summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_ste.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-101-5/+5
| | | | 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@
* 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
|
* 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
|
* The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.mpi2015-11-241-2/+1
|
* arp_ifinit() is no longer needed.mpi2015-10-251-4/+1
|
* 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@
* Convert to if_input().mpi2015-05-151-10/+5
| | | | ok dlg@
* unifdef INETtedu2014-12-221-5/+1
|
* Have foo_init() call foo_reset() to reset the chip to a known statebrad2014-12-081-6/+4
| | | | | | | | as is the case for a lot of the other drivers. Remove some redundant calls to foo_stop() and foo_reset() before foo_init(). Tested with DP83815, 3c905C, 8139 and ST201. Mostly from FreeBSD.
* Fewer <netinet/in_systm.h>mpi2014-07-221-3/+1
|
* 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 return at the end of void functionsbrad2013-03-141-35/+7
| | | | - Move the PCI devices table up to the top
* Rewrite the receive filter handling code and cleanup the ioctl bits.brad2013-03-091-80/+49
| | | | ok sthen@
* Some corrections for D-Link device names.brad2013-01-161-5/+5
| | | | ok jsing@
* 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@
* Convert a number of old private copies of code which predatesderaadt2012-10-181-29/+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
* kill a few more casts that aren't helpful. ok krw miodtedu2011-06-221-5/+4
|
* use nitems(); no binary change for drivers that are compiled on amd64.jasper2011-04-031-2/+2
| | | | ok claudio@
* - consistify cfdriver for the ethernet drivers (0 -> NULL)jasper2009-08-131-2/+2
| | | | ok dlg@
* A few more simple cases of shutdown hooks which only call xxstop, whenderaadt2009-08-101-12/+1
| | | | we now know the interface has already been stopped
* Eliminate the redundant bits of code for MTU and multicast handlingbrad2008-11-281-17/+10
| | | | | | | | | | | | | | 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@
* First step towards cleaning up the Ethernet driver ioctl handling.brad2008-10-021-9/+2
| | | | | | | | | | | | | | | | | | | | 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@
* Convert timeout_add() calls using multiples of hz to timeout_add_sec()blambert2008-09-101-3/+3
| | | | | | | Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
* Add missing '};' to end struct declaration. Compiles again.krw2007-07-171-1/+2
|
* ident/ansify/de-registerjasper2007-07-171-140/+117
|
* uncomment call to ste_miibus_statchg in ste_stats_update.brad2006-07-081-7/+5
|
* unknown ioctl is ENOTTY not EINVALjason2006-05-281-2/+2
|
* add another PCI id to the ste(4) driver.brad2006-04-021-3/+4
| | | | From the Sundance Linux driver.
* allow bpf(4) to ignore packets based on their direction (inbound ordjm2006-03-251-3/+4
| | | | | outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
* - splimp -> splnetbrad2005-11-071-11/+8
| | | | | | | | - remove spl's from attach - removing redundant checks before pci_mapreg_map() - fix dmesg printing - de-allocate resources on failure to attach - remove unused VLAN input code from vge(4)
* - a few fixes from the FreeBSD driverbrad2005-09-101-67/+74
| | | | | - make use of pci_mapreg_map() - ensure driver cleans after itself if ste_attach() fails
* do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in pcisubmatch(); kettenis@ testing; brad@ okmickey2005-08-091-6/+2
|
* clear IFF_RUNNING & IFF_OACTIVE in foo_stop() before de-allocating resources.brad2005-07-021-3/+3
|
* o if the mac address cannot be read, just fail and disestablish thefgsch2005-04-211-14/+32
| | | | | | | | | | | irq (for shared irq's) on failure. (should other drivers do the same?) o if it's a rev 0x12 card, only use the first phy as it reports a non-existent one as well (From FreeBSD). o remove splimp/splx from ste_attach(). o some cleanup. thanks to matt at mattroberts dot org and paolo at actcom dot net dot il for testing; commit deraadt@.
* remove dmesg spewage when link changes, ok deraadt, brad, canacarbeck2005-04-081-3/+1
|
* make sure interface is in RUNNING state before touching the multicast filtersbrad2005-01-151-2/+3
| | | | | | | | From NetBSD NetBSD PR 27678 for details ok mcbride@
* - Use ETHER_MAX_DIX_LEN.brad2004-11-211-6/+11
| | | | - Accept VLAN sized frames. based on diff from canacar@
* vaddr_t casts for vtophys, works on amd64, enabled in GENERICcanacar2004-10-301-7/+7
| | | | | patch submitted and tested by Steffen Schütz, schuetz.steffen at melle de ok tedu@
* don't need to set ifp->if_mtu or ifp->if_output in each driver,brad2004-09-231-3/+1
| | | | | | {ether,atm,fddi}_ifattach already does this. ok mcbride@ markus@ henning@
* Do check for STATS_OFLOW in interrupt handler. The overflow interrupt iscanacar2004-08-221-7/+1
| | | | | | already disabled and the status update function fails to clear the overflow, causing high interrupt load. Reported and tested by Arvid Grøtting. ok deraadt@
* update ste(4) with stability and performance fixes fromcanacar2004-08-091-98/+156
| | | | | FreeBSD if_ste.c revisions 1.28, 1.29, 1.38, 1.43, 1.63, 1.68, 1.70 ok henning@
* Multicast cleanupsmcbride2004-06-061-29/+8
| | | | | | | | - make multicast ranges work - replace handrolled crc code with ether_crc32_{be,le}() - add missing calls to ether_{add,del}multi() ok deraadt@
* do not whine if we cannot get mbufs. the countless printfd makes the machinehenning2004-04-091-7/+2
| | | | | | crawl under mbuf starvation, making the situationmuch worse, and don't make sense in the first place. ok tdeval@ millert@ beck@ deraadt@
* lose ste_unit; jason@ okavsm2003-06-291-21/+20
|
* another bad format string; %s->%davsm2003-06-291-2/+2
| | | | ok tedu@
* Get rid of the remaining vm_offset_t in pci drivers.art2003-01-151-2/+2
|