summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_ale.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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@
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-081-2/+1
|
* move counting if_opackets next to counting if_obytes in if_enqueue.dlg2017-01-221-4/+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-3/+1
| | | | definitions; ok mpi@
* 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@
* rework the start routines to avoid IF_PREPEND.dlg2015-11-091-29/+21
| | | | | | | | | | | | IF_PREPEND assumes the underlying send queue is priq, while hfsc may be enabled on it. the previous code pattern to DEQUEUE, try and encap the mbuf on the ring, and if that failed cos there was no space it would PREPEND it. now it checks for space on the ring before it attempts to DEQUEUE. failure to encap means the mbuf is now unconditionally dropped.
* arp_ifinit() is no longer needed.mpi2015-10-251-4/+1
|
* 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-2/+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@
* Convert to if_input() but I won't tell your the story of krw@mpi2015-03-241-9/+5
| | | | | fighting trolls and daemons with old wireless cards to be able to find the correct hardware to test this diff.
* 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@
* unifdef INETtedu2014-12-221-5/+1
|
* Fix a long standing bug in MAC statistics register access. Onebrad2014-11-271-12/+4
| | | | | | | | | additional register was erroneously added in the MAC register set such that 7 TX statistics counters were wrong. From FreeBSD ok mikeb@
* use the correct capitalization for Realtek.brad2014-11-241-2/+2
|
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-3/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* Fewer <netinet/in_systm.h>mpi2014-07-221-2/+1
|
* 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@
* Fix typo in ale_stop_mac().brad2013-04-081-2/+2
| | | | | | From FreeBSD ok kevlo@
* 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@
* Do not report link status unless the interface is up as the status isbrad2012-09-261-1/+4
| | | | | | | | only valid when the interface is up. From FreeBSD ok sthen@
* Typo; from Bradkevlo2011-10-191-2/+2
|
* Add some missing bus_dmamap_sync()'s and sync the others withkevlo2011-10-191-11/+25
| | | | | | | | | the FreeBSD code. age(4) tested by Thomas Pfaff; alc(4) tested by Gabriel Linder; ale(4) tested by Johan Torin. From Brad
* Some minor clean up to the _start funtions to make the code read a littlekevlo2011-09-211-5/+5
| | | | | | better. No functional change. From Brad
* Fix up ale_encap() / ale_start():kevlo2011-09-131-34/+23
| | | | | | | | | | | | | | | | | | - Remove unnecessary nsegs variable from ale_encap() and use map->dm_nsegs. Also remove unnecessary FreeBSD check for 0 DMA segments check. - Remove printfs in ale_encap() failure paths that shouldn't be there. - Add missing IF_PREPEND() from failure path coming off of ale_encap() within ale_start(). - Fix error handling within ale_encap(). Previously ale_encap() was attempting to unload a DMA map upon failure from bus_dmamap_load_mbuf() even though one wasn't loaded at that point and then always forcing mbufs through the EFBIG path. Tested by Johan Torin. From Brad
* Enable MSI support and fix establishing a link to a GigE link partnerkevlo2011-09-051-13/+6
| | | | | | | | | from a FastE ale(4) controller. Previously only link parters which support down-shifting were able to establish a link. Tested by roberth, Johan Torin and sthen@ From Brad
* Help prevent watchdog timeouts.kevlo2011-09-031-12/+11
| | | | | | Tested by roberth <robert at openbsd dot pap dot st> and Johan Torin. From Brad
* mechanic rename M_{TCP|UDP}V4_CSUM_OUT -> M_{TCP|UDP}_CSUM_OUThenning2011-04-051-2/+2
| | | | ok claudio krw
* Add DVACT_QUIECE support. This is called before splhigh() and beforederaadt2010-08-311-2/+5
| | | | | | | | DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
* remove the unused if_init callback in struct ifnetjsg2010-08-271-2/+1
| | | | ok deraadt@ henning@ claudio@
* ca_activate function brings eeepc 1000HE back after resume.deraadt2010-07-271-2/+25
| | | | tested by krw
* BUS_DMA_ZERO love.oga2010-05-191-13/+6
| | | | ok kevlo@, krw@
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* Fix multicast handling. All Atheros controllers use big-endian formkevlo2010-02-271-2/+2
| | | | | | when computing multicast hash. From Brad via FreeBSD
* Rename _rxfilter functions to _iff for consistency. From Brad, ok kevlo@sthen2010-01-071-5/+6
|
* M_DUP_PKTHDR() define -> m_dup_pkthdr() function to properly dealkrw2009-09-131-27/+2
| | | | | | | | | | | | | with m_tag_copy_chain() failures. Use m_defrag() to eliminate hand rolled defragging of mbufs and some uses of M_DUP_PKTHDR(). Original diff from thib@, claudio@'s feedback integrated by me. Tests kevlo@ claudio@, "reads ok" blambert@ ok thib@ claudio@, "m_defrag() bits ok" kettenis@
* Rewrite bits of the multicast handling code as it should be.kevlo2009-08-091-9/+5
| | | | | | | The handling of the IFF_ALLMULTI flag is wrong and the bcmp based range checking shouldn't be there. From Brad
* don't read/write 1000baseT specific MII registers on 10/100M ony device.kevlo2009-08-051-1/+12
| | | | | | From dragonflybsd tested by krw@
* print the chipset name in the dmesg so it is possible to tellkevlo2009-07-281-2/+7
| | | | | | whether this is an L1E or L2E chipset. From Brad
* Add flow control supportkevlo2009-07-281-5/+6
| | | | From Brad
* make various strings ("can't map mem space" and similar) more consistentsthen2009-03-291-3/+3
| | | | | | | between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
* set interrupt moderation timer for tx; otherwise interrupt always for txkevlo2009-02-271-1/+2
| | | | ok deraadt@
* fix the multicast code; tested by sthen@kevlo2009-02-261-4/+9
| | | | ok deraadt@
* add Atheros AR8121/AR8113/AR8114 Ethernet controller(also known as L1E).kevlo2009-02-251-0/+2045
written by Pyun YongHyeon for FreeBSD, ported to DragonFlyBSD by Sepherosa Ziehau and then ported to OpenBSD by me. ok deraadt@