aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/device_handler
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2011-08-24 04:51:16 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-30 15:31:03 -0400
commit46ccf6b55bfa9fff7d0a9da761f186e98cf2f660 (patch)
treefa22e51f27ff12b0ba668c0e9fd07ec58e5b300d /drivers/scsi/device_handler
parent6c3633d08acf514e2e89aa95d2346ce9d64d719a (diff)
[SCSI] scsi_dh_alua: always update TPGS status on activate
When activating a patch we should always update the TPGS state as it might have changed in between. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/device_handler')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 80c5cf327b84..f44dbf69843a 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -631,11 +631,9 @@ static int alua_activate(struct scsi_device *sdev,
631 struct alua_dh_data *h = get_alua_data(sdev); 631 struct alua_dh_data *h = get_alua_data(sdev);
632 int err = SCSI_DH_OK; 632 int err = SCSI_DH_OK;
633 633
634 if (h->group_id != -1) { 634 err = alua_rtpg(sdev, h);
635 err = alua_rtpg(sdev, h); 635 if (err != SCSI_DH_OK)
636 if (err != SCSI_DH_OK) 636 goto out;
637 goto out;
638 }
639 637
640 if (h->tpgs & TPGS_MODE_EXPLICIT && 638 if (h->tpgs & TPGS_MODE_EXPLICIT &&
641 h->state != TPGS_STATE_OPTIMIZED && 639 h->state != TPGS_STATE_OPTIMIZED &&