[SCSI] Retry ADD_TO_MLQUEUE return value for EH commands

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>
This commit is contained in:
Hannes Reinecke 2009-09-17 17:00:26 +02:00 committed by James Bottomley
parent e27168f8c3
commit 6e883b0e42
1 changed files with 3 additions and 0 deletions

View File

@ -725,6 +725,9 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,
case NEEDS_RETRY: case NEEDS_RETRY:
case FAILED: case FAILED:
break; break;
case ADD_TO_MLQUEUE:
rtn = NEEDS_RETRY;
break;
default: default:
rtn = FAILED; rtn = FAILED;
break; break;