[SCSI] scsi_dh_alua: Re-enable STPG for unavailable ports
authorBart Van Assche <bvanassche@acm.org>
Fri, 22 Jun 2012 08:49:38 +0000 (08:49 +0000)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 20 Jul 2012 07:58:36 +0000 (08:58 +0100)
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 re-enable
sending STPG to a target port group that is in the unavailable state.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/device_handler/scsi_dh_alua.c

index 0d573822bf438dc83449d572b8863843000b807c..08d80a6d272a0c255541b445a97c13e147122e0d 100644 (file)
@@ -742,9 +742,9 @@ static int alua_activate(struct scsi_device *sdev,
                                stpg = 0;
                        break;
                case TPGS_STATE_STANDBY:
+               case TPGS_STATE_UNAVAILABLE:
                        stpg = 1;
                        break;
-               case TPGS_STATE_UNAVAILABLE:
                case TPGS_STATE_OFFLINE:
                        err = SCSI_DH_IO;
                        break;