All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi_dh_alua: Re-enable STPG for unavailable ports
@ 2012-06-22  8:49 Bart Van Assche
  2012-06-22 17:52 ` Moger, Babu
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2012-06-22  8:49 UTC (permalink / raw)
  To: linux-scsi, Babu Moger, Hannes Reinecke

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>
Cc: Babu Moger <babu.moger@netapp.com>
Cc: Hannes Reinecke <hare@suse.de>

---
This patch fixes a regression introduced in kernel 3.5-rc1.

---
 drivers/scsi/device_handler/scsi_dh_alua.c |    2 +-
 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 5088209..155fadc 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -691,9 +691,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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-22 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22  8:49 [PATCH] scsi_dh_alua: Re-enable STPG for unavailable ports Bart Van Assche
2012-06-22 17:52 ` Moger, Babu
2012-06-22 18:50   ` Bart Van Assche
2012-06-22 20:05     ` Moger, Babu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.