summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bge.c
AgeCommit message (Collapse)Author
2008-07-16Enable the read DMA engine's PCI read request burst length long burstBrad Smith
mode (4KB) for PCIe chips. This resolves the poor TX performance for the PCIe chips. The result being a bit under double the TX performance on a Gig connection (roughly 495 Mb/s -> 940 Mb/s). Tested by reyk@, sthen@, brad@ and a few end users.
2008-06-07Add baudrate handling for fiber boards using the TBI interface.Brad Smith
ok deraadt@
2008-05-24And another Fujitsu Gigabit Etherenet card that is a bge(4) in disguise.Brad Smith
2008-05-23Another Fujitsu Gigabit Etherenet card that is a bge(4) in disguise.Mark Kettenis
2008-05-23Simplify the combination use of pci_mapreg_type()/pci_mapreg_map() asBrad Smith
suggested by dlg@ awhile ago. ok dlg@
2008-05-21Fujitsu PRIMEPOWER250/450 secondary LAN is a BCM5703C in disguise.Mark Kettenis
2008-05-14Add the Altima AC1003 PCI id.Brad Smith
ok dlg@
2008-05-12Call mii_pollstat() instead of bge_tick() in bge_link_upd() so that linkBrad Smith
state transitions are noticed and the appropriate routing socket messages are generated. ok kettenis@ krw@
2008-05-11Remove special casing of the BCM5700 B2 chipset so that this revision alsoBrad Smith
uses MII interrupts to detect link state transitions as is done for all of the other BCM5700 revisions, without this change link state transitions are not being detected at all. ok kettenis@
2008-05-11Revert the last commit as this is not the proper way of fixing the issue.Brad Smith
ok krw@
2008-05-09Attempt to fix link status change handling so that the proper RTM_IFINFOKenneth R Westerback
messages are generated when links go down or come up. Works on available devices, put in tree to encourage wide testing. Enables latest dhclient changes to work their magic on bge. Feedback from brad@ ok deraadt@ beck@ reyk@
2008-04-20rev 1.35 added special register settings for BCM5704 chipsets whenBrad Smith
in TBI mode for fiber adapters which causes problems for some systems. Add code to detect when the special settings are necessary which helps with some blade systems. From FreeBSD ok dlg@
2008-04-20Add a workaround for a CRC bug errata with BCM5701 A0 and B0 chipsetBrad Smith
revisions. From Linux via FreeBSD. ok dlg@
2008-04-03Clean up the DMA read/write control register setup code and add someBrad Smith
comments. Tested by a number of users with a variety of chipsets. From FreeBSD ok kettenis@
2008-03-21Pass the MIIF_HAVEFIBER flag along to mii_attach() for MII based fiberBrad Smith
adapters. Tested by brad@ and johan@ to ensure flow control is still working for copper adapters.
2008-02-20When collecting the hardware statistics add the interfaces input errorsBrad Smith
counter and out of receive buffer descriptors counter to the network stacks input errors counter. Based on a diff from mickey@ though updated for -current and added support for BCM5705 or newer chipsets from brad@. Tested it with BCM5704 on i386/amd64, BCM5700 on sparc64, BCM5701/BCM5751M on i386 and BCM5721/BCM5780 on amd64. ok krw@ sthen@ dlg@
2008-02-20when bge has link, use autopolling for link status, not direct mii polls.Stuart Henderson
fixes input errors on BCM5701/5702X/5704 and may avoid firmware hangs on some cards if asf/ipmi support is added. original diff from Oleg Bulyzhin in a freebsd-net post and ported by mickey; included stats counter changes which don't apply to -current so they are split out and not included here. "The rest of the diff looks ok" brad. tested on 5701/5702X/5703X/5704C/5721 by mpf naddy okan beck sthen ok beck (before splitting out stats changes), krw, henning. closes kernel/5699
2008-02-18Add initial bits for fiber support with the BCM5714/BCM5715/BCM5780 chipsets.Brad Smith
Tested by brad@, chl@, sthen@, Johan Mson Lindman and Ian Lindsay <iml04@hampshire.edu> ok dlg@
2008-02-17- Correct clearing of the IFF_OACTIVE flag by ensuring the flag isBrad Smith
only cleared if there is enough slack space since bge_encap() will return anyway and IFF_OACTIVE will be set again. - Only reset the watchdog timer when all packets have been processed. - Have bge_start() do a fast return if the adapter is not running or the IFF_OACTIVE flag is set. Tested by brad@, chl@, krw@, landry@, sthen@ and Johan Mson Lindman. ok dlg@
2008-02-02- Simplify statistics updates and remove redundant register reads.Brad Smith
- Add discarded RX packets to input errors for the BCM5705 or newer chipsets. Unfortunately output errors cannot be added because the equivalent to the ifOutDiscards register does not exist. - Replace misleading and wrong BGE_RX_STATS/BGE_TX_STATS with BGE_MAC_STATS. They were reversed but just happened to work. From FreeBSD Tested by chl@, landy@, sthen@, krw@, okan@ and brad@ ok dlg@
2008-01-31recognize the BCM5755 C0 ASIC revision.Brad Smith
tested by Rodolfo Gouveia and marco@ ok kettenis@ marco@ dlg@
2007-11-17Rename fiber TBI flag from BGE_TBI to BGE_PHY_FIBER_TBI. No functional change.Brad Smith
ok dlg@
2007-10-13Add support for BCM5906.Mark Kettenis
ok deraadt@
2007-10-09Use %zu for printing size_t values.Ray Lai
OK dlg.
2007-06-21rework how the IFF_PROMISC and IFF_ALLMULTI flags are dealt with, and howDavid Gwynne
the multicast filter is programmed. IFF_ALLMULTI is for use by the driver and only the driver, meaning that we have to clear it when its not needed anymore. now that the ethernet layer counts the number of multicast address ranges we can check that early to determine if ALLMULTI is needed, rather than doing the stupid goto allmulti dance as we iterate over the multicast address list. the imperfect multicast filter is a 16 byte wide bitfield, so we can use the "setbit" macro to build it in memory, and then write it to the hardware as a bus_space region. this simplifies the code a lot and avoids confusing bitshifts on u_int32_ts to get the bits in the right place. tested by krw on amd64, naddy on alpha, deraadt on sparc64, and beck on various bits. ok beck
2007-05-03The ring replenish threshold change needed to work around a hardwareTom Cosgrove
problem also appears to be required on the BCM5754/5787 in the Dell PowerEdge SC440 and OptiPlex GX745. dlg identified the problem and came up with the fix. Tested by dlg@, ckuethe@, reyk@; thanks. ok dlg@ beck@ reyk@
2007-05-02the 5754 and 5787 share the same ASIC ID, make the crazy strings list bothDavid Gwynne
so its obvious to people working on the code
2007-05-02do { } while (0) for the debug macrosDavid Gwynne
2007-04-03On sparc64, prefer the local-mac-address provided by the PROM. Makes sure theMark Kettenis
MAC address on the builtin ports of the Sun Fire V215 match what is used by the PROM. ok deraadt@
2007-03-19Fix some code relative to chips that don't currently work (BCM5722 &Kenneth R Westerback
BCM5756). They still don't work but when they do they won't use an inappropriate Jitter bug workaround. No effect on other chips. From Michael Chan of Broadcom, via Linux tg3 via Brad. ok reyk@
2007-02-16bge_newbuf_std() should return ENOBUFS on failure, as that's whatKenneth R Westerback
callers check for. One return accidentally changed to ENOMEM when r1.133 reverted r1.85. Nuke superfluous blank line. From brad@, tested by myself and Johan M:son Lindman.
2007-02-10Add more chipset revision ids.Kenneth R Westerback
From scottl via FreeBSD and brad@.
2007-01-30Rough in more support for 5787/5755 chips so far known to not work orKenneth R Westerback
unreported in the wild. In this case add a PHY workaround for an eventual mobile version of the chipset. No change to existing functionality. From Michael Chan (mchan@broadcom), via Linux tg3 and brad.
2007-01-19Workarounds for DMA HW errata on pci express chips. Based on FreeBSDKenneth R Westerback
changes but with the more conservative (i.e. specific) chip matching logic of Linux's tg3. No change except to pci express chips. From Brad. Tested by brad & thib@ (BCM5750) and pedro la peu (BCM5752).
2007-01-10Flow control support for bge(4)/brgphy(4). From brad@ based on code fromMark Kettenis
NetBSD.
2006-12-22Remove never used code for a BCM5700 feature (BGE_EXTRAM) that didn'tKenneth R Westerback
survive past 1st gen silicon. From brad. Tested by wilfried@ and Johan Mason Lindman.
2006-12-17Add/modify some comments. From Brad.Kenneth R Westerback
2006-12-08Add the Broadcom BCM5787F PCI id.Gordon Willem Klok
Add D-Link DGE-560SX and another Marvell Yukon (unknown model) PCI ids. From the Linux sky2 driver via brad@
2006-12-04report full/half duplex state for non-MII interfacesReyk Floeter
ok brad@
2006-11-26revert the Jumbo diff that was commited as part of a wireles drivers commit.Brad Smith
2006-11-26do not have each net80211 driver define its own rates structures. if they useTheo de Raadt
the standard rates, use some defined by net80211 itself. kernel shrinks a bit ok jsg mglocker
2006-11-20set the IFCAP_VLAN_HWTAGGING capabilities flag.Brad Smith
2006-10-28M_TRAILINGSPACE(m) returns 0 if M_READONLY(m) is true,Brad Smith
so no need to call both. From tsutsui@NetBSD
2006-10-26Fix this by commiting the proper revision of the bge_encap() diff.Brad Smith
2006-10-26bge_encap():Brad Smith
- Move TX ring full sanity check further up and check the number of DMA segments from the DMA map, instead of counting the DMA segments in the for loop and breaking out later. - Unload the DMA map if encountering an error condition. Tested by brad@ sturm@ wilfried@
2006-10-25replace a few more instances of hand rolled code with theBrad Smith
LIST_FOREACH macro.
2006-10-22recognize the BCM5715 A3 chipset.Brad Smith
2006-10-17disable the firmware fastboot feature on 5752/5755 and 5787 ASICs,Brad Smith
eliminates firmware timeouts. Tested by pedro la peu <pedro at am-gen dot org> with a 5752 ASIC and Benjamin Black <ben at layer8 dot net> with a 5787 ASIC.
2006-10-15recognize the BCM5787 A2 chipset.Brad Smith
2006-10-10revert the firmware synchronization change in rev 1.178, this is the causeBrad Smith
of the first port of a dual port MAC to not work.