diff options
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/probing.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c index 0d2e21684..433f48481 100644 --- a/mdk-stage1/probing.c +++ b/mdk-stage1/probing.c @@ -162,6 +162,17 @@ void probe_that_type(enum driver_type type, enum media_bus bus) void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((unused))) #endif { + static int already_probed_usb_controllers = 0; + static int already_loaded_usb_scsi = 0; + + if (type == SCSI_ADAPTERS && already_probed_usb_controllers && !already_loaded_usb_scsi) { + already_loaded_usb_scsi = 1; + /* we can't allow additional modules floppy since we need usbkbd for keystrokes of usb keyboards */ + my_insmod("usb-storage", SCSI_ADAPTERS, NULL, 0); + if (module_already_present("ieee1394")) + my_insmod("sbp2", SCSI_ADAPTERS, NULL, 0); + } + /* ---- PCI probe ---------------------------------------------- */ { FILE * f = NULL; @@ -275,7 +286,6 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u #ifdef ENABLE_USB /* ---- USB probe ---------------------------------------------- */ if ((bus == BUS_USB || bus == BUS_ANY) && !(IS_NOAUTO)) { - static int already_probed_usb_controllers = 0; static int already_mounted_usbdev = 0; FILE * f = NULL; @@ -290,10 +300,6 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u if (!already_mounted_usbdev) { already_mounted_usbdev = 1; - /* we can't allow additional modules floppy since we need usbkbd for keystrokes of usb keyboards */ - my_insmod("usb-storage", SCSI_ADAPTERS, NULL, 0); - if (module_already_present("ieee1394")) - my_insmod("sbp2", SCSI_ADAPTERS, NULL, 0); if (mount("/proc/bus/usb", "/proc/bus/usb", "usbdevfs", 0, NULL)) { log_message("USB: couldn't mount /proc/bus/usb"); goto end_usb_probe; |