]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/scsi-dh-alua-send-stpg
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / scsi-dh-alua-send-stpg
CommitLineData
2cb7cef9
BS
1From: Hannes Reinecke <hare@suse.de>
2Subject: Always send STPG for explicit tgps mode
3
4When we are in explicit tgps mode we should always send an STPG
5command to enable the active/optimized mode.
6
7Signed-off-by: Hannes Reinecke <hare@suse.de>
8
9---
10 drivers/scsi/device_handler/scsi_dh_alua.c | 10 ++++------
11 1 file changed, 4 insertions(+), 6 deletions(-)
12
13--- a/drivers/scsi/device_handler/scsi_dh_alua.c
14+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
15@@ -599,13 +599,11 @@ static int alua_activate(struct scsi_dev
16 struct alua_dh_data *h = get_alua_data(sdev);
17 int err = SCSI_DH_OK;
18
19- if (h->group_id != -1) {
20- err = alua_rtpg(sdev, h);
21- if (err != SCSI_DH_OK)
22- goto out;
23- }
24+ err = alua_rtpg(sdev, h);
25+ if (err != SCSI_DH_OK)
26+ goto out;
27
28- if (h->tpgs == TPGS_MODE_EXPLICIT && h->state != TPGS_STATE_OPTIMIZED)
29+ if ((h->tpgs & TPGS_MODE_EXPLICIT) && h->state != TPGS_STATE_OPTIMIZED)
30 err = alua_stpg(sdev, TPGS_STATE_OPTIMIZED, h);
31
32 out: