1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
freebsd/sys
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
..
alpha Update syscalls to Linux kernel 2.3.38. These syscalls are 2000-01-10 22:19:06 +00:00
amd64 Uncomment pcic device and put pccard in GENERIC. PCCARD will be removed 2000-01-10 02:29:23 +00:00
boot Add device driver support for USB ethernet adapters based on the 2000-01-05 04:27:24 +00:00
cam Widen width of tag && initiator ids to u_int 2000-01-03 08:54:51 +00:00
coda Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
compat Return Linux kernel version 2.2.12 by default. This is in line 2000-01-10 13:09:08 +00:00
compile
conf Attempt to fix a problem with receiving packets on USB ethernet interfaces. 2000-01-10 23:12:54 +00:00
contrib Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
crypto Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
ddb
dev Attempt to fix a problem with receiving packets on USB ethernet interfaces. 2000-01-10 23:12:54 +00:00
fs remove check now done in vn_isdisk(). 2000-01-10 12:24:36 +00:00
geom Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
gnu Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
i4b update to isdn4bsd beta release 0.90 1999-12-14 20:54:38 +00:00
i386 Update syscalls to Linux kernel 2.3.38. These syscalls are 2000-01-10 22:19:06 +00:00
isa Removed some more vestiges of ft. 2000-01-09 17:13:35 +00:00
isofs/cd9660 remove check now done in vn_isdisk(). 2000-01-10 12:24:36 +00:00
kern Also handle zero return from dscheck(). 2000-01-10 12:21:39 +00:00
libkern Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
miscfs Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
modules Attempt to fix a problem with receiving packets on USB ethernet interfaces. 2000-01-10 23:12:54 +00:00
msdosfs Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
net Attempt to fix a problem with receiving packets on USB ethernet interfaces. 2000-01-10 23:12:54 +00:00
netatalk Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
netatm Fix a warning (unused variable RCSid) 1999-11-18 08:18:13 +00:00
netgraph Fix a few obscure memory leaks. 2000-01-05 20:36:07 +00:00
netinet MGETHDR() does not initialize m_pkthdr.rcvif, do it here. 2000-01-10 18:46:05 +00:00
netinet6 tcp updates to support IPv6. 2000-01-09 19:17:30 +00:00
netipx Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
netkey Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
netnatm Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
netncp Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
netns Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
nfs tcp updates to support IPv6. 2000-01-09 19:17:30 +00:00
nfsclient tcp updates to support IPv6. 2000-01-09 19:17:30 +00:00
nfsserver tcp updates to support IPv6. 2000-01-09 19:17:30 +00:00
ntfs Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
nwfs Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
pc98 Put on my asbestos suit and move $mach/conf/*.$mach to conf/*.$mach as 2000-01-09 15:29:10 +00:00
pccard Fill in the blanks for some of the Texas Instruments cardbus controllers. 1999-12-31 07:22:24 +00:00
pci Added PCIR_BIOS (0x30). 2000-01-10 12:53:19 +00:00
posix4 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
powerpc Sync with i386 2000-01-08 16:43:46 +00:00
rpc
svr4 Removed bogus include of opt_global.h. opt_global.h is automatically 2000-01-09 12:29:45 +00:00
sys Add a comment to hopefully prevent more bugs like kern/8596. 2000-01-10 19:34:40 +00:00
tools Use a seperate -c and -h mode. The vnode_if.c file is compiled only into 1999-12-12 16:43:05 +00:00
ufs Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
vm Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
Makefile ${MACHINE} -> ${MACHINE_ARCH} 1999-11-14 13:54:44 +00:00