From: Mike Christie <michaelc@xxxxxxxxxxx> This has the scsi device handlers return SCSI_MLQUEUE error values instead of the old values. One change is that if the handler does not care we return 0 instead of SCSI_RETURN_NOT_HANDLED. Signed-off-by: Mike Christie <michaelc@xxxxxxxxxxx> Signed-off-by: Mike Anderson <andmike@xxxxxxxxxxxxxxxxxx> --- drivers/scsi/device_handler/scsi_dh_alua.c | 16 ++++++++-------- drivers/scsi/device_handler/scsi_dh_emc.c | 8 ++++---- drivers/scsi/device_handler/scsi_dh_rdac.c | 10 +++++----- drivers/scsi/scsi_error.c | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 6bc55a6..b98d531 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -426,45 +426,45 @@ static int alua_check_sense(struct scsi_device *sdev, /* * LUN Not Accessible - ALUA state transition */ - return NEEDS_RETRY; + return SCSI_MLQUEUE_IMM_RETRY; if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x0b) /* * LUN Not Accessible -- Target port in standby state */ - return SUCCESS; + return SCSI_MLQUEUE_DIS_FINISH; if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x0c) /* * LUN Not Accessible -- Target port in unavailable state */ - return SUCCESS; + return SCSI_MLQUEUE_DIS_FINISH; if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x12) /* * LUN Not Ready -- Offline */ - return SUCCESS; + return SCSI_MLQUEUE_DIS_FINISH; break; case UNIT_ATTENTION: if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00) /* * Power On, Reset, or Bus Device Reset, just retry. */ - return NEEDS_RETRY; + return SCSI_MLQUEUE_IMM_RETRY; if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x06) { /* * ALUA state changed */ - return NEEDS_RETRY; + return SCSI_MLQUEUE_IMM_RETRY; } if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x07) { /* * Implicit ALUA state transition failed */ - return NEEDS_RETRY; + return SCSI_MLQUEUE_IMM_RETRY; } break; } - return SCSI_RETURN_NOT_HANDLED; + return 0; } /* diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 64a56e5..4be7be3 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c @@ -418,7 +418,7 @@ static int clariion_check_sense(struct scsi_device *sdev, * Can return FAILED only when we want the error * recovery process to kick in. */ - return SUCCESS; + return SCSI_MLQUEUE_DIS_FINISH; break; case ILLEGAL_REQUEST: if (sense_hdr->asc == 0x25 && sense_hdr->ascq == 0x01) @@ -432,7 +432,7 @@ static int clariion_check_sense(struct scsi_device *sdev, * Can return FAILED only when we want the error * recovery process to kick in. */ - return SUCCESS; + return SCSI_MLQUEUE_DIS_FINISH; break; case UNIT_ATTENTION: if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00) @@ -440,11 +440,11 @@ static int clariion_check_sense(struct scsi_device *sdev, * Unit Attention Code. This is the first IO * to the new path, so just retry. */ - return NEEDS_RETRY; + return SCSI_MLQUEUE_IMM_RETRY; break; } - return SCSI_RETURN_NOT_HANDLED; + return 0; } static int clariion_prep_fn(struct scsi_device *sdev, struct request *req) diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index c504afe..9b1c2d5 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -546,13 +546,13 @@ static int rdac_check_sense(struct scsi_device *sdev, * * Nothing we can do here. Try to bypass the path. */ - return SUCCESS; + return SCSI_MLQUEUE_DIS_FINISH; if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0xA1) /* LUN Not Ready - Quiescense in progress * * Just retry and wait. */ - return NEEDS_RETRY; + return SCSI_MLQUEUE_IMM_RETRY; break; case ILLEGAL_REQUEST: if (sense_hdr->asc == 0x94 && sense_hdr->ascq == 0x01) { @@ -561,7 +561,7 @@ static int rdac_check_sense(struct scsi_device *sdev, * Fail the path, so that the other path be used. */ h->state = RDAC_STATE_PASSIVE; - return SUCCESS; + return SCSI_MLQUEUE_DIS_FINISH; } break; case UNIT_ATTENTION: @@ -569,11 +569,11 @@ static int rdac_check_sense(struct scsi_device *sdev, /* * Power On, Reset, or Bus Device Reset, just retry. */ - return NEEDS_RETRY; + return SCSI_MLQUEUE_IMM_RETRY; break; } /* success just means we do not care what scsi-ml does */ - return SCSI_RETURN_NOT_HANDLED; + return 0; } static const struct scsi_dh_devlist rdac_dev_list[] = { diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 45c7d24..b0e4b42 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -314,7 +314,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) int rc; rc = sdev->scsi_dh_data->scsi_dh->check_sense(sdev, &sshdr); - if (rc != SCSI_RETURN_NOT_HANDLED) + if (rc) return rc; /* handler does not care. Drop down to default handling */ } -- 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html