summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bnx.c
AgeCommit message (Collapse)Author
2010-05-19BUS_DMA_ZERO instead of alloc, map, bzero.Owain Ainsworth
ok krw@
2009-11-23bnx(4) is a bit special. The chip itself is capable of swapping endianessClaudio Jeker
so there is no need for htoleXX calls. The only thing needed is the correct layout of the DMA-ed structures. Additionally it uses PAGE_SIZE but assumed that it is always 4k. Fix the macros that failed to respect that so that it works on 8k PAGE_SIZE systems. This makes bnx(4) work on sparc64. Tested on amd64 by dlg@. OK dlg@, deraadt@
2009-11-09Link state change interrupt was not generated due to a missing bit inDavid Gwynne
the MAC event register. fix from atte dot peltomaki at iki dot fi tested by me on 5708 and 5709
2009-08-13- consistify cfdriver for the ethernet drivers (0 -> NULL)Jasper Lievisse Adriaanse
ok dlg@
2009-08-09MCLGETI() will now allocate a mbuf header if it is not provided, thusTheo de Raadt
reducing the amount of splnet/splx dancing required.. especially in the worst case (of m_cldrop) ok dlg kettenis damien
2009-08-06Add device id for BCM5716S, tidy whitespace. From Brad.Stuart Henderson
2009-07-03this is a rather large change to add support for the BCM5709.David Gwynne
the 5709s use a the b09 firmwares, which is different to the b06 used by all the other chips supported by bnx. the majority of the diff comes from special handling for some indirect reads and writes, and because it needs more host memory to operate with. ive tried to keep the cosmetic changes to a minimum. "go for it" deraadt@
2009-07-03newer bnx chips use a separate firmware to the "old" ones. this updatesDavid Gwynne
the b06 firmware for the older chips, and adds the b09 firmware. there are three variants of the rv2p code thats loaded onto the chips, so this has been split out into separate firmware files as well. the driver has been updated to handle the split firmwares, and to easily allow loading of the different versions. this change only supports the loading of the firmwares for the currently supported chips. after this change you must build the new firmwares and install them as well as your new kernel. "go to it" deraadt@
2009-06-20Rewrite the interface flag handling case code and update the receiveChristian Weisgerber
filter handling to take advantage of ac_multirangecnt and have correct IFF_ALLMULTI handling. From Brad.
2009-04-22dont need to zero the tx pkt pool structure before initting it now thatDavid Gwynne
pool_init does its job properly.
2009-04-22replace arrays of dmamaps and mbuf pointers used to manage packetsDavid Gwynne
on the tx rings (one mbuf ptr/dmamap array entry was created for every tx descriptor slot at attach time) with a dynamically grown list of mbuf pointers and dmamaps. bnx used to have 512 dmamaps/mbuf pointers for the tx ring, now my system is running with 8 under moderate load. the big bonus from this is that the dmamap handling is greatly simplified. reyk@ likes this a lot
2009-04-20when transmitting packets, put the dmamap we used for the packet into theDavid Gwynne
last descriptor slot in the ring. the tx completion code expects the dmamap to be there so it can unload it. ok reyk@
2009-04-20fix dma map unmapping and unloading in the tx cleanup path.Reyk Floeter
ok dlg@
2009-04-14Don't free an mbuf that's still on the TX queue. While there sanitize theMark Kettenis
function signature of bnx_tx_encap() such that people don't get weird ideas like this again. ok dlg@
2009-04-09white space fixesDavid Gwynne
2009-03-30switch to MCLGETI.David Gwynne
this conversion is the easiest ive done so far. the mbuf allocation wrapper in the driver already had code to handle a failing cluster allocator as part of a test harness, now we test that code all the time with MCLGETI. ok kettenis@ tested by phessler@
2008-11-28Eliminate the redundant bits of code for MTU and multicast handlingBrad Smith
from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
2008-11-09Introduce bpf_mtap_ether(), which for the benefit of bpf listenersChristian Weisgerber
creates the VLAN encapsulation from the tag stored in the mbuf header. Idea from FreeBSD, input from claudio@ and canacar@. Switch all hardware VLAN enabled drivers to the new function. ok claudio@
2008-10-19Re-add support for RX VLAN tag stripping.Brad Smith
2008-10-16Switch the existing TX VLAN hardware support over to having theChristian Weisgerber
tag in the header. Convert TX tagging in the drivers. Help and ok brad@
2008-10-16Convert RX tag stripping to storing the tag in the mbuf header andChristian Weisgerber
enable RX tag stripping for re(4). ok brad@
2008-10-02First step towards cleaning up the Ethernet driver ioctl handling.Brad Smith
Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-06-24Fixed a problem that would cause errors (especially when in low memoryBrad Smith
systems) because the RX chain was corrupted when an mbuf was mapped to an unexpected number of buffers. From davidch@FreeBSD
2008-06-13fix compilation with BNX_DEBUG.Brad Smith
2008-06-13Remove slack space for RX/TX chains since it only covers sloppy coding.Brad Smith
From davidch @ FreeBSD
2008-06-08don't declare foo_driver_version[] strings and turn them into defines,Reyk Floeter
nothing uses them and it saves a few bytes in the kernel. ok claudio@
2008-05-29- Add a debug message to mention when a 2.5Gb adapter is found.Brad Smith
- Change invalid PHY address debug message in bnx_miibus_write_reg() from warn level to verbose. - Add two new softc fields and store the shared and port hw config data. From FreeBSD ok dlg@
2008-05-23Simplify the combination use of pci_mapreg_type()/pci_mapreg_map() asBrad Smith
suggested by dlg@ awhile ago. ok dlg@
2008-02-28Add initial bits for fiber support with the BCM5706/BCM5708 chipsets.Brad Smith
Tested with copper adapters by brad@, johan@ and Jung <moorang at gmail dot com> ok dlg@
2008-02-22Avoid unaligned PCI config space access.Mark Kettenis
ok brad@
2008-02-17Remove the check for non-production bnx(4) chipsets. These chipsets areBrad Smith
not officially "supported" and could have errata which the driver does not workaround but they should more or less work. Tested by marco@ with a BCM5708 B0 chipset. ok marco@ dlg@
2007-11-25IF_Gbps(2.5) is wrong.David Gwynne
ok claudio@
2007-08-28unify firmware load failure messages; ok mglockerTheo de Raadt
2007-07-04Revert r1.42 of if_bnx.c, "Enable IPv4 transmit TCP/UDP checksumKenneth R Westerback
offload", and associated man page change. To use IPv4 transmit TCP/UDP checksum offloading you must again define BNX_CSUM. As requested by mbalmer@ via deraadt@ on suggestion of reyk@ in response to PR #5437.
2007-05-22Add the BCM5709 PCI device Id. It is disabled for now since we do notReyk Floeter
support SerDes-based (1000base-SX fibre) bnx(4) devices yet. The reason is simple - we do not have any fibre bnx(4) to test and port the SerDes changes from the other bnx drivers. From brad found in the Linux driver
2007-05-22adress -> addressJasper Lievisse Adriaanse
from brad ok claudio@
2007-05-22Use BNX_PRINTF instead of printf with missing argument.Ray Lai
OK reyk@, earlier version OK tedu@, dlg@, and miod@.
2007-05-21fix bnx vlan tagging in the rx path; do not attach the vlan tag twiceReyk Floeter
if the firmware has been told to keep it and copy the tag in network byte order in the other case. ok mcbride@ dlg@
2007-03-05remove jumbo frame support by replacing MEXTALLOC with MCLGET, andReyk Floeter
simplify the VLAN code. this will close PR 5356 (system panics under high load). From claudio@ who is currently not around to commit this fix tested and ok by mcbride@, reyk@, todd@, Paul Hirsch, and brad
2007-03-03instead of establishing the interrupt in the mounthook, move it backReyk Floeter
to the attach function and set a flag in the mounthook to start accepting interrupts (there are possible problems with establishing interrupts after the ioapics are enabled in i386 GENERIC.MP). also suggested by kettenis tested by mcbride, me, and some others ok dlg@
2007-03-03Replacing some spaces with tabs and some typo fixesTodd T. Fries
from brad@
2007-03-02oops, this is $OpenBSD$Reyk Floeter
2007-03-02- remove the code to bring down the PHY in bnx_stop(), it's wrongReyk Floeter
(ifm_data isn't updated) and lead to a panic in mii_phy_setmedia(), or reading past the end mii_media_table[]. - make sure the dma_map matches the mbuf in the rx structures. We would sync/unload the wrong map, leading to a DIAGNOSTIC panic, or eventually leaking memory when bounce buffers are needed. From NetBSD ok marco@, brad@
2007-01-30Allow the bnx(4) driver to make use of all of the available hardwareKenneth R Westerback
multicast hash slots. The bnx(4) hardware supports 8 slots instead of 4 like the bge(4) hardware. From Mike Karels via FreeBSD Tested by Brad, biorn@ and Johan M:son Lindman
2007-01-27Enable transmit TCP/UDP checksum offload.Kenneth R Westerback
From Brad, tested by Brad, biorn@ and Johan M:son Lindman.
2007-01-21Remove bogus check for old firmware.Ryan Thomas McBride
Identical fixes from myself and brad@, also reported by chefren@pi.net.
2007-01-20move the interrupt establishment till after everything in the softc isDavid Gwynne
set up and allocated (which happens in a mountroothook). this prevents an early call to the interrupt handler from causing a null deref when trying to look into the unallocated regions. found by mcbride when ciss and bnx were sharing an interrupt. mounting root caused interrupts before the bnx was properly set up. "commit your fix" mcbride@
2007-01-19bnx_init() takes a pointer to sc, not ifp.Ryan Thomas McBride
2007-01-10change firmware byte order to be same on all architecturesTheo de Raadt
THIS MEANS YOU NEED TO UPDATE YOUR FIRMWARE FILE BEFORE BOOTING WITH A NEW KERNEL tested by marco, biorn