Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26621
b: refs/heads/master
c: f3e93f7
h: refs/heads/master
i:
  26619: e80c68d
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Apr 27, 2006
1 parent bf0e631 commit b53faa3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a6fae1d9c0d879d5d46a2a4962220dbf53ac72b
refs/heads/master: f3e93f735321ea75108b41cb654c16f92d3f264c
27 changes: 20 additions & 7 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,16 +1067,29 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes,
break;
case NOT_READY:
/*
* If the device is in the process of becoming ready,
* retry.
* If the device is in the process of becoming
* ready, or has a temporary blockage, retry.
*/
if (sshdr.asc == 0x04 && sshdr.ascq == 0x01) {
scsi_requeue_command(q, cmd);
return;
if (sshdr.asc == 0x04) {
switch (sshdr.ascq) {
case 0x01: /* becoming ready */
case 0x04: /* format in progress */
case 0x05: /* rebuild in progress */
case 0x06: /* recalculation in progress */
case 0x07: /* operation in progress */
case 0x08: /* Long write in progress */
case 0x09: /* self test in progress */
scsi_requeue_command(q, cmd);
return;
default:
break;
}
}
if (!(req->flags & REQ_QUIET))
if (!(req->flags & REQ_QUIET)) {
scmd_printk(KERN_INFO, cmd,
"Device not ready.\n");
"Device not ready: ");
scsi_print_sense_hdr("", &sshdr);
}
scsi_end_request(cmd, 0, this_count, 1);
return;
case VOLUME_OVERFLOW:
Expand Down

0 comments on commit b53faa3

Please sign in to comment.