35 lines
1021 B
Plaintext
35 lines
1021 B
Plaintext
From: Hannes Reinecke <hare@suse.de>
|
|
Subject: Always send STPG for explicit tgps mode
|
|
Patch-mainline: not yet
|
|
|
|
When we are in explicit tgps mode we should always send an STPG
|
|
command to enable the active/optimized mode.
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
|
|
---
|
|
drivers/scsi/device_handler/scsi_dh_alua.c | 11 +++++------
|
|
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
|
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
|
|
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
|
|
@@ -601,13 +601,12 @@ static int alua_activate(struct scsi_dev
|
|
struct alua_dh_data *h = get_alua_data(sdev);
|
|
int err = SCSI_DH_OK;
|
|
|
|
- if (h->group_id != -1) {
|
|
- err = alua_rtpg(sdev, h);
|
|
- if (err != SCSI_DH_OK)
|
|
- goto out;
|
|
- }
|
|
+ err = alua_rtpg(sdev, h);
|
|
+ if (err != SCSI_DH_OK)
|
|
+ goto out;
|
|
|
|
- if (h->tpgs & TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED) {
|
|
+ if ((h->tpgs & TPGS_MODE_EXPLICIT) &&
|
|
+ h->state != TPGS_STATE_OPTIMIZED) {
|
|
h->callback_fn = fn;
|
|
h->callback_data = data;
|
|
err = submit_stpg(h);
|