Re: Ejected Nook (usb mass storage) prevents suspend

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

 



On Fri, 26 Jul 2013, Andy Lutomirski wrote:

> This is kernel 3.9.9-302.fc19.x86_64.
> 
> I plugged in a BN Nook (a usb mass storage device), used it, and
> ejected it.  This makes suspend fail:
> 
> [50135.265514] PM: Entering freeze sleep
> [50135.265517] Suspending console(s) (use no_console_suspend to debug)
> [50135.287724] sd 7:0:0:0: [sdb] Synchronizing SCSI cache
> [50135.290413] sd 7:0:0:0: [sdb]
> [50135.290415] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
> [50135.290418] sd 7:0:0:0: [sdb]
> [50135.290422] Sense Key : Not Ready [current]
> [50135.290424] sd 7:0:0:0: [sdb]
> [50135.290429] Add. Sense: Medium not present
> [50135.290448] dpm_run_callback(): scsi_bus_suspend+0x0/0x40 returns -5
> [50135.290454] PM: Device 7:0:0:0 failed to suspend async: error -5
> [50138.486917] PM: Some devices failed to suspend
> [50138.525007] PM: resume of devices complete after 38.132 msecs
> [50138.525315] pci_pm_runtime_suspend():
> hcd_pci_runtime_suspend+0x0/0x50 returns -16
> [50138.536357] PM: Finishing wakeup.

In addition to my earlier comment, the patch below should be applied.  
It will fix your immediate problem, although not in the best way.

Alan Stern



Index: usb-3.10/drivers/scsi/scsi_pm.c
===================================================================
--- usb-3.10.orig/drivers/scsi/scsi_pm.c
+++ usb-3.10/drivers/scsi/scsi_pm.c
@@ -48,8 +48,6 @@ static int scsi_dev_type_resume(struct d
 static int
 scsi_bus_suspend_common(struct device *dev, int (*cb)(struct device *))
 {
-	int err = 0;
-
 	if (scsi_is_sdev_device(dev)) {
 		/*
 		 * All the high-level SCSI drivers that implement runtime
@@ -59,10 +57,10 @@ scsi_bus_suspend_common(struct device *d
 		if (pm_runtime_suspended(dev))
 			return 0;
 
-		err = scsi_dev_type_suspend(dev, cb);
+		scsi_dev_type_suspend(dev, cb);
 	}
 
-	return err;
+	return 0;	/* System suspend should never fail */
 }
 
 static int

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