lkml.org 
[lkml]   [2003]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectGET_TIMEOUT too small for hotplugging in usb.c (2.4.20)
There seem to be several threads in the archives which report problems that 
the small timeout seems to explain. Details attached.

ael
GET_TIMEOUT in usb.c requires a larger value to permit hotplugging
------------------------------------------------------------------

drivers/usb/usb.c from 2.4.20 (no version number in file)

#ifdef CONFIG_USB_LONG_TIMEOUT
#define GET_TIMEOUT 20 <== This was 4
#else
#define GET_TIMEOUT 3
#endif
#define SET_TIMEOUT 3

Hotplugging my usb Epson scanner ceased to work sometime ago. I have just
traced this to a short GET_TIMEOUT in usb.c as above.

It is well known that Epson scanners take a long time to respond.
Mine takes around 12 seconds: the explanation seems to be that it switchs
on the transparency light source and waits for it to stabilize before answering
enquiries. This is covered in scanner.c which uses extended timeouts for
Epsons.

However, even with CONFIG_USB_LONG_TIMEOUT set, the timeout in usbcore is only
4 seconds, so the hotplug script does not get called to load that scanner
module. So the longer value of GET_TIMEOUT needs to be increased to at least
15 seconds, perhaps much longer to cover other devices that may be even slower?
Or should it become a module parameter?

A.E.Lawrence
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.030 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site