#
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 |
|
07-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 |
#
298955 |
|
03-May-2016 |
pfg |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
#
279223 |
|
23-Feb-2015 |
yongari |
Correct a typo.
Reported by: jmg
|
#
272096 |
|
25-Sep-2014 |
glebius |
- Provide bce_get_counter() to return counters that are not collected, but taken from hardware. - Mechanically convert to if_inc_counter() the rest of counters. - While here fix 3 instances of the same bug, when error counter was ++ in one place and then assigned in other place, losing the increment. Achieve that storing soft errors counters in softc.
|
#
265703 |
|
08-May-2014 |
davidcs |
Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business. Added clean option to Makefile
Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation MFC after:5 days
|
#
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
|
#
257173 |
|
26-Oct-2013 |
glebius |
Move includes from if_bcereg.h to .c files.
|
#
252402 |
|
30-Jun-2013 |
yongari |
Fix triggering false watchdog timeout when controller is in PAUSE state. Previously it used to check if controller has sent a PAUSE frame to the remote peer.
Reported by: David Imhoff via Brad Smith <brad@OpenBSD.org> Submitted by: davidch (initial version) Reviewed by: davidch, David Imhoff <dimhoff_devel@xs4all.nl>
|
#
251142 |
|
30-May-2013 |
marius |
- As a follow-up to r247565, make firmware images that do not require patching at runtime actually const. - Remove pointless softc members by employing the corresponding constants directly. - Remove pointless returns. - Remove unnecessary inclusion of opt_device_polling.h. - Replace an outdated and now bogus comment in bce_tick() with the appropriate one.
MFC after: 1 week
|
#
247565 |
|
01-Mar-2013 |
marius |
- Make tables, device ID strings etc const. - Use NULL instead of 0 for pointers. - Remove redundant bzero(9)'ing of the softc. - Remove redundant/unused softc members. - Don't allocate MSI/MSI-X as RF_SHAREABLE. - Re-use bus accessor macros instead of duplicating them. - In bce_miibus_{read,write}_reg(), remove superfluous limiting of the PHY address (missed in r213893).
MFC after: 1 week
|
#
242360 |
|
30-Oct-2012 |
zont |
- Remove BCE_JUMBO_HDRSPLIT kernel option which was forgotten in r218423.
Approved by: davidch Approved by: kib (mentor)
|
#
235151 |
|
09-May-2012 |
yongari |
Implement basic remote PHY support. Remote PHY allows the controller to perform MDIO type accesses to a remote transceiver using message pages defined through MRBE(multirate backplane ethernet). It's used in blade systems(e.g Dell Blade m610) which are connected to pass-through blades rather than traditional switches. This change directly manipulates firmware's mailboxes to control remote PHY such that it does not use mii(4). Alternatively, as David said, it could be implemented in brgphy(4) by creating a fake PHY and let brgphy(4) do necessary mii accesses and bce(4) can implement mailbox accesses based on the type of brgphy(4)'s mii accesses. Personally, I think it would make brgphy(4) hard to maintain since it would have to access many bce(4) registers in brgphy(4). Given that there are users who are suffering from lack of remote PHY support, it would be better to get working system rather than waiting for complete/perfect implementation.
Tested by: Jan Winter ( jan.winter <> kantarmedia dot de ) Reviewed by: davidch (initial version) MFC after: 2 weeks
|
#
234121 |
|
11-Apr-2012 |
yongari |
Back out r228476. r228476 fixed superfluous link UP/DOWN messages but broke IPMI access during boot. It's not clear why r228476 breaks IPMI and should be revisited.
Reported by: Paul Guyot <paulguyot <> ieee dot org > MFC after: 1 week
|
#
228476 |
|
13-Dec-2011 |
yongari |
Rework link state tracking and remove superfluous link UP/DOWN messages. o Add check for actually resolved speed in miibus_statchg callback instead of blindly reprogramming BCE_EMAC_MODE register. The callback may be called multiple times(e.g. link UP, link transition, auto-negotiate complete etc) while auto-negotiation is in progress. All unresolved link state changes are ignored now and setting BCE_EMAC_MODE after link establishment is done once. o bce(4) is careful enough not to drive MII_TICK if driver got a valid link. To detect lost link, bce(4) relied on link state change interrupt and if driver see the interrupt, it forced to drive MII_TICK by calling bce_tick() in interrupt handler. Because bce(4) generates multiple link state change interrupts while auto-negotiation is in progress, bce_tick() would be called multiple times and this resulted in generating multiple link UP/DOWN messages. With this change, bce_tick() is not called in interrupt handler anymore such that miibus_statchg callback handles link state changes with consistent manner.
Reviewed by: davidch
|
#
226123 |
|
07-Oct-2011 |
yongari |
BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0.
Reported by: sbruno Reviewed by: davidch Tested by: davidch
|
#
218527 |
|
10-Feb-2011 |
davidch |
- Added error checking to nvram read functions. - Minor style updates.
Submitted by: gcooper@freebsd.org MFC after: 2 weeks
|
#
218423 |
|
07-Feb-2011 |
davidch |
- Added systcls for header splitting, RX/TX buffer count, interrupt coalescing, strict RX MTU, verbose output, and shared memory debug. - Added additional debug counters (VLAN tags and split header frames). - Updated debug counters to 64 bit definitions. - Updated l2fhdr bit definitions. - Combined RX buffer sizing into a single function. - Added buffer size and interrupt coalescing settings to adapter info printout.
Submitted by: davidch MFC after: 2 weeks
|
#
213489 |
|
06-Oct-2010 |
ambrisko |
Add the capability to read the complete contents of the NVRAM via sysctl dev.bce.<unit>.nvram_dump Add the capability to write the complete contents of the NVRAM via sysctl dev.bce.<unit>.nvram_write These are only available if the kernel option BCE_DEBUG is enabled. The nvram_write sysctl also requires the kernel option BCE_NVRAM_WRITE_SUPPORT to be enabled. These are to be used at your own caution. Since the MAC addresses are stored in the NVRAM, if you dump one NIC and restore it on another NIC the destination NIC's MAC addresses will not be preserved. A tool can be made using these sysctl's to manage the on-chip firmware.
Reviewed by: davidch, yongari
|
#
210271 |
|
19-Jul-2010 |
yongari |
Specify BCE_RX_BUF_ALIGN alignment for RX buffers. All bce(4) controllers require RX buffers aligned on BCE_RX_BUF_ALIGN bytes.
Reviewed by: davidch
|
#
207411 |
|
30-Apr-2010 |
davidch |
- Enable flow control. - Print device details only when verbose boot is enabled. - Add debug output for shared memory access. - Add debug statistics (checksum offload & VLAN frame counters). - Modify TX path to update consumer index for each frame completed rather than updating the consumer index only once for a group of frames to improve small packet performance. - Print driver/firmware pulse messages only when verbose boot is enabled. - Add debug sysctl to clear statistics. - Fix more style(9) violations.
MFC after: 2 weeks
|
#
206268 |
|
06-Apr-2010 |
davidch |
- Fixed 5708S 2.5G support broken in last commit. - Added some new debug helper routines to systcl. - Fixed many of the style(9) violations that have crept into the code due to my use of a "smart" editor.
MFC after: 2 weeks
|
#
205300 |
|
18-Mar-2010 |
davidch |
- Added support for 5709S/5716S PHYs. - Update copyright to 2010. - Add new debug code for RV2P block. - Improve output formatting for various debug functions.
MFC after: 2 weeks
|
#
202717 |
|
20-Jan-2010 |
davidch |
- Added a workaround for NC-SI management firmware that would allow frames to be accepted while the driver is resetting the hardware. This failure is generally observed when broadcast frames are received during driver load and will generate "Unable to write CTX memory" errors. - Small changes to driver flags display.
|
#
198320 |
|
21-Oct-2009 |
stas |
- Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header splitting in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not propagated into if_bce.c anyway. It is disabled by default.
Approved by: davidch MFC after: 3 days
|
#
194781 |
|
23-Jun-2009 |
davidch |
- Added code to read bootcode firwmare version. - Created dedicated shared memory access routines.
MFC after: One week
|
#
191923 |
|
08-May-2009 |
davidch |
- Fixed incorrect packet length problem caused be earlier change to support ZERO_COPY_SOCKETS. - Created #define for context initialization retry count.
MFC after: 1 week
|
#
189325 |
|
03-Mar-2009 |
davidch |
- Updated firmware to latest 4.6.X release. - Added missing firmware for 5709 A1 controllers. - Changed some debug statistic variable names to be more consistent.
Submitted by: davidch MFC after: Two weeks
|
#
189117 |
|
27-Feb-2009 |
davidch |
- Update copyright to 2009. - Only enable split header operation when ZERO_COPY_SOCKETS is enabled in the kernel.
Submitted by: davidch MFC after: 1 week
|
#
185162 |
|
22-Nov-2008 |
kmacy |
- bump __FreeBSD version to reflect added buf_ring, memory barriers, and ifnet functions
- add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own
- add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers
- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues
This work was supported by Bitgravity Inc. and Chelsio Inc.
|
#
182293 |
|
27-Aug-2008 |
davidch |
- Updated support for 5716. - Added some additional code for debug builds. - Fixed a problem printing physical memory on 64bit system during debugging. - Modified some of the context memory and mailbox register names to more clearly distinguish their use. - Added memory barriers for Intel CPUs when accessing host memory data structures which are written by hardware.
MFC after: Two weeks.
|
#
179771 |
|
12-Jun-2008 |
davidch |
- Added support for BCM5709 and BCM5716 controllers.
MFC after: 2 weeks
|
#
179695 |
|
10-Jun-2008 |
davidch |
- Fixed kern/123696 by increasing firmware timeout value from 100 to 1000. - Fixed a problem on i386 architecture when using split header/jumbo frame firmware caused by hardware alignment requirements. - Added #define BCE_USE_SPLIT_HEADER to allow the feature to be enabled/ disabled. Enabled by default.
PR: kern/123696 MFC after: 2 weeks
|
#
178132 |
|
11-Apr-2008 |
davidch |
- Fixed a problem with the send chain consumer index which would cause TX traffic to sit in the send chain until a received packet kick started the interrupt handler. This would cause extremely slow performance when used with NFS over UDP. - Removed untested polling code. - Updated copyright year in the file header. - Removed inadvertent ^M's created by DOS text editor.
MFC after: 2 weeks
|
#
176448 |
|
21-Feb-2008 |
davidch |
MFC after: 4 weeks
- Added loose RX MTU functionality to allow frames larger than 1500 bytes to be accepted even though the interface MTU is set to 1500. - Implemented new TCP header splitting/jumbo frame support which uses two chains for receive traffic rather than the original single recevie chain. - Added additional debug support code.
|
#
171667 |
|
30-Jul-2007 |
davidch |
- Fixed a problem that would cause kernel panics and "bce0: discard frame .." errors (especially when jumbo frames are enabled or in low memory systems) because the RX chain was corrupted when an mbuf was mapped to an unexpected number of buffers. - Fixed a problem that would cause kernel panics when an excessively fragmented TX mbuf couldn't be defragmented and was released by bce_tx_encap().
Approved by: re(hrs) MFC after: 7 days
|
#
170810 |
|
16-Jun-2007 |
davidch |
- Migrated IPMI fix from RELENG_6. - Added additional debug code.
|
#
170392 |
|
07-Jun-2007 |
davidch |
New Features: - Added 2.5G support for BCM5708S.
MFC after: 4 weeks
|
#
169632 |
|
16-May-2007 |
davidch |
- Added TSO support - Updated firmware to latest release (v3.4.8) to fix TSO + jumbo frame lockup - Added MSI (hw.bce.msi_enable) and TSO (hw.bce.tso_enable) sysctls - Fixed kernel panic when MSI is used and module is unloaded - Added several new debug routines - Removed slack space for RX/TX chains since it only covers sloppy coding - Fixed a potential problem when programming jumbo MTU size in hardware - Various other comment changes
MFC after: 4 weeks
|
#
169271 |
|
04-May-2007 |
davidch |
MFC after: 2 weeks
Updated copyright date to 2007.
Tested with BCM5706 A3.
Added ID for BCM5708 B2.
Removed unused driver version string.
Modified BCE_PRINTF macro to automatically fill-in the sc pointer.
Fixed a kernel panic when the driver was loaded as a module from the command-line because the MII bus pointer was null (i.e. the MII bus hadn't been enumerated yet).
Added fix proposed by Vladimir Ivanov <wawa@yandex-team.ru> to prevent driver state corruption when releasing the lock during the ISR in bce_rx_intr() to send packets up the stack.
Added new TX chain and register read sysctl interfaces for debugging.
Cleaned up formatting for various other debug routines.
Added a new statistic maintained by firmware which tracks the number of received packets dropped because no receive buffers are available.
|
#
165933 |
|
11-Jan-2007 |
delphij |
- Instead of if_watchdog/if_timer interface use our own timer that piggybacks on bce_tick() callout. - Instead of unconditionally resetting the controller, try to skip the reset in case we got a pause frame, like em(4) did. - Lock bce_tick() using callout_init_mtx().
Discussed with/Reviewed by: glebius, scottl, davidch
|
#
164329 |
|
16-Nov-2006 |
scottl |
Due to an incorrect macro, it appears that this driver has always been accidentally truncating off the VLAN tag field in the TX descriptor. Fix this by splitting up the vlan_tag and flags fields into separate fields, and handling them appropriately.
Sponsored by: Ironport MFC After: 3 days
|
#
163642 |
|
24-Oct-2006 |
scottl |
Refine the checksum hack a little. It appears that the chip can handle UDP and TCP checksum offloading fine, it only has a problem with IP checksums on IP fragments.. Barring a fix or workaround available from the hardware, the real solution would be to have finer grained control in the stack over what can and cannot be assisted in hardware.
|
#
163593 |
|
21-Oct-2006 |
scottl |
There seems to be a problem with txcsum and UDP. Turn it off until it is understood better. This fixes timeout problems with NFS.
|
#
163393 |
|
15-Oct-2006 |
scottl |
Overhaul the transmit and dma paths: - Use bus_dmamap_load_mbuf_sg() to eliminate the need for the callback and all of the extra bookkeeping associated with it. - Eliminate the bce_dmamap_arg structure and streamline the memory allocation routines to not need it. This does change some of the debugging messages. - Refactor the loop that fills the buffer descriptor so that it can be done with a single set of logic in a single loop instead of two sets of logic. - Eliminate the need to cache and pass descriptor indexes between the start loop and the encap function. - Change the start loop to always check the ifnet sendq for more work.
This significantly helps the driver withstand large UDP workloads, though it's still not perfect. I suspect the remaining work lies with handling the OACTIVE flag, and also in possibly streamlining the interrupt handler some. It is, however, nearly on par with the other popular gigabit drivers in terms of stability now.
|
#
163337 |
|
14-Oct-2006 |
scottl |
Don't copy the bd_chain head pointers into temporary objects, they are available globally.
|
#
158651 |
|
16-May-2006 |
phk |
Since DELAY() was moved, most <machine/clock.h> #includes have been unnecessary.
|
#
158277 |
|
03-May-2006 |
mjacob |
Gratuitous tag alignment. It bugged me.
|
#
158046 |
|
26-Apr-2006 |
ps |
Only use the low address for stats collection.
|
#
158024 |
|
25-Apr-2006 |
jhb |
Fix half of the current i386 tinderbox failure. max_bus_addr should be a bus_addr_t rather than a bus_size_t.
|
#
157642 |
|
10-Apr-2006 |
ps |
Add a driver for the Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet adapeter.
Submitted by: David Christensen
|