From 95897910a5b8ecdc7e86ca2c38e21e84324c98bd Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Mon, 16 Sep 2013 13:28:15 +0200 Subject: [SCSI] sd: Add error handling during flushing caches It makes no sense to flush the cache of a device without medium. Errors during suspend must be handled according to their causes. Errors due to missing media or unplugged devices must be ignored. Errors due to devices being offlined must also be ignored. The error returns must be modified so that the generic layer understands them. [jejb: fix up whitespace and other formatting problems] Signed-off-by: Oliver Neukum Acked-by: Alan Stern Signed-off-by: James Bottomley --- drivers/scsi/scsi_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/scsi_pm.c') diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c index 4c5aabe21755..af4c050ce6e4 100644 --- a/drivers/scsi/scsi_pm.c +++ b/drivers/scsi/scsi_pm.c @@ -54,7 +54,8 @@ scsi_bus_suspend_common(struct device *dev, int (*cb)(struct device *)) /* * All the high-level SCSI drivers that implement runtime * PM treat runtime suspend, system suspend, and system - * hibernate identically. + * hibernate nearly identically. In all cases the requirements + * for runtime suspension are stricter. */ if (pm_runtime_suspended(dev)) return 0; -- cgit v1.2.3-59-g8ed1b