Skip to content

Commit

Permalink
[SCSI] hptiop: fix header.context usage
Browse files Browse the repository at this point in the history
header.context is a 64 bit field, but it's deliberately split into
context and context_hi32.  Thus cpu_to_le64 assignments are wrong on
this.  Replace them with the correct settings of both the low and high
words.

Cc: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
James Bottomley authored and James Bottomley committed Apr 7, 2008
1 parent a579dab commit f6b196a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/hptiop.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ static int iop_get_config_mv(struct hptiop_hba *hba,
req->header.size =
cpu_to_le32(sizeof(struct hpt_iop_request_get_config));
req->header.result = cpu_to_le32(IOP_RESULT_PENDING);
req->header.context = cpu_to_le64(IOP_REQUEST_TYPE_GET_CONFIG<<5);
req->header.context = cpu_to_le32(IOP_REQUEST_TYPE_GET_CONFIG<<5);
req->header.context_hi32 = 0;

if (iop_send_sync_request_mv(hba, 0, 20000)) {
dprintk("Get config send cmd failed\n");
Expand Down Expand Up @@ -392,7 +393,8 @@ static int iop_set_config_mv(struct hptiop_hba *hba,
req->header.size =
cpu_to_le32(sizeof(struct hpt_iop_request_set_config));
req->header.result = cpu_to_le32(IOP_RESULT_PENDING);
req->header.context = cpu_to_le64(IOP_REQUEST_TYPE_SET_CONFIG<<5);
req->header.context = cpu_to_le32(IOP_REQUEST_TYPE_SET_CONFIG<<5);
req->header.context_hi32 = 0;

if (iop_send_sync_request_mv(hba, 0, 20000)) {
dprintk("Set config send cmd failed\n");
Expand Down

0 comments on commit f6b196a

Please sign in to comment.