From ef279b6ea80743b2879012847aeaa55ee7b5eb06 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Wed, 11 Feb 2004 15:46:44 +0000 Subject: don't insmod usb-storage the soonest, we can end up mixing scsi devices orders at reboot time, do it only when needed --- mdk-stage1/probing.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'mdk-stage1/probing.c') 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; -- cgit v1.2.1