summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
Commit message (Collapse)AuthorAgeFilesLines
* 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
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-9/+0
| | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+3
| | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
* Use __FBSDID rather than rcsid[].obrien2003-04-031-13/+4
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-3/+3
| | | | Approved by: trb
* Obtain the media type from the shared memory and only use the eepromps2003-02-052-7/+17
| | | | as a fallback.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-3/+3
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Remove miidevs.h and generate it from miidevs at compile time.obrien2003-01-191-1/+1
| | | | The devlist2h.awk tool to do this has been repocopied to sys/tools/.
* Put the ASIC revision into the device description string so it appearsjdp2003-01-071-1/+10
| | | | | | in the dmesg output. MFC after: 3 days
* Don't reference the maxlen and flags fields in the ring control blocksjdp2003-01-062-57/+45
| | | | | | | | | | | | | | | | | as separate 16-bit entities. Some of the ring control blocks are in NIC memory, so they must be referenced using 32-bit accesses. Smaller accesses have been observed to fail under some conditions. This caused the rings to be set up wrong, leading to writes by the card outside of the intended bounds of the rings. This problem was diagnosed by Michael Barthelow. Don Bowman submitted a patch which fixed the problem using a slightly different approach. Reference ring control blocks in NIC memory using a pointer to volatile. Parenthesize the BGE_HOSTADDR macro definition properly. MFC after: 3 days
* network interface driver changes:sam2002-11-142-40/+15
| | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re
* Fix instances of macros with improperly parenthasized arguments.alfred2002-11-091-4/+4
| | | | Verified by: md5
* Fix the code so that it no longer on alpha refers to the now nonexistentmjacob2002-10-111-17/+1
| | | | | | | | | | pci_cvt_to_bwx. This doesn't necessarily make bge(4) now actually *work* on an alpha. It loads, configures, and then about 30 seconds later, my XP1000 hard freezes. But, hey, it's a start. Obtained from: gallatin@freebsd.org
* Fix a typo in BGE_BIGENDIAN_INIT.jake2002-10-011-2/+2
|
* Add support for the BCM5702x chips.iwasaki2002-09-282-0/+3
| | | | | Reviewed by: jdp MFC after: 1 week
* Fix a couple of longstanding typos which would have made ajdp2002-09-221-1/+2
| | | | | | | | statement fail to compile if it weren't inside "#ifdef __brokenalpha__". Submitted by: Birger Toedtmann <birger@takatukaland.de> MFC after: 2 weeks
* Follow the lead of recent changes in the 3com Linux driver byjdp2002-09-221-46/+3
| | | | | | | | | disabling memory write invalidate unconditionally. It looks like they've decided that MWI just doesn't work with these devices. Also, remove now-irrelevant code that set PCI write boundary values based on the cache line size. MFC after: 2 weeks
* Set up the BCM570x chip's DMA Read/Write Control register morejdp2002-09-221-2/+10
| | | | | | | correctly. This fixes the "watchdog timeout -- resetting" errors seen on Dell 2650 systems. MFC after: 1 month
* Add support for the BCM5703x chips. I do not have one of thesejdp2002-09-082-3/+23
| | | | | | | | cards to test; however the submitter reports that this patch works with the on-board interface on the IBM x235 server. Submitted by: Jung-uk Kim <jkim@niksun.com> MFC after: 1 month
* Recognize the Altima AC9100 chip, which is used in current versionsjdp2002-07-262-0/+3
| | | | | | | | | | of the Netgear GA302-T. I changed the symbolic names in the submitter's patch to reflect the part number of the chip instead of the board. PR: kern/38988 Submitted by: Brad Chapman <chapmanb@arches.uga.edu> MFC after: 2 days
* Disable hardware checksum offloading of IP fragments in the bgejdp2002-07-041-1/+1
| | | | | | | | | | driver. I tried a few obvious experiments, but was unable to make the 3c996B-T generate correct UDP checksums for transmitted fragmented packets. I'm not so sure the device is even capable of it. This fixes NFS over UDP. MFC after: 1 day
* catch up with ext_free prototype change.alfred2002-06-291-2/+2
|
* Add missing splx().mp2002-06-241-1/+3
| | | | MFC after: 3 days
* Work around what appears to be a chip bug in the BCM5701 that showsjdp2002-06-242-2/+37
| | | | | | | | | | | | | | up when operating in PCI-X mode. For some received packets there is data corruption in the first few bytes in that case. Aligning the packet buffer eliminates the corruption. With this fix, the code that offsets the packet buffer up by 2 bytes to align the payload is disabled for BCM5701s operating in PCI-X mode. On the i386, which permits unaligned accesses, the payload is left unaligned. On other platforms, the packet is copied after reception to force alignment of the payload. Obviously, this work-around reduces performance in those cases (BCM5701 plus PCI-X) where it is in effect. MFC after: 3 days
* Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/phk2002-04-281-2/+2
|
* Add missing splx calls in bge_tick. These don't make any functionaljdp2002-04-221-1/+4
| | | | | | | difference in -current, but they are important for -stable where they are missing too. MFC after: 1 day
* Try to sort out the correct way to generate async link state changewpaul2002-04-042-15/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | interrupts. This is a bit harder than it needs to be because there's more than one way to generate link attentions, at least one of which does not work on the BCM5700, but does on the 5701. For the 5701, we can safely use the 'link changed' bit in the status block, and we enable link change attentions in the mac event register. For the 5700, we have to use MII interrupts, which require checking the MAC status register rather than the status block. This requires doing an extra register access on each interrupt which I'd prefer to avoid, but them's the breaks. Testing with both a 3c996-T and 3c996B-T shows that we do in fact detect the link going up and down properly on cable insertions/disconnections. Also, avoid twiddling the autopoll enable bit in the MI mode register when doing a PHY read. I think this coupled with the other changes will stop the interrupt storms Paul Saab has been harassing me about. Manually setting the link to 100baseTX full duplex seems to work ok for me. (I'm typing over the 3c996B-T right now.) Lastly, teach the driver how to recognize a 3c996B-SX by checking the hardware config word in the EEPROM in order to detect the media. We attach 5701 fiber cards correctly now, but I haven't verified that they send/receive packets yet since I don't have a second fiber interface at home. (I know that fiber 5700 cards work, so I'm keeping my fingers crossed.)
* Teach the bge driver about the BCM5701 (specifically, the 3Comwpaul2002-03-222-4/+20
| | | | | | | | 3c996B-T, with the 5701 rev B5 ASIC). One thing that confuses me still is that the 'link state change' bit in the status block seems to change state an awful lot. I have a workaround for this in place now, but it needs more investigation. For the moment though, this is enough to get the driver to work with this card.
* Remove __P.alfred2002-03-201-58/+56
|
* Remove mbuf exhaustion warning messages; these are handled by thesilby2002-02-111-6/+0
| | | | | | mbuf system in a rate-limited fashion now. MFC: Already performed due to sloppiness.
* Add support for the Netgear GA302T 10/100/1000 adapter. Given thatjdp2002-01-272-0/+8
| | | | | | it's a 32-bit card, it's quite nice for $75. MFC after: 3 days
* Fix warnings: the bge_bpd_read*() functions are not used (#ifdef notdef)peter2001-12-181-0/+4
|
* Disabled input hardware checksum due to it being calculated incorrecteddg2001-12-141-0/+2
| | | | | | | | for some packets, in particular small (0 byte payload) packets. May also be related to TCP options. Approved by: wpaul MFC after: 3 days
* Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from thebrooks2001-12-031-1/+1
| | | | | | mbuf instead. Suggested by: fenner
* Do not call mii_polltick() immediately after mii_tick().jlemon2001-09-291-12/+9
| | | | Poiinted out by: wpaul
OpenPOWER on IntegriCloud