Re: [autosuspend] [ums] spin down the disk in the suspend() method of the storage driver
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Montag 10 September 2007 schrieb Oliver Neukum: > Am Montag 10 September 2007 schrieb Alan Stern: > > On Sun, 9 Sep 2007, Alexey Rempel wrote: > > > > > i use "040d:6204 VIA Technologies, Inc." ( USB->IDE Adapter) with 2,5 > > > hard drive what working perfectly except small issue with autosuspend. > > > It can be suspended and resumed, so it seems like there is no problem > > > power mangment in this adapter. But the way haw it will be suspended > > > make me some worries: the adpater will be just powered off and hard > > > drive make sound like air plain crash. Similar sound i heard on shutdown > > > of my laptop with broken libata or acpi, so far i know it is not really > > > healthy for hard drive. > > > > > > I think it should be done with some scenario like: 1. park heads, 2. > > > spin down, 3. suspend the adapter. > > > > You are correct, except for one thing: The change you propose (park > > heads, spin down, and then suspend) involves the SCSI disk driver, not > > the usb-storage driver. In fact, the SCSI disk driver already contains > > code to do these things, although I believe you have to enable it by > > hand. > > By this logic the autosuspend code in the storage driver is fundamentally > flawed. In this case the SCSI layer should propagate down the information > that all a bus' devices are spun down. Sorry for replying to myself. I wasn't fully awake the first time. Firstly, you are right, anything else is a layering violation. But if we do this our API becomes insufficient. It makes no sense to put the USB timeout based API on top of whatever SCSI may use. We need a way to specify that an interface doesn't need timeout. It should suspend as soon as the counter goes to zero. Regards Oliver ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel