Re: [linux-usb-devel] question on flushing buffers and spinning down disk

Alan Stern <[email protected]>
Newsgroups gmane.linux.scsi,gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, 28 Sep 2007, Oliver Neukum wrote:

> Am Donnerstag 27 September 2007 schrieb Alan Stern:
> > Have you thought about how autoresume would fit into this picture?  I
> > don't think you can rely on usb-storage telling the SCSI core to resume
> > devices when it gets handed a command, because the commands to spin-up
> > the drives would have to be transmitted first.  (The sample patch you

I had another look at your patch.  It calls scsi_device_quiesce(), 
which causes all normal requests to be deferred.  Hence under normal 
operation the device would never autoresume -- user requests would be 
deferred and never sent to usb-storage.

It will be necessary to modify scsi_prep_fn(), so that if the device is
in the SDEV_QUIESCE state because of autosuspend when a request
arrives, a workqueue routine initiates an autoresume.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.