summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/mtd8xx.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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@
* arp_ifinit() is no longer needed.mpi2015-10-251-7/+1
|
* Increment if_ipackets in if_input().mpi2015-06-241-10/+8
| | | | | | | 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().mpi2015-04-081-7/+6
| | | | ok dlg@
* unifdef INETtedu2014-12-221-5/+1
|
* Have foo_init() call foo_reset() to reset the chip to a known statebrad2014-12-081-3/+6
| | | | | | | | 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.
* reduce the amount of pci includesjsg2014-09-061-2/+1
|
* Instead of comparing the lower and higher addresses of all the multicastmpi2013-11-261-7/+6
| | | | | | | | | | | entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not change the behavior of any driver but if you encounter any problem, feel free to revert the offending chunk and ping me about it. ok naddy@, dlg@
* get rid of the copy argument in m_devget that let you provide andlg2013-08-211-3/+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@
* 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@
* remove some unnecessary casts. ok blambert deraadt kettenis matthewtedu2011-06-211-5/+3
|
* BUS_DMA_ZERO instead of alloc, map, bzero.oga2010-05-191-3/+2
| | | | ok krw@
* Eliminate the redundant bits of code for MTU and multicast handlingbrad2008-11-281-23/+8
| | | | | | | | | | | | | | 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@
* Change m_devget()'s outdated and unused "offset" argument: It isnaddy2008-10-141-4/+3
| | | | | | | | | | | now the offset into the first mbuf of the target chain before copying the source data over. From FreeBSD. Convert drivers' use of m_devget(). Mostly from thib@. Update mbuf(9) man page. ok claudio@, thib@
* First step towards cleaning up the Ethernet driver ioctl handling.brad2008-10-021-8/+3
| | | | | | | | | | | | | | | | | | | | 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@
* typos; ok jmc@martynas2007-11-261-2/+2
| | | | | sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@ sys/dev/pci/bktr/* ok jakemsr@
* allow bpf(4) to ignore packets based on their direction (inbound ordjm2006-03-251-3/+3
| | | | | outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
* Remove superfluous statement-ending semi-colons. i.e., "return foo;;" shouldaaron2005-11-191-2/+2
| | | | just be "return foo;". Cleaning out some M's in my tree.
* splimp -> splnetbrad2005-11-071-3/+3
|
* set IFCAP_VLAN_MTU and do not whine if we cannot get mbufsbrad2005-07-021-8/+4
|
* 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/ETHER_MIN_LENbrad2004-09-281-2/+2
|
* 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@
* Make multicast ranges work.mcbride2004-06-051-1/+6
| | | | ok deraadt@
* use ETHER_ALIGNbrad2004-05-261-4/+4
|
* Defined behavior.espie2003-11-171-5/+5
| | | | ok grange@ miod@
* typos from Tom Cosgrove;jmc2003-10-211-2/+2
| | | | | | | | Tom: I did not commit a couple of your changes. i did not include some punctuation fixes (full stops, etc.) mnemorable -> mnemonic: i decided memorable was probably better instrunctions -> instruction: i kept the plural
* update fom form@ including support for 891 chips and moremickey2003-09-251-0/+1103