summaryrefslogtreecommitdiffstats
path: root/sys/arch/macppc/dev/if_bm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thepatrick2020-07-101-2/+2
| | | | | | "new" API. ok dlg@ tobhe@
* Do not clear IFF_UP, even in the error path, clearing IFF_RUNNINGmpi2017-03-081-2/+2
| | | | | | | | | is enough. This flag should only be set by the stack, drivers shouldn't mess with it. Discussed with dlg@ and mikeb@, ok mikeb@, stsp@
* 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
|
* No trailers has been the default and only option for 20 years, yet sometedu2015-12-081-2/+2
| | | | | | | drivers still set IFF_NOTRAILERS while others do not. Remove all usage of the flag from the drivers which in ancient times used it (and the modern drivers which blindly copied it from those drivers of yore). suggested by guenther. ok mpi
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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@
* No need to include <net/bpfdesc.h>mpi2015-11-141-2/+1
| | | | | Now that "struct bpf_d" depends on <sys/srp.h> this is one of the offender for removing the header from <sys/param.h>
* arp_ifinit() is no longer needed.mpi2015-10-251-12/+2
|
* Workaround for slow bm(4) from NetBSD PR 33667 via Donovan Watteau onmpi2015-08-241-1/+3
| | | | bugs@.
* MFREE(9) is dead, long live m_freem(9)!mpi2015-07-081-3/+3
| | | | ok bluhm@, claudio@, dlg@
* 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@
* test mbuf pointers against NULL not 0jsg2015-05-131-4/+4
| | | | ok krw@ miod@
* tweak the new if_input function so it takes an mbuf_list insteaddlg2015-02-091-2/+4
| | | | | | | | | 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@
* Convert to if_input().mpi2015-02-081-11/+2
|
* unifdef INETtedu2014-12-221-3/+1
|
* Instead of comparing the lower and higher addresses of all the multicastmpi2013-10-231-16/+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 introduce any behavior change but will help changing our representation of multicast enries.
* In bmac_init(), invoke bmac_transmit_packet() with the correct packet sizemiod2009-08-251-2/+2
| | | | | | (sizeof(ptr) vs sizeof(*ptr) bug). ok krw@
* Actual final round of timeout_add(to, n * hz) -> timeout_add_sec(to, n)blambert2009-01-111-2/+2
| | | | | | | conversions. ok kettenis@ ok krw@ (possibly for the second time :)
* Eliminate the redundant bits of code for MTU and multicast handlingbrad2008-11-281-20/+9
| | | | | | | | | | | | | | 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@
* Second pass of simple timeout_add -> timeout_add_sec conversionsblambert2008-10-151-2/+2
| | | | | | | This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
* First step towards cleaning up the Ethernet driver ioctl handling.brad2008-10-021-3/+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@
* better interrupt names for vmstat -iz; ok miod gwkderaadt2007-04-221-3/+3
|
* 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 some NetBSD/OpenBSD portability cruft.brad2005-10-091-97/+28
| | | | compiles ok kettenis@
* eliminate use of M_HASFCSmartin2005-10-071-5/+5
| | | | | | ok brad@ from NetBSD
* remove netns crud.henning2005-06-081-19/+1
| | | | | some drivers actually had hooks for SIOCSIFADDR, most just useless includes "looks good" deraadt miod brad
* make sure interface is in RUNNING state before touching the multicast filtersbrad2005-01-151-3/+5
| | | | | | | | From NetBSD NetBSD PR 27678 for details ok mcbride@
* spacesderaadt2003-10-161-2/+2
|
* more ANSI/KNF.drahn2003-10-161-85/+35
|
* Reduce the amount of asm code in powerpc/macppc by replacing it withdrahn2003-07-021-2/+2
| | | | | inlined functions, helps improve readability and fix a couple of bugs. ok miod@
* backout prematurederaadt2002-09-151-16/+16
|
* KNFderaadt2002-09-151-16/+16
|
* sizeof(pointer) is not what should be used here, should be sizeof(*pointer)drahn2002-09-061-2/+2
| | | | pointed out by aaron.
* Remove code, use common ether_crc32_le() routine.drahn2002-08-221-19/+3
|
* Configure the media in the initialization routine so that media/mediaoptdrahn2002-08-221-1/+4
| | | | | | fields in hostname.bm0 will work correctly. This does not fix the 100MB receive problem, but allows media 10baseT in hostname.bm0 to set the speed to a working speed.
* properly allocate dmable memory for buffers (no malloc); drahn@ ok and testingmickey2002-04-261-22/+53
|
* First round of __P removal in sysmillert2002-03-141-32/+32
|
* sync with KAMEkjc2002-03-121-2/+3
| | | | | ALTQify more drivers. ok millert@
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+2
| | | | (Look ma, I might have broken the tree)
* Update the bmac (if_bm) to a newer version from NetBSD.drahn2001-09-161-132/+149
| | | | | | | | Now uses mii/mii_bitbang. Driver still has performance issues, It does not transfer as fast data as it should. No worse than before. Need to investigate a dhclient reported error: 'ip length 331 disagrees with bytes recieved 336'. only on if_bm.
* reimplement dbdma such that it does memory allocationsmickey2001-09-151-11/+14
| | | | | | | w/ bus_dma(9) and rework drivers accordingly. make drivers use bus_dma as well, except for if_bm (later ;) . additionally, sync wdc_obio w/ netbsd. drahn@ ok, tested by miod@, pval@, brad@, mickey@
* correct files for the powerpc/mac/ -> macppc/dev which did not getdrahn2001-09-011-3/+3
| | | | renamed correctly.
* The "powerpc" port which has supported the newer Apple Macintosh powerpc baseddrahn2001-09-011-0/+1083
is being renamed to macppc. This is to allow sharing of common code between different powerpc base platforms. Most of the work involved in the renaming process was performed by miod@ Files moved from powerpc/mac to macppc/dev