350891 |
12-Aug-2019 |
avg |
MFC r350025: bge: check that the bus is a pci bus before using it as such |
337985 |
17-Aug-2018 |
eugen |
MFC r336461: bge(4): disable MSI for BGE_ASICREV_BCM5784/BGE_CHIPREV_5784_AX found in some MacBook Pro.
PR: 229727 Reported by: Stephan Neuhaus <sten@artdecode.de> and others Tested by: Stephan Neuhaus <sten@artdecode.de> Approved by: mav (mentor) |
331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
301103 |
01-Jun-2016 |
sephe |
bge: Force chipid to 5720 A0 for 5717 C0 in an early place
Discussed with: yongari MFC after: 1 week Sponsored by: Microsoft OSTC
|
300985 |
30-May-2016 |
sephe |
bge: Support 5717 C0, which is almost same as 5720 A0
PR: 209758 Obtained from: DragonFlyBSD d79f5d8f5fe94cd6769207b2901422977d502bc0 MFC after: 1 week
|
279786 |
08-Mar-2015 |
pfg |
bge(4): Small memory leak
CID: 1229985 Reviewed by: marcel Differential Review: https://reviews.freebsd.org/D2024
|
276750 |
06-Jan-2015 |
rwatson |
In order to reduce use of M_EXT outside of the mbuf allocator and socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value.
With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations.
NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature.
Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division
|
276299 |
27-Dec-2014 |
marius |
- Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4).
MFC after: 3 days
|
272257 |
28-Sep-2014 |
glebius |
- Remove empty wrappers ether_poll_[de]register_drv(). [1] - Move polling(9) declarations out of ifq.h back to if_var.h they are absolutely unrelated to queues.
Submitted by: Mikhail <mp lenta.ru> [1]
|
271782 |
18-Sep-2014 |
glebius |
- Use if_inc_counter() to increment various counters. - Do not ever set a counter to a value. For those counters that we don't increment, but return directly from hardware create cases in if_get_counter() method.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
270876 |
31-Aug-2014 |
glebius |
It is actually possible to have if_t a typedef to non-void type, and keep both converted to drvapi and non-converted drivers compilable.
o Make if_t typedef to struct ifnet *. o Remove shim functions.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
268833 |
18-Jul-2014 |
peter |
Fix an apparent conversion error in bge to the new driver api. if_multiaddr_array() does the LLADDR work, don't do it twice.
This broke IPv6 in "interesting" ways in the FreeBSD.org cluster.
|
268176 |
02-Jul-2014 |
pluknet |
Fixed build with DEVICE_POLLING.
|
268165 |
02-Jul-2014 |
marcel |
Fix off-by-one introduced by the conversion to the driver API.
Submitted by: Sreekanth Rupavatharam <rupavath@juniper.net> Obtained from: Juniper Networks, Inc.
|
268113 |
01-Jul-2014 |
marcel |
Convert bge(4) to use the driver API.
Submitted by: Sreekanth Rupavatharam <rupavath@juniper.net> Obtained from: Juniper Networks, Inc.
|
267992 |
28-Jun-2014 |
hselasky |
Pull in r267961 and r267973 again. Fix for issues reported will follow.
|
267985 |
27-Jun-2014 |
gjb |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
|
267961 |
27-Jun-2014 |
hselasky |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
|
267363 |
11-Jun-2014 |
jhb |
Fix various NIC drivers to properly cleanup static DMA resources. In particular, don't check the value of the bus_dma map against NULL to determine if either bus_dmamem_alloc() or bus_dmamap_load() succeeded. Instead, assume that bus_dmamap_load() succeeeded (and thus that bus_dmamap_unload() should be called) if the bus address for a resource is non-zero, and assume that bus_dmamem_alloc() succeeded (and thus that bus_dmamem_free() should be called) if the virtual address for a resource is not NULL.
In many cases these bugs could result in leaks when a driver was detached.
Reviewed by: yongari MFC after: 2 weeks
|
263957 |
31-Mar-2014 |
yongari |
Increase the number of TX DMA segments from 32 to 35. It turned out 32 is not enough to support a full sized TSO packet. While I'm here fix a long standing bug introduced in r169632 in bce(4) where it didn't include L2 header length of TSO packet in the maximum DMA segment size calculation.
In collaboration with: rmacklem MFC after: 2 weeks
|
260045 |
29-Dec-2013 |
marius |
- Simplify MSI allocation and release. For a single one, we don't need to fiddle with the MSI count and pci_release_msi(9) is smart enough to just do nothing in case of INTx. - Don't allocate MSI as RF_SHAREABLE.
MFC after: 1 week
|
258830 |
02-Dec-2013 |
yongari |
Add support for BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787. Submitted by: jhb PR: 184304
|
257176 |
26-Oct-2013 |
glebius |
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
254118 |
09-Aug-2013 |
yongari |
Fix for IPv4 fragment packets treated as RMCP.
bit25 of rxMode MAC register of 5762 needs to be set for rx mgmt filter to work correctly when processing match for UDP header fields. Otherwise false positive can occur which causes IPv4 fragment to be received by APE instead of host.
Reported by: Geans Pin <geanspin@broadcom.com>
|
253540 |
22-Jul-2013 |
yongari |
5725 family of devices corrupts TSO packets when TSO DMA buffers cross into regions which are within MSS bytes of a 4GB boundary. If we encounter the condition, drop the packet.
Reviewed by: Geans Pin geanspin@Broacom
|
253483 |
20-Jul-2013 |
yongari |
Add support for upcoming BCM5725 (ASIC 5762) controller. This is a new 1Gb server controller chip that will be going into production soon. BCM5725 combines MAC with triple-speed PHY, a Network Controller Sideband Interface (NC-SI) and on-chip memory buffer in a single device. BCM5725 has an Application Processing Engine (APE) that is capable of on-chip management and offloading features. BCM5725 supports high-precision clock, time stamp registers for receive/transmit packets and programmable trigger inputs and watchdog timeouts. These new features are not yet supported by bge(4). Many thanks to Broadcom for continuing to support FreeBSD!
Submitted by: Geans Pin geanspin@Broacom (initial version) Reviewed by: Geans Pin geanspin@Broacom H/W donated by: Broadcom
|
253480 |
20-Jul-2013 |
yongari |
Setup the PCIE Fast Training Sequence (FTS) value to prevent transmit hangs for 57766 and non Ax versions of 57765. While here, correct definition of BGE_CHIPREV_57765_AX.
|
253408 |
17-Jul-2013 |
yongari |
Implement workaround for BCM5719/BCM5720 TX hang. The read DMA request logic operation is based on having sufficient available space in the transmit data buffer (TXMBUF) before a read DMA can be requested. There are four read DMA channels that use the TXMBUF, and the logic checks if the available free space in the TXMBUF is large enough for all the data in the four Send Buffers for which buffer descriptors have been fetched. The Enable_Request signal is asserted only if the free TXMBUF space is larger than the sum of the four DMA length registers. The power-up default value of BGE_RDMA_LSO_CRPTEN_CTRL register bit 25 (bit 21 on BCM5720) is zero, which selects the DMA length registers to connect to the input of the adder block. The DMA length registers are asynchronously reset following BCM5719/BCM5720 power-up, and due to the lack of synchronous deassertion of the length registers reset signal these resisters may contain uninitialized values following the reset deassertion. In the case of the failure the uninitialized DMA length register values added up to more than the TXMBUF size, which prevented the assertion of the Enable_Request signal and any subsequent read DMA to start. This lockup condition is the root cause of failing to generate any transmit traffic.
To workaround the issue, select alternate output of multiplexers and transmit the first four Ethernet frames. This overwrites the DMA length registers with valid values.
Reported by: Geans Pin <geanspin@broadcom.com> Reviewed by: Geans Pin <geanspin@broadcom.com>
|
252404 |
30-Jun-2013 |
yongari |
Fix triggering false watchdog timeout as done in bce(4) when controller is in PAUSE state.
|
252227 |
26-Jun-2013 |
yongari |
Don't blidly clear GPIOs configuration. Just use firmware configured one. This change also fixes non-working traffic LED on BCM57780.
Submitted by: Masanobu SAITOH <msaitoh@NetBSD.org> Tested by: Alexander Milanov <a@amilanov.com>
|
251733 |
14-Jun-2013 |
yongari |
Fix a typo introduced in r213280. IFM_OPTIONS macro should see current media word.
|
251482 |
07-Jun-2013 |
yongari |
Correct setting TX random backoff register. This register is implemented as a 10 bits linear feedback shift register so only lower 10 bits are valid. Because this register is used to initialize random backoff interval register only when resolved duplex is half-duplex, it wouldn't have caused issues in these days.
Submitted by: Masanobu SAITOH <msaitoh@NetBSD.org>
|
251481 |
07-Jun-2013 |
yongari |
Do not report current link status if driver is not running. Reporting link status in driver has a side-effect that makes mii(4) check current link status. mii(4) will call link status change callback when it sees link state change. Normally this wouldn't have problems. However, ASF/IPMI firmware can actively access PHY regardless of driver's running state such that reporting link status for not-running interface can generate meaningless link UP/DOWN messages.
This change also makes dhclient think driver got a valid link regardless of link establishment so it will bypass dhclient's initial link status check. I think that wouldn't be issue though.
Tested by: Daniel Braniss <danny@cs.huji.ac.il>
|
248993 |
02-Apr-2013 |
yongari |
Fix a typo.
Reported by: David Imhoff via brad@OpenBSD Tested by: hrs Reviewed by: davidch
|
248226 |
13-Mar-2013 |
yongari |
r241438 broke IPMI access on Sun Fire X2200 M2(BCM5715). Fix the IPMI regression by sending BGE_FW_DRV_STATE_UNLOAD to ASF/IPMI firmware in driver attach phase. Sending heartheat to ASF/IPMI is enabled only after upping interface so setting driver state to BGE_FW_DRV_STATE_START in attach phase broke IPMI access. While I'm here, add NVRAM arbitration lock before performing controller reset. ASF/IPMI firmware may be able to access the NVRAM while controller reset is in progress. Without the arbitration lock before resetting the controller, ASF/IPMI may not initialize properly.
Special thanks to Miroslav Lachman who provided full remote debugging environments.
|
245931 |
26-Jan-2013 |
marius |
Mention NetLink controllers in the fallback description, too.
|
245926 |
26-Jan-2013 |
marius |
- Improve some comments. - Make bge_lookup_{rev,vendor}() static. - Factor out chip identification rather than duplicating the code. - Sanitize bge_probe() a bit (don't hardcode buffer sizes, allow bge_lookup_vendor() to return NULL so the excessive panic() three can be removed there, etc.) and return BUS_PROBE_DEFAULT rather than hardcoding 0. - According to the Linux tg3 driver, BCM57791 and BCM57795 aren't capable of Gigabit Ethernet. - Check the return value of taskqueue_start_threads().
|
245870 |
24-Jan-2013 |
yongari |
bge_attach() can fail before attaching mii(4). So make sure to check bge_miibus before detaching mii(4).
|
245867 |
24-Jan-2013 |
yongari |
For 57765 class controllers, set low watermark max receive frames to 1.
|
243857 |
04-Dec-2012 |
glebius |
Mechanically substitute flags from historic mbuf allocator with malloc(9) flags in sys/dev.
|
243686 |
30-Nov-2012 |
yongari |
Add preliminary support for BCM57766 ASIC. While I'm here add BCM57762 device id which is found on Apple Thunderbolt ethernet.
Tested by: Richard Kuhns < rjk <> wintek dot com >
|
242625 |
05-Nov-2012 |
dim |
Remove duplicate const specifiers in many drivers (I hope I got all of them, please let me know if not). Most of these are of the form:
static const struct bzzt_type { [...list of members...] } const bzzt_devs[] = { [...list of initializers...] };
The second const is unnecessary, as arrays cannot be modified anyway, and if the elements are const, the whole thing is const automatically (e.g. it is placed in .rodata).
I have verified this does not change the binary output of a full kernel build (except for build timestamps embedded in the object files).
Reviewed by: yongari, marius MFC after: 1 week
|
242426 |
01-Nov-2012 |
yongari |
TCP/UDP checksum offloading feature for IP fragmented datagram was removed in r99417. bge(4) controllers can do TCP checksum offload for IP fragmented datagrams but unlike ti(4), it lacks UDP checksum offloading for IP fragmented datagrams. The problem was bge(4) blindly requested TCP/UDP checksum for IP fragmented datagrams such that it resulted in corrupted UDP datagrams before r99417. Remove remaining code for TCP checksum offloading for IP fragmented datagrams which should have been removed in r99417.
|
241985 |
24-Oct-2012 |
yongari |
For fast ethernet controllers, Ethernet@WireSpeed is not defined so explicitly set BGE_PHY_NO_WIRESPEED flag.
|
241984 |
24-Oct-2012 |
yongari |
Ethernet@WireSpeed is defined for 1000baseT adapter to establish a link at a lower speed so enabling it for fiber adapters is wrong. Fix the issue by setting BGE_PHY_NO_WIRESPEED such that brgphy(4) wouldn't enable the feature. While I'm here move PHY specific feature/bug configuration to new location(just before mii attach) for readability.
|
241983 |
24-Oct-2012 |
yongari |
Do not hardcode phy address. Multi-port controllers use different phy address.
|
241438 |
11-Oct-2012 |
yongari |
Add APE firmware support and improve firmware handshake procedure. This change will enable IPMI access on 5717/5718/5719/5720 and 5761 controllers. Because ASF is not available when APE firmware is present, bge_allow_asf tunable is ignored when driver detects APE firmware. Also bge(4) no longer performs two resets(one blind reset and the other reset with firmware in mind) in device attach. Now bge(4) performs a reset with enough information in bge_reset(). The APE firmware also needs special handling to make suspend/resume work but it was not implemented yet.
With this change, bge(4) should work on any 5717/5718/5719/5720 controllers. Special thanks to Mike Hibler at Emulab who setup remote debugging on Dell R820. Without his help I couldn't be able to address several issues happened on Dell Rx20 systems. And many thanks to Broadcom for continuing to support FreeBSD!
Submitted by: davidch (initial version) H/W donated by: Broadcom Tested by: many Tested on: Del R820/R720/R620/R420/R320 and HP Proliant DL 360 G8
|
241436 |
11-Oct-2012 |
yongari |
Rework controller reset procedure. Previously driver saved BGE_PCI_PCISTATE register before issuing global reset. After issuing reset, it reads BGE_PCI_PCISTATE register again and compares the saved register value and current value. It was used to know whether the global reset operation was completed or not. Unfortunately, this logic caused several issues on recent BCM5717/ 5718/5719 and BCM5720 controllers. It seems APE firmware accesses some registers while global reset is in progress such that reading BGE_PCI_PCISTATE register after reset does not yield old pre-reset state value. This resulted in consuming too much time in global reset and sometimes it couldn't successfully complete reset.
The BGE_MISCCFG_RESET_CORE_CLOCKS of BGE_MISC_CFG register is self-clearing bit so driver is able to know the reset completion. But the core-lock reset will disable indirect/flat/standard access modes such that driver cannot poll BGE_MISCCFG_RESET_CORE_CLOCKS bit of BGE_MISC_CFG register. So just wait enough time for core-clock reset to complete. Data sheet says driver should wait 100us for PCI/PCI-X devices and 100ms for PCIe devices. I chose 1ms for PCI/PCI-X since this value was used for many years in bge(4). For PCIe devices, use 100ms as recommended by data sheet.
bge_chipinit() also cleared BGE_MAC_MODE register which shall clear firmware configured mode information. I think this will result in losing ASF/IPMI link in device attachment. Let bge_reset() honor firmware configured BGE_MAC_MODE register and don't announce driver is UP in bge_reset(). Firmware should have control over driver until it's fully initialized by driver.
While I'm here, enable workaround for PCI-X BCM5704 A0 in bge_reset(). This will prevent internal arbitration logic from switching to the other DMA engine after a retry cycle.
|
241393 |
10-Oct-2012 |
yongari |
Remove unnecessary delay. I don't see any comments in data sheet that requires 10ms delay after device reset. Because that code was there from day 1, I guess it was added to give enough settlement time after updating BGE_MAC_MODE register. The recommended delay time for BGE_MAC_MODE after updating is 40us and it was already done in r241219.
|
241392 |
10-Oct-2012 |
yongari |
Fix a long standing VCPU reset sequence bug on BCM5906. The VCPU(Virtual CPU) of BCM5906 is used to provide a mechanism to control the bootcode execution and to pick up configuration data stored inside the EEPROM. The bootcode of BCM5906 will check the BGE_VCPU_STATUS_DRV_RESET bit to decide which booting procedure to choose. Data sheet indicates the VCPU of BCM5906 should set BGE_VCPU_STATUS_DRV_RESET bit *before* VCPU reset or global reset.
|
241391 |
10-Oct-2012 |
yongari |
Do not force PCIe 1.0a mode in device reset on BCM5717 and newer controllers. BCM5785 does not require PCI 1.0a mode as well during reset.
|
241390 |
10-Oct-2012 |
yongari |
Honor PHY type fiber for BCM5717/BCM5718/BCM5719/BCM5720.
|
241389 |
10-Oct-2012 |
yongari |
On PHY write error use hex number to show the value. Add more comments.
|
241388 |
10-Oct-2012 |
yongari |
If the maximum payload size is 256 bytes or more, set the DMA write water mark to 256 bytes. Otherwise controller will encounter DMA write under run errors and would result in RX DMA hang. If the maximum payload size is 128 bytes, the water mark is set to 128 bytes as usual. While here, set maximum read request size to 2048 for BCM5719/BCM5720. For other PCIe devices, use 4096. And reprogram the maximum read request size whenever device reset is performed.
|
241343 |
08-Oct-2012 |
yongari |
Rework device detach. While here, move driver lock/callout initialization to the beginning of device attach for readability.
|
241341 |
08-Oct-2012 |
yongari |
Limit applying TX data corruption and FIFO workaround to BCM5719 A0. It's believed BCM5720 does not have the issue.
|
241220 |
05-Oct-2012 |
yongari |
Follow Broadcom datasheet: Delay 100 microseconds after enabling transmit MAC. Delay 10 microseconds after enabling receive MAC.
|
241219 |
05-Oct-2012 |
yongari |
Add 40 microseconds delay after updating EMAC Mode register as recommended by Broadcom data sheet.
|
241216 |
05-Oct-2012 |
yongari |
APE firmware touches EMAC Mode and TX/RX MAC Mode registers to keep the MAC connected to the outside world. So keep the accesses atomic.
|
241215 |
05-Oct-2012 |
yongari |
Don't touch EMAC Mode and TX/RX MAC Mode register when driver is not running.
|
240680 |
18-Sep-2012 |
gavin |
Align the PCI Express #defines with the style used for the PCI-X #defines. This also has the advantage that it makes the names more compact, iand also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves.
This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g
When this is MFC'd, #defines will be added for the old names to assist out-of-tree drivers.
Discussed with: jhb MFC after: 1 week
|
236701 |
07-Jun-2012 |
yongari |
Fix typo.
Submitted by: Alexander Milanov < a <> amilanov dot com >
|
236488 |
02-Jun-2012 |
marius |
Take advantage of nitems().
MFC after: 3 days
|
236371 |
01-Jun-2012 |
yongari |
Remove unnecessary device_printfs.
Pointed out by: marius
|
236328 |
30-May-2012 |
marius |
Try to finally get the point in time at which bge_add_sysctls() is called right; it needs to be called before bge_can_use_msi() but in turn requires bge_flags to be properly set.
Submitted by: yongari MFC after: 3 days
|
235821 |
23-May-2012 |
yongari |
Don't force max payload size to 128. Root complex and Endpoint will negotiate with each other on the TLP payload size so blindly forcing the size to 128 can cause a completion error which in turn will stop device.
Reported by: Geans Pin < geanspin <> broadcom dot com > MFC after: 5 days
|
232850 |
12-Mar-2012 |
yongari |
Make if_ierrors updated whenever any of the following counters are updated. o Number of times NIC ran out of RX buffer descriptors o Number of inbound packet errors o Number of inbound packets that were chosen to be discarded Previously only the discarded packet counter was used to update if_ierrors. This change fixes wrong if_ierrors counter on BCM570[0-4] controllers. For BCM5705 and later controllers bge(4) already correctly counted it.
Reported by: Eugene Grosbein <egrosbein <> rdtc dot ru>
|
232849 |
12-Mar-2012 |
yongari |
Show PCI bus speed and width as well as running mode of PCI-X device in device attach. This would help to narrow down issue to a specific controller and operating mode of the controller. While I'm here rename BGE_MISCCFG_BOARD_ID with BGE_MISCCFG_BOARD_ID_MASK.
|
232848 |
12-Mar-2012 |
yongari |
Add workaround for PCI-X BCM5704 controller that live behind AMD-8131 PCI-X bridge. The bridge seems to reorder write access to mailbox registers such that it caused watchdog timeouts by out-of-order TX completions.
Tested by: Michael L. Squires <mikes <> siralan dot org > Reviewed by: jhb
|
232766 |
10-Mar-2012 |
yongari |
After r232403, DMA transactions does not cross 4GB boundary for all PCI devices. Remove driver workaround for 4GB boundary issue.
|
232727 |
09-Mar-2012 |
jhb |
Remove PAE special-case 2GB DMA boundary and always use a 4GB boundary now that DMA tags in PAE kernels support 4GB boundaries.
Reviewed by: yongari
|
231159 |
07-Feb-2012 |
marius |
Call bge_add_sysctls() early and especially before bge_can_use_msi() so r230337 actually has a chance of working and doesn't always unconditionally disable the use of MSIs.
|
230338 |
19-Jan-2012 |
yongari |
Oops, fix logic error introduced in r230337.
|
230337 |
19-Jan-2012 |
yongari |
Rename dev.bge.%d.msi_disable to dev.bge.%d.msi which matches enable/disable and default it to on.
Suggested by: jhb
|
230286 |
17-Jan-2012 |
yongari |
Introduce a tunable that disables use of MSI. Non-zero value will use INTx.
|
228480 |
13-Dec-2011 |
yongari |
Destroy DMA tag for jumbo RX buffer in device detach.
|
228479 |
13-Dec-2011 |
yongari |
BCM5720 performance tweak from Broadcom. o Allow multiple outstanding read requests from non-LSO read DMA engine. o Allow 4KB burst length reads for non-LSO frames. o Enable 512B burst length reads for buffer descriptors.
Submitted by: Geans Pin < geanspin <> broadcom dot com >
|
227843 |
22-Nov-2011 |
marius |
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
|
227309 |
07-Nov-2011 |
ed |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
|
226872 |
28-Oct-2011 |
yongari |
Disable updating InputDiscards counter for BCM5717, BCM5718, BCM5719 A0 and BCM5720 A0 and add comment why driver does not try to read it.
|
226871 |
28-Oct-2011 |
yongari |
Add initial BCM5720 support. Many thanks to Broadcom for continuing support of FreeBSD.
Submitted by: Geans Pin at Broadcom (initial version) H/W donated by: Broadcom
|
226867 |
27-Oct-2011 |
yongari |
Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value. bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2 seconds. BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data. This data contains timeout value in seconds until the next BGE_FW_CMD_DRV_ALIVE command. Broadcom recommends driver set the value 3 times longer than the interval that it sends BGE_FW_CMD_DRV_ALIVE. Currently bge(4) uses 3 seconds so probably we have to increase it in future and use different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).
No functional changes.
|
226866 |
27-Oct-2011 |
yongari |
Rename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT. This bit(SW event 7 in publicly available data sheet) is used to make RX CPU handle a firmware command and the bit is automatically cleared after RX CPU completed the command. Generally firmware command takes the following steps. 1. Write BGE_SRAM_FW_CMD_MB with a command. 2. Write BGE_SRAM_FW_CMD_LEN_MB with the length of the command in bytes. 3. Write BGE_SRAM_FW_CMD_DATA_MB with actual command data. 4. Generate BGE_RX_CPU_EVENT and let firmware handle the command. 5. Wait for the ACK of the firmware command.
No functional changes.
|
226864 |
27-Oct-2011 |
yongari |
Rename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE. Also add more firmware commands(not used yet). No functional changes.
|
226821 |
27-Oct-2011 |
yongari |
SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware about the various driver events like load, unload, reset, suspend, restart, and ioctl operations. Define driver's event rather than using hard-coded values. We don't still send suspend/resume event to firmware.
Previously bge(4) used BGE_SDI_STATUS to send events. Because driver has to access firmware mail box to inform current state, using BGE_SDI_STATUS register was wrong. The end result was the same as BGE_SDI_STATUS is 0x0C04.
No functional changes.
|
226820 |
26-Oct-2011 |
yongari |
Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with BGE_RX_CPU_EVENT for readability. Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] only).
|
226815 |
26-Oct-2011 |
yongari |
Define MAC address mail box and use it instead of using hard-coded value.
|
226814 |
26-Oct-2011 |
yongari |
Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones. The origin of GENCOMM seems to come from Alteon Tigon Host/NIC interface definition where it defines general communications region which is active when firmware is loaded and running. This region was used in communication between the host and processor internal to the Tigon chip. Broadcom data sheet also defines the region as 'Software Gencomm' in NetXtreme memory map but lacks detailed description of its interface so it was hard to know which ones are used for which interface. This change shall slightly enhance readability.
No functional changes.
|
226807 |
26-Oct-2011 |
yongari |
BCM5719 cannot handle DMA requests for DMA segments that have larger than 4KB in size. However the maximum DMA segment size created in DMA tag is 4KB, so we wouldn't encounter the issue here. Just record this issue such that let developers not to create a DMA segment that is larger than 4KB for BCM5719. It's possible to split a DMA segment into multiple smaller ones in run time but I believe it's not worth to implement that.
|
226806 |
26-Oct-2011 |
yongari |
Broadcom says BCM5755 or higher and BCM5906 have short DMA bug. Apply workaround to these controllers.
|
226805 |
26-Oct-2011 |
yongari |
It is known that all Broadcom controllers have 4GB boundary DMA bug. Apply workaround to all controllers.
|
226804 |
26-Oct-2011 |
yongari |
Make CPMU handle GPHY power down control on controllers that have CPMU capability.
|
226770 |
26-Oct-2011 |
yongari |
Fix long standing bge_sysctl_debug_info() issues. o Protect bge(4) status block access and register dump with driver lock. o Add missing bus_dmamap_sync() before dumping status block. o Use minimum status block size, 32 bytes, for status block dump on most controllers except BCM5700 AX/BX. While I'm here, make the handler show 5717 Plus in hardware flags.
|
226749 |
25-Oct-2011 |
yongari |
Whitespace nits.
|
221974 |
15-May-2011 |
yongari |
Correctly disable jumbo frame support for BCM5719 A0.
|
221818 |
12-May-2011 |
yongari |
Add initial BCM5719 support. TSO and jumbo frame was intentionally disabled for BCM5719 A0 revision due to known hardware errata. Many thanks to Broadcom for continuing support of FreeBSD.
Submitted by: Geans Pin at Broadcom
|
221712 |
09-May-2011 |
yongari |
Since r117657, bge(4) does not enable buffer manager for BCM5705 or newer controllers. However, all data sheet I have access has no indication that buffer manager should not be touched on these controllers. It seems the buffer manager always runs on BCM5705 or newer controllers. Some controller(e.g. BCM5719) needs other buffer manager configuration so driver should enable buffer manager for all controllers. Both Linux and OpenBSD/NetBSD use the same approach. This change polls enable bit of block to know whether specified block was really stopped as well as enabling buffer manager for all controllers in driver initialization.
Obtained from: NetBSD
|
221468 |
05-May-2011 |
yongari |
Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'm here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled for most PHYs.
|
221445 |
04-May-2011 |
yongari |
Add initial BCM57765 family support. The BCM57765 family seems to have similar hardware features of BCM5718 family except the number of receive return ring is 4. The BCM57765 family is known to support IEEE 802.3az EEE(Energy Efficient Ethernet) but this change does not include EEE support code. I hope EEE is implemented in near future. This change will support BCM57761, BCM57765, BCM57781, BCM57785, BCM57791 and BCM57795. All hardware offloading features are supported and suspend/resume also should work. Many thanks to Broadcom for continuing support of FreeBSD.
Tested by: Paul Thornton (prt <> prt dot org) HW donated by: Broadcom
|
221407 |
03-May-2011 |
marius |
- Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOP (reporting IFM_LOOP based on BMCR_LOOP is left in place though as it might provide useful for debugging). For most mii(4) drivers it was unclear whether the PHYs driven by them actually support loopback or not. Moreover, typically loopback mode also needs to be activated on the MAC, which none of the Ethernet drivers using mii(4) implements. Given that loopback media has no real use (and obviously hardly had a chance to actually work) besides for driver development (which just loopback mode should be sufficient for though, i.e one doesn't necessary need support for loopback media) support for it is just dropped as both NetBSD and OpenBSD already did quite some time ago. - Let mii_phy_add_media() also announce the support of IFM_NONE. - Restructure the PHY entry points to use a structure of entry points instead of discrete function pointers, and extend this to include a "reset" entry point. Make sure any PHY-specific reset routine is always used, and provide one for lxtphy(4) which disables MII interrupts (as is done for a few other PHYs we have drivers for). This includes changing NIC drivers which previously just called the generic mii_phy_reset() to now actually call the PHY-specific reset routine, which might be crucial in some cases. While at it, the redundant checks in these NIC drivers for mii->mii_instance not being zero before calling the reset routines were removed because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. Consequently, NIC drivers now no longer should call mii_phy_reset() directly, so it was removed from EXPORT_SYMS. - Add a mii_phy_dev_attach() as a companion helper to mii_phy_dev_probe(). The purpose of that function is to perform the common steps to attach a PHY driver instance and to hook it up to the miibus(4) instance and to optionally also handle the probing, addition and initialization of the supported media. So all a PHY driver without any special requirements has to do in its bus attach method is to call mii_phy_dev_attach() along with PHY-specific MIIF_* flags, a pointer to its PHY functions and the add_media set to one. All PHY drivers were updated to take advantage of mii_phy_dev_attach() as appropriate. Along with these changes the capability mask was added to the mii_softc structure so PHY drivers taking advantage of mii_phy_dev_attach() but still handling media on their own do not need to fiddle with the MII attach arguments anyway. - Keep track of the PHY offset in the mii_softc structure. This is done for compatibility with NetBSD/OpenBSD. - Keep track of the PHY's OUI, model and revision in the mii_softc structure. Several PHY drivers require this information also after attaching and previously had to wrap their own softc around mii_softc. NetBSD/OpenBSD also keep track of the model and revision on their mii_softc structure. All PHY drivers were updated to take advantage as appropriate. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - According to IEEE 802.3-2002 the bits actually have to be reversed when mapping an OUI to the MII ID registers. All PHY drivers and miidevs where changed as necessary. Actually this now again allows to largely share miidevs with NetBSD, which fixed this problem already 9 years ago. Consequently miidevs was synced as far as possible. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE.
Obtained from: NetBSD (partially) Reviewed by: yongari (earlier version), silence on arch@ and net@
|
221344 |
02-May-2011 |
marius |
Correct spelling in comments.
Submitted by: brucec
|
221343 |
02-May-2011 |
marius |
Fix an logic bug which caused jumbo buffers to not be synced. Reported and tested by: Michael Moll
MFC after: 3 days
|
220368 |
05-Apr-2011 |
yongari |
Add initial jumbo frame support for BCM5714/BCM5715 and BCM5780. Unlike other controllers which have more advanced jumbo support, these controllers have one send ring, one standard receive producer ring and one receive return ring. In order to receive jumbo frames on the controllers, driver now will increase Rx buffer size to 9k. Two Rx modes are supported on these controllers and I chose standard Rx BDs over extended Rx BDs. The extended Rx BD mode allows up to 4 segmentations for each Rx BDs such that kernel does not have to allocate large buffer of contiguous memory for receiving. The extended Rx BD mode is already used on controllers that have separate jumbo receive ring. However, using extended Rx BDs on BCM5714/BCM5715/BCM5780 reduces the number of Rx BDs to 256 entries which in turn may reduce the performance. Also UMA backed page allocator for jumbo frame returns contiguous memory so using extended Rx BD has no advantage on FreeBSD unless highly customized local allocator implemented in driver is used. To use jumbo buffers in standard receive ring, Rx buffer allocation handler was changed to allocate MJUM9BYTES sized mbuf.
PR: kern/155192 Tested by: Vijay Singh <vijju.singh <> gmail dot com> Submitted by: mjacob (initial version)
|
219902 |
23-Mar-2011 |
jhb |
Do a sweep of the tree replacing calls to pci_find_extcap() with calls to pci_find_cap() instead.
|
217323 |
12-Jan-2011 |
mdf |
sysctl(9) cleanup checkpoint: amd64 GENERIC builds cleanly.
Commit the rest of the devices.
|
217226 |
10-Jan-2011 |
yongari |
Apply DMA address space restriction to controllers that have 4GB DMA boundary bug and runs with PCI-X mode. watchdog timeout was observed on BCM5704 which lives behind certain PCI-X bridge(e.g. AMD 8131 PCI-X bridge). It's still not clear whether the root cause came from that PCI-X bridge or not. The watchdog timeout indicates the issue is in TX path. If the bridge reorders TX mailbox write accesses it would generate all kinds of problems but I'm not sure. This should be revisited.
Tested by: Michael L. Squires (mikes <> siralan dot org)
|
217225 |
10-Jan-2011 |
yongari |
Backout r216973 and r216970. r216973 didn't solve watchdog timeout issue seen on PCIX BCM5704 controller. r216970 fixed the issue but the DMA address space restriction was applied to all bge(4) controllers such that it caused unnecessary performance degradation for controllers that have no such issues.
|
216973 |
04-Jan-2011 |
yongari |
Limit hardware bug workaround to controllers that have 4GB boundary bug instead of blindly applying it to all controllers.
Pointed out by: marius MFC after: 3 days
|
216970 |
04-Jan-2011 |
yongari |
Partially revert change made in r212061. r212061 relied on bus_dma(9)'s capability which honors boundary restrictions of DMA tag for dynamic buffers. However it seems this does not work well and it triggered watchodg timeouts on controller that has the hardware bug. It's not clear whether there is still another hardware bug not mentioned in errata. This should be revisited since this change shall make use of bounce buffers which in turn reduces performance a lot on systems that have more than 4GB memory.
Reported by: Michael L. Squires (mikes <> siralan dot org) Tested by: Michael L. Squires (mikes <> siralan dot org) MFC after: 3 days
|
216085 |
30-Nov-2010 |
marius |
- Remove the remaining support for older (in this case pre-7.0-RELEASE) versions of FreeBSD. In fact we are already missing a lot of conditional code necessary to support older versions of FreeBSD, including alternatives for vital functionality not yet provided by the respective subsystem back then (see for example r199663). So this change shouldn't actually break this driver on versions of FreeBSD that were supported before. Besides, this driver also isn't maintained as an multi-release version outside of the main repository, so removing the conditional code shouldn't be a problem in that regard either. - Sprinkle some more const on tables.
|
215302 |
14-Nov-2010 |
marius |
Move the limiting of the PHY to 10/100 modes of operation due to limitations of certain MAC models from brgphy(4) to bge(4) where it belongs. While at it, update the list of models having that restriction to what OpenBSD uses, which in turn seems to have obtained that information from the Linux tg3 driver.
|
215297 |
14-Nov-2010 |
marius |
o Flesh out the generic IEEE 802.3 annex 31B full duplex flow control support in mii(4): - Merge generic flow control advertisement (which can be enabled by passing by MIIF_DOPAUSE to mii_attach(9)) and parsing support from NetBSD into mii_physubr.c and ukphy_subr.c. Unlike as in NetBSD, IFM_FLOW isn't implemented as a global option via the "don't care mask" but instead as a media specific option this. This has the following advantages: o allows flow control advertisement with autonegotiation to be turned on and off via ifconfig(8) with the default typically being off (though MIIF_FORCEPAUSE has been added causing flow control to be always advertised, allowing to easily MFC this changes for drivers that previously used home-grown support for flow control that behaved that way without breaking POLA) o allows to deal with PHY drivers where flow control advertisement with manual selection doesn't work or at least isn't implemented, like it's the case with brgphy(4), e1000phy(4) and ip1000phy(4), by setting MIIF_NOMANPAUSE o the available combinations of media options are readily available from the `ifconfig -m` output - Add IFM_FLOW to IFM_SHARED_OPTION_DESCRIPTIONS and IFM_ETH_RXPAUSE and IFM_ETH_TXPAUSE to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so these are understood by ifconfig(8). o Make the master/slave support in mii(4) actually usable: - Change IFM_ETH_MASTER from being implemented as a global option via the "don't care mask" to a media specific one as it actually is only applicable to IFM_1000_T to date. - Let mii_phy_setmedia() set GTCR_MAN_MS in IFM_1000_T slave mode to actually configure manually selected slave mode (like we also do in the PHY specific implementations). - Add IFM_ETH_MASTER to IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS so it is understood by ifconfig(8). o Switch bge(4), bce(4), msk(4), nfe(4) and stge(4) along with brgphy(4), e1000phy(4) and ip1000phy(4) to use the generic flow control support instead of home-grown solutions via IFM_FLAGs. This includes changing these PHY drivers and smcphy(4) to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set) and implemented for these media variants, i.e. typically only for copper. o Switch brgphy(4), ciphy(4), e1000phy(4) and ip1000phy(4) to report and set IFM_1000_T master mode via IFM_ETH_MASTER instead of via IFF_LINK0 and some IFM_FLAGn. o Switch brgphy(4) to add at least the the supported copper media based on the contents of the BMSR via mii_phy_add_media() instead of hardcoding them. The latter approach seems to have developed historically, besides causing unnecessary code duplication it was also undesirable because brgphy_mii_phy_auto() already based the capability advertisement on the contents of the BMSR though. o Let brgphy(4) set IFM_1000_T master mode on all supported PHY and not just BCM5701. Apparently this was a misinterpretation of a workaround in the Linux tg3 driver; BCM5701 seem to require RGPHY_1000CTL_MSE and BRGPHY_1000CTL_MSC to be set when configuring autonegotiation but this doesn't mean we can't set these as well on other PHYs for manual media selection. o Let ukphy_status() report IFM_1000_T master mode via IFM_ETH_MASTER so IFM_1000_T master mode support now is generally available with all PHY drivers. o Don't let e1000phy(4) set master/slave bits for IFM_1000_SX as it's not applicable there.
Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks
|
214428 |
27-Oct-2010 |
yongari |
Add initial BCM5718 family support. The BCM5718 family includes the dual port BCM5717 and BCM5718 devices which are intended for mainstream workstation and entry-level server designs and represents the twelfth generation of NetXtreme Ethernet controllers. This family is the successor to the BCM5714/BCM5715 family and supports IPv4/IPv6 checksum offloading, TSO, VLAN hardware tagging, jumbo frames, MSI/MSIX, IOV, RSS and TSS.
This change set supports all hardware features except IOV and RSS/TSS. Unlike its predecessors, only extended RX buffer descriptors can be posted to the jumbo producer ring. Single RX buffer descriptors for jumbo frame are not supported. RSS requires a more substantial set of changes and will apply to a larger set of NetXtreme devices so RSS/TSS multi-queue support will be implemented in a future releases.
Special thanks to Broadcom who kindly sent a sample board to me and to davidch who gave provided the initial support code.
Submitted by: davidch (initial version) HW donated by: Broadcom
|
214292 |
24-Oct-2010 |
yongari |
Use bge_chipid to compare controller ids. r214251 incorrectly used bge_chiprev.
Reported by: Buganini <buganini <> gmail dot com >
|
214251 |
23-Oct-2010 |
yongari |
Apply the same workaround for SDI flow control used on BCM5906 A1 to BCM6906 A0/A2. This should fix a long standing BCM5906 A2 lockup issues. Data sheet explicitly mentions BCM5906 A0, A1 and A2 use de-pipelined mode on these revisions. Special thanks to Buganini who tried all combinations of experimental patches for more than 10 days.
Tested by: Buganini <buganini <> gmail dot com >
|
214219 |
22-Oct-2010 |
yongari |
Add workaround for BCM5906 A1 controller silicon bug. When auto-negotiation results in half-duplex operation, excess collision on the ethernet link may cause internal chip delays that may result in subsequent valid frames being dropped due to insufficient receive buffer resources. The workaround is to choose de-pipeline method as a flow control decision for SDI. De-pipeline method allows only 1 data in TxMbuf at a time such that a request to RDMA from SDI is made only when TxMbuf is empty. Thanks for david for providing detailed errata information.
|
214216 |
22-Oct-2010 |
yongari |
Enable TX MAC state machine lockup fix for both BCM5755 or higher and BCM5906. Publicly available data sheet just says it may happen due to corrupted TxMbuf.
|
214087 |
19-Oct-2010 |
yongari |
Add workaround for BCM5906 controller silicon bug. If device receive two back-to-back send BDs with less than or equal to 8 total bytes then the device may hang. The two back-to-back send BDs must be in the same frame for this failure to occur. Thanks to davidch for detailed errata information.
Reviewed by: davidch
|
213893 |
15-Oct-2010 |
marius |
Convert the PHY drivers to honor the mii_flags passed down and convert the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags.
While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es).
Reviewed by: jhb, yongari
|
213844 |
14-Oct-2010 |
yongari |
Make sure to not use stale ip/tcp header pointers. The ip/tcp header parser uses m_pullup(9) to get access to mbuf chain. m_pullup(9) can allocate new mbuf chain and free old one if the space left in the mbuf chain is not enough to hold requested contiguous bytes. Previously drivers can use stale ip/tcp header pointer if m_pullup(9) returned new mbuf chain.
Reported by: Andrew Boyer (aboyer <> averesystems dot com) MFC after: 10 days
|
213812 |
13-Oct-2010 |
yongari |
Fix a regression introduced in r213710. r213710 removed the use of auto polling such that it made all controllers obtain link status information from the state of the LNKRDY input signal. Broadcom recommends disabling auto polling such that driver should rely on PHY interrupts for link status change indications. Unfortunately it seems some controllers(BCM5703, BCM5704 and BCM5705) have PHY related issues so Linux took other approach to workaround it. bge(4) didn't follow that and it used to enable auto polling to workaround it. Restore this old behavior for BCM5700 family controllers and BCM5705 to use auto polling. For BCM5700 and BCM5701, it seems it does not need to enable auto polling but I restored it for safety. Special thanks to marius who tried lots of patches with patience.
Reported by: marius Tested by: marius
|
213808 |
13-Oct-2010 |
yongari |
Add more checks for resolved link speed in bge_miibus_statchg(). Link UP state could be reported first before actual completion of auto-negotiation. This change makes bge(4) reprogram BGE_MAC_MODE, BGE_TX_MODE and BGE_RX_MODE register only after controller got a valid link.
|
213747 |
12-Oct-2010 |
yongari |
Protect bge(4) from accessing invalid NIC internal memory regions on BCM5906.
Tested by: Buganini < buganini <> gmail dot com >
|
213742 |
12-Oct-2010 |
yongari |
Fix a regression introduced in r213495. r213495 disabled mini receive producer ring only for BCM5700. It was believed that BCM5700 with external SSRAM is the only controller that supports mini ring but it seems all BCM570[0-4] requires to disable mini receive producer ring. Otherwise, it caused unexpected RX DMA error or watchdog timeouts.
Reported by: marius, Steve Kargl <sgk <> troutmask dot apl dot washington dot edu> Tested by: marius, Steve Kargl <sgk <> troutmask dot apl dot washington dot edu>
|
213711 |
11-Oct-2010 |
yongari |
The IFF_DRV_RUNNING flag is set at the end of bge_init_locked. But before setting the flag, interrupt was already enabled such that interrupt handler could be run before setting IFF_DRV_RUNNING flag. This can lose initial link state change interrupt which in turn make bge(4) think that it still does not have valid link. Fix this race by protecting the taskqueue with a driver lock. While I'm here move reenabling interrupt code after handling of link state chage.
Reviewed by: davidch
|
213710 |
11-Oct-2010 |
yongari |
Remove one last reference of BGE_MI_MODE register for auto polling. Previously bge(4) always enabled auto polling for non-BGE_FLAG_TBI controllers. With this change, auto polling is not used anymore so polling through mii(4) was introduced.
Reviewed by: davidch
|
213587 |
08-Oct-2010 |
yongari |
Do not blindly UP the interface when interface's MTU is changed. If driver is not running there is no need to up the interface. While I'm here hold driver lock before modifying MTU as it is referenced in RX handler.
|
213522 |
07-Oct-2010 |
yongari |
Fix a long standing bug which regarded some revisions of controller as 5788. This caused BGE_MISC_LOCAL_CTL register is used to generate link state change interrupt for non-5788 controllers. The interrupt handler may or may not detect link state attention as status block wouldn't be updated when an interrupt was generated with BGE_MISC_LOCAL_CTL register. All controllers except 5700 and 5788 should use host coalescing mode register to trigger an interrupt.
|
213495 |
06-Oct-2010 |
yongari |
Add more comments to rings supported by the controller. Different versions of controller support different number of ring control blocks such that adjust code a bit to access known number of send/receive ring control blocks. Previously bge(4) blindly accessed 16 send/receive RCBs. Also move initializing standard receive producer ring producer index, jumbo receive producer ring producer index and mini receive producer ring producer index to the end of each receive producer ring initialization.
Do not assume mini receive producer ring is available only when controller has jumbo frame capability, instead explicitly check ASIC version BCM5700 to disable mini receive producer ring.
Additionally always enable send ring 0 regardless of controller versions. Previously bge(4) didn't enable send ring 0 if controller is BGE_IS_5705_PLUS. Becase bge(4) need 1 send ring to send frames at least, I have no idea how it would have worked so far.
Submitted by: davidch
|
213486 |
06-Oct-2010 |
yongari |
Remove bge_tx_buf_ratio, unused member of softc.
|
213485 |
06-Oct-2010 |
yongari |
Overhaul MII register access routine and remove unnecessary BGE_MI_MODE register accesses. Previously bge(4) used to read BGE_MI_MODE register to detect whether it needs to disable autopolling feature or not. Because we don't touch autopolling in other part of driver there is no reason to read BGE_MI_MODE register given that we know default value in advance. In order to achieve the goal, check whether the controller has CPMU(Central Power Mangement Unit) capability. If controller has CPMU feature, use 500KHz MII management interface(mdio/mdc) frequency regardless core clock frequency. Otherwise use default MII clock. While I'm here, add CPMU register definition.
In bge_miibus_readreg(), rearrange code a bit and remove goto statement. In bge_miibus_writereg(), make sure to restore autopolling even if MII write failed. The delay time inserted after accessing BGE_MI_MODE register increased from 40us to 80us.
The default PHY address is now stored in softc. All PHYs supported by bge(4) currently uses PHY address 1 but it will be changed when we add newer controllers. This change will make it easier to change default PHY address depending on PHY models.
Submitted by: davidch
|
213468 |
06-Oct-2010 |
yongari |
Fix bge(4) build breakage when BGE_REGISTER_DEBUG is defined.
|
213465 |
05-Oct-2010 |
yongari |
Rearrange code a bit to correctly set PHY flags. This change make it easy to add more newer ASICs.
Obtained from: OpenBSD
|
213464 |
05-Oct-2010 |
yongari |
Separate common flags into controller specific and PHY related flags. There should be no functional changes. This change will make it easy to add more quirk/flags in future.
Reviewed by: davidch
|
213411 |
04-Oct-2010 |
yongari |
Enable fix for read DMA FIFO overruns on controllers that have this fix. Note, we still need workaround for controllers that lacks this fix and it needs more work in RX BD updating.
Submitted by: davidch
|
213410 |
04-Oct-2010 |
yongari |
Consistently use ifHCOutOctets/ifHCInOctets instead of Octets as these names are used in data sheet. Also use UnicastPkts, MulticastPkts and BroadcastPkts instead of UcastPkts, McastPkts and BcastPkts to clarify its meaning.
Suggested by: bde
|
213334 |
01-Oct-2010 |
yongari |
Remove extra semicolon.
|
213333 |
01-Oct-2010 |
yongari |
Allow write DMA to request larger DMA burst size to get better performance on BCM5785.
Obtained from: OpenBSD
|
213316 |
30-Sep-2010 |
yongari |
Fix IFCAP_TXCSUM/IFCAP_RXCSUM handling. Previously bge(4) used IFCAP_HWCSUM to know which capability should be changed such that disabling RX checksun offloading resulted in disabling TX checksum offloading.
|
213283 |
29-Sep-2010 |
yongari |
Implement hardware MAC statistics for BCM5705 or newer Broadcom controllers. bge(4) exported MAC statistics on controllers that maintain the statistics in the NIC's internal memory. Newer controllers require register access to fetch these values. These counters provide useful information to diagnose driver issues.
|
213280 |
29-Sep-2010 |
yongari |
After r207391, brgphy(4) passes resolved flow-control settings to parent driver. Use that information to configure flow-control. One drawback is there is no way to disable flow-control as we still don't have proper way to not advertise RX/TX pause capability to link partner. But I don't think it would cause severe problems and users can selectively disable flow-control in switch port.
|
213255 |
29-Sep-2010 |
yongari |
Set the number of RX frames to receive after RX MBUF low watermark has reached. This reduced number of dropped frames when flow-control is enabled. Previously it dropped incoming frames once RX MBUF low watermark has reached. The value used in MAC RX MBUF low watermark is greater than or equal to 4 so receiving two more RX frames should not be a problem.
Obtained from: OpenBSD
|
213081 |
23-Sep-2010 |
yongari |
Always show asic/chip revision in device attach phase. There are too many bge(4) controllers there and model name does not necessarily match asic/chip revision. Relying on VPD string made it hard to identify exact asic/chip revision so the first step to debug bge(4) was getting exact asic/chip information with verbose boot which may not be available on production server.
|
212755 |
16-Sep-2010 |
yongari |
Fix incorrect RX BD producer updates. The producer index was already updated after allocating mbuf so driver had to use the last index instead of using next producer index. This should fix driver hang which may happen under high network load.
Reported by: Igor Sysoev <is <> rambler-co dot ru>, Vlad Galu <dudu <> dudu dot ro> Tested by: Igor Sysoev <is <> rambler-co dot ru>, Vlad Galu <dudu <> dudu dot ro> MFC after: 10 days
|
212302 |
07-Sep-2010 |
yongari |
Make sure to create DMA'able memory for statistics block. This was missed in r212061 and it caused crashes for 570x controllers as controller DMAed statistics to physical address 0.
Reported by: kan
|
212071 |
31-Aug-2010 |
yongari |
Remove unnecessary atomic operation in bge_poll. bge(4) always holds a driver lock in the function entry and memory synchronization is handled by bus_dmamap_sync(9).
|
212069 |
31-Aug-2010 |
yongari |
bge_txeof() already checks whether it has to free transmitted mbufs or not by comparing reported TX consumer index with saved index. So remove unnecessary check done after freeing transmitted mbufs. While I'm here nuke unnecessary variable initializations.
|
212065 |
31-Aug-2010 |
yongari |
Handle PAE case correctly. You cannot effectively specify a 4GB boundary in PAE case so use a 2GB boundary for PAE as suggested by jhb.
Pointed out by: jhb Reviewed by: jhb
|
212061 |
31-Aug-2010 |
yongari |
Split common parent DMA tag into ring DMA tag and TX/RX mbuf DMA tag. All controllers that are not BCM5755 or higher have 4GB boundary DMA bug. Previously bge(4) used 32bit DMA address to workaround the bug(r199670). However this caused the use of bounce buffers such that it resulted in poor performance for systems which have more than 4GB memory. Because bus_dma(9) honors boundary restriction requirement of DMA tag for dynamic buffers, having a separate TX/RX mbuf DMA tag will greatly reduce the possibility of using bounce buffers. For DMA buffers allocated with bus_dmamem_alloc(9), now bge(4) explicitly checks whether the requested memory region crossed the boundary or not. With this change, only the DMA buffer that crossed the boundary will use 32bit DMA address. Other DMA buffers are not affected as separate DMA tag is created for each DMA buffer. Even if 32bit DMA address space is used for a buffer, the chance to use bounce buffer is still very low as the size of buffer is small. This change should eliminate most usage of bounce buffers on systems that have more than 4GB memory.
More correct fix would be teaching bus_dma(9) to honor boundary restriction for buffers created with bus_dmamem_alloc(9) but it seems that is not easy.
While I'm here cleanup bge_dma_map_addr() and remove unnecessary member variables in bge_dmamap_arg structure.
Tested by: marcel
|
211596 |
22-Aug-2010 |
yongari |
It seems all Broadcom controllers have a bug that can generate UDP datagrams with checksum value 0 when TX UDP checksum offloading is enabled. Generating UDP checksum value 0 is RFC 768 violation. Even though the probability of generating such UDP datagrams is low, I don't want to see FreeBSD boxes to inject such datagrams into network so disable UDP checksum offloading by default. Users still override this behavior by setting a sysctl variable or loader tunable, dev.bge.%d.forced_udpcsum.
I have no idea why this issue was not reported so far given that bge(4) is one of the most commonly used controller on high-end server class systems. Thanks to andre@ who passed the PR to me.
PR: kern/104826
|
211594 |
21-Aug-2010 |
yongari |
Load tunable from loader.conf(5) instead of device.hints(5).
|
210152 |
15-Jul-2010 |
yongari |
Use Miscellaneous Configuration Register bit definition instead of magic number.
|
210083 |
14-Jul-2010 |
yongari |
Remove enabling Data FIFO protection with indirect memory access. r165114 added that code and that change ignored the same logic committed in r135772. In addition, data FIFO protection should be selectively enabled instead of applying to all PCIe devices. While I'm here add BCM5785 to devices that do not require this fix.
|
210015 |
13-Jul-2010 |
yongari |
Prefer PCIR_BAR macro over BGE_PCI_BAR0.
|
210014 |
13-Jul-2010 |
yongari |
Fix error message for jumbo buffer allocation failure.
|
210013 |
13-Jul-2010 |
yongari |
style.
|
210011 |
13-Jul-2010 |
yongari |
Make bge_stop_fw() static. While I'm here use ANSI function definitions.
|
209741 |
06-Jul-2010 |
yongari |
Zero entire status block and add missing bus_dmamap_sync(9).
|
209714 |
06-Jul-2010 |
yongari |
It seems read DMA mode register requires both IPv4 TSO and IPv6 TSO configuration to get IPv4 TSO work on BCM57780. While I'm here apply the same fix to BCM5785 which shares similar hardware feature of BCM57780. This change makes TSO work on BCM57780.
Tested by: Tong Liu <nemoliu <> gmail dot com>
|
208917 |
08-Jun-2010 |
yongari |
Remove unused macros.
Reviewed by: bde
|
208862 |
05-Jun-2010 |
yongari |
Fix a bug introduced in r199011. When bge(4) reuses loaded RX buffers it should also reinitialize RX descriptors otherwise some stale data could be passed to controller. This could end up with mbuf double free or unexpected NULL pointer dereference in upper stack. To fix the issue, save loaded buffer's length and reinitialize RX descriptors with the saved value whenever bge(4) reuses the loaded RX buffers. While I'm here, increase the number of RX buffers to 512 from 256. This simplifies RX buffer handling as well as giving more RX buffers. Controller supports just fixed number of RX buffers (i.e. 512) and bge(4) used to rely on hope that our CPU is fast enough to keep up with the controller. With this change, bge(4) will use 1MB for RX buffers but I don't think it would cause problems in these days.
Reported by: marcel Tested by: marcel
|
207242 |
26-Apr-2010 |
marius |
For the on-board interfaces found in Fujitsu SPARC64 machines obtain the MAC address via OFW as well.
|
205651 |
25-Mar-2010 |
yongari |
Use pci_get_max_read_req() and pci_set_max_read_req() to set maximim read request size.
|
205221 |
16-Mar-2010 |
yongari |
Revert r205090. It's hard to know when the mail box register write will get flushed to the hardware and it may take longer.
Pointed out by: scottl
|
205090 |
12-Mar-2010 |
yongari |
Reorder interrupt handler a bit such that producer/consumer index of status block is read first before acknowledging the interrupts. Otherwise bge(4) may get stale status block as acknowledging an interrupt may yield another status block update.
Reviewed by: marius
|
204981 |
10-Mar-2010 |
yongari |
Fix typo in r204978.
Pointed out by: marius
|
204979 |
10-Mar-2010 |
yongari |
Fix typo in r204975.
Pointed out by: marius
|
204978 |
10-Mar-2010 |
yongari |
Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices. Also disable relaxed ordering as recommended by data sheet for PCI-X devices. For PCI-X BCM5704, set maximum outstanding split transactions to 0 as indicated by data sheet. For BCM5703 in PCI-X mode, DMA read watermark should be less than or equal to maximum read byte count configuration. Enforce this limitation in DMA read watermark configuration.
|
204975 |
10-Mar-2010 |
yongari |
Enable hardware fixes for BCM5704 B0 as recommended by data sheet.
|
204376 |
26-Feb-2010 |
yongari |
Disable TSO on BCM5755M controller until I understand better for the issue. I still have no idea why TSO does not work on this controller. davidch@ also confirmed there is no known TSO related issues for this controller.
|
204223 |
22-Feb-2010 |
yongari |
Remove Tx mbuf parsing code for VLAN in TSO path. Controller does not support TSO over VLAN if VLAN hardware tagging is disabled so there is no need to check VLAN here. While I'm here make sure to pullup IP/TCP headers in the first buffer.
|
204151 |
20-Feb-2010 |
yongari |
Add TSO support on VLAN. Controller requires VLAN hardware tagging to make TSO work on VLAN. So if VLAN hardware tagging is disabled explicitly clear TSO on VLAN. While I'm here remove duplicated VLAN_CAPABILITIES call.
|
203716 |
09-Feb-2010 |
yongari |
Move device specific flag configuration to attach routine. The softc obtained in device probe wouldn't be the same one used in device attach. Drivers should not assume any values stored in softc structure in probe routine will be available for its attach routine.
|
203358 |
01-Feb-2010 |
yongari |
PCI express device status register has W1C feature. Writing 0 has no effect. Make sure to clear error bits by writing 1. [1] While I'm here use predefined value instead of hardcodig magic vlaue.
Submitted by: msaitoh at NetBSD [1]
|
202822 |
22-Jan-2010 |
yongari |
Use new handshake command for BCM5750 or new controllers.
|
202821 |
22-Jan-2010 |
yongari |
Fix a long standing ASF heartbeat sending bug. The initial implementation of heartbeat interval was 2 but there was typo which caused the heartbeat is sent approximately every 5 seconds. This caused unintended controller reset by firmware because firmware thought OS was crashed.
Submitted by: Floris Bos < info <> je-eigen-domein dot nl > Tested by: Andrzej Tobola < ato <> iem dot pw dot edu dot pl >
|
202406 |
15-Jan-2010 |
yongari |
Don't free mbuf chains when bge(4) fails to collapse the mbuf chains. This part of code is to enhance performance so failing the collapsing should not free TX frames. Otherwise bge(4) will unnecessarily drop frames which in turn can freeze the network connection.
Reported by: Igor Sysoev (is <> rambler-co dot ru) Tested by: Igor Sysoev (is <> rambler-co dot ru)
|
202293 |
14-Jan-2010 |
yongari |
For controllers that has dual mode PHY(copper or fiber) interfaces over GMII, make sure to enable GMII. With this change brgphy(4) is used to handle the dual mode PHY. Since we still don't have a sane way to pass PHY specific information to mii(4) layer special handling is needed in brgphy(4) to determine which mode of PHY was configured in parent interface. This change make BCM5715S work.
Tested by: olli Obtained from: OpenBSD MFC after: 1 week
|
202268 |
13-Jan-2010 |
delphij |
o Add PCI ID for BCM 5756. o Don't enable BGE_FLAG_BER_BUG on both 5722 and 5756, and based on their PCI IDs rather than their chip IDs.
Reported by: several PC-BSD users via kmoore Reviewed by: yongari, imp, jhb, davidch Sponsored by: iXsystems, Inc. MFC after: 2 weeks
|
201446 |
03-Jan-2010 |
yongari |
Fix regression introduced in r198318. BCM5754/BCM5754M uses the same ASIC ID of BCM5758 such that r198318 incorecctly enabled TSO on BCM5754.BCM5754M controllers. BCM5754/BCM5754M needs a special firmware to enable TSO and bge(4) does not support firmware based TSO.
Reported by: ed Tested by: ed
|
200264 |
08-Dec-2009 |
yongari |
Create sysctl node(dev.bge.%d.focred_collapse) instead of hw.bge.forced_collapse. hw.bge.forced_collapse affects all bge(4) controllers on system which may not desirable behavior of the sysctl node. Also allow the sysctl node could be modified at any time.
Reviewed by: bde (initial version)
|
200246 |
08-Dec-2009 |
yongari |
Partially revert r200228. For mini RCB case, bge(4) still have to disable mini ring withtout regard to mini ring support.
Reported by: marcel Tested by: marcel
|
200228 |
07-Dec-2009 |
yongari |
Don't access jumbo frame related registers if controller lacks the feature. These registers are reserved on controllers that have no support for jumbo frame. Only BCM5700 has mini ring so do not poke mini ring related registers if controller is not BCM5700.
Reviewed by: marius
|
200227 |
07-Dec-2009 |
yongari |
Remove PHY isolate/power down code in bge_stop(). The isolation handler in brgphy(4) does not exist and brgphy(4) just resets the PHY and returns EINVAL as it has no isolation handler. I also agree on Marius's opinion that stop handler of every NIC driver seems to be the wrong place for implementing PHY isolate/power down. If we need PHY isolate/power down it should be implemented in brgphy(4) and users should administratively down the PHY.
Reviewed by: marius
|
200088 |
04-Dec-2009 |
yongari |
Add workaround to overcome hardware limitation which allows only a single outstanding DMA read operation. Most controllers targeted to client with PCIe bus interface(e.g. BCM5761) may have this limitation. All controllers for servers does not have this limitation. Collapsing mbuf chains to reduce number of memory reads before transmitting was most effective way to workaround this. I got about 940Mbps from 850Mbps with mbuf collapsing on BCM5761. However it takes a lot of CPU cycles to collapse mbuf chains so add tunable to control the number of allowed TX buffers before collapsing. The default value is 0 which effectively disables the forced collapsing. For most cases 2 would yield best performance(about 930Mbps) without much sacrificing CPU cycles. Note the collapsing is only activated when the controller is on PCIe bus and the frame does not need TSO operation. TSO does not seem to suffer from the hardware limitation because the payload size is much bigger than normal IP datagram. Thanks to davidch@ who told me the limitation of client controllers and actually gave possible workarounds to mitigate the limitation.
Reviewed by: davidch, marius
|
199808 |
25-Nov-2009 |
yongari |
Fix typo which inversed the logic which in turn disabled MSI.
Pointy hat to: yongari
|
199807 |
25-Nov-2009 |
yongari |
Make sure one shot MSI is enabled.
Submitted by: marius
|
199761 |
24-Nov-2009 |
yongari |
BGE_FLAG_40BIT_BUG should be set before creating DMA tags.
Pointy hat to: yongari
|
199679 |
22-Nov-2009 |
yongari |
Reduce status block size DMAed by controller. bge(4) uses single Tx/Rx/Rx return ring such that large part of status block was not used at all. All bge(4) controllers except BCM5700 AX/BX has a feature to control the size of status block. So use minimum status block size allowed in controller. This reduces number of DMAed status block size to 32 bytes from 80 bytes.
|
199674 |
22-Nov-2009 |
yongari |
Add missing function prototype in r199671.
|
199671 |
22-Nov-2009 |
yongari |
Implement TSO for BCM5755 or newer controllers. Some controllers seem to require a special firmware to use TSO. But the firmware is not available to FreeBSD and Linux claims that the TSO performed by the firmware is slower than hardware based TSO. Moreover the firmware based TSO has one known bug which can't handle TSO if ethernet header + IP/TCP header is greater than 80 bytes. The workaround for the TSO bug exist but it seems it's too expensive than not using TSO at all. Some hardwares also have the TSO bug so limit the TSO to the controllers that are not affected TSO issues (e.g. 5755 or higher). While I'm here set VLAN tag bit to all descriptors that belengs to a frame instead of the first descriptor of a frame. The datasheet is not clear how to handle VLAN tag bit but it worked either way in my testing. This makes it simplify TSO configuration a little bit.
Big thanks to davidch@ who sent me detailed TSO information. Without this I was not able to implement it.
Tested by: current
|
199670 |
22-Nov-2009 |
yongari |
Fix two long standing bugs on bge(4). Most pre BCM5755 controllers have a DMA bug when buffer address crosses a multiple of the 4GB boundary(e.g. 4GB, 8GB, 12GB etc). Limit DMA address to be within 4GB address for these controllers. The second DMA bug limits DMA address to be within 40bit address space. This bug applies to BCM5714 and BCM5715 and 5708(bce(4) controller). This is not actually a MAC controller bug but an issue with the embedded PCIe to PCI-X bridge in the device. So for BCM5714/BCM5715 controllers also limit the DMA address to be within 40bit address space. Special thanks to davidch@ who gave me detailed errata information. I think this change will fix long standing bge(4) instability issues on systems with more than 4GB memory.
Reviewed by: davidch
|
199668 |
22-Nov-2009 |
yongari |
For MSI case, interrupt is not shared and we don't need to force PCI flush to get correct status block update. Add an optimized interrupt handler that is activated for MSI case. Actual interrupt handling is done by taskqueue such that the handler does not require driver lock for Rx path. The MSI capable bge(4) controllers automatically disables further interrupt once it enters interrupt state so we don't need PIO access to disable interrupt in interrupt handler.
|
199667 |
22-Nov-2009 |
yongari |
Cache Rx producer/Tx consumer index as soon as we know status block update and then clear status block. Previously it used to access these index without synchronization which may cause problems when bounce buffers are used. Also add missing bus_dmamap_sync(9) in polling handler. Since we now update status block in driver, adjust bus_dmamap_sync(9) for status block.
|
199666 |
22-Nov-2009 |
yongari |
Rearrange bge_start_locked to see we can send more frames by checking IFF_DRV_RUNNING and IFF_DRV_OACTIVE flags. Also if we have less than 16 free send BDs set IFF_DRV_OACTIVE and try it later. Previously bge(4) used to reserve 16 free send BDs after loading dma maps but hardware just need one reserved send BD. If prouder index has the same value of consumer index it means the Tx queue is empty. While I'm here check IFQ_DRV_IS_EMPTY first to save one lock operation.
|
199665 |
22-Nov-2009 |
yongari |
Controller does not write Rx descriptors, remove BUS_DMASYNC_PREREAD.
|
199664 |
22-Nov-2009 |
yongari |
Use capability pointer to access PCIe registers rather than directly access them at fixed address. While I'm here don't touch other bits of PCIe device control register except max payload size.
Reviewed by: marius
|
199663 |
22-Nov-2009 |
yongari |
Due to newly added PCIe capabilities fallback code for finding the PCIe capability did not work right on recent controllers. Remove FreeBSD 6.x support code.
Reviewed by: marius
|
199662 |
22-Nov-2009 |
yongari |
Fix typo introduced in r199011.
Pointed out by: marius
|
199661 |
22-Nov-2009 |
yongari |
Remove extra white space.
|
199153 |
10-Nov-2009 |
yongari |
Controller does not update Tx descriptors(send BDs) after sending frames so remove unnecessary BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTREAD of bus_dmamap_sync(9).
|
199116 |
09-Nov-2009 |
yongari |
Zero out Tx/Rx descriptors before using them. Also add missing bus_dmamap_sync(9) after Tx descriptor initialization.
|
199115 |
09-Nov-2009 |
yongari |
Add missing bus_dmamap_sync(9) before issuing kick command.
|
199065 |
09-Nov-2009 |
yongari |
Correct disabling checksum offloading for BCM5700 B0.
|
199054 |
08-Nov-2009 |
yongari |
Partially revert r199035. Revision 1.158 says only lower ten bits of BGE_RXLP_LOCSTAT_IFIN_DROPS register is valid. For BCM5761 case it seems the controller maintains 16bits value for the register. However 16bits are still too small to count all dropped packets happened in a second. To get a correct counter we have to read the register in bge_rxeof() which would be too expensive.
Pointed out by: bde
|
199036 |
08-Nov-2009 |
yongari |
Count number of inbound packets which were chosen to be discarded as input errors. Also count out of receive BDs as input errors.
|
199035 |
08-Nov-2009 |
yongari |
Don't count input errors twice, we always read input errors from MAC in bge_tick. Previously it used to show more number of input errors. I noticed actual input errors were less than 8% even for 64 bytes UDP frames generated by netperf. Since we always access BGE_RXLP_LOCSTAT_IFIN_DROPS register in bge_tick, remove useless code protected by #ifdef notyet.
|
199020 |
07-Nov-2009 |
yongari |
Tell upper layer we support long frames. ether_ifattach() initializes it to ETHER_HDR_LEN so we have to override it after calling ether_ifattch(). While I'm here remove setting if_mtu value, it's initialized in ether_ifattach().
|
199014 |
07-Nov-2009 |
yongari |
Fix I mssied in r199011. Rx ring index also should be updated. If we fill Rx ring full instead of half we can simplify this logic but this requires more experimentation.
|
199011 |
07-Nov-2009 |
yongari |
Reimplement Rx buffer allocation to handle dma map load failure. Introduce two spare dma maps for standard buffer and jumbo buffer respectively. If loading a dma map failed reuse previously loaded dma map. This should fix unloaded dma map is used in case of dma map load failure. Also don't blindly unload dma map and defer dma map sync and unloading operation until we know dma map for new buffer is successfully loaded. This change saves unnecessary dma load/unload operation. Previously bge(4) tried to reuse mbuf with unloaded dma map which is really bad thing in bus_dma(9) perspective. While I'm here update if_iqdrops if we can't allocate Rx buffers.
|
199010 |
06-Nov-2009 |
yongari |
Do bus_dmamap_sync call only if frame size is greater than standard buffer size. If controller is not capable of handling jumbo frame, interface MTU couldn't be larger than standard MTU which in turn the received should be fit in standard buffer. This fixes bus_dmamap_sync call for jumbo ring is called even if interface is configured to use standard MTU. Also if total frame size could be fit into standard buffer don't use jumbo buffers.
|
199009 |
06-Nov-2009 |
yongari |
bge(4) already switched to use UMA backed page allocator and local memory allocator for jumbo frame was removed long time ago. Remove no more used macros.
|
198967 |
06-Nov-2009 |
yongari |
Correct MSI mode register bits.
|
198928 |
04-Nov-2009 |
yongari |
Make bge_newbuf_std()/bge_newbuf_jumbo() returns actual error code for buffer allocation. If driver know we are out of Rx buffers let controller stop. This should fix panic when interface is run even if it had no configured Rx buffers.
|
198927 |
04-Nov-2009 |
yongari |
Remove common DMA tag used for TX/RX mbufs and create Tx DMA tag and Rx DMA tag separately. Previously it used a common mbuf DMA tag for both Tx and Rx path but Rx buffer(standard ring case) should have a single DMA segment and maximum buffer size of the segment should be less than or equal to MCLBYTES. This change also make it possible to add TSO with minor changes.
|
198924 |
04-Nov-2009 |
yongari |
Covert bge_newbuf_std to use bus_dmamap_load_mbuf_sg(9). Note, bge_newbuf_std still has a bug for handling dma map load failure under high network load. Just reusing mbuf is not enough as driver already unloaded the dma map of the mbuf. Graceful recovery needs more work. Ideally we can just update dma address part of a Rx descriptor because the controller never overwrite the Rx descriptor. This requires some Rx initialization code changes and it would be done later after fixing other incorrect bus_dma(9) usages.
|
198923 |
04-Nov-2009 |
yongari |
Use correct dma tag for jumbo buffer.
|
198318 |
21-Oct-2009 |
stas |
- On entrance to the rx_eof sync RX rings maps with POSTWRITE flag instead of POSTREAD: the hardware do not touch this memory (CPU updates it). It is already synchronized as PREWRITE after the processing is done.
- Synchronize RX return ring memory in rx_eof. This is needed as the deviced updates this memory when receives packets.
- Decouple the synchronization of BGE status block in the interrupt service routine: perfrom PREREAD synchronization only all accesses to this block are finished. This seems to be more natural.
Reviewed by: yongari, marius MFC after: 2 weeks
|
198049 |
13-Oct-2009 |
bz |
Immediately after clearing a pending callout that didn't make it due to the lock we hold, disable interrupts, and announce to the firmware that we are shutting down. Especially do this before disabling blocks.
This makes some types of machines with asf enabled no longer hang upon boot, when we start configuring the interface.
PR: i386/96382, kern/100410, kern/122252, kern/116328 Reported by: erwin Hardware provided by: TDC A/S Reviewed by: stas Tested by: stas
|
197837 |
07-Oct-2009 |
stas |
- Give a name to the host coalescing bug fix WDMA mode register bit instead of using hardcoded value in the code. Obtained from: OpenBSD
|
197832 |
07-Oct-2009 |
stas |
- Add support for new BGE chips (5761, 5784 and 57780). These chips uses new BGE_PCI_PRODID_ASICREV register to store the chip identifier and its revision. - Add new grouping macro for 7575+ chips (BGE_IS_5755_PLUS). - Add IDs for Fujitsu-branded Broadcom adapters.
PR: kern/127587 Tested by: Thomas Quinot <thomas@quinot.org> (BCM7561 A0) MFC after: 2 weeks Obtained from: OpenBSD
|
196370 |
18-Aug-2009 |
stas |
- Do not try to reevaluate current RX production index on each loop iteration as it can be updated by the card while we process the RX ring forcing us to process RX descriptors for which DMA synchronisation operation has not been performed. This fixes the bug when bge(4) drops packets under high load.
Discussed with: yongari, marius Approved by: re (kib) MFC after: 1 week
|
195049 |
26-Jun-2009 |
rwatson |
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list.
Approved by: re (kib) MFC after: 6 weeks
|
193103 |
30-May-2009 |
attilio |
Fix return values appropriately.
Tested by: zec
|
193100 |
30-May-2009 |
attilio |
s/rk_npkts/rx_npkts
Reported by: zec
|
193096 |
30-May-2009 |
attilio |
When user_frac in the polling subsystem is low it is going to busy the CPU for too long period than necessary. Additively, interfaces are kept polled (in the tick) even if no more packets are available. In order to avoid such situations a new generic mechanism can be implemented in proactive way, keeping track of the time spent on any packet and fragmenting the time for any tick, stopping the processing as soon as possible.
In order to implement such mechanism, the polling handler needs to change, returning the number of packets processed. While the intended logic is not part of this patch, the polling KPI is broken by this commit, adding an int return value and the new flag IFCAP_POLLING_NOCOUNT (which will signal that the return value is meaningless for the installed handler and checking should be skipped).
Bump __FreeBSD_version in order to signal such situation.
Reviewed by: emaste Sponsored by: Sandvine Incorporated
|
192128 |
14-May-2009 |
delphij |
Some comment/space changes (FALLTHRU -> FALLTHROUGH, space after while).
|
192127 |
14-May-2009 |
delphij |
Try to workaround a race where bge_stop() may sneak in when bge_rxeof() drops and re-grabs the softc mutex in the middle, resulting in kernel trap 12. This may happen when a lot of traffic is being hammered on one bge(4) interface while the system is shutting down.
Reported by: Alexander Sack <pisymbol gmail com> PR: kern/134548 MFC After: 2 weeks
|
190319 |
23-Mar-2009 |
marius |
- Ensure that INTx isn't disabled, as these chips apparently have a quirk requiring it to be enabled even when using MSI. This makes the latter work again after r189285. - Remove a comment which no longer applies since r190194.
|
190194 |
21-Mar-2009 |
marius |
- In bge_ifmedia_upd_locked() take advantrage of LIST_FOREACH(). - If boot verbose, print asicrev, chiprev and bus type on attach. - For PCI Express devices: 1) Adjust max read request size to 4Kbytes 2) Turn on FIFO_LONG_BURST in RDMA during bge_blockinit() Though 1) does not seem to have much to do with the poor TX performance observed on PCI Express bge(4), 2) does fix the problem. [1] - Nuke the RX CPU self-diag, which prevents working cards from working (Linux tg3 does not have this diag neither does OpenBSD's bge(4)). The increasing of the firmware handshaking timeout to 20000 retries done as part of the original commit isn't merged as way already have a way higher BGE_TIMEOUT of 100000.
PR: 119361 [1] Obtained from: tg3 via DragonflyBSD [1], DragonflyBSD
|
188457 |
10-Feb-2009 |
marius |
Don't reset the PHY probe retry counter within the loop so it will eventually terminate as intended.
Submitted by: Helen Zhang
|
188164 |
05-Feb-2009 |
imp |
device_shutdown returns an int.
|
185812 |
09-Dec-2008 |
marius |
- Limit BCM5701 B5 to 32-bit mode as a workaround for a bug which causes data corruption in combination with certain bridges. Information about this problem was kindly provided by davidch. [1] - As BGE_FLAG_PCIX is meant to indicate that the controller is in PCI-X mode, revert to the pre __FreeBSD_version 602101 method of reading the bus mode register rather than checking the mere existence of a PCI-X capability, which is also there when the NIC f.e. is put into a 32-bit slot causing it not to be in PCI-X mode. Setting BGE_FLAG_PCIX inappropriately could cause the NIC to be tuned incorrectly.
PR: 128833 [1] Reviewed by: jhb MFC after: 3 days
|
184380 |
27-Oct-2008 |
marius |
Do as the Linux tg3 driver does and enable MSI support also for the BCM5714 revision A0 when in a multi-port configuration and unconditionally for the remainder of the class of BCM575X and beyond chips. This was prodded by mav and is based on a suggestion and a patch submitted by jhb.
Reviewed by: jhb MFC after: 2 months
|
183896 |
14-Oct-2008 |
marius |
Use bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9) in order to get rid of the bus space handle and tag in the softc.
MFC after: 1 month
|
183281 |
22-Sep-2008 |
marius |
- Don't read the identifier string from the VPD if there's no chip containing an Ethernet address fitted as this is yet another thing that fails in that case in order to avoid the one second delay until pci_read_vpd_reg() times out. - Const'ify the bge_devs array.
|
182874 |
08-Sep-2008 |
oleg |
bge_tick(): do not touch PHY if link is up. This should solve problem with extra input errors for some BCM57XX chips.
PR: kern/122295
|
178996 |
14-May-2008 |
marius |
Improve the integration of BCM5906[M] support: - Rename BGE_FLAG_EEPROM to BGE_FLAG_EADDR to underline it's absence means "there's no chip containing an Ethernet address fitted to the BGE chip so we have to get it from the firmware instead" rather than "there's no EEPROM, but maybe NVRAM or something else". - Don't treat BCM5906[M] generally like chips w/o BGE_FLAG_EADDR set, just in the two cases really necessary. This gets us line with the original patch for DragonFlyBSD. - For sparc64 restore the intended behavior of obtaining the Ethernet address from the firmware in case BGE_FLAG_EADDR is not set, even for BCM5906[M]. - Fix some style(9) bugs introduced with rev. 1.208 of if_bge.c
Approved by: jhb Additional testing by: Thomas Nystroem (BCM5906)
|
178785 |
05-May-2008 |
bz |
Use a better approach to force the interrupt which should work for all cards/modes. In addition to the intr forcing added with rev. 1.205 adopt the other places to use the same logic.
We need to exclude a few chips/revisions (5700, 5788) from using the enhanced version and fall back to the old way as that is the only method they support.
Tested by: phk Suggested by: davidch, Broadcom (thanks a lot for the help!) MFC after: 16 days
|
178707 |
01-May-2008 |
bz |
Use the correct bit when trying to force an interrupt through the HCC reg. It's not a problem as this is a #ifdef notyet.
|
178667 |
29-Apr-2008 |
jhb |
Add support for the BCM5906[M] adapters. These adapters only support 10/100 operation and place the mailbox registers at a different offset. They also do not have an EEPROM, so the MAC address must be read from NVRAM instead.
MFC after: 1 month PR: kern/118975 Submitted by: benjsc, Thomas Nyström thn at saeab dot se Submitted by: sephe (original patch for DragonflyBSD)
|
178588 |
26-Apr-2008 |
marius |
Remove some remnant alpha hacks.
Approved by: PCI-maintainers (imp, jhb)
|
178578 |
26-Apr-2008 |
marius |
- Use more appropriate maxsize, nsegments and maxsegsize parameters when creating the parent bus DMA tag. While at it correct the style and a nearby comment. - Take advantage of m_collapse(9) for performance reasons.
MFC after: 2 weeks
|
178004 |
08-Apr-2008 |
bz |
In some situations we were not clearing pending link state attentions. Because of this we were not getting further interrupts for link state changes, thus never went into iface UP state and thus could not transmit.
The only way out of this was an incoming packet generating an rx interrupt and making us call into bge_link_upd.
Up to rev. 1.101, in bge_start_locked, we only returned instantly if there was 'no link AND nothing queued for tx'. So with a packet queued for tx, we hit the register scrubbing at the end of bge_start_locked and were out fine. We simply lost a packet or two but got the interrupts need to get into UP state. With rev. 1.102 this was turned into 'if there is no link OR there is nothing to send' (correct behaviour) and as long as there is no link we never hit the register scrubbing and consequently never got the link UP.
What we do now is force an interrupt at the end of bge_ifmedia_upd_locked so we will call bge_link_upd, clear the link state attention and get further interrupts. This helps to get the iface UP on an idle network or at least to get it UP faster not depending on an rx intr anymore. In case you could not get a DHCP lease or it took very long, it was because of this.
It is unknown which chips are affected by this. ASIC rev. 0x2003 was the most popular trouble candidate. At least the fiber cards should have been working fine.
Which register to scrub is currently under discussion. The comitted solution was tested and found to work for a lot of setups. It might not help with MSI. The reason why we end up in such a situation is entirely unknown.
PR: kern/111804 Tested by: phk, scottl at Y! MFC after: 14 days
|
177057 |
11-Mar-2008 |
jhb |
Don't enable the workaround for the jitter bug on the 5722.
Obtained from: Linux tg3 driver
|
176883 |
06-Mar-2008 |
jhb |
Style tweak to the 5722 chipid to match the rest of this file.
|
176881 |
06-Mar-2008 |
jhb |
Flesh out support for the BCM5722 by recognizing the phy on the 5722 and the specific ASIC revision.
MFC after: 1 week Obtained from: OpenBSD (mii/phy bits)
|
175466 |
18-Jan-2008 |
jkim |
Add a flag for Ethernet@WireSpeed capability and correct chip revisions. The idea was taken from OpenBSD and cross-referenced with Linux driver.
|
175458 |
18-Jan-2008 |
jkim |
Fix mbuf pool watermark configuration (mismerged from OpenBSD in 1.132).
Submitted by: sephe MFC after: 3 days
|
174902 |
25-Dec-2007 |
remko |
Add support for the BMC5722.
Reported by: Chris Shenton <chris at shenton dot org> on current@ Approved by: imp (mentor)
|
173675 |
16-Nov-2007 |
jkim |
Do not report MAC, TX, and RX stats via sysctl(8) with BCM5705+. The register layout is little different from memory-mapped stats in the previous generation chips. In fact, it is bad because registers in this range are cleared after reading them.
Reviewed by: scottl MFC after: 3 days
|
172394 |
30-Sep-2007 |
marius |
Make the PCI code aware of PCI domains (aka PCI segments) so we can support machines having multiple independently numbered PCI domains and don't support reenumeration without ambiguity amongst the devices as seen by the OS and represented by PCI location strings. This includes introducing a function pci_find_dbsf(9) which works like pci_find_bsf(9) but additionally takes a domain number argument and limiting pci_find_bsf(9) to only search devices in domain 0 (the only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order to no longer report false positives when searching for siblings and dupe devices in the same domain respectively. Along with this change the sole host-PCI bridge driver converted to actually make use of PCI domain support is uninorth(4), the others continue to use domain 0 only for now and need to be converted as appropriate later on. Note that this means that the format of the location strings as used by pciconf(8) has been changed and that consumers of <sys/pciio.h> potentially need to be recompiled.
Suggested by: jhb Reviewed by: grehan, jhb, marcel Approved by: re (kensmith), jhb (PCI maintainer hat)
|
170289 |
04-Jun-2007 |
dwmalone |
Despite several examples in the kernel, the third argument of sysctl_handle_int is not sizeof the int type you want to export. The type must always be an int or an unsigned int.
Remove the instances where a sizeof(variable) is passed to stop people accidently cut and pasting these examples.
In a few places this was sysctl_handle_int was being used on 64 bit types, which would truncate the value to be exported. In these cases use sysctl_handle_quad to export them and change the format to Q so that sysctl(1) can still print them.
|
170176 |
01-Jun-2007 |
yar |
Add on/off controls for VLAN_MTU and VLAN_HWTAGGING to bge(4).
|
169882 |
22-May-2007 |
jkim |
Remove an empty line.
|
169881 |
22-May-2007 |
jkim |
Remove BCM5704S specific tunable (hw.bge.fake_autoneg) and auto-detect the condition.
|
169880 |
22-May-2007 |
jkim |
Rearrange DMA read/write control register settings based on document snippet provided by davidch via glebius.
PR: kern/96806
|
169878 |
22-May-2007 |
jkim |
Remove stale alpha support code.
|
169876 |
22-May-2007 |
jkim |
Fix time out check in EEPROM read and move delays to give some settle time.
Submitted by: mjacob
|
169875 |
22-May-2007 |
jkim |
Add delays in MI communication register R/W loops.
|
169191 |
01-May-2007 |
jkim |
Reflect MFC of pci_find_extcap().
MFC after: 3 days
|
169152 |
30-Apr-2007 |
marius |
- Add support/quirks for the on-board BGEs found in Sun Blade 1500 Blade 2500, Fire V210 and probably some other sparc64 machines. These chips are typically not fitted with an EEPROM which means that we have to obtain the MAC address via OFW and that some chip tests will just always fail. These changes are based on the respective code found in OpenBSD with some additional info obtained from OpenSolaris and some style suggestions by jkim@. They also have the desired side-effect of respecting the 'local-mac-address?' system configuration variable for the affected BGEs. - In bge_attach() factor out calling bge_release_resources() before going to the fail label into the fail label as well as replace a magic 6 with ETHER_ADDR_LEN.
Reviewed by: yongari (before style changes), jkim
|
168277 |
02-Apr-2007 |
jkim |
Enable MSI support on RELENG_6.
MFC after: 3 days
|
167496 |
13-Mar-2007 |
scottl |
Fix some OID names and minor style as per feedback from various people. Also, apparently quad support is broken in the sysctl infrastructure, so don't pretend that it works.
Submitted by: ru, bde
|
167480 |
12-Mar-2007 |
scottl |
Add MAC, RX, and TX stats reporting via sysctl.
|
167351 |
09-Mar-2007 |
jkim |
Add more chipset revision IDs.
Obtained from: OpenBSD
|
167312 |
08-Mar-2007 |
jkim |
Use correct bits to stop firmware when ASF mode is enabled.
|
167311 |
08-Mar-2007 |
jkim |
Fix more style(9) bugs.
- Remove some excessive parentheses around shift operators. - Use macro instead of magic number where it is applicable. - Change lower-case hexdecimals to upper cases to match wpaul's style. - Revert some unnecessary line wraps and changes from the previous commit.
Pointed out by: bde
|
167280 |
06-Mar-2007 |
jkim |
Fix style(9) and consistency.
|
167279 |
06-Mar-2007 |
jkim |
Pollute bge(4) with #if's and #ifdef's to make MFC easier.
MFC after: 3 days
|
166901 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many Approved by: re@
|
166718 |
14-Feb-2007 |
jkim |
Use bge_writereg_ind() to do global reset as we did before 1.159 for certain chipsets. It was causing 'firmware handshake timed out' errors for some chips.
Discussed with: scottl
|
166717 |
14-Feb-2007 |
jkim |
Fix two typos in comments.
|
166677 |
12-Feb-2007 |
jkim |
Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver.
|
166676 |
12-Feb-2007 |
jkim |
Fix style(9).
Pointed out by: many
|
166673 |
12-Feb-2007 |
jkim |
Add PHY DSP code for BCM5755M.
Obtained from: OpenBSD
|
166031 |
15-Jan-2007 |
jkim |
- Fix BCM5754 support found in Dell PowerEdge SC440. - Move some PHY bug detections from brgphy.c to if_bge.c. - Do not penalize working PHYs. - Re-arrange bge_flags roughly by their categories. - Fix minor style(9) nits.
PR: kern/107257 Obtained from: OpenBSD Tested by: Mike Hibler <mike at flux dot utah dot edu>
|
165932 |
11-Jan-2007 |
jdp |
Correct the comment describing the BGE_PCISTATE_PCI_BUSSPEED bit. It had the sense of the bit reversed.
|
165557 |
26-Dec-2006 |
bde |
After rev.1.169, the "interrupt" coalescing parameters are not used in bge_intr(). Some of them are used in bge_poll(). Simplify by only initializing these for polling mode and not toggling them when switching modes. This also fixes missing synchronization with the coalescing engine in the toggling.
|
165459 |
22-Dec-2006 |
jdp |
Re-enable MSI support for those chips on which it is believed to work properly.
|
165458 |
22-Dec-2006 |
jdp |
Correct the BGE_CHIPID_BCM5750_B0 constant.
MFC after: 1 week
|
165383 |
20-Dec-2006 |
bde |
In bge_txeof(), cancel the watchdog timeout if all descriptors have been handled instead of when at least one descriptor was just handled. For bge, it is normal to get a txeof when only a small fraction of the queued tx descriptors have been handled, so the bug broke the watchdog in a usual case.
|
165376 |
20-Dec-2006 |
bde |
Avoid a race and a pessimization in bge_intr():
- moved the synchronizing bus read to after the bus write for the first interrupt ack so that it actually synchronizes everything necessary.
We were acking not only the status update that triggered the interrupt together with any status updates that occurred before we got around to the bus write for the ack, but also any status updates that occur after we do the bus write but before the write reaches the device. The corresponding race for the second interrupt ack resulted in sometimes returning from the interrupt handler with acked but unserviced interrupt events. Such events then remain unserviced until further events cause another interrupt or the watchdog times out.
The race was often lost on my 5705, apparently since my 5705 has broken event coalescing which causes a status update for almost every packet, so another status update is quite likely to occur while the interrupt handler is running. Watchdog timeouts weren't very noticeable, apparently because bge_txeof() has one of the usual bugs resetting the watchdog.
- don't disable device interrupts while bge_intr() is running. Doing this just had the side effects of: - entering a device mode in which different coalescing parameters apply. Different coalescing parameters can be used to either inhibit or enhance the chance of getting another status update while in the interrupt handler. This feature is useless with the current organization of the interrupt handler but might be useful with a taskqueue handler. - giving a race for ack+reenable/return. This cannot be handled by simply rearranging the order of bus accesses like the race for ack+keepenable/entry. It is necessary to sync the ack and then check for new events. - taking longer, especially with the extra code to avoid the race on ack+reenable/return.
Reviewed by: ru, gleb, scottl
|
165363 |
20-Dec-2006 |
jkim |
Partially back out rev. 1.148 and use new ETHER_BPF_MTAP() macro for VLAN. Remaining changes are cosmetic.
|
165344 |
19-Dec-2006 |
oleg |
- Add missing callout_drain() call. - Synchronize bge_tick() with callout_reset/callout_stop() calls. - Avoid using bge_tick() inside bge_link_upd(), use mii_pollstat() instead.
MFC after: 2 month
|
165333 |
18-Dec-2006 |
jkim |
- Remove stale VPD support and its comment and get device name from VPD API. - Do not repeatedly read vendor/device IDs while probing. - Remove redundant bzero(3) for softc. device_get_softc(9) does it for free[1].
Reviewed by: glebius Suggested by: glebius[1]
|
165236 |
15-Dec-2006 |
jdp |
Disable bge MSI support for now. A couple of people warned me that there are problems with it on several revisions of this chip. I'll re-enable it after I've sorted out which chip revisions work and which don't.
|
165233 |
14-Dec-2006 |
jdp |
Add MSI support to the bge driver. I tested this on a Dell SC1435 running an i386 kernel, and it worked fine.
|
165189 |
13-Dec-2006 |
scottl |
Fix recent style problems and expand a comment.
Submitted by: Bruce Evans
|
165188 |
13-Dec-2006 |
scottl |
Use the BGE_IS_* macros consistently. Also add a couple of missing cases to the debug_info function.
|
165187 |
13-Dec-2006 |
scottl |
Remove a redundant write of the firmware reset magic number. It looks to have been added erroneously, and it causes problems on some chips. A larger change is needed to do this write at a more appropriate place, but that change requires reworking the ASF logic. That will be worked on in the future.
Submitted by: Bruce Evans
|
165181 |
13-Dec-2006 |
jkim |
Use one counter instead of four to make up TX collision stats as BCM5705+. It reduces chance of errors from multiple counter wraps at the same time.
|
165114 |
12-Dec-2006 |
scottl |
Fix support for certain 575x/578x chips. This consists of the following:
- Use the appropriate register writing method when reseting the chip - Program the descriptor DMA engine correctly. - More reliably detect certain chips and their features.
Also add some low-level debugging tools to help future work on this driver.
Submitted by: David Christenson (proof of concept changes) Sponsored by: www.UIA.net
|
165101 |
11-Dec-2006 |
jkim |
- Correct collision counter for BCM5705+. This register is read/clear. - Correct RX packet drop counter for BCM5705+. This register is read/clear and it wraps very quickly under heavy packet drops because only the lower ten bits are valid according to the documentation. However, it seems few more bits are actually valid and the rest bits are always zeros[1]. Therefore, we don't mask them off here. To get accurate packet drop count, we need to check the register from bge_rxeof(). It is commented out for now, not to penalize normal operation. Actual performance impact should be measured later. - Correct integer casting from u_long to uint32_t. Casting is not really needed for all supported platforms but we better do this correctly[2].
Tested by: bde[1] Suggested by: bde[2]
|
164888 |
04-Dec-2006 |
jkim |
- Add BGE_FLAG_JUMBO flag which idicates jumbo frame capability. Some day we may be able to support jumbo frames for BCM5714 and BCM5780. - Rename BGE_IS_5705_OR_BEYOND() to BGE_IS_5705_PLUS() for consistency.
|
164886 |
04-Dec-2006 |
jkim |
Use bge_flags to save chipset family and remove dead code while I am here.
|
164879 |
04-Dec-2006 |
glebius |
Fix my error in rev. 1.152
Submitted by: oleg
|
164781 |
01-Dec-2006 |
jkim |
Fix white spaces.
|
164780 |
01-Dec-2006 |
jkim |
Simplify statistics updates, remove redundant register reads, and add discarded RX packets to input error for BCM5705 or newer chipset as the others. Unfortunately we cannot do the same for output errors because ifOutDiscards equivalent register does not exist. While I am here, replace misleading and wrong BGE_RX_STATS/BGE_TX_STATS with BGE_MAC_STATS. They were reversed but worked accidently.
|
164769 |
30-Nov-2006 |
glebius |
- Instead of if_watchdog/if_timer interface use our own timer that piggybacks on bge_tick() callout. - Lock bge_tick() using callout_init_mtx().
|
163502 |
19-Oct-2006 |
scottl |
There is no reason to have a PAGE_SIZE alignment enforced on all DMA by the parent tag.
|
162982 |
03-Oct-2006 |
glebius |
Remove 3Com 985 deviceid that is really ti(4).
Submitted by: erwin
|
162583 |
23-Sep-2006 |
scottl |
Allow the ASF feature to be disabled via a tunable. On one of my systems, bringing up the bge interface results in a complete system freeze when this feature is enabled. Leave it enabled by default.
|
162423 |
18-Sep-2006 |
jkim |
Do not strip VLAN tag in promiscuous mode.
|
162422 |
18-Sep-2006 |
jkim |
Simplify promiscuous mode check and make ALLMULTI independent from it.
|
162375 |
17-Sep-2006 |
andre |
Move ethernet VLAN tags from mtags to its own mbuf packet header field m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content.
Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field:
m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG;
to mark the packet m with the specified VLAN tag.
On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid:
if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... }
VLAN tags are stored in host byte order. Byte swapping may be necessary.
(Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.)
Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done.
Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005
|
162321 |
15-Sep-2006 |
glebius |
- Consistently use if_printf() only in interface methods: if_start(), if_watchdog, etc., or in functions used only in these methods. In all other functions in the driver use device_printf(). - Use __func__ instead of typing function name.
Submitted by: Alex Lyashkov <umka sevcity.net>
|
162169 |
09-Sep-2006 |
ambrisko |
Add support to bge(4) to not break IPMI support when the driver attaches to it. Try to co-operate with the IPMI/ASF firmware accessing the PHY. One we get link we don't mess with the PHY. If we do then over time the NIC will go off line. It would be nice if we could tell if IPMI was enabled on the chip but I can't figure out a reliable way to do that. The scheme I tried worked on a Dell PE850 but not on an HP machine. So we assume any NIC that has ASF capability needs to deal with it.
The code was inspired by the support in Linux from kernel.org and Broadcom. Broadcom did give me some info. but it is rather limited and is mostly just what is in the Linux driver. Thanks to the numerous people that helped debug the many prior versions and that I didn't break other bge(4) HW.
Reviewed by: several people Tested by: even more
|
161928 |
03-Sep-2006 |
jmg |
add a newbus method for obtaining the bus's bus_dma_tag_t... This is required by arches like sparc64 (not yet implemented) and sun4v where there are seperate IOMMU's for each PCI bus... For all other arches, it will end up returning NULL, which makes it a no-op...
Convert a few drivers (the ones we've been working w/ on sun4v) to the new convection... Eventually all drivers will need to replace the parent tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for each driver, and will require hand inspection...
Reviewed by: scottl (earlier version)
|
161847 |
01-Sep-2006 |
davidch |
/tmp/cvsleYf6y
|
161575 |
24-Aug-2006 |
oleg |
Properly lock ifmedia callbacks. This should prevent concurrent access to PHY. Following issues should be resolved: - random watchdog timeouts (caused by concurrent phy access) - some link state issues - non working TX if media type was set explicitly
PR: kern/98738 Approved by: glebius (mentor) MFC after: 2 weeks
|
161546 |
23-Aug-2006 |
glebius |
Pack several boolean fields into single bge_flags field.
|
161438 |
18-Aug-2006 |
glebius |
bge_cksum_pad() can modify the mbuf, thus call it before bus_dmamap_load().
Submitted by: yongari
|
161399 |
17-Aug-2006 |
glebius |
Rewrite bge_encap() so that it takes mbuf ** argument. In this case if m_defrag(9) changes pointer we can show this to our caller.
Reviewed by: yongari
|
161043 |
07-Aug-2006 |
glebius |
Recognize the 5750 C2.
Obtained from: OpenBSD (brad)
|
160017 |
29-Jun-2006 |
glebius |
Since 5714 family doesn't have Jumbo ring, we do not support Jumbos on them, yet. The 5780 is equivalent to the 5714.
Submitted by: brad@OpenBSD, davidch
|
159999 |
28-Jun-2006 |
glebius |
- Recognize more device IDs adding support for BCM5754, BCM5755, BCM5787 based NICs. - Recognize BCM5703 B0 ASIC. - Rewrite the jumbo capability matching macro, so that chips known to work are listed there. [*]
[*] I'm still not sure about this. Probably more corrections will be done to this macro after discussion with davidch@ and brad@OpenBSD.
Obtained from: OpenBSD (brad)
|
159637 |
15-Jun-2006 |
glebius |
Possess some work from OpenBSD, with some local additions.
- Add more device IDs, ASIC revisions and chip IDs. - Rewrite a bit code that picks the description for device. - Introduce several macros to shorten quirks for bugs and features.[*] - Use some magic values, that OpenBSD has successfully possessed from Linux (Broadcom supplied) driver. - Remove disabled code that tried to access VPD.
[*] The macro that matches Jumbo capable NICs is rewritten to preserve our current behavior. I need clarify whether our or theirs is correct.
PR: 68351 (and may be others) Obtained from: OpenBSD, brad@ mostly
|
159396 |
08-Jun-2006 |
glebius |
Whitespace.
|
159395 |
08-Jun-2006 |
glebius |
u_intXX -> uintXX
|
159385 |
07-Jun-2006 |
glebius |
- style(9) cleanup. - Fix comments and printf()s about allocating jumbo buffers.
|
158651 |
16-May-2006 |
phk |
Since DELAY() was moved, most <machine/clock.h> #includes have been unnecessary.
|
158022 |
25-Apr-2006 |
mjacob |
If one removes the option from conf/options, one should remove the include of the derived file opt_bge.h as well.
|
158018 |
25-Apr-2006 |
mr |
make BGE_FAKE_AUTONEG a tunable. This allows one to change the behavior of the driver pre-boot.
NOTE: This patch was made for DragonFly BSD by Sepherosa Ziehau.
PR: kern/94833 Submitted by: Devon H. O'Dell Obtained from: DragonFly MFC after: 1 month
|
157769 |
15-Apr-2006 |
scottl |
Fix the interrupt handler to do the mandatory PCI flush before looking at DMA memory. The could contribute towards missed link state changes under heavy bus load.
|
157683 |
12-Apr-2006 |
pjd |
Correct an obvious typo.
MFC after: 1 week
|
156801 |
17-Mar-2006 |
glebius |
Remove dead code.
Submitted by: oleg
|
155782 |
17-Feb-2006 |
oleg |
1) Ignore link events for MII/GMII cards if MI auto-polling disabled. This should fix strange link state behaviour reported for bcm5721 & bcm5704c 2) Clear bge_link flag in bge_stop() 3) Force link state check after bge_ifmedia_upd(). Otherwise we can miss link event if PHY changes it's state fast enough.
Tested by: phk (bcm5704c) Approved by: glebius (mentor) MFC after: 1 week
|
155207 |
02-Feb-2006 |
oleg |
Enable 'complete' rx checksum offloading (i.e. let chip calculate checksums with pseudo header for tcp/udp packets). This could save one in_pseudo() call per incoming tcp/udp packet.
Approved by: glebius (mentor) MFC after: 3 weeks
|
155184 |
01-Feb-2006 |
oleg |
Optimize bge_rxeof() & bge_txeof(): return immediately if there are no packets to process. It could give us [significant?] perfomance increase if there is big difference between RX/TX flows.
Submitted by: Mihail Balikov <mihail.balikov AT interbgc DOT com> Approved by: glebius (mentor) MFC after: 3 days
|
155182 |
01-Feb-2006 |
oleg |
Since bge_rxeof() & bge_txeof() depends on status block data it should be synchronized on every call of bge_poll_locked().
Suggested by: Mihail Balikov <mihail.balikov AT interbgc DOT com> Approved by: glebius (mentor) MFC after: 3 days
|
155180 |
01-Feb-2006 |
oleg |
1) Fix link state detection for cards operating in TBI mode (fiber ones) 2) add missing bus_dmamap_sync() call in bge_intr()
Tested by: Husnu Demir <hdemir AT metu DOT edu DOT tr> Approved by: glebius (mentor) MFC after: 3 days
|
155170 |
01-Feb-2006 |
ru |
Setting IFF_ALLMULTI on a running interface didn't call bge_setmulti() as intended, resulting in a non-working multicast routing. Fix it.
MFC after: 3 days
|
155052 |
30-Jan-2006 |
glebius |
This driver can do hardware VLAN tagging + checksum offloading.
In collaboration with: Mihail Balikov <mihail.balikov interbgc.com>
|
154723 |
23-Jan-2006 |
glebius |
Use m_getcl() instead of getting mbuf, and then getting a cluster.
|
154610 |
21-Jan-2006 |
glebius |
Check for BGE_RXBDFLAG_IP_CSUM flag before marking mbuf as with valid checksum. This fixes operation of PPPoE and other non-IP Ethernet protocols.
|
154519 |
18-Jan-2006 |
glebius |
Be ready to a case when not a constant number of segments is returned by bus_dmamap_load_mbuf_sg() on jumbo buffer allocation.
Reviewed by: scottl, gallatin
|
154492 |
17-Jan-2006 |
oleg |
- Count packets discarded by RX/TX MAC (cause of FIFO overflow, etc) as input/output interface errors. - Keep values of rx/tx discards & tx collisions inside struct bge_softc. So we can keep statistic across ifconfig down/up runs (cause bringing bge up will reset chip).
Approved by: glebius (mentor) MFC after: 1 week
|
154368 |
14-Jan-2006 |
scottl |
Don't base the number of jumbo segments on page size, instead base it on the fact that jumbo desriptors are defined to have 3 segments.
Found by: Coverity Prevent(tm)
|
154292 |
13-Jan-2006 |
oleg |
1) move all link state detection code from bge_tick_locked() to bge_link_upd() 2) use more robust way of link state handling for BCM5700 rev.B2 chip 3) workaround bug of some BCM570x chips which cause spurious "link up" messages 4) fix bug: some BCM570x chips was unable to detect link state changes after ifconfig down/up sequence until any 'non-link related' interrupt generated. (this happened due to pending internal link state attention which blocked interrupt generation)
Approved by: glebius (mentor) MFC after: 1 week
|
153673 |
23-Dec-2005 |
yongari |
Use device_printf() and if_printf() rather than printf() and axe bge_unit from the softc.
Requested by: marius
|
153642 |
22-Dec-2005 |
glebius |
- All bge(4) supported hardware is known to support RX/TX checksum offloading, except for BGE_CHIPID_BCM5700_B0, which is buggy. - All bge(4) supported hardware, has a bug that produces incorrect checksums on Ethernet runts. However, in case of a transmitted packet, the latter can be padded with zeroes, and the checksum would be correct. (Probably chip includes the pad data into checksum). In case of receive, we just don't trust checksum data in received runts.
Obtained from: NetBSD (jonathan) via Mihail Balikov
|
153629 |
22-Dec-2005 |
yongari |
Fix bge_eeprom_getbyte() to return 1 when timeout happens. Previously it always returned 0 which means success regardless of EEPROM status.
While here, add a check whether EEPROM read is successful.
Submitted by: jkim
|
153626 |
22-Dec-2005 |
yongari |
Add bge(4) support for big-endian architectures(part 2/2). - removed unused funtion bge_handle_events(). - removed bus_dmamap_destroy(9) calls for DMA maps created by bus_dmamem_alloc(9). This should fix panics seen on sparc64 in device detach. - added check for parent DMA tag creation. - switched to use __NO_STRICT_ALIGNMENT as bge(4) supports all architectures. - added missing bus_dmamap_sync(9) in bge_txeof(). - added missing bus_dmamap_sync(9) in bge_encap(). - corrected memory synchronization operation on status block. As the driver just read status block that was DMAed by NIC it should use BUS_DMASYNC_POSTREAD. Likewise the driver does not need to write status block back, so remove unnecessary bus_dmamap_sync(9) calls in bge_intr(). - corrected memory synchronization operation on RX return ring. The driver only read the block so remove unnecessary bus_dmamap_sync(9) in bge_rxeof(). - force bus_dmamap_sync(9) for only modified descriptors. Blindly synching all desciptor rings would reduce performance. - call bus_dmamap_sync(9) for DMA maps that were modified in bge_rxeof().
Reviewed by: jkim(initial version) Tested by: glebius(i386), jkim(amd64 initial version)
|
153516 |
18-Dec-2005 |
glebius |
Since BGE_MBX_TX_HOST_PROD0_LO register is write-only to software, we can cache its value in the softc. Eliminates one PCI register write per call to bge_start().
A 1.8% speedup for UDP_RR test on my old box.
Obtained from: NetBSD(jonathan) via delphij
|
153512 |
18-Dec-2005 |
glebius |
- Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL.
In collaboration with: yongari, ru, sam
|
153445 |
15-Dec-2005 |
glebius |
o Rewrite bge_encap() to use bus_dmamap_load_mbuf_sg(9), inlining the callback function bge_dma_map_tx_desc() into the bge_encap() itself. o If busdma returns EFBIG, try to m_defrag() the packet.
Reviewed by: yongari
|
153437 |
15-Dec-2005 |
yongari |
Add bge(4) support for big-endian architectures(part 1/2). - Give up endianess support and switch to native-endian format for accessing hardware structures. In fact embedded processor for BCM57xx is big-endian architure(MIPS) and it requires native-endian format for NIC structures.The NIC performs necessary byte/word swapping depending on programmed endian type. - With above changes all htole16/htole32 calls were gone. - Remove bge_vhandle member in softc and changed to use explicit register access. This may add additional performance penalty that than that of previous memory access. But most of the access is performed on initialization phase(e.g. RCB setup), it would be negligible.
Due to incorrect use of bus_dma(9) in bge(4) it still panics sparc64 system in device detach path. The issue would be fixed in next patch.
Reviewed by: jkim (initial version) Silence from: ps Tested by: glebius Obtained from: NetBSD via OpenBSD
|
153373 |
13-Dec-2005 |
marcel |
In bge_link_upd(), rewrite the logic so that status is assigned on the code path it is used in a way that GCC understands. This avoids breakage due to higher optimization levels.
|
153239 |
08-Dec-2005 |
glebius |
A big rewrite of receive Jumbo frame handling. Remove the local Jumbo cluster allocator, that wasn't MPSAFE. Instead, utilize our new generic UMA jumbo cluster allocator. Since UMA gives us a 9k piece that is contigous in virtual memory, but isn't contigous in physical memory we need to handle a few segments. To deal with this we utilize Tigon chip feature - extended RX descriptors, that can handle up to four DMA segments for one frame.
Details:
o Remove bge_alloc_jumbo_mem(), bge_free_jumbo_mem(), bge_jalloc(), bge_jfree() functions. o Remove SLIST heads, bge_jumbo_tag, bge_jumbo_map from softc. o Use extended RX BDs for Jumbo receive producer ring, and initialize it appropriately. o New bge_newbuf_jumbo(): - Allocate an mbuf with Jumbo cluster with help of m_cljget(). - Load the cluster for DMA with help of bus_dmamap_load_mbuf_sg(). - Assert that we got 3 segments in the DMA mapping. - Fill in these 3 segments into the extended RX descriptor.
|
153234 |
08-Dec-2005 |
oleg |
1) fix tiny bug in bge_start_locked() 2) rework link state detection code & use it in POLLING mode 3) fix 2 bugs in link state detection code: a) driver unable to detect link loss on bcm5721 b) on bcm570x chips (tested on bcm5700 bcm5701 bcm5702) driver fails to detect link loss with probability 1/6 (solved in brgphy.c)
Devices working in TBI mode should not be affected by this change.
Approved by: glebius (mentor) MFC after: 1 month
|
152953 |
30-Nov-2005 |
glebius |
If bus_dmamap_load() failed, we free the mbuf. We also need to clear the pointer, to avoid double free on next bge_stop().
|
152452 |
15-Nov-2005 |
glebius |
Recognize Broadcom BCM5752 chip, that can be found in HP DC7600.
PR: kern/88940 Submitted by: Alexander Hausner
|
152315 |
11-Nov-2005 |
ru |
- Store pointer to the link-level address right in "struct ifnet" rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr.
- Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
|
151553 |
22-Oct-2005 |
glebius |
Introduce polling(4) capability for bge(4).
Submitted by: Oleg Bulyzhin <oleg rinet.ru>
|
151545 |
22-Oct-2005 |
imp |
Replace FreeBSD 3.x syntax (controller miibus0) with 4.x syntax (device miibus) in time for 7.0 :-)
|
150700 |
28-Sep-2005 |
pjd |
Implement suspend/resume methods to be more ACPI friendly. I'm able to suspend/resume my laptop without this change, but then I need to wait for the watchdog to reset the card. With this change, it is ready immediately.
Glanced at by: glebius
|
150215 |
16-Sep-2005 |
ru |
Fix "struct ifnet" leaks when attach() fails in the middle.
|
149780 |
04-Sep-2005 |
pjd |
When bge_stop() is called from bge_detach(), mii is already NULL, so check before trying to use it. This fix allows to 'kldunload if_bge' without panicing.
Reviewed by: bz MFC after: 3 days
|
148887 |
09-Aug-2005 |
rwatson |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field.
Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so.
Reviewed by: pjd, bz MFC after: 7 days
|
148654 |
03-Aug-2005 |
rwatson |
Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list.
Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
|
147589 |
24-Jun-2005 |
dwhite |
Backout the change I made before 5.4-R since I wasn't aware that it was only a problem with one particular switch module. Create a kernel option BGE_FAKE_AUTONEG that restores the 5.4 behavior, which should make the DNLK switch module work. IBM/Intel blades with Intel or AD switch modules should work without patching or kernel options with this commit.
Hardware for testing provided by several folks, including Danny Braniss <danny@cs.huji.ac.il>, Achim Patzner <ap@bnc.net>, and OffMyServer.
Approved by: re
|
147256 |
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go.
Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
|
146734 |
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
146485 |
22-May-2005 |
silby |
Add PCI ID for BCM5789.
Submitted by: S. Aeschbacher
|
146413 |
19-May-2005 |
ps |
Support the 5714C
Submitted by: John Cagle <john dot cagle at hp dot com>
|
145893 |
05-May-2005 |
dwhite |
Backout part of rev 1.71, which breaks the interfaces on IBM/Intel blade servers.
PR: kern/68445 MFC after: 7 days
|
145470 |
24-Apr-2005 |
scottl |
Fix the order of the lowaddr,highaddr arguments in the parent tag. This coincidentally didn't cause any problems, but was definitely wrong.
|
143448 |
12-Mar-2005 |
avatar |
Adding new device ID for BCM5751M support.
Submitted by: FUJITA Kazutoshi <fujita at soum dot co dot jp> Reviewed by: sam (mentor)
|
139749 |
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
138990 |
17-Dec-2004 |
ps |
Add support for the 5721 which seems to be similar to the 5750/5751.
Tested by: Vivek Khera vivek at khera dot org
|
137961 |
21-Nov-2004 |
scottl |
Don't force busdma to pre-allocate bounce pages for the parent tag.
|
137403 |
08-Nov-2004 |
phk |
Hide link up/down/media printfs behind bootverbose
|
137090 |
30-Oct-2004 |
des |
With ALTQ, it is possible that although the queue was not empty when we 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.
|
137084 |
30-Oct-2004 |
des |
Add altq(4) support.
|
137073 |
30-Oct-2004 |
des |
Whitespace cleanup.
|
136686 |
19-Oct-2004 |
scottl |
Use and alignment of 1 instead of ETHER_ALIGN for rx and tx buffers and jumbo 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.
|
135784 |
25-Sep-2004 |
ps |
Fix the statements for checking if we're dealing with a 5705/5750.
Pointhat to: me
|
135772 |
24-Sep-2004 |
ps |
Add support for the BCM5750/5751. Unfortunately the documentation 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.
|
135359 |
17-Sep-2004 |
wpaul |
Commit patch to supress spurious link change events. Apparently, with 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.
|
132596 |
24-Jul-2004 |
yar |
Bring the advertised interface capabilities into line with the reality (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)
|
130273 |
09-Jun-2004 |
wpaul |
Add some special case code to fix a problem with the BCM5704 in TBI (fiber) 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
|
130270 |
09-Jun-2004 |
naddy |
Replace handrolled CRC calculation with ether_crc32_[lb]e().
|
129879 |
30-May-2004 |
phk |
Add missing <sys/module.h> includes
|
129640 |
24-May-2004 |
ps |
Add support for BCM5705K
Submitted by: candy@kgc.co.jp PR: kern/67110
|
129616 |
23-May-2004 |
mux |
We don't need to initialize if_output, ether_ifattach() does it for us.
|
127949 |
06-Apr-2004 |
ps |
Enable the memory arbiter before turning off the PXE restart. This 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>
|
127135 |
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
126966 |
14-Mar-2004 |
mdodd |
Announce ethernet MAC addresss in ether_ifattach().
|
124474 |
13-Jan-2004 |
brueffer |
Fix typo in a comment
|
124257 |
08-Jan-2004 |
wpaul |
Add the PCI ID for yet another bge chip: the Altima 1002.
Submitted by: Pavel Gubin <pg@rainbow.ie.tusur.ru>
|
123289 |
08-Dec-2003 |
obrien |
Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.
Requested by: bde,imp
|
122678 |
14-Nov-2003 |
obrien |
Remove duplicate FBSDID's, move others to their right place.
|
122625 |
13-Nov-2003 |
obrien |
Try to create some sort of consistency in how the routings to find the 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).
|
122497 |
11-Nov-2003 |
sam |
o add locking o mark isr MPSAFE
Supported by: FreeBSD Foundation
|
121816 |
31-Oct-2003 |
brooks |
Replace the if_name and if_unit members of struct ifnet with new members 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)
|
121810 |
31-Oct-2003 |
wpaul |
Add support for the Broadcom BCM5788 (just another entry to the PCI device ID list, probably a 5705 ASIC).
Submitted by: Marcel Prisi <marcel@virtua.ch>
|
120390 |
23-Sep-2003 |
ps |
By not setting No_CRC in the Mode Control Register, we must also reduce the size of the packet by 4 bytes to remove the ethernet crc.
Submitted by: jdp
|
120366 |
23-Sep-2003 |
ps |
From the Broadcom Eratta: 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.
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
119277 |
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
119157 |
20-Aug-2003 |
ambrisko |
On Dell boxes such as the PE2650 we need to disable 3 led mode for the link LED to work.
Reviewed by: wpaul Obtained from: Linux driver
|
119047 |
17-Aug-2003 |
ps |
Fix a typo. BGE_HCC_TX_MAX_COAL_BDS_INT is at offset 0x3C24, not 0x3C34
|
118814 |
12-Aug-2003 |
wpaul |
Add support for the Broadcom BCM5901 and BCM5901 rev A2 chips. 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>
|
118733 |
10-Aug-2003 |
wpaul |
The BCM5704 ASIC has a smaller mbuf space than the 5700/1/2/3. Failure 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.
|
118710 |
10-Aug-2003 |
wpaul |
Silence unwanted 'gigabit link up' messages: do not treat the 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.
|
118417 |
04-Aug-2003 |
wpaul |
Set the BGE_RX_MTU register correctly so that we can receive slightly 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.
|
118027 |
25-Jul-2003 |
wpaul |
Remove alpha vtophys() hack from if_bgereg.h and clean up unneeded #includes formerly required to pull in vtophys support, since we don't need them anymore.
|
118026 |
25-Jul-2003 |
wpaul |
Convert bge(4) to use busdma. I have not tested this on anything besides x86 yet since I don't have access to a non-x86 FreeBSD box at the moment. Volunteers welcome.
|
117659 |
16-Jul-2003 |
wpaul |
Add support for the BCM5705 and its ilk. Changes:
- 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.)
|
117434 |
11-Jul-2003 |
wpaul |
Squelch spurious "gigabit link up" messages generated on some fiber NICs (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.
|
115557 |
31-May-2003 |
phk |
Remove unused variable(s).
Found by: FlexeLint
|
115200 |
21-May-2003 |
ps |
- Make this work with PAE. - atomically load and clear the status block so we dont miss an update. Submitted by: jdp
Approved by: re (scottl)
|
114813 |
07-May-2003 |
ps |
- Change the full Asic revision defines to CHIPID to better since the 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)
|
114622 |
04-May-2003 |
ps |
Implement the write twice to send producer index workaround for BCM5700 chips as described in the Broadcom Errata documents.
Obtained from: NetBSD and Broadcom Errata documentation
|
114615 |
03-May-2003 |
ps |
- Change the short hand representation of the various ASIC revisions - Implement the ONEDMA_AT_ONCE workaround as described in the 5703/5704 eratta documents. Obtained from: NetBSD & Broadcom documentation
|
114590 |
03-May-2003 |
ps |
- Move bge_phy_hack into the phy code and implement the various DSP 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.
|
114547 |
02-May-2003 |
ps |
Add untested support for the Broadcom 5704.
Obtained from: NetBSD
|
114073 |
26-Apr-2003 |
ps |
Update the mbuf watermark settings to match the latest documentation from Broadcom. These values are strongly encouraged for proper operation.
MFC after: 3 days
|
113545 |
16-Apr-2003 |
mdodd |
- Don't call pci_enable_io() in drivers (unless needed for resume). - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
|
113506 |
15-Apr-2003 |
mdodd |
- Express hard dependencies on bus (pci, isa, pccard) and 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.)
|
113038 |
03-Apr-2003 |
obrien |
Use __FBSDID rather than rcsid[].
|
111119 |
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
110367 |
05-Feb-2003 |
ps |
Obtain the media type from the shared memory and only use the eeprom as a fallback.
|
109623 |
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
109514 |
19-Jan-2003 |
obrien |
Remove miidevs.h and generate it from miidevs at compile time. The devlist2h.awk tool to do this has been repocopied to sys/tools/.
|
108850 |
07-Jan-2003 |
jdp |
Put the ASIC revision into the device description string so it appears in the dmesg output.
MFC after: 3 days
|
108847 |
06-Jan-2003 |
jdp |
Don't reference the maxlen and flags fields in the ring control blocks 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
|
106937 |
14-Nov-2002 |
sam |
network interface driver changes:
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
|
106696 |
09-Nov-2002 |
alfred |
Fix instances of macros with improperly parenthasized arguments.
Verified by: md5
|
104915 |
11-Oct-2002 |
mjacob |
Fix the code so that it no longer on alpha refers to the now nonexistent 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
|
104325 |
01-Oct-2002 |
jake |
Fix a typo in BGE_BIGENDIAN_INIT.
|
104102 |
28-Sep-2002 |
iwasaki |
Add support for the BCM5702x chips.
Reviewed by: jdp MFC after: 1 week
|
103808 |
22-Sep-2002 |
jdp |
Fix a couple of longstanding typos which would have made a statement fail to compile if it weren't inside "#ifdef __brokenalpha__".
Submitted by: Birger Toedtmann <birger@takatukaland.de> MFC after: 2 weeks
|
103807 |
22-Sep-2002 |
jdp |
Follow the lead of recent changes in the 3com Linux driver by 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
|
103806 |
22-Sep-2002 |
jdp |
Set up the BCM570x chip's DMA Read/Write Control register more correctly. This fixes the "watchdog timeout -- resetting" errors seen on Dell 2650 systems.
MFC after: 1 month
|
103103 |
08-Sep-2002 |
jdp |
Add support for the BCM5703x chips. I do not have one of these 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
|
100695 |
26-Jul-2002 |
jdp |
Recognize the Altima AC9100 chip, which is used in current versions 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
|
99417 |
04-Jul-2002 |
jdp |
Disable hardware checksum offloading of IP fragments in the bge 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
|
99004 |
29-Jun-2002 |
alfred |
catch up with ext_free prototype change.
|
98782 |
24-Jun-2002 |
mp |
Add missing splx().
MFC after: 3 days
|
98779 |
24-Jun-2002 |
jdp |
Work around what appears to be a chip bug in the BCM5701 that shows 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
|
95673 |
28-Apr-2002 |
phk |
Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/
|
95266 |
22-Apr-2002 |
jdp |
Add missing splx calls in bge_tick. These don't make any functional difference in -current, but they are important for -stable where they are missing too.
MFC after: 1 day
|
93751 |
04-Apr-2002 |
wpaul |
Try to sort out the correct way to generate async link state change 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.)
|
92934 |
22-Mar-2002 |
wpaul |
Teach the bge driver about the BCM5701 (specifically, the 3Com 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.
|
92739 |
20-Mar-2002 |
alfred |
Remove __P.
|
90547 |
11-Feb-2002 |
silby |
Remove mbuf exhaustion warning messages; these are handled by the mbuf system in a rate-limited fashion now.
MFC: Already performed due to sloppiness.
|
89835 |
27-Jan-2002 |
jdp |
Add support for the Netgear GA302T 10/100/1000 adapter. Given that it's a 32-bit card, it's quite nice for $75.
MFC after: 3 days
|
88114 |
18-Dec-2001 |
peter |
Fix warnings: the bge_bpd_read*() functions are not used (#ifdef notdef)
|
87953 |
14-Dec-2001 |
dg |
Disabled input hardware checksum due to it being calculated incorrected for some packets, in particular small (0 byte payload) packets. May also be related to TCP options.
Approved by: wpaul MFC after: 3 days
|
87276 |
03-Dec-2001 |
brooks |
Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the mbuf instead.
Suggested by: fenner
|
84148 |
29-Sep-2001 |
jlemon |
Do not call mii_polltick() immediately after mii_tick().
Poiinted out by: wpaul
|
84092 |
28-Sep-2001 |
wpaul |
Set the 'no pseudo header checksum' option for RX checksums, otherwise we may botch UDP checksums on receive, which will break NFS.
|
84059 |
27-Sep-2001 |
wpaul |
Add device driver support for the Broadcom BCM570x family of gigabit ethernet controllers. This adds support for the 3Com 3c996-T, the SysKonnect SK-9D21 and SK-9D41, and the built-in gigE NICs on Dell PowerEdge 2550 servers. The latter configuration hauls ass: preliminary measurements show TCP speeds of over 900Mbps using only normal size frames.
TCP/IP checksum offload, jumbo frames and VLAN tag insertion/stripping are supported, as well as interrupt moderation.
Still need to fix autonegotiation support for 1000baseSX NICs, but beyond that, driver is pretty solid.
|