diff options
| -rw-r--r-- | drivers/scsi/scsi_error.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 771c16bfdbac..d020149ea8d4 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
| @@ -1157,6 +1157,15 @@ int scsi_eh_get_sense(struct list_head *work_q, | |||
| 1157 | __func__)); | 1157 | __func__)); |
| 1158 | break; | 1158 | break; |
| 1159 | } | 1159 | } |
| 1160 | if (status_byte(scmd->result) != CHECK_CONDITION) | ||
| 1161 | /* | ||
| 1162 | * don't request sense if there's no check condition | ||
| 1163 | * status because the error we're processing isn't one | ||
| 1164 | * that has a sense code (and some devices get | ||
| 1165 | * confused by sense requests out of the blue) | ||
| 1166 | */ | ||
| 1167 | continue; | ||
| 1168 | |||
| 1160 | SCSI_LOG_ERROR_RECOVERY(2, scmd_printk(KERN_INFO, scmd, | 1169 | SCSI_LOG_ERROR_RECOVERY(2, scmd_printk(KERN_INFO, scmd, |
| 1161 | "%s: requesting sense\n", | 1170 | "%s: requesting sense\n", |
| 1162 | current->comm)); | 1171 | current->comm)); |
