Re: question on flushing buffers and spinning down disk

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

> Unless I am very mistaken, further down in storage_suspend, I call
> 
> +	/* In case of autosuspend device must be unblocked again */
> +	if (us->pusb_dev->auto_pm) {
> +err_unblock:
> +		shost_for_each_device(sdev, host) {
> +			if (sdev == sdev2) {
> +				scsi_device_put(sdev);
> +				break;
> +			}
> +			scsi_device_resume(sdev);
> 
> which again allows normal io, so the autoresume is triggered.
> It may deadlock, you are right about that, but it is definitely triggered.
> I verified that experimentally.

Yes, okay, sorry, I didn't read far enough into the patch.

Still, doesn't it seem peculiar that to implement autosuspend you have 
to quiesce the device and then reactivate it?  In fact, it's not clear 
why you want to call scsi_device_quiesce() in the first place.  The 
fact that scsi_bus_suspend() does it isn't a good reason.

Alan Stern


-------------------------------------------------------------------------
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
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.