1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/sys/modules
Bill Paul a0067d7b89 Attempt to fix a problem with receiving packets on USB ethernet interfaces.
Packets are received inside USB bulk transfer callbacks, which run at
splusb() (actually splbio()). The packet input queues are meant to be
manipulated at splimp(). However the locking apparently breaks down under
certain circumstances and the input queues can get trampled.

There's a similar problem with if_ppp, which is driven by hardware/tty
interrupts from the serial driver, but which must also manipulate the
packet input queues at splimp(). The fix there is to use a netisr, and
that's the fix I used here. (I can hear you groaning back there. Hush up.)

The usb_ethersubr module maintains a single queue of its own. When a
packet is received in the USB callback routine, it's placed on this
queue with usb_ether_input(). This routine also schedules a soft net
interrupt with schednetisr(). The ISR routine then runs later, at
splnet, outside of the USB callback/interrupt context, and passes the
packet to ether_input(), hopefully in a safe manner.

The reason this is implemented as a separate module is that there are
a limited number of NETISRs that we can use, and snarfing one up for
each driver that needs it is wasteful (there will be three once I get
the CATC driver done). It also reduces code duplication to a certain
small extent. Unfortunately, it also needs to be linked in with the
usb.ko module in order for the USB ethernet drivers to share it.

Also removed some uneeded includes from if_aue.c and if_kue.c

Fix suggested by: peter
Not rejected as a hairbrained idea by: n_hibma
2000-01-10 23:12:54 +00:00
..
aha Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
amr Don't waste time creating amr.h since it (and NAMR) aren't used. 1999-12-12 20:54:53 +00:00
aue This commit adds device driver support for the ADMtek AN986 Pegasus 1999-12-28 02:01:18 +00:00
bktr Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
cardbus Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
cbb Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
ccd Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
cd9660 Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
coda Bring these more into line with other modules that have .h files generated 1999-12-12 16:47:33 +00:00
coff Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
dc Add the if_dc driver and remove all of the al, ax, dm, pn and mx drivers 1999-12-04 17:41:31 +00:00
fdesc Bring these more into line with other modules that have .h files generated 1999-12-12 16:47:33 +00:00
fdescfs Bring these more into line with other modules that have .h files generated 1999-12-12 16:47:33 +00:00
fpu $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
fxp Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
gnufpu $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
hpfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
ibcs2 Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
if_disc udp IPv6 support, IPv6/IPv4 tunneling support in kernel, 1999-12-07 17:39:16 +00:00
if_ef Add module for if_ef driver and make it compile. 1999-12-13 16:42:17 +00:00
if_ppp Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
if_sl Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
if_tun Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
ip_mroute_mod $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ipfilter Add forgotten ip_fil.c and fil.c to kld version 1999-12-06 20:33:38 +00:00
ipfw $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
joy Fix joy and put it back in the MI section. (yes, it works on Alpha) 1999-12-12 20:42:58 +00:00
kernfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
kue Add device driver support for USB ethernet adapters based on the 2000-01-05 04:27:24 +00:00
linux Compile linux_genassym.c with ordinary ${CFLAGS}. The (small) need for 2000-01-09 10:04:53 +00:00
md Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
mfs Bring these more into line with other modules that have .h files generated 1999-12-12 16:47:33 +00:00
mii Add pci_if.h to SRCS so that dcphy will build. 1999-12-05 01:39:11 +00:00
mlx Move mlx from x86-only to generic. It builds on the Alpha and is in the 1999-12-12 21:00:42 +00:00
msdos Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
msdosfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
ncp Zap unused CFLAGS += -DNCP 1999-12-12 21:15:51 +00:00
netgraph Fix typos per PR 15649. Also did some rewording for clarity. 2000-01-03 18:36:42 +00:00
nfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
nfsclient Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
nfsserver Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
ntfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
nullfs Bring these more into line with other modules that have .h files generated 1999-12-12 16:47:33 +00:00
nwfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
osf1 Finally add the Alpha OSF/1 compat code. I will add it to the 1999-12-14 22:35:36 +00:00
pccard Add resource activation routines to pcic driver. Minor cleanup of 1999-11-28 21:11:13 +00:00
pcic i82365_isasubr is gone, remove from building module. 1999-12-19 05:49:56 +00:00
portal Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
portalfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
procfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
rl Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
sf Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
sis Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
sk Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
splash $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
ste Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
streams Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
svr4 . add manpage for svr4(8) 2000-01-10 08:48:11 +00:00
syscons Add the apm_saver syscons screen saver module. 1999-10-02 03:56:42 +00:00
ti Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
tl Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
ugen Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
uhid Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
ukbd Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
ulpt Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
umapfs Bring these more into line with other modules that have .h files generated 1999-12-12 16:47:33 +00:00
umass Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
umodem Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
ums Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
union Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
unionfs Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been 1999-12-12 20:34:11 +00:00
usb Attempt to fix a problem with receiving packets on USB ethernet interfaces. 2000-01-10 23:12:54 +00:00
vesa Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
vinum Remove non-functional 'all:' target. 2000-01-04 23:46:41 +00:00
vn Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
vr Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
wb Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
wi Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
xl Removed special rules for building and cleaning device interface files 1999-11-28 18:53:47 +00:00
Makefile Add device driver support for USB ethernet adapters based on the 2000-01-05 04:27:24 +00:00
Makefile.inc $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00