qubes-linux-kernel/patches.fixes/scsi-dh-alua-send-stpg

34 lines
976 B
Plaintext
Raw Normal View History

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
2011-04-19 20:09:59 +00:00
@@ -602,13 +602,11 @@ 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;
2011-04-19 20:09:59 +00:00
- if (h->tpgs & TPGS_MODE_EXPLICIT &&
+ if ((h->tpgs & TPGS_MODE_EXPLICIT) &&
2011-04-19 20:09:59 +00:00
h->state != TPGS_STATE_OPTIMIZED &&
h->state != TPGS_STATE_LBA_DEPENDENT) {
h->callback_fn = fn;