summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
Commit message (Collapse)AuthorAgeFilesLines
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-062-2/+2
|
* Add support for the 5721 which seems to be similar to the 5750/5751.ps2004-12-172-0/+3
| | | | Tested by: Vivek Khera vivek at khera dot org
* Don't force busdma to pre-allocate bounce pages for the parent tag.scottl2004-11-211-2/+2
|
* Hide link up/down/media printfs behind bootverbosephk2004-11-081-5/+7
|
* With ALTQ, it is possible that although the queue was not empty when wedes2004-10-301-0/+7
| | | | | | entered the interface start function, no packets were actually dequeued. Therefore, keep a count of how many packets we really added onto the tx chain, and initiate a transmit only if the count is non-zero.
* Add altq(4) support.des2004-10-301-8/+10
|
* Whitespace cleanup.des2004-10-302-55/+55
|
* Use and alignment of 1 instead of ETHER_ALIGN for rx and tx buffers and jumboscottl2004-10-191-2/+2
| | | | | | | frames. BGE hardware with the rx alignment bug will still be handled by the calls to m_adj() that already exist. m_adj() is probably better suited for this task anyways. Just as with if_em, this saves a malloc + several locks per packet and prevents unneeded data copying within busdma.
* Fix the statements for checking if we're dealing with a 5705/5750.ps2004-09-251-20/+20
| | | | Pointhat to: me
* Add support for the BCM5750/5751. Unfortunately the documentationps2004-09-242-38/+132
| | | | | | | | I have from Broadcom does not give much information on these devices, so the Broadcom Linux driver was used for clues to what these chips support. It turns out they are similar to the 5705 with the 5751 being the PCI-Express version and needing special work-arounds and settings.
* Commit patch to supress spurious link change events. Apparently, withwpaul2004-09-171-2/+11
| | | | | | | | | | | | | | | | | | | | | | | copper NICs, a link change event is posted whenever MII autopolling is toggled off and on, which happens whenever someone calls bge_miibus_readreg() or bge_miibus_writereg() to access the PHY registers. This means anytime someone called the SIOCGIFMEDIA ioctl on a bge interface, the link would reset. Even a simple "ifconfig bge0" would do it, though other apps like dhclient or the PPPoE daemon could trigger it as well. An obvious symptom of this problem is lots of "bgeX: gigabit link up" messages appearing on the console for no apparent reason. Through experimentation, I determined that when a real link change event occurs, the BGE_MIMODE_AUTOPOLL in the BGE_MI_MODE register is always set, so now if we have a copper NIC and an link change event occurs and the BGE_MIMODE_AUTOPOLL bit is clear, we ignore the event. Note that this does not apply to the original BCM5700 chip since we use a different method for sensing link changes with that chip (the status block method was broken), nor to fiber optic NICs since they don't use the GMII PHY access registers.
* Bring the advertised interface capabilities into line with the realityyar2004-07-241-6/+14
| | | | | | | | | | | (in particular, bge(4) hasn't supported rxcsum since if_bge.c#1.5) Clean up some aspects of capabilities usage, i.e. stop using if_hwassist to see whether we are doing offload now because if_hwassist is for TCP/IP layer and it is subordinate to if_capenable. Thanks to: Aled Morris for donating a nice bge(4) NIC to me Reviewed by: -net, -hackers (silence)
* Add some special case code to fix a problem with the BCM5704 in TBI (fiber)wpaul2004-06-092-0/+71
| | | | | | | | | | | mode. The 5704 apparently has some s00p3r s33kr1t registers for setting the advertisement of pause frame ability (i.e flow control) when in autoneg mode. If we don't set these registers correctly, we may not be able to negotiate a proper link with some switches. (Symptom is that the NIC reports the link as up (PCS synched) but no traffic can be exchanged.) PR: kern/67598
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-23/+2
|
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Add support for BCM5705Kps2004-05-242-0/+3
| | | | | Submitted by: candy@kgc.co.jp PR: kern/67110
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Enable the memory arbiter before turning off the PXE restart. Thisps2004-04-061-4/+4
| | | | | | | prevents NMI's from happening when resetting the chip on some hardware I have seen. Mis-behaving box made available by: John Cagle <john.cagle@hp.com>
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-3/+3
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-6/+0
|
* Fix typo in a commentbrueffer2004-01-131-1/+1
|
* Add the PCI ID for yet another bge chip: the Altima 1002.wpaul2004-01-082-0/+3
| | | | Submitted by: Pavel Gubin <pg@rainbow.ie.tusur.ru>
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-5/+5
| | | | Requested by: bde,imp
* Remove duplicate FBSDID's, move others to their right place.obrien2003-11-141-3/+0
|
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-4/+6
| | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument).
* o add lockingsam2003-11-112-61/+115
| | | | | | o mark isr MPSAFE Supported by: FreeBSD Foundation
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+1
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Add support for the Broadcom BCM5788 (just another entry to the PCIwpaul2003-10-312-0/+3
| | | | | | device ID list, probably a 5705 ASIC). Submitted by: Marcel Prisi <marcel@virtua.ch>
* By not setting No_CRC in the Mode Control Register, we must alsops2003-09-231-1/+1
| | | | | | reduce the size of the packet by 4 bytes to remove the ethernet crc. Submitted by: jdp
* From the Broadcom Eratta:ps2003-09-231-2/+1
| | | | | Setting the No_CRC bit Can Cause Data Write Errors on BCM5701/03/04 The resolution is to not set the No_CRC bit in the Mode Control Register.
* Use __FBSDID().obrien2003-08-241-0/+3
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* On Dell boxes such as the PE2650 we need to disable 3 led mode for theambrisko2003-08-202-0/+9
| | | | | | | link LED to work. Reviewed by: wpaul Obtained from: Linux driver
* Fix a typo. BGE_HCC_TX_MAX_COAL_BDS_INT is at offset 0x3C24, not 0x3C34ps2003-08-171-1/+1
|
* Add support for the Broadcom BCM5901 and BCM5901 rev A2 chips.wpaul2003-08-122-0/+6
| | | | | | | | These are 10/100 only NICs found on the IBM Thinkpad R40E and G40. These seem to be based on the BCM5705 MAC but with a PHY that doesn't support 1000Mbps modes. Submitted by: Igor Sviridov <sia@nest.org>
* The BCM5704 ASIC has a smaller mbuf space than the 5700/1/2/3. Failurewpaul2003-08-101-2/+10
| | | | | | to configure this correctly yields many watchdog timeouts even on lightly loaded machines. This is a common complaint from users with Dell 1750 servers with built-in dual 5704 NICs.
* Silence unwanted 'gigabit link up' messages: do not treat thewpaul2003-08-101-1/+2
| | | | | | | | BGE_MACSTAT_MI_COMPLETE bit in the MAC status register as a link change indicator. We turn this bit on now because some of the newer chips need it, but it usually just means that reading/writing an MII/GMII register has completed, not that a link change has occured.
* Set the BGE_RX_MTU register correctly so that we can receive slightlywpaul2003-08-041-1/+1
| | | | | | | | | | | | larger than normal frames, to account for the case where a bge(4) NIC is used with VLANs. Since we set the IFCAP_VLAN_MTU flag, we must allow reception of frames up to 1522 bytes in size rather than 1518. Note that it is possible to work around this bug by doing: # ifconfig bge0 mtu 1504 prior to configuring any VLAN interfaces.
* Remove alpha vtophys() hack from if_bgereg.h and clean up unneededwpaul2003-07-252-7/+0
| | | | | #includes formerly required to pull in vtophys support, since we don't need them anymore.
* Convert bge(4) to use busdma. I have not tested this on anythingwpaul2003-07-252-127/+856
| | | | | besides x86 yet since I don't have access to a non-x86 FreeBSD box at the moment. Volunteers welcome.
* Add support for the BCM5705 and its ilk. Changes:wpaul2003-07-162-111/+298
| | | | | | | | | | | | | | | | | | | - 5705 doesn't support jumbo frames - Statistics must be read from registers - RX return ring must be capped at 512 entries - Omit initialization of certain device blocks - Acknowledge link change interrupts by setting the 'link changed' bit in the status register (used to have no effect) - Remember to toggle the MI completion bit too - Set the mbuf low watermark differently (on-chip memory buffers, not BSD mbufs) - Don't enable Ethernet@WireSpeed feature for certain 5705 chip revs - Add additional PCI IDs for 5705 and 5782 parts - Add a forgotten 5704 PCI ID Most changes ripped kicking and screaming from the Broadcom linux driver. Thanks to Paul Saab for sanity testing. (My lack of sanity has been confirmed.)
* Squelch spurious "gigabit link up" messages generated on some fiber NICswpaul2003-07-111-4/+19
| | | | | | | | | | | | | | | | | | | | (mainly the 3Com 3c996B/BCM5701). For some reason that I don't fully understand, the 5701 signals PCS encoding errors as though they were link change events, i.e. the 'link state changed' bit in the status word of the status block is updated and an interrupt is generated. This would cause the bge_tick() function to be invoked and a "gigabit link up" message to be printed on the console. To avoid this, the interrupt handler now checks the MAC status register when a link change interrupt is triggered, and it will only call the bge_tick() function if the 'PCS encoding error detected' bit is clear. (This change should have no effect on copper NICs since this bit can only ever be set in TBI mode. I do not know how it affects 5704 NICs with a BCM8002 SERDES PHY.) Special thanks to: Sherry Rogers at UCB for allowing me access to one of their traffic monitor boxes so I could diagnose this problem.
* Remove unused variable(s).phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* - Make this work with PAE.ps2003-05-212-18/+20
| | | | | | | | - atomically load and clear the status block so we dont miss an update. Submitted by: jdp Approved by: re (scottl)
* - Change the full Asic revision defines to CHIPID to better since theps2003-05-072-41/+49
| | | | | | | | | | | | | | | ASIC revision is really the major number of the CHIPID. Also store the chipid, asic rev and chip revision in the softc for later use. - The write twice to send producer index workaround only applies to the 5700_BX chips, so only do it there. Requested by: jdp - Do not initalize the LED's to 0x00. The default configuration the chip comes up in should yeild proper operation of the LED's. Confirmed by: John Cagle <john.cagle@hp.com> Approved by: re (blanket)
* Implement the write twice to send producer index workaround forps2003-05-041-0/+11
| | | | | | BCM5700 chips as described in the Broadcom Errata documents. Obtained from: NetBSD and Broadcom Errata documentation
* - Change the short hand representation of the various ASIC revisionsps2003-05-032-11/+47
| | | | | | - Implement the ONEDMA_AT_ONCE workaround as described in the 5703/5704 eratta documents. Obtained from: NetBSD & Broadcom documentation
* - Move bge_phy_hack into the phy code and implement the various DSPps2003-05-031-50/+37
| | | | | | | | | | | | | | | | | | | | | | | | | patch workarounds for each phy revision. Obtained from: NetBSD & Broadcom Linux driver - Disable AUTOPOLL when accessing the PHY as it may cause PCI errors. Obtained from: NetBSD - Check the UPDATED bit in the status block so the driver knows that the status block as indeed changed since the last access. Broadcom documentation states drivers should unset the UPDATED/CHANGED bits after reading them. - When changing media types, first loop the phy then set the media. Broadcom documentation and Linux drivers do this and I observed much better handling of link after this change. - Broadcom documentation states that for 1000BaseT operation, autonegotiation must be enabled. Fix hard coding of media so that the driver only advertises 1000BaseT as the supported media type and enable autonegotition. - Only set Master/Slave on the 5701. Obtained from Broadcom Linux driver.
* Add untested support for the Broadcom 5704.ps2003-05-022-0/+10
| | | | Obtained from: NetBSD
* Update the mbuf watermark settings to match the latest documentationps2003-04-261-3/+3
| | | | | | from Broadcom. These values are strongly encouraged for proper operation. MFC after: 3 days
OpenPOWER on IntegriCloud