Re: HDD spins up to slow for USB and/or Mass-Storage Driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 1 Nov 2012, Matthias Schniedermeyer wrote:

> > Okay, Matthias, here's an updated version of that patch.  The only 
> > difference is that it puts the usb_hcd_alloc_bandwidth() call _before_ 
> > the usb_disable_interface() calls.
> 
> This time it worked. The HDD showed up after the echo.

Great!

> Could the kernel automate this, like do what the echo triggers 
> automatically 1-2 seconds after it sees the error? I guess it's only 
> about 1 second or so that this HDD/enclosure-pair spins/boots up too 
> slow.

That's not such a good idea.  Firstly, although your device requires
only 1 second, other devices might need different amounts of time.  
Secondly, what if the second attempt fails?  Do we try again, and then
again, forever (and spamming the kernel log with an error message each
time)?

And then what about other sorts of errors?  Should the kernel
automatically retry every operation whenever there's a failure?

No, it's better for the retries to be carried out by the caller.  In 
this case the caller is you, although you could write a udev script to 
do it automatically.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux