[PATCH 5/5] scsi: more error conditions for power management

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

 



BUSY and QUEUE_FULL are retryable errors.

Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
---
 drivers/scsi/scsi_error.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 195cc75..2f70a07 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -2227,6 +2227,12 @@ EXPORT_SYMBOL(scsi_build_sense_buffer);
  **/
 int scsi_translate_errors_to_power_management(int res)
 {
+	switch (status_byte(res)) {
+	case BUSY:
+	case QUEUE_FULL:
+		return -EBUSY;
+	}
+
 	switch (host_byte(res)) {
 	/* ignore errors due to racing a disconnection */
 	case DID_BAD_TARGET:
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux