]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Ilgu Hong <ilgu.hong@promise.com> |
2 | Subject: Incorrect masking for group ID in scsi_dh_alua | |
3 | ||
4 | ||
5 | The buf[i] is a byte but we are only asking 4 bits off the | |
6 | group_id. This patch has us take off a byte. | |
7 | ||
8 | Signed-off-by: Ilgu Hong <ilgu.hong@promise.com> | |
9 | Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> | |
10 | Signed-off-by: Hannes Reinecke <hare@suse.de> | |
11 | ||
12 | diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c | |
13 | index 1000acc..fc7003a 100644 | |
14 | --- a/drivers/scsi/device_handler/scsi_dh_alua.c | |
15 | +++ b/drivers/scsi/device_handler/scsi_dh_alua.c | |
16 | @@ -210,8 +210,8 @@ static unsigned submit_stpg(struct scsi_device *sdev, struct alua_dh_data *h) | |
17 | /* Prepare the data buffer */ | |
18 | memset(h->buff, 0, stpg_len); | |
19 | h->buff[4] = TPGS_STATE_OPTIMIZED & 0x0f; | |
20 | - h->buff[6] = (h->group_id >> 8) & 0x0f; | |
21 | - h->buff[7] = h->group_id & 0x0f; | |
22 | + h->buff[6] = (h->group_id >> 8) & 0xff; | |
23 | + h->buff[7] = h->group_id & 0xff; | |
24 | ||
25 | rq = get_alua_req(sdev, h->buff, stpg_len, WRITE); | |
26 | if (!rq) |