From 3c0d1d94aa516cad50274fe1aa9f745957b67a65 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Tue, 28 Jul 2009 23:08:06 -0500 Subject: [PATCH] [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 Signed-off-by: James Bottomley Signed-off-by: James Bottomley --- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) goto out; } - if (h->tpgs == TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED) + if (h->tpgs & TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED) err = alua_stpg(sdev, TPGS_STATE_OPTIMIZED, h); out: -- 2.20.1