diff options
author | Himanshu Madhani <himanshu.madhani@cavium.com> | 2017-06-30 19:32:53 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-07-01 17:20:42 -0400 |
commit | c345c6ca13825d1a15de5399226802433dd30f8c (patch) | |
tree | 33bf6885c0003a3f1625108eed90c3ba80d10e1c /drivers/scsi/qla2xxx | |
parent | bcda771b2f7e4f2a7577eef62ddeb61394e03b69 (diff) | |
download | talos-obmc-linux-c345c6ca13825d1a15de5399226802433dd30f8c.tar.gz talos-obmc-linux-c345c6ca13825d1a15de5399226802433dd30f8c.zip |
qla2xxx: Fix NVMe entry_type for iocb packet on BE system
This patch fixes incorrect assignment for entry_type field for Continuation
Type iocb packet on BE system. This was caught by -Woverflow warning on BE
system compilation.
For Continuation Type iocb driver needs to write complete 32 bit value to
initialize other field members in structure to 0.
Following warning is seen on BE system compile:
drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq':
include/uapi/linux/byteorder/big_endian.h:32:26: warning: large integer
implicitly truncated to unsigned type [-Woverflow]
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
[mkp: fixed typo]
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nvme.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c index ec15a49532a6..f3710a75fe1f 100644 --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -442,7 +442,8 @@ static int qla2x00_start_nvme_mq(srb_t *sp) req->ring_ptr++; } cont_pkt = (cont_a64_entry_t *)req->ring_ptr; - cont_pkt->entry_type = cpu_to_le32(CONTINUE_A64_TYPE); + *((uint32_t *)(&cont_pkt->entry_type)) = + cpu_to_le32(CONTINUE_A64_TYPE); cur_dsd = (uint32_t *)cont_pkt->dseg_0_address; avail_dsds = 5; |