Commit c7dbb627 authored by Mike Anderson's avatar Mike Anderson Committed by James Bottomley

[SCSI] scsi_dh: make check_sense return ADD_TO_MLQUEUE

Change scsi_dh check_sense functions to return ADD_TO_MLQUEUE
to allow retries to occur without restriction of blk_noretry_request
check.
Signed-off-by: default avatarMike Anderson <andmike@linux.vnet.ibm.com>
Acked-by: default avatarChandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 025270f0
...@@ -425,7 +425,7 @@ static int alua_check_sense(struct scsi_device *sdev, ...@@ -425,7 +425,7 @@ static int alua_check_sense(struct scsi_device *sdev,
/* /*
* LUN Not Accessible - ALUA state transition * LUN Not Accessible - ALUA state transition
*/ */
return NEEDS_RETRY; return ADD_TO_MLQUEUE;
if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x0b) if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x0b)
/* /*
* LUN Not Accessible -- Target port in standby state * LUN Not Accessible -- Target port in standby state
...@@ -447,18 +447,18 @@ static int alua_check_sense(struct scsi_device *sdev, ...@@ -447,18 +447,18 @@ static int alua_check_sense(struct scsi_device *sdev,
/* /*
* Power On, Reset, or Bus Device Reset, just retry. * Power On, Reset, or Bus Device Reset, just retry.
*/ */
return NEEDS_RETRY; return ADD_TO_MLQUEUE;
if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x06) { if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x06) {
/* /*
* ALUA state changed * ALUA state changed
*/ */
return NEEDS_RETRY; return ADD_TO_MLQUEUE;
} }
if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x07) { if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x07) {
/* /*
* Implicit ALUA state transition failed * Implicit ALUA state transition failed
*/ */
return NEEDS_RETRY; return ADD_TO_MLQUEUE;
} }
break; break;
} }
...@@ -490,7 +490,7 @@ static int alua_stpg(struct scsi_device *sdev, int state, ...@@ -490,7 +490,7 @@ static int alua_stpg(struct scsi_device *sdev, int state,
if (!err) if (!err)
return SCSI_DH_IO; return SCSI_DH_IO;
err = alua_check_sense(sdev, &sense_hdr); err = alua_check_sense(sdev, &sense_hdr);
if (retry > 0 && err == NEEDS_RETRY) { if (retry > 0 && err == ADD_TO_MLQUEUE) {
retry--; retry--;
goto retry; goto retry;
} }
...@@ -535,7 +535,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) ...@@ -535,7 +535,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
return SCSI_DH_IO; return SCSI_DH_IO;
err = alua_check_sense(sdev, &sense_hdr); err = alua_check_sense(sdev, &sense_hdr);
if (err == NEEDS_RETRY) if (err == ADD_TO_MLQUEUE)
goto retry; goto retry;
sdev_printk(KERN_INFO, sdev, sdev_printk(KERN_INFO, sdev,
"%s: rtpg sense code %02x/%02x/%02x\n", "%s: rtpg sense code %02x/%02x/%02x\n",
......
...@@ -439,7 +439,7 @@ static int clariion_check_sense(struct scsi_device *sdev, ...@@ -439,7 +439,7 @@ static int clariion_check_sense(struct scsi_device *sdev,
* Unit Attention Code. This is the first IO * Unit Attention Code. This is the first IO
* to the new path, so just retry. * to the new path, so just retry.
*/ */
return NEEDS_RETRY; return ADD_TO_MLQUEUE;
break; break;
} }
...@@ -514,7 +514,7 @@ retry: ...@@ -514,7 +514,7 @@ retry:
return SCSI_DH_IO; return SCSI_DH_IO;
err = clariion_check_sense(sdev, &sshdr); err = clariion_check_sense(sdev, &sshdr);
if (retry > 0 && err == NEEDS_RETRY) { if (retry > 0 && err == ADD_TO_MLQUEUE) {
retry--; retry--;
goto retry; goto retry;
} }
......
...@@ -551,7 +551,7 @@ static int rdac_check_sense(struct scsi_device *sdev, ...@@ -551,7 +551,7 @@ static int rdac_check_sense(struct scsi_device *sdev,
* *
* Just retry and wait. * Just retry and wait.
*/ */
return NEEDS_RETRY; return ADD_TO_MLQUEUE;
break; break;
case ILLEGAL_REQUEST: case ILLEGAL_REQUEST:
if (sense_hdr->asc == 0x94 && sense_hdr->ascq == 0x01) { if (sense_hdr->asc == 0x94 && sense_hdr->ascq == 0x01) {
...@@ -568,7 +568,7 @@ static int rdac_check_sense(struct scsi_device *sdev, ...@@ -568,7 +568,7 @@ static int rdac_check_sense(struct scsi_device *sdev,
/* /*
* Power On, Reset, or Bus Device Reset, just retry. * Power On, Reset, or Bus Device Reset, just retry.
*/ */
return NEEDS_RETRY; return ADD_TO_MLQUEUE;
break; break;
} }
/* success just means we do not care what scsi-ml does */ /* success just means we do not care what scsi-ml does */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment