]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] scsi_pm: resume device if suspend failed
authorAaron Lu <aaron.lu@amd.com>
Tue, 15 May 2012 06:43:00 +0000 (14:43 +0800)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 22 May 2012 10:09:50 +0000 (11:09 +0100)
commit3dcf6727aef8025957be627f6f8d188197077e30
tree8b4807a70dbeaca14a882ef96bc0410bcf1f464f
parentc1d241cfce9b88a0e8e46326d414aefa865a0afe
[SCSI] scsi_pm: resume device if suspend failed

For scsi devices which use scsi bus runtime callback, runtime suspend
will call scsi_dev_type_suspend, and if the drv->suspend failed, the
device will still be in active state. But since scsi_device_quiesce is
called, the device will not be able to respond any more commands.
So add a check here to see if err occured, if so, bring the device back
to normal state with scsi_device_resume.

Signed-off-by: Aaron Lu <aaron.lu@amd.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_pm.c