From: Bart Van Assche Date: Fri, 24 Aug 2012 09:08:41 +0000 (+0000) Subject: [SCSI] scsi_dh_alua: Enable STPG for unavailable ports X-Git-Tag: upstream/snapshot3+hdmi~6556^2^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e47f8976d8e573928824a06748f7bc82c58d747f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [SCSI] scsi_dh_alua: Enable STPG for unavailable ports A quote from SPC-4: "While in the unavailable primary target port asymmetric access state, the device server shall support those of the following commands that it supports while in the active/optimized state: [ ... ] d) SET TARGET PORT GROUPS; [ ... ]". Hence enable sending STPG to a target port group that is in the unavailable state. Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie Acked-by: Hannes Reinecke Cc: Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 08d80a6..6f4d8e6 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -641,8 +641,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h) h->state = TPGS_STATE_STANDBY; break; case TPGS_STATE_OFFLINE: - case TPGS_STATE_UNAVAILABLE: - /* Path unusable for unavailable/offline */ + /* Path unusable */ err = SCSI_DH_DEV_OFFLINED; break; default: