summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_bge.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.jan2020-12-121-3/+3
| | | | | | OK dlg@, bluhm@ No Opinion mpi@ Not against it claudio@
* Avoid nvram lock timeout on sparc64 systems with onboard BCM5704 instanceskettenis2020-07-261-2/+3
| | | | | | that come without a fitted EEPROM/NVRAM. ok deraadt@, kn@
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-101-2/+2
| | | | ok dlg@ tobhe@
* use ifiq_input and use it's return value to apply backpressure to rxrs.dlg2020-06-221-3/+8
| | | | this is a step toward deprecating softclock based livelock detection.
* BCM5719 A1 seen in the wild.kettenis2020-06-181-1/+2
| | | | dlg@, deraadt@, mpi@
* M_LEADINGSPACE() and M_TRAILINGSPACE() are just wrappers forclaudio2018-11-091-5/+5
| | | | | | m_leadingspace() and m_trailingspace(). Convert all callers to call directly the functions and remove the defines. OK krw@, mpi@
* Fix iLO/IPMI remote access problem. At least for bge(4) network portyasuoka2018-05-171-4/+17
| | | | | | | | | | which is shared with IPMI on HPE DL20 Gen9, its link state became down a while or never became active again. diff from FreeBSD through Naoki Fukaumi. https://svnweb.freebsd.org/base?view=revision&revision=248226 ok mpi dlg
* Fix asic test. Coverity CID 990792.jsg2017-08-171-2/+2
| | | | ok mpi@ tom@ mikeb@
* properly set BGE_HCC_STATS_ADDR_HI by using BGE_HOSTADDR.dlg2017-02-131-4/+4
| | | | this makes it consistent with the rest of the code.
* add support for multiple transmit ifqueues per network interface.dlg2017-01-241-7/+8
| | | | | | | | | | | | | | | | | | | | | | | an ifq to transmit a packet is picked by the current traffic conditioner (ie, priq or hfsc) by providing an index into an array of ifqs. by default interfaces get a single ifq but can ask for more using if_attach_queues(). the vast majority of our drivers still think there's a 1:1 mapping between interfaces and transmit queues, so their if_start routines take an ifnet pointer instead of a pointer to the ifqueue struct. instead of changing all the drivers in the tree, drivers can opt into using an if_qstart routine and setting the IFXF_MPSAFE flag. the stack provides a compatability wrapper from the new if_qstart handler to the previous if_start handlers if IFXF_MPSAFE isnt set. enabling hfsc on an interface configures it to transmit everything through the first ifq. any other ifqs are left configured as priq, but unused, when hfsc is enabled. getting this in now so everyone can kick the tyres. ok mpi@ visa@ (who provided some tweaks for cnmac).
* move counting if_opackets next to counting if_obytes in if_enqueue.dlg2017-01-221-3/+1
| | | | | | | this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
* G/C IFQ_SET_READY().mpi2016-04-131-2/+1
|
* shuffle tx code slightly and mark bge_start as mpsafe.dlg2015-12-291-22/+17
| | | | | reviewed by jmatthew@ ok kettenis@
* Make it possible to detach bge(4).kettenis2015-11-291-71/+112
| | | | ok deraadt@
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-251-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | there are two things shared between the network stack and drivers in the send path: the send queue and the IFF_OACTIVE flag. the send queue is now protected by a mutex. this diff makes the oactive functionality mpsafe too. IFF_OACTIVE is part of if_flags. there are two problems with that. firstly, if_flags is a short and we dont have any MI atomic operations to manipulate a short. secondly, while we could make the IFF_OACTIVE operates mpsafe, all changes to other flags would have to be made safe at the same time, otherwise a read-modify-write cycle on their updates could clobber the oactive change. instead, this moves the oactive mark into struct ifqueue and provides an API for changing it. there's ifq_set_oactive, ifq_clr_oactive, and ifq_is_oactive. these are modelled on ifsq_set_oactive, ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd. this diff includes changes to all the drivers manipulating IFF_OACTIVE to now use the ifsq_{set,clr_is}_oactive API too. ok kettenis@ mpi@ jmatthew@ deraadt@
* You only need <net/if_dl.h> if you're using LLADDR() or a sockaddr_dl.mpi2015-11-241-2/+1
|
* Include <sys/atomic.h> when atomic operations are used.mpi2015-11-231-1/+2
| | | | | | This has been masked because <sys/srp.h> is pulled unconditionally. ok dlg@
* Clear if_timer when shutting down the interface so the watchdog timerjmatthew2015-11-171-1/+2
| | | | | | doesn't fire a few seconds later. problem reported by Hrvoje Popovski, ok dlg@
* shuffle transmit to avoid IFQ_POLL.dlg2015-11-171-32/+30
| | | | | | | basically make sure there's enough space in the ring before dequeueing a packet for it. ok mpi@ jmatthew@
* Do not include <net/if_vlan_var.h> when it's not necessary.mpi2015-11-141-6/+1
| | | | | | Because of the VLAN hacks in mpw(4) this file still contains the definition of "struct ifvlan" which depends on <sys/refcnt.h> which in turns pull <sys/atomic.h>...
* Revert 1.372, reported to cause regressions on some models.miod2015-11-121-2/+2
|
* In bge_reset(), after figuring out which register access routines to usemiod2015-11-101-2/+2
| | | | | | | | | | | depending upon the chip capabilities, use it everywhere instead of hardcoding one call to bge_writemem_ind() by mistake; this unbreaks the BCM5704 A3 found on some xserve G5 (RackMac3,1). Also tested on a few other bge(4) chip models by jmatthew@ (5703X, 5714), mpi@ (5780), naddy@ (5761) and me (5701). ok dlg@
* arp_ifinit() is no longer needed.mpi2015-10-251-4/+1
|
* Move bge rxeof and txeof outside the kernel lock.jmatthew2015-10-191-109/+92
| | | | | | | | | | | | | | | | To make rxeof safe, use a separate ring refill timeout for each ring. We activate the refill timeout for a ring when it's too empty to receive packets, which ensures we won't attempt to refill it from interrupt context. To make txeof safe, remove the list of dma maps and just allocate maps based on the ring slots occupied by the packet, and use atomic operations to adjust bge_txcnt. Rework some parts of the txeof and start loops so that we only adjust bge_txcnt after exiting the loop, and only take actions such as setting or clearing OACTIVE based on the final value. tested on 5703, 5714, 5721 by me, 5753 by semarie@, 5761 by naddy@, and also in snapshots for a while ok mpi@, dlg@
* use standardized register definition in mii.h rather than eachyuo2015-07-191-2/+3
| | | | | | | | specific driver definition. no logical change. ok deraadt@
* Increment if_ipackets in if_input().mpi2015-06-241-2/+1
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Increase a maximum firmware handshake timeout to 10smikeb2015-05-191-3/+4
| | | | | | | | BCM5718 Programmers Guide in chapter 7 "Device Control", section "Device Reset Procedure" states that SEEPROM chips need a larger timeout than Flash ones. ok reyk
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* if_input sets m->m_pkthdr.rcvif so we dont have to.dlg2015-02-091-2/+1
|
* tweak the new if_input function so it takes an mbuf_list insteaddlg2015-02-091-10/+5
| | | | | | | | | of a single mbuf. this forces us to batch work between the hardware rx handlers and the stack. this includes a converstion of bge from ether_input to if_input. ok claudio@ pelikan@ mpi@
* Remove a comment that is no longer true with MCLGETI and jumbos onbrad2015-01-241-7/+1
| | | | some revisions of the chipsets.
* unifdef INETtedu2014-12-221-5/+1
|
* Add Jumbo support for BCM5714 / BCM5780 and BCM5717 / BCM5719 / BCM5720 / BCM57765 / BCM57766brad2014-09-021-16/+41
| | | | | | chipsets. ok mikeb@ "i think it should go in" dlg@
* Revert part of the if_rxr diff that incorrectly moves RX ring tailmikeb2014-08-261-5/+3
| | | | | index update code from the buf_get success path to the do it all the time code path. Tested by millert; ok dlg, deraadt
* Fix a copy and pasto with the standard ring setup with calling if_rxr_init()brad2014-08-211-2/+2
| | | | | | to use BGE_STD_RX_RING_CNT instead of BGE_JUMBO_RX_RING_CNT. ok dlg@
* Fewer <netinet/in_systm.h>mpi2014-07-221-3/+1
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* cut things that relied on mclgeti for rx ring accounting/restriction overdlg2014-07-081-25/+63
| | | | | | | | | | to using if_rxr. cut the reporting systat did over to the rxr ioctl. tested as much as i can on alpha, amd64, and sparc64. mpi@ has run it on macppc. ok mpi@
* sending a heavily fragmented packet will cause the bus_dmamap_loaddlg2014-07-031-3/+14
| | | | | | | | | | | | | | | | | | in bge_encap to fail because the dmamap lacks space, not necessarily because the ring is full. however, bge_encap failure sets the OACTIVE flag on the interface and keeps the packet at the start of the send queue. the next time we try to fill the tx ring we'll try to load the same packet and fail. an empty tx ring means bge_txeof hasnt got anything which is where the OACTIVE condition is cleared. this diff adds handling of fragmented packets via m_defrag. this might fix the issues landry@ has been complaining about on his bulk build machines. i can reproduce the above problem in contrived circumstances here and this diff fixes it, so its going in so landry@ is forced to test it.
* If VLAN_HWTAGGING is disabled, we tell the chip not to strip thenaddy2014-04-221-2/+3
| | | | | | | tag from the received frame. Do not add the tag from the receive descriptor in this case so that the packet isn't tagged twice. Matches FreeBSD. ok brad@
* Revert rev 1.348 and disable IPv6 TCP checksum offload for the time being.brad2014-02-241-3/+1
| | | | | | | | | | It has been reported that the offload support is not working properly with some of the newer ASICs, specifically BCM57780 and BCM57765. It is unknown what the issue is whether it could be hw, the driver or the stack; so to be on the safe side it is being disabled all together until the issue can be investigated further. ok deraadt@
* - Recognize BCM5762 A0 chipset.brad2014-02-051-17/+17
| | | | | | | - Have the BGE_RXLP_LOCSTAT_IFIN_DROPS workaround cover for the BCM5762 ASIC. From Linux ok naddy@
* Revert part of rev 1.329 that involved bringing in some code from FreeBSDbrad2014-02-041-3/+2
| | | | | | | | | and part of it touched upon the link state handling for the BCM5700 B2 revision of chipset. The special casing of the BCM5700 B2 chipset for link state handling is wrong and doesn't work. This special casing was removed in rev 1.229. ok naddy@
* Split bge(4)'s feature flags into bge_flags and bge_phy_flags.brad2014-02-011-25/+25
| | | | ok naddy@
* Fix a long standing VCPU reset sequence bug on BCM5906. The VCPU (Virtual CPU)brad2014-01-311-14/+12
| | | | | | | | | | | | 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 boot procedure to choose. Datasheet indicates the VCPU of BCM5906 should set BGE_VCPU_STATUS_DRV_RESET bit before VCPU reset or global reset. From FreeBSD ok naddy@
* Enable IPv6 TCP checksum offload; ok brad@naddy2014-01-281-1/+3
| | | | (UDP is broken over both IPv4 and IPv6, verified on BCM5761.)
* - Bring in some fixes/workarounds for BCM5719 / BCM5720 / BCM57765 and BCM57766brad2014-01-281-20/+133
| | | | | | | | | | | chipsets - Add support for the new BCM5762 ASIC (BCM5725 / BCM5727 / BCM57767) - Add all of the newer PCI ids Tested with BCM5719 / BCM5720 and BCM57765 / BCM57766 and a bunch of older chipsets. ok naddy@
* Expand the MSI support to cover most of the remaining bge(4) chipsets with thebrad2013-12-301-10/+59
| | | | | | | | exception being the BCM5714 family for now. Tested on a variety of newer chipsets. ok sthen@
* The few network drivers that called their children's (ie. mii PHYderaadt2013-12-281-2/+1
| | | | | drivers) activate functions at DVACT_RESUME time do not need to do so, since their PHYs are repaired by IFF_UP.
* Add support for BCM57786,which seems to be almost indistinguishable from thekettenis2013-12-221-1/+3
| | | | | | BCM57785. Tested by Mark Rowland.