patch-2.2.8 linux/drivers/usb/hub.c
Next file: linux/drivers/usb/inits.h
Previous file: linux/drivers/usb/README.ohci_hcd
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Fri Apr 30 08:20:01 1999
- Orig file:
v2.2.7/linux/drivers/usb/hub.c
- Orig date:
Wed Apr 28 11:37:30 1999
diff -u --recursive --new-file v2.2.7/linux/drivers/usb/hub.c linux/drivers/usb/hub.c
@@ -30,6 +30,9 @@
/* List of hubs needing servicing */
static struct list_head hub_event_list;
+/* PID of khubd */
+static int khubd_pid = 0;
+
/*
* A irq handler returns non-zero to indicate to
* the low-level driver that it wants to be re-activated,
@@ -166,7 +169,8 @@
/* Is it a hub? */
if (interface->bInterfaceClass != 9)
return -1;
- if (interface->bInterfaceSubClass != 0)
+ if ((interface->bInterfaceSubClass != 0) &&
+ (interface->bInterfaceSubClass != 1))
return -1;
/* Multiple endpoints? What kind of mutant ninja-hub is this? */
@@ -398,8 +402,10 @@
usb_register(&hub_driver);
pid = kernel_thread(usb_hub_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
- if (pid >= 0)
+ if (pid >= 0) {
+ khubd_pid = pid;
return 0;
+ }
/* Fall through if kernel_thread failed */
usb_deregister(&hub_driver);
@@ -407,3 +413,10 @@
return 0;
}
+void hub_cleanup(void)
+{
+ if (khubd_pid >= 0)
+ kill_proc(khubd_pid, SIGINT, 1);
+
+ usb_deregister(&hub_driver);
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)