Skip to content

Commit

Permalink
[SCSI] scsi dh alua: fix group id masking
Browse files Browse the repository at this point in the history
The buf[i] is a byte but we are only asking 4 bits off the
group_id. This patch has us take off a byte.

Signed-off-by: Ilgu Hong <ilgu.hong@promise.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Ilgu Hong authored and James Bottomley committed Mar 12, 2009
1 parent f078727 commit ef3fa8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/device_handler/scsi_dh_alua.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ static unsigned submit_stpg(struct scsi_device *sdev, struct alua_dh_data *h)
/* Prepare the data buffer */
memset(h->buff, 0, stpg_len);
h->buff[4] = TPGS_STATE_OPTIMIZED & 0x0f;
h->buff[6] = (h->group_id >> 8) & 0x0f;
h->buff[7] = h->group_id & 0x0f;
h->buff[6] = (h->group_id >> 8) & 0xff;
h->buff[7] = h->group_id & 0xff;

rq = get_alua_req(sdev, h->buff, stpg_len, WRITE);
if (!rq)
Expand Down

0 comments on commit ef3fa8c

Please sign in to comment.