Greg,
Here's "nousb" for 2.4.39 if you want it.
It only applies to USB when built into a kernel image,
not as modules.
[Could be changed, but I didn't see a need for it.]
I'm working on some Documentation/kernel-parameters.txt
changes also, so I'll add this one when it's accepted.
~Randy
--- ./drivers/usb/core/usb.c.2539 Fri Sep 27 14:49:55 2002
+++ ./drivers/usb/core/usb.c Fri Sep 27 22:35:30 2002
@@ -1440,11 +1440,32 @@
.hotplug = usb_hotplug,
};
+int nousb; /* Disable USB when built into kernel image */
+ /* Not honored on modular build */
+
+#ifndef MODULE
+
+static int __init usb_setup_disable(char *str)
+{
+ nousb = 1;
+ return 1;
+}
+
+/* format to disable USB on kernel command line is: nousb */
+__setup("nousb", usb_setup_disable);
+
+#endif
+
/*
* Init
*/
static int __init usb_init(void)
{
+ if (nousb) {
+ info("USB support disabled\n");
+ return 0;
+ }
+
bus_register(&usb_bus_type);
usb_major_init();
usbfs_init();
@@ -1460,6 +1481,10 @@
*/
static void __exit usb_exit(void)
{
+ /* This will matter if shutdown/reboot does exitcalls. */
+ if (nousb)
+ return;
+
remove_driver(&usb_generic_driver);
usb_major_cleanup();
usbfs_cleanup();