freebsd-nq/sys/dev/usb
John Baldwin 6b66deaeff The ukbd driver has some questionable "magic" to for a default keyboard
which is ukbd0.  Specifically, the keyboard driver structures for ukbd0
are not allocated/freed but are statically allocated via a persistent
global variable.  There is some additional magic for the ukbd0 such that
if the keyboard is marked as probed in this global variable, then we
don't check to see if the device_t we are probing has an interface.

This causes a problem if an attach of ukbd0 fails without fulling clearing
the state in the global variable.  Specifically, if the keyboard fails to
initialize in init_keyboard() or kbd_register(), then the keyboard will
still be marked as probed.  The USB layer will then try to offer the
"generic" version of the USB keyboard device (as opposed to the
per-interface sub-devices) and the ukbd(4) driver will see that the
keyboard is marked probe and will skip the "is this a per-interface device"
check.  Later in ukbd_attach() it panics because it tries to dereference
the interface pointer which is NULL.

The fix is to clear the flags in the persistent keyboard data for ukbd0
when init_keyboard() or kbd_register() fail.

MFC after:	1 week
Reviewed by:	imp
2007-10-12 19:47:42 +00:00
..
dsbr100io.h Don't pretend to support !BSD systems. 2007-06-12 19:01:32 +00:00
ehci_pci.c - Only assume that a PCI device on the same slot is a "neighbor" USB 2007-09-19 16:21:34 +00:00
ehci.c Replace three copies of the host controller reset sequence that 2007-08-12 18:45:24 +00:00
ehcireg.h ehcivar.h: 2005-09-18 11:45:39 +00:00
ehcivar.h Expand callout compatibility macros in the main usb bridges. 2007-06-14 16:23:31 +00:00
FILES Acknowledge (dearly) departed files 2006-11-21 22:29:06 +00:00
hid.c s/logprintf/printf/g 2007-06-20 05:11:37 +00:00
hid.h
if_aue.c Remove duplicate ID and recall that I comes after E in alphabetical 2007-06-23 05:59:53 +00:00
if_auereg.h Remove my "custom" locks that allow for lock acquire abort, they are 2007-01-08 23:24:21 +00:00
if_axe.c Add support for the AX88178 and AX88772 based devices. 2007-09-25 20:47:24 +00:00
if_axereg.h Add support for the AX88178 and AX88772 based devices. 2007-09-25 20:47:24 +00:00
if_cdce.c Fix two more PRs: 2007-06-30 20:18:44 +00:00
if_cdcereg.h Prefer device_printf over printf 2007-06-10 07:33:48 +00:00
if_cue.c Note the Belkin F5U111 Adapter is covered by NETMATE entry. 2007-06-23 06:29:19 +00:00
if_cuereg.h Prefer device_printf to printf where sane. 2007-06-11 05:42:47 +00:00
if_kue.c Add a boatload of devices from OpenBSD and NetBSD to kue and cdce. 2007-06-23 06:47:43 +00:00
if_kuereg.h Prefer device_printf to printf 2007-06-11 05:50:47 +00:00
if_rue.c When all the other drivers were converted to scheduling a taskqueue to 2007-07-09 16:58:07 +00:00
if_ruereg.h Missed in last commit: add usb task for rue to use for its ticks. 2007-07-09 20:56:39 +00:00
if_rum.c Update beacon handling to sync w/ vap code base: 2007-09-17 19:07:24 +00:00
if_rumreg.h Update 802.11 wireless support: 2007-06-11 03:36:55 +00:00
if_rumvar.h Update 802.11 wireless support: 2007-06-11 03:36:55 +00:00
if_udav.c Add support for ShanTou ST268 usb nic. This is from a patch for NetBSD 2007-07-24 14:44:23 +00:00
if_udavreg.h More removing compatibility macros. 2006-09-07 00:06:42 +00:00
if_ural.c Update beacon handling to sync w/ vap code base: 2007-09-17 19:07:24 +00:00
if_uralreg.h Update 802.11 wireless support: 2007-06-11 03:36:55 +00:00
if_uralvar.h Update 802.11 wireless support: 2007-06-11 03:36:55 +00:00
if_zyd.c Add another zydas device: Planex GW-US54GD (a.k.a Dempaotoko) 2007-10-12 08:45:55 +00:00
if_zydfw.h A port of the zyd driver from NetBSD by . This supports the ZyDAS 2007-08-29 21:16:50 +00:00
if_zydreg.h A port of the zyd driver from NetBSD by . This supports the ZyDAS 2007-08-29 21:16:50 +00:00
kue_fw.h s/Static/static/g 2006-09-06 23:44:25 +00:00
ohci_pci.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
ohci.c s/logprintf/printf/g 2007-06-20 05:11:37 +00:00
ohcireg.h Use the limited scatter-gather capabilities of ehci, ohci and uhci 2006-05-28 05:27:09 +00:00
ohcivar.h Expand callout compatibility macros in the main usb bridges. 2007-06-14 16:23:31 +00:00
rio500_usb.h Don't pretend to support !BSD systems. 2007-06-12 19:01:32 +00:00
rt2573_ucode.h Add support for Ralink Technology RT2501USB/RT2601USB devices. 2007-05-06 10:07:21 +00:00
sl811hs.c Include usb_port.h to fix build. 2007-06-19 10:28:08 +00:00
sl811hsreg.h
sl811hsvar.h Use pause() rather than using tsleep() on a dummy variable. 2007-02-27 17:19:33 +00:00
slhci_pccard.c Include usb_port.h to fix build. 2007-06-19 10:28:08 +00:00
uark.c Reduce diffs to OtherBSD by using usb_lookup. No functional changes. 2007-06-30 02:42:36 +00:00
ubsa.c add support for Option GlobeTrotter 3G+ 2007-06-22 05:56:05 +00:00
ubser.c Prefer device_printf to printf("%s: ...", device_get_nameunit()). On 2007-07-05 06:42:14 +00:00
ubser.h
ucom.c Starting in version 1.56, ucomstop started calling ucomstart to work 2007-06-25 06:40:20 +00:00
ucomvar.h Eliminate usb_thread_t. 2007-06-12 17:30:54 +00:00
ucycom.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
udbp.c Prefer device_printf to printf + device_get_nameunit. This saves 2007-07-05 15:25:32 +00:00
udbp.h
ufm.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
ufoma.c Minor Bug fix that will cause panic with some terminal with voice path on USB. 2007-07-27 12:00:29 +00:00
uftdi.c Tactrix Openport support 2007-06-22 05:53:05 +00:00
uftdireg.h
ugen.c The timeout is in milliseconds, not in hz. Only the portion of the 2007-06-28 06:22:40 +00:00
ugraphire_rdesc.h Add support for the Wacom Graphire 3 4x5. Like the Graphire 3, it has a 2005-12-31 04:38:50 +00:00
uhci_pci.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
uhci.c Expand callout compatibility macros in the main usb bridges. 2007-06-14 16:23:31 +00:00
uhcireg.h
uhcivar.h Expand callout compatibility macros in the main usb bridges. 2007-06-14 16:23:31 +00:00
uhid.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
uhub.c Fix two more PRs: 2007-06-30 20:18:44 +00:00
uipaq.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
ukbd.c The ukbd driver has some questionable "magic" to for a default keyboard 2007-10-12 19:47:42 +00:00
ulpt.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
umass.c Add quirks, derived from the linux quirks table for: 2007-07-05 05:26:08 +00:00
umct.c Finish removal of usb_port.h macros. 2007-06-18 22:27:57 +00:00
umodem.c Add missing newline in printf. 2007-07-29 18:16:43 +00:00
ums.c ums(4) does not work if the mouse defaults to boot protocol. Force 2007-07-25 06:43:06 +00:00
uplcom.c s/logprintf/printf/g 2007-06-20 05:11:37 +00:00
urio.c Latest round of usb cleanups: 2007-06-21 14:42:34 +00:00
usb_ethersubr.c Add the following functions to abstract away the creation of task threads 2007-01-08 23:21:06 +00:00
usb_ethersubr.h Add the following functions to abstract away the creation of task threads 2007-01-08 23:21:06 +00:00
usb_if.m
usb_mem.c s/logprintf/printf/g 2007-06-20 05:11:37 +00:00
usb_mem.h Remove more __OtherBSD__ ifdefs that don't make sense, and haven't for 2007-06-13 05:45:48 +00:00
usb_port.h uhub already does the printing and naming of a device, so don't do it 2007-07-06 20:02:37 +00:00
usb_quirks.c WISPY added an X. 2007-07-22 15:59:45 +00:00
usb_quirks.h Add support for various MS Wirless usb mice. the patch is from 2007-06-29 21:07:41 +00:00
usb_subr.c Fix two more PRs: 2007-06-30 20:18:44 +00:00
usb.c s/logprintf/printf/g 2007-06-20 05:11:37 +00:00
usb.h Add definition for UIPROTO_MOUSE. 2007-06-30 02:40:21 +00:00
usbcdc.h
usbdevs Add another zydas device: Planex GW-US54GD (a.k.a Dempaotoko) 2007-10-12 08:45:55 +00:00
usbdi_util.c s/logprintf/printf/g 2007-06-20 05:11:37 +00:00
usbdi_util.h protect against multiple inclusion (this is useful when you 2007-01-03 10:50:03 +00:00
usbdi.c Fix two more PRs: 2007-06-30 20:18:44 +00:00
usbdi.h Fix two more PRs: 2007-06-30 20:18:44 +00:00
usbdivar.h Expand callout compatibility macros in the main usb bridges. 2007-06-14 16:23:31 +00:00
usbhid.h
uscanner.c Add entries for Epson multifunction scanner/printer/card readers, 2007-10-05 07:26:39 +00:00
uvisor.c Prefer device_printf to printf("%s:...", device_get_nameunit(),...); 2007-07-05 06:28:46 +00:00
uvscom.c Prefer device_printf to printf("%s:...", device_get_nameunit(),...); 2007-07-05 06:28:46 +00:00
uxb360gp_rdesc.h Add support for the Wacom Graphire 3 4x5. Like the Graphire 3, it has a 2005-12-31 04:38:50 +00:00