aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/device_handler
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-07-29 00:08:06 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-08-22 18:52:01 -0400
commit3c0d1d94aa516cad50274fe1aa9f745957b67a65 (patch)
tree4a71261905bee0843d125d5cd8d1ec20d0a69e1b /drivers/scsi/device_handler
parenta4a8b064dd06d30d007e46445d17575e2875c340 (diff)
[SCSI] ALUA: send STPG if explicit and implicit is supported
alua_activate only sends a STPG if only explicit is suppored. As a result, for EMC targets that support both we end up doing a implicit failover when X commands are finally sent to the other SP. This patch does a AND on the h->tpgs, so we do a explicit failover right away. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/device_handler')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index dba154c8ff64..b5cdefaf2608 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -663,7 +663,7 @@ static int alua_activate(struct scsi_device *sdev)
663 goto out; 663 goto out;
664 } 664 }
665 665
666 if (h->tpgs == TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED) 666 if (h->tpgs & TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED)
667 err = alua_stpg(sdev, TPGS_STATE_OPTIMIZED, h); 667 err = alua_stpg(sdev, TPGS_STATE_OPTIMIZED, h);
668 668
669out: 669out: