ALT Linux Bugzilla
– Attachment 2349 Details for
Bug 13841
Недостаточный таймаут для инициализации USB-устройств
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Задержка для инициализации USB-устройств в параметрах ядра
propagator-usbdelay.patch (text/plain), 1.55 KB, created by
Michael A. Kangin
on 2007-12-31 17:20:09 MSK
(
hide
)
Description:
Задержка для инициализации USB-устройств в параметрах ядра
Filename:
MIME Type:
Creator:
Michael A. Kangin
Created:
2007-12-31 17:20:09 MSK
Size:
1.55 KB
patch
obsolete
>diff -urN propagator.orig/probing.c propagator/probing.c >--- propagator.orig/probing.c 2007-08-08 20:05:08 +0400 >+++ propagator/probing.c 2007-12-31 15:49:34 +0300 >@@ -365,6 +365,7 @@ > static int already_probed_usb_controllers = 0; > static int already_mounted_usbdev = 0; > static int already_probed_hid = 0; >+ static int usb_sleep = 0; > > FILE * f; > char buf[200]; >@@ -404,7 +405,9 @@ > if (type == MEDIA_ADAPTERS) { > stg1_info_message("About to load driver for usb storage device: usb-storage"); > my_insmod("usb-storage", ANY_DRIVER_TYPE, NULL); >- sleep(5); /* wait for dust settles down */ >+ usb_sleep = get_usb_delay(); >+ log_message("Will be sleep %d seconds...", usb_sleep); >+ sleep(usb_sleep); /* wait for dust settles down */ > } > > #ifdef ENABLE_USBNET >diff -urN propagator.orig/tools.c propagator/tools.c >--- propagator.orig/tools.c 2007-08-08 20:05:08 +0400 >+++ propagator/tools.c 2007-12-31 15:24:05 +0300 >@@ -518,6 +518,20 @@ > return i; > } > >+int get_usb_delay() >+{ >+ int usb_delay = 0; >+ char * usb_delay_param = get_param_valued("usbdelay"); >+ if (!usb_delay_param) { >+ return(5); >+ } >+ if (sscanf(usb_delay_param,"%d",&usb_delay) != 1) { >+ return(5); >+ } >+ return(usb_delay); >+} >+ >+ > int do_losetup(char * device, char * target) > { > int loopfd, targfd; >diff -urN propagator.orig/tools.h propagator/tools.h >--- propagator.orig/tools.h 2007-08-08 20:05:08 +0400 >+++ propagator/tools.h 2007-12-31 15:48:43 +0300 >@@ -47,6 +47,7 @@ > int update_splash(void); > int prepare_progress(void); > void close_progress(void); >+int get_usb_delay(); > > struct param_elem > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 13841
: 2349