freebsd-dev/sys/dev
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
..
advansys Move the declaration of panic() from sys/systm.h to sys/param.h. 1999-09-26 18:19:49 +00:00
aha MIN unused, so kill it 1999-10-25 04:28:53 +00:00
ahb
aic Adjust data pointers for untransmitted bytes in fifos when there's phase 1999-12-16 16:11:49 +00:00
aic7xxx Avoid setting DPARCKEN until I can figure out why it causes 2000-01-10 01:47:51 +00:00
amd
amr Fix a printf format problem on the Alpha, where size_t == unsigned long, 1999-12-12 20:53:31 +00:00
ar Add explicit null entries for new entrypoints. 1999-12-01 09:34:14 +00:00
ata Grrrr, this time it should be right, I need sleep - badly... 2000-01-07 15:51:45 +00:00
atkbdc Obtain the initial key repeat rate setting via BIOS in i386 if 2000-01-10 08:52:32 +00:00
bktr Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
buslogic * Add struct resource_list* argument to resource_list_alloc and 1999-10-12 21:35:51 +00:00
cardbus Sync to latest cardbusdevs file 1999-11-18 07:22:59 +00:00
ccd Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
cs Remove NBPF conditionality of bpf calls in most of our network drivers. 1999-09-25 12:06:01 +00:00
cy Introduce ttyread() and ttywrite() which do the canonical thing. 1999-09-28 11:45:31 +00:00
dc It appears that under certain circumstances that I still can't quite pin 2000-01-03 15:28:47 +00:00
de Remove NBPF conditionality of bpf calls in most of our network drivers. 1999-09-25 12:06:01 +00:00
dec Ho, ho, ho... this clock chip is not y2k compliant. Motorola 2000-01-04 03:22:04 +00:00
dgb Introduce ttyread() and ttywrite() which do the canonical thing. 1999-09-28 11:45:31 +00:00
dpt Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
ed Fix pccard ed driver, I think. 1999-12-10 07:22:53 +00:00
eisa Remove the 'ivars' arguement to device_add_child() and 1999-12-03 08:41:24 +00:00
en remove unused #include, add $FreeBSD$ 1999-10-11 19:14:37 +00:00
ep Commit kernel part of patches to get the 3Com OfficeConnect 3CXSH572BT 2000-01-10 02:32:43 +00:00
ex Fix bus_setup_intr(); I changed exintr() to take a pointer to ex_softc 1999-11-03 15:45:14 +00:00
fb Rework the algorithm to detect MDA/CGA/EGA/VGA cards, so that 2000-01-10 08:49:49 +00:00
fdc Futher cleanup.. "device_print_prettyname(); printf()" -> device_printf() 2000-01-08 09:33:09 +00:00
fe Make release is now falling over in if_fe.c due to Warner's pccard changes: 1999-10-25 17:04:17 +00:00
fxp Make the fxp driver work on alpha, rather than panic the machine on boot 1999-09-30 19:03:12 +00:00
hea Incorrect uses of NULL changed to 0 1999-12-21 08:24:35 +00:00
hfa Remove five now unused fields from struct cdevsw. They should never 1999-09-25 18:24:47 +00:00
ic
ida Revamp the devstat priority system. All disks now have the same priority. 1999-12-08 04:45:23 +00:00
ie Hid silly unknown board types message behind if (bootverbose). This 1999-10-11 18:53:59 +00:00
iicbus Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
isp change debug printout lefvels for a couple of places 2000-01-09 21:47:39 +00:00
joy Recognize the CSC0101 ID for the Thinkpad series. 1999-12-30 20:07:20 +00:00
kbd Obtain the initial key repeat rate setting via BIOS in i386 if 2000-01-10 08:52:32 +00:00
lnc Remove NBPF conditionality of bpf calls in most of our network drivers. 1999-09-25 12:06:01 +00:00
mc146818
mca Remove the 'ivars' arguement to device_add_child() and 1999-12-03 08:41:24 +00:00
mcd Remove five now unused fields from struct cdevsw. They should never 1999-09-25 18:24:47 +00:00
md Initialize type correctly. 1999-12-01 10:20:21 +00:00
mii Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
mlx Fix the firmware build number output (again). 1999-12-25 01:45:22 +00:00
mse - Remove cdevsw_add(). 1999-10-06 13:03:09 +00:00
pccard Move xe driver from dev/pccard to dev/xe. Convert driver to newbus. 2000-01-10 08:05:53 +00:00
pcf Remove the 'ivars' arguement to device_add_child() and 1999-12-03 08:41:24 +00:00
pci Added PCIR_BIOS (0x30). 2000-01-10 12:53:19 +00:00
pcic Add some comments about things that have become bad as I've been 2000-01-10 06:17:27 +00:00
pdq Remove NBPF conditionality of bpf calls in most of our network drivers. 1999-09-25 12:06:01 +00:00
ppbus Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
ppc
rc Introduce ttyread() and ttywrite() which do the canonical thing. 1999-09-28 11:45:31 +00:00
rp Introduce ttyread() and ttywrite() which do the canonical thing. 1999-09-28 11:45:31 +00:00
scd Remove five now unused fields from struct cdevsw. They should never 1999-09-25 18:24:47 +00:00
sf Modify the Adaptec "starfire" driver to reset the PHY on the MII bus 1999-12-05 20:02:45 +00:00
si Fix some -Wunused warnings 1999-11-18 08:43:58 +00:00
sio Recognize the GVC0505 (GVC 56k Faxmodem) as a sio device. 1999-12-27 05:02:25 +00:00
sk Call sk_start() at the end of sk_intr() if there's packets in the 1999-09-25 04:50:27 +00:00
smbus Remove the 'ivars' arguement to device_add_child() and 1999-12-03 08:41:24 +00:00
sn Two nits and disable isa probe due to its overly agressive claiming of 1999-12-28 01:07:16 +00:00
snp Remove cdevsw_add() - the make_dev() calls are already there. 1999-11-18 06:39:47 +00:00
sound make dsp_read() assert that it has a read channel, not a write channel 2000-01-10 07:05:15 +00:00
speaker Move isfoo() and friends to the newly created sys/ctype.h. 1999-11-03 17:54:26 +00:00
sr Add explicit null entries for new entrypoints. 1999-12-01 09:34:14 +00:00
streams Rename remove_dev() to destroy_dev(). 1999-11-08 07:44:01 +00:00
sym - Add year 2000 copyright to driver files. 2000-01-08 19:58:17 +00:00
syscons - Remember the keyboard repeat delay and rate. 1999-12-13 09:31:43 +00:00
ti As suggested by phk, unconditionalize BPF support in these drivers. Since 1999-09-23 03:32:57 +00:00
tx Change incorrect NULLs to 0s 1999-12-21 11:14:12 +00:00
usb Attempt to fix a problem with receiving packets on USB ethernet interfaces. 2000-01-10 23:12:54 +00:00
vinum Give vn_isdisk() a second argument where it can return a suitable errno. 2000-01-10 12:04:27 +00:00
vn Fix a panic when doing non-multiples of PAGE_SIZE or misaligned transfers 1999-12-28 07:32:34 +00:00
vr Change contigmalloc() lower memory bound from 1MB to 0 to improve 1999-09-25 17:29:02 +00:00
vx Remove NBPF conditionality of bpf calls in most of our network drivers. 1999-09-25 12:06:01 +00:00
wi Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 04:46:21 +00:00
wl Remove NBPF conditionality of bpf calls in most of our network drivers. 1999-09-25 12:06:01 +00:00
xe Move xe driver from dev/pccard to dev/xe. Convert driver to newbus. 2000-01-10 08:05:53 +00:00