diff options
author | Bradley Grove <bgrove@attotech.com> | 2013-10-01 14:26:02 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 09:58:59 +0100 |
commit | 8e65e2f07c1fdbd952570591bf78316aeed1c74a (patch) | |
tree | 4e9fa1c055dc6c513893502b304c46ea31158156 /drivers/scsi/esas2r/esas2r.h | |
parent | 9588d24e36003b53f76e43b4fadfc5b35207be04 (diff) | |
download | linux-8e65e2f07c1fdbd952570591bf78316aeed1c74a.tar.gz linux-8e65e2f07c1fdbd952570591bf78316aeed1c74a.tar.bz2 linux-8e65e2f07c1fdbd952570591bf78316aeed1c74a.zip |
[SCSI] esas2r: Fixes for big-endian platforms
In esas2r_format_init_msg(), sgl_page_size and epoch_time params
are converted to little endian and the firmware version read from
the hba is converted to cpu endianess.
In esas2r_rq_init_request, correct and simplify the construction
of the SCSI handle.
These fixes are the result of testing on a PPC64 machine.
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/esas2r/esas2r.h')
-rw-r--r-- | drivers/scsi/esas2r/esas2r.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/esas2r/esas2r.h b/drivers/scsi/esas2r/esas2r.h index d128c96a501d..3fd305d6b67d 100644 --- a/drivers/scsi/esas2r/esas2r.h +++ b/drivers/scsi/esas2r/esas2r.h @@ -1207,7 +1207,6 @@ static inline void esas2r_rq_init_request(struct esas2r_request *rq, struct esas2r_adapter *a) { union atto_vda_req *vrq = rq->vrq; - u32 handle; INIT_LIST_HEAD(&rq->sg_table_head); rq->data_buf = (void *)(vrq + 1); @@ -1243,11 +1242,9 @@ static inline void esas2r_rq_init_request(struct esas2r_request *rq, /* * add a reference number to the handle to make it unique (until it - * wraps of course) while preserving the upper word + * wraps of course) while preserving the least significant word */ - - handle = be32_to_cpu(vrq->scsi.handle) & 0xFFFF0000; - vrq->scsi.handle = cpu_to_be32(handle + a->cmd_ref_no++); + vrq->scsi.handle = (a->cmd_ref_no++ << 16) | (u16)vrq->scsi.handle; /* * the following formats a SCSI request. the caller can override as |