summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_vr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.jan2020-12-121-2/+2
| | | | | | OK dlg@, bluhm@ No Opinion mpi@ Not against it claudio@
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-101-3/+3
| | | | ok dlg@ tobhe@
* Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thepatrick2020-07-101-2/+2
| | | | | | "new" API. ok dlg@ tobhe@
* use ifiq_input and use it's return value to apply backpressure to rxrs.dlg2020-06-221-3/+4
| | | | this is a step toward deprecating softclock based livelock detection.
* move counting if_opackets next to counting if_obytes in if_enqueue.dlg2017-01-221-2/+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
|
* Ethernet drivers no longer need to include if_vlan_var.h for the VLANnaddy2016-03-151-5/+1
| | | | definitions; ok mpi@
* prettify a NULL test in vr_start.dlg2016-01-261-2/+2
| | | | from richard proctor on bugs@
* dont leak mbufs on encap failure.dlg2016-01-261-1/+2
| | | | diff from richard proctor on bugs@
* 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
|
* No need to include <net/if_types.h> for <net/if_vlan_var.h>mpi2015-11-241-2/+1
|
* rework the code to avoid IF_PREPEND.dlg2015-11-091-58/+43
| | | | | | | | | | IF_PREPEND assumes the underlying send queue is using priq, so if you're using hfsc things dont work well. part of this shuffle moved the defragmentation of the mbuf to using m_defrag instead of hand rolled code. tested by several people on tech@
* arp_ifinit() is no longer needed.mpi2015-10-251-4/+1
|
* Fix 802.1p VLAN priority code points for VLAN_HWTAGGING.chrisz2015-10-201-4/+9
| | | | | | Our in-kernel ether-vtag has a different layout to the vr TXSTAT register. ok sthen@
* More ifmedia64 fallout; that should be the last.miod2015-09-121-3/+3
|
* Increment if_ipackets in if_input().mpi2015-06-241-3/+1
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Now that if_input() set the receiving interface pointer on mbufs for usmpi2015-04-131-3/+2
| | | | | | | | | | | | there's no need to do it in m_devget(9). Stop passing an ``ifp'' will help for upcoming interface pointer -> index conversion. While here remove unused ``ifp'' argument from m_clget(9) and kill two birds^W layer violations in one commit. ok henning@
* 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@
* convert to if_input()jasper2015-03-131-11/+5
| | | | ok mpi@ sthen@
* unifdef INETtedu2014-12-221-5/+1
|
* rxr ioctl handling.brad2014-11-271-1/+6
|
* Fewer <netinet/in_systm.h>mpi2014-07-221-3/+1
|
* cut things that relied on mclgeti for rx ring accounting/restriction overdlg2014-07-081-14/+16
| | | | | | | | | | 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@
* sigh, another driver fiddling with altq outside #ifdef ALTQhenning2014-04-191-5/+2
|
* 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 a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-4/+4
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* get rid of the copy argument in m_devget that let you provide andlg2013-08-211-2/+2
| | | | | | | | | alternative to bcopy since noone uses it. while there use memcpy instead of bcopy because we know the memory cannot overlap. ok henning@ matthew@ mikeb@ deraadt@
* Most network drivers include netinet/in_var.h, but apparently theybluhm2013-08-071-2/+1
| | | | | don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
* remove spurious semicolon at end of if statement in vr_watchdog.sthen2013-03-071-2/+2
| | | | from oga@bitrig, ok dtucker
* Programme the VT6105M, VT6105 and RhineII-2 to permit frames of up tosthen2013-02-091-5/+13
| | | | | 1758 bytes (MTU 1740) and raise hardmtu to allow the user to set them. Tests by Mark Patruck, Michal Markowski, mikeb, beck, dtucker. ok mikeb@
* Add TX interrupt mitigation for vr(4) chips, loosely based on FreeBSD,dtucker2013-01-281-7/+32
| | | | | | | | but with tweaks so it works on 6105Ms like those found in pcengines alix and soekris 5501s. ok sthen@, help brad chris mikeb dlg jsing There may be other 610x chips that would benefit from the VR_Q_INTDISABLE quirk, please send me a dmesg if you can confirm it works.
* Don't try to access m_head after it may be freed (unlikely for VT6105M,chris2013-01-171-10/+11
| | | | | | | but possible). Also don't re-calculate vlan tag repeatedly through the descriptor loop. ok dtucker@
* fix typo in commentdtucker2013-01-161-2/+2
|
* Add hardware VLAN tag/untag support for VT6105M chips. Help/feedback/okdtucker2013-01-161-1/+41
| | | | brad@ chris@ jsing@ kettenis@ mikeb@ sthen@
* Keep a count of packets added to the chip's TX queue and only poke the chipdtucker2013-01-161-2/+4
| | | | if we've added a packet. Reduces CPU util a tiny bit. ok brad@ jsing@
* Don't bother to zero initialize the if_capabilities field first andbrad2012-12-011-4/+5
| | | | | | then set the flags. Just set the flags as is done everywhere else. ok sthen@
* Remove setting an initial assumed baudrate upon driver attach which is notbrad2012-11-291-2/+1
| | | | | | necessarily correct, there might not even be a link when attaching. ok mikeb@ reyk@
* set ifp->if_baudrate with IF_Gbps() / IF_Mbps().gsoares2012-11-231-2/+2
| | | | OK reyk@ sthen@
* Do not try to transmit packets if the interface is not running.jsing2012-11-151-2/+5
| | | | ok chris@ deraadt@ dtucker@ mikeb@
* Implement transmit DMA segments. The descriptor usage is from FreeBSD,chris2012-10-201-91/+147
| | | | | | | | | which contradicts the datasheet (but actually works). Also, use a segment (instead of a new mbuf and data copy) to zero-pad small packets, modeled after if_myx. ok sthen@, gerhard@, henning@
* Convert a number of old private copies of code which predatesderaadt2012-10-181-35/+2
| | | | | | | | pci_set_powerstate() to using it instead. Many of these chunks of code had bugs in them, especially missing delay() calls. Some of them were doing things our PCI subsystem is now responsible for handling. If you have any of the affected devices, please keep an eye out for regressions. ok kettenis
* Wait until all xfers have finished before giving up DMA buffer mappings.gerhard2012-09-181-1/+12
| | | | ok deraadt@, mikeb@
* Remove redundant call to vr_reset. From Bryan Steele, ok mikeb@sthen2012-01-301-2/+1
|
* suspend/resume support for vr(4); from brynet@gmail.comderaadt2012-01-051-23/+57
|
* add timeout to fill rx-ring in case of mbuf shortage while in vr_intr();markus2011-12-081-2/+22
| | | | fixes hanging interfaces similar to in myx(4); ok dlg@, claudio@, henning@
* kill a few more casts that aren't helpful. ok krw miodtedu2011-06-221-7/+5
|
* do not disable interrupts in the isr and then enable them againdlg2011-04-201-7/+1
| | | | | | | | | when leaving. when you're handling an interrupt it is masked. whacking the chip is work for no gain. diff from chris@ tested by marco@ ok by me :)
* mechanic rename M_{TCP|UDP}V4_CSUM_OUT -> M_{TCP|UDP}_CSUM_OUThenning2011-04-051-3/+3
| | | | ok claudio krw
* Wake On LAN support for vr(4).stsp2011-03-131-1/+39
| | | | ok deraadt