Skip to content

Commit

Permalink
[SCSI] Retry ADD_TO_MLQUEUE return value for EH commands
Browse files Browse the repository at this point in the history
A target reset when I/O is ongoing might result
an eventual device offline, as scsi_eh_completed_normally()
might return ADD_TO_MLQUEUE in addition to the
advertised SUCCESS, FAILED, and NEEDS_RETRY.

Which is unfortunate as scsi_send_eh_cmnd() will
therefore map ADD_TO_MLQUEUE to FAILED instead of
the more appropriate NEEDS_RETRY.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Hannes Reinecke authored and James Bottomley committed Oct 2, 2009
1 parent e27168f commit 6e883b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,9 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,
case NEEDS_RETRY:
case FAILED:
break;
case ADD_TO_MLQUEUE:
rtn = NEEDS_RETRY;
break;
default:
rtn = FAILED;
break;
Expand Down

0 comments on commit 6e883b0

Please sign in to comment.