summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2004-02-11 15:46:44 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2004-02-11 15:46:44 +0000
commitef279b6ea80743b2879012847aeaa55ee7b5eb06 (patch)
tree034b96cbcc47120af4e43a27abd7c768229f2059 /mdk-stage1
parent55f69e09d7460b996585f6501c004a775d7b1cfc (diff)
downloaddrakx-ef279b6ea80743b2879012847aeaa55ee7b5eb06.tar
drakx-ef279b6ea80743b2879012847aeaa55ee7b5eb06.tar.gz
drakx-ef279b6ea80743b2879012847aeaa55ee7b5eb06.tar.bz2
drakx-ef279b6ea80743b2879012847aeaa55ee7b5eb06.tar.xz
drakx-ef279b6ea80743b2879012847aeaa55ee7b5eb06.zip
don't insmod usb-storage the soonest, we can end up mixing scsi devices orders at reboot time, do it only when needed
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/probing.c16
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;