aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bce
Commit message (Collapse)AuthorAgeFilesLines
* MFC r265703David C Somayajulu2014-05-123-23/+11
| | | | | | | | | | | 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 Notes: svn path=/stable/7/; revision=265920
* MFC r234121:Pyun YongHyeon2012-04-232-55/+53
| | | | | | | | | | | | 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 > Notes: svn path=/stable/7/; revision=234595
* MFC r228476:Pyun YongHyeon2012-01-092-53/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/stable/7/; revision=229866
* MFC r218529:Pyun YongHyeon2012-01-091-10834/+11094
| | | | | | | - Updated firmware which improves small packet performance. Notes: svn path=/stable/7/; revision=229863
* MFC r210522,213489,218423,218527:Pyun YongHyeon2012-01-092-710/+1193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r210522: Fix an apparent typo. r213489: 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. r218423: - 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. r218527: - Added error checking to nvram read functions. - Minor style updates. Notes: svn path=/stable/7/; revision=229860
* MFC r207761:Pyun YongHyeon2012-01-071-5/+2
| | | | | | | | | Add a fastpath to allocate from packet zone when using m_getjcl. This will add support for packet zone for at least igb and ixgbe and will avoid to check for that in bce and mxge. Notes: svn path=/stable/7/; revision=229755
* MFC r226123:Pyun YongHyeon2011-12-312-52/+25
| | | | | | | | | | | | | | 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. Notes: svn path=/stable/7/; revision=229054
* MFC: r221407 (partial)Marius Strobl2011-09-111-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | - Let mii_phy_add_media() also announce the support of IFM_NONE. - Add a PHY-specific reset routine is for lxtphy(4) which disables MII interrupts. - Remove redundant checks in NIC drivers for mii->mii_instance not being zero before calling the reset routines 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. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - 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) Notes: svn path=/stable/7/; revision=225490
* MFC: r214608, r215297(partial), r215713Marius Strobl2010-11-261-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Unlike as in head, bge(4), bce(4), msk(4), nfe(4) and stge(4) are changed to set MIIF_FORCEPAUSE in stable/7 so they continue to always advertise support of flow control and brgphy(4), ciphy(4), e1000phy(4) as well as ip1000phy(4) are changed to still also accept IFF_LINK0 in addition to the master media option for setting master mode, both in order to not violate POLA. Notes: svn path=/stable/7/; revision=215879
* MFC: r213894, r213896, r214913Marius Strobl2010-11-071-6/+7
| | | | | | | | | | Converted the remainder of the NIC drivers to use the mii_attach() introduced in r213878 (MFC'ed to stable/7 in r214685) instead of mii_phy_probe(). Unlike r213893 (MFC'ed to stable/7 in r214910) these are mostly straight forward conversions though. Notes: svn path=/stable/7/; revision=214925
* MFC r213844:Pyun YongHyeon2010-10-241-0/+2
| | | | | | | | | | | | | | 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) Notes: svn path=/stable/7/; revision=214296
* MFC r210271:Pyun YongHyeon2010-08-152-1/+2
| | | | | | | | Specify BCE_RX_BUF_ALIGN alignment for RX buffers. All bce(4) controllers require RX buffers aligned on BCE_RX_BUF_ALIGN bytes. Notes: svn path=/stable/7/; revision=211388
* MFC r210263,210267,210269-210270:Pyun YongHyeon2010-08-151-22/+23
| | | | | | | | | | | | | | | | | | | | | | r210263: Do not report current link state if interface is not UP. r210267: Add KASSERT to check number of returned DMA segments. r210269: Use bus_get_dma_tag() to get parent tag. Also use BUS_SPACE_MAXSIZE_32BIT to specify sum of all segment lengths. Previously it used MAXBSIZE which was wrong. r210270: Specify BUS_DMA_ZERO flag to bus_dmamem_alloc(9) and remove bzero() calls. Also add BUS_DMA_COHERENT flag to bus_dmamem_alloc(9) to take advantage of efficient synchronization for architectures that support that feature. Notes: svn path=/stable/7/; revision=211386
* MFC r210257,210259-210261:Pyun YongHyeon2010-08-151-51/+34
| | | | | | | | | | | | | | | | | | | | | | | | r210257: When we didn't find a matching flash device, do not touch flash config data. While I'm here, use return code of bce_init_nvram() to set error instead of directly setting ENODEV. r210259: Have bce_init_ctx() return error code and make caller check the return code. If context was not setup correctly give up initialization. While I'm here move variable declarations to the beginning of the function. r210260: Don't change current media in bce_stop(). There is no need to do this here. r210261: Correctly check the result of media selection. Previously it always returned success. Notes: svn path=/stable/7/; revision=211384
* MFC r207411:Pyun YongHyeon2010-08-152-784/+955
| | | | | | | | | | | | | | | | | - 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. Notes: svn path=/stable/7/; revision=211382
* MFC r206268Pyun YongHyeon2010-04-152-2839/+3118
| | | | | | | | | | - 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. Notes: svn path=/stable/7/; revision=206683
* MFC r205300:Pyun YongHyeon2010-04-153-386/+285
| | | | | | | | | | | | - Added support for 5709S/5716S PHYs. - Update copyright to 2010. - Add new debug code for RV2P block. - Improve output formatting for various debug functions. PR: kern/134658, kern/136417, kern/139761, kern/140970 Notes: svn path=/stable/7/; revision=206681
* MFC r204373-204374:Pyun YongHyeon2010-03-231-71/+124
| | | | | | | | | | | | | | | | | | | | r204373: Move TSO setup to new function bce_tso_setup(). Also remove VLAN parsing code in TSO path as the controller requires VLAN hardware tagging to make TSO work over VLANs. While parsing the mbuf in TSO patch, always perform check for writable mbuf as bce(4) have to reset IP length and IP checksum field of IP header and make sure to ensure contiguous buffer before accessing IP/TCP headers. While I'm here replace magic number 40 to more readable sizeof(struct ip) + sizeof(struct tcphdr). r204374: Add TSO support on VLANs. bce(4) controllers require VLAN hardware tagging to make TSO work on VLANs so explicitly disable TSO on VLAN if VLAN hardware tagging is disabled. Notes: svn path=/stable/7/; revision=205548
* MFC r204368,204370-204372:Pyun YongHyeon2010-03-231-41/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r204368: Allow disabling VLAN hardware tag stripping with software work around. Management firmware(ASF/IPMI/UMP) requires the VLAN hardware tag stripping so don't actually disable VLAN hardware tag stripping. If VLAN hardware tag stripping was disabled, bce(4) manually reconstruct VLAN frame by appending stripped VLAN tag. Also remove unnecessary IFCAP_VLAN_MTU message. r204370: Make sure to stop controller first before changing MTU. And if interface is not running don't initialize controller. While here remove unnecessary update of error variable. r204371: Make toggling TSO, VLAN hardware checksum offloading work. Also fix TX/RX checksum handler to set/clear relavant assist bits which was used to cause unexpected results. With this change, bce(4) can be bridged with other interfaces that lack TSO, VLAN checksum offloading. r204372: Prefer m_collapse(9) over m_defrag(9). Notes: svn path=/stable/7/; revision=205546
* MFC r202717:Pyun YongHyeon2010-03-192-29/+137
| | | | | | | | | | | | | | - 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. PR: kern/135836, kern/140684 Notes: svn path=/stable/7/; revision=205304
* MFC r194781:Pyun YongHyeon2010-03-192-42/+130
| | | | | | | | - Added code to read bootcode firwmare version. - Created dedicated shared memory access routines. Notes: svn path=/stable/7/; revision=205301
* - MFC r198320:Stanislav Sedov2009-11-152-47/+47
| | | | | | | | | Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not into if_bce.c anyway. It is disabled by default. Notes: svn path=/stable/7/; revision=199289
* DMA synchronization fixes:Xin LI2009-06-011-16/+13
| | | | | | | | | | | | | | | | | | - In bce_rx_intr(), use BUS_DMASYNC_POSTREAD instead of BUS_DMASYNC_POSTWRITE, as we want to "read" from the rx page chain pages. - Document why we need to do PREWRITE after we have updated the rx page chain pages. - In bce_intr(), use BUS_DMASYNC_POSTREAD and BUS_DMASYNC_PREREAD when before and after CPU "reading" the status block. - Adjust some nearby style mismatches/etc. Pointed out by: yongari Approved by: davidch (no objection) but bugs are mine :) Notes: svn path=/stable/7/; revision=193220
* MFC r191923 (davidch):Xin LI2009-05-202-2/+6
| | | | | | | | | - Fixed incorrect packet length problem caused be earlier change to support ZERO_COPY_SOCKETS. - Created #define for context initialization retry count. Notes: svn path=/stable/7/; revision=192477
* Update bce(4) to latest -CURRENT version:Xin LI2009-03-313-13636/+14082
| | | | | | | | | | | | | | | | | - Add several HP OEM parts' PCI IDs (187133+187317) - Remove intermediate variable busaddr and have bus_* operate directly on softc members upon initialization. (187204) - Only enable split header operation when ZERO_COPY_SOCKETS is enabled in the kernel. (189117) - Updated firmware to latest 4.6.X release. (189325) - Added missing firmware for 5709 A1 controllers. (189325) - Changed some debug statistic variable names to be more consistent. (189325) Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=190582
* MFC r186169:Xin LI2008-12-191-1/+0
| | | | | | | | | | | | | Don't count InFramesL2FilterDiscards into Ierr. This value does not represent a real packet error but simply indicate that an unexpected unicast or multicast error was received by the NIC, which was not counted in the past as well. Reported by: many (on -stable@) Reviewed by: davidch Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=186304
* MFC r186168:Xin LI2008-12-191-1/+1
| | | | | | | | | | Test whether sc->tx_mbuf_map[i], not whether sc->tx_mbuf_map is NULL before doing bus_dmamap_sync() since it operates on the former, not the latter. Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=186303
* MFC r185593:Xin LI2008-12-051-5/+6
| | | | | | | | | | | | | Don't attempt to clear status updates if we did not do a link state change. As a side effect, this makes the excessive interrupts to disappear which has been observed as a regression in recent stable/7. Reported by: many (on -stable@) Reviewed by: davidch Approved by: re (kensmith, kib) Notes: svn path=/stable/7/; revision=185653
* MFC r185082:Xin LI2008-11-221-1/+1
| | | | | | | | | | | | Correct a logic error when testing BCE_PHY_SERDES_FLAG. PR: kern/128801 Pointed out by: Adam Morrison Ok'ed by: davidch Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=185161
* Merge the following bce(4) changes:Xin LI2008-11-103-6964/+19739
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r176448,178132,178853,179436,179695,179771,182293 r176448 (davidch) - 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 receive chain. - Added additional debug support code. r178132 (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. r178853 (scottl) The BCE chips appear to have an undocumented requirement that RX frames be aligned on an 8 byte boundary. Prior to rev 1.36 (now r176448) this wasn't a problem because mbuf clusters tend be naturally aligned. The switch to using split buffers with the first buffer being the embedded data area of the mbuf has broken this assumption, at least on i386, causing a complete failure of RX functionality. Fix this for now by using a full cluster for the first RX buffer. A more sophisticated approach could be done with the old buffer scheme to realign the m_data pointer with m_adj(), but I'm also not clear on performance benefits of this old scheme or the performance implications of adding an m_adj() call to every allocation. r179436 (jhb) Trim an extra semi-colon. r179695 (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 r179771 (davidch) - Added support for BCM5709 and BCM5716 controllers. r182293 (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. Approved by: re (kib) Notes: svn path=/stable/7/; revision=184826
* MFC: Fix function prototype for device_shutdown method.Pyun YongHyeon2008-03-131-3/+5
| | | | Notes: svn path=/stable/7/; revision=177136
* - Fixed a problem that would cause kernel panics and "bce0: discard frame .."David Christensen2007-07-313-119/+240
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=171667
* - Migrated IPMI fix from RELENG_6.David Christensen2007-06-162-205/+362
| | | | | | | - Added additional debug code. Notes: svn path=/head/; revision=170810
* New Features:David Christensen2007-06-072-410/+412
| | | | | | | | | - Added 2.5G support for BCM5708S. MFC after: 4 weeks Notes: svn path=/head/; revision=170392
* - Added TSO supportDavid Christensen2007-05-163-3483/+6210
| | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=169632
* MFC after: 2 weeksDavid Christensen2007-05-043-312/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=169271
* Catch up the rest of the drivers with the ether_vlan_mtap modifications.Christian S.J. Peron2007-03-041-1/+1
| | | | | | | | | | | | | If these drivers are setting M_VLANTAG because they are stripping the layer 2 802.1Q headers, then they need to be re-inserting them so any bpf(4) peers can properly decode them. It should be noted that this is compiled tested only. MFC after: 3 weeks Notes: svn path=/head/; revision=167190
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=166901
* Add support for SERDES PHY configurations. These are commonly found inDoug White2007-01-261-43/+13
| | | | | | | | | | blade systems, such as the Dell 1955 and the Intel SBXD132. Development hardware for this work was provided by Broadcom and iXsystems. A SBXD132 blade for testing was provided by Iron Systems. Notes: svn path=/head/; revision=166261
* The multicast hash table has 8 slots in the BCE hardware, not 4 slots likeScott Long2007-01-201-4/+4
| | | | | | | | | | the BGE hardware. Adapt the driver for this. Submitted by: Mike Karels MFC After: 3 days Notes: svn path=/head/; revision=166153
* - Add a locked variant of bce_ifmedia_upd() for use within the driver andJohn Baldwin2007-01-131-7/+18
| | | | | | | | | | | add missing locking to bce_ifmedia_upd(). - While I'm here, unexpand an instance of LIST_FOREACH(). MFC after: 2 weeks Reviewed by: scottl Notes: svn path=/head/; revision=165994
* Space cleanup.Xin LI2007-01-111-1/+1
| | | | Notes: svn path=/head/; revision=165934
* - Instead of if_watchdog/if_timer interface use our own timerXin LI2007-01-112-29/+28
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=165933
* Fix compile with BCE_DEBUG. The last one tripped up gcc 2.95 on 4.x evenJohn Baldwin2006-12-061-4/+4
| | | | | | | with BCE_DEBUG turned off. Notes: svn path=/head/; revision=164968
* Due to an incorrect macro, it appears that this driver has always beenScott Long2006-11-162-14/+18
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=164329
* In bce_start_locked, check the used_tx_bd count rather than theJohn Polstra2006-11-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | descriptor's mbuf pointer to see if the transmit ring is full. The mbuf pointer is set only in the last descriptor of a multi-descriptor packet. By relying on the mbuf pointers of the earlier descriptors, the driver would sometimes overwrite a descriptor belonging to a packet that wasn't completed yet. Also, tx_chain_prod wasn't updated inside the loop, causing the wrong descriptor to be checked after the first iteration. The upshot of all this was the loss of some transmitted packets at medium to high packet rates. In bce_tx_encap, remove a couple of old statements that shuffled around the tx_mbuf_map pointers. These now correspond 1-to-1 with the transmit descriptors, and they are not supposed to be changed. Correct a couple of inaccurate comments. MFC after: 1 month Notes: svn path=/head/; revision=164327
* Add MSI support to em(4), bce(4), and mpt(4). For now, we only supportJohn Baldwin2006-11-151-3/+11
| | | | | | | | devices that support a maximum of 1 message, and we use that 1 message instead of the INTx rid 0 IRQ with the same interrupt handler, etc. Notes: svn path=/head/; revision=164305
* Fix a typo in the device ID table that prevented 5708S chips from beingScott Long2006-10-311-2/+2
| | | | | | | | | detected. Submitted by: pyun Notes: svn path=/head/; revision=163814
* Refine the checksum hack a little. It appears that the chip can handle UDPScott Long2006-10-241-3/+7
| | | | | | | | | | 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. Notes: svn path=/head/; revision=163642
* There seems to be a problem with txcsum and UDP. Turn it off until it isScott Long2006-10-211-0/+5
| | | | | | | understood better. This fixes timeout problems with NFS. Notes: svn path=/head/; revision=163593