]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[SCSI] sd: check runtime PM status in sd_shutdown
authorLin Ming <ming.m.lin@intel.com>
Mon, 5 Dec 2011 01:20:26 +0000 (09:20 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 7 Dec 2011 20:00:56 +0000 (15:00 -0500)
commita3720577f21c940df2b5d8fcf17256cce648b76a
tree74b17ebe6bf1a836370b5576b0dc1e7234800a6b
parent92334f65e3cfa12430b97483722c22d9f3ac493f
[SCSI] sd: check runtime PM status in sd_shutdown

sd_shutdown is called during reboot/poweroff.
It may fail if parent device, for example, ata port, was runtime suspended.

Fix it by checking runtime PM status of sd.
Exit immediately if sd was runtime suspended already.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/scsi/sd.c