Am Freitag 28 September 2007 schrieb Alan Stern:
> 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.
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.
Regards
Oliver
-
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