freebsd-dev/sys/modules/usb/Makefile

30 lines
628 B
Makefile
Raw Normal View History

1999-11-22 03:46:33 +00:00
# $FreeBSD$
MAINTAINER = n_hibma@freebsd.org
S = ${.CURDIR}/../..
.PATH: $S/dev/usb $S/pci
KMOD = usb
SRCS = bus_if.h device_if.h usb_if.h usb_if.c \
vnode_if.h \
1999-11-22 03:46:33 +00:00
opt_usb.h \
hid.c hid.h usbhid.h \
uhub.c \
usb.c usb.h \
usb_mem.h \
usb_port.h \
usb_quirks.c usb_quirks.h \
usb_subr.c \
usbdevs.h usbdevs_data.h \
usbdi.c usbdi.h usbdivar.h \
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
usbdi_util.c usbdi_util.h \
usb_ethersubr.c
1999-11-22 03:46:33 +00:00
SRCS += uhci_pci.c uhci.c uhcireg.h uhcivar.h
SRCS += ohci_pci.c ohci.c ohcireg.h ohcivar.h
SRCS += opt_bus.h pci_if.h
NOMAN =
.include <bsd.kmod.mk>