From 183c439f0708db00b85c027270edc61a850fb2f1 Mon Sep 17 00:00:00 2001 From: Himanshu Madhani Date: Thu, 1 Aug 2019 15:55:52 -0400 Subject: [PATCH 092/124] [scsi] scsi: qla2xxx: Pass little-endian values to the firmware Message-id: <20190801155618.12650-93-hmadhani@redhat.com> Patchwork-id: 267869 O-Subject: [RHEL 7.8 e-stor PATCH 092/118] scsi: qla2xxx: Pass little-endian values to the firmware Bugzilla: 1729270 RH-Acked-by: Jarod Wilson RH-Acked-by: Tony Camuso From: Bart Van Assche Bugzilla 1729270 Pass dsd_list_len in little endian format to the firmware instead of in CPU endian format. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen (cherry picked from commit 6e73985a9dea627114531723bdae6f8c1f59d5e8) Signed-off-by: Himanshu Madhani Signed-off-by: Jan Stancek --- drivers/scsi/qla2xxx/qla_iocb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index a1289b70a359..4498cf78e156 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -976,7 +976,7 @@ alloc_and_fill: /* add new list to cmd iocb or last list */ *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); - *cur_dsd++ = dsd_list_len; + *cur_dsd++ = cpu_to_le32(dsd_list_len); cur_dsd = (uint32_t *)next_dsd; } *cur_dsd++ = cpu_to_le32(LSD(sle_dma)); @@ -1079,7 +1079,7 @@ qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd, /* add new list to cmd iocb or last list */ *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); - *cur_dsd++ = dsd_list_len; + *cur_dsd++ = cpu_to_le32(dsd_list_len); cur_dsd = (uint32_t *)next_dsd; } sle_dma = sg_dma_address(sg); @@ -1324,7 +1324,7 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp, cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); - *cur_dsd++ = dsd_list_len; + *cur_dsd++ = cpu_to_le32(dsd_list_len); cur_dsd = dsd_ptr->dsd_addr; } *cur_dsd++ = cpu_to_le32(LSD(dif_dsd->dsd_list_dma)); @@ -1385,7 +1385,7 @@ qla24xx_walk_and_build_prot_sglist(struct qla_hw_data *ha, srb_t *sp, cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); - *cur_dsd++ = dsd_list_len; + *cur_dsd++ = cpu_to_le32(dsd_list_len); cur_dsd = dsd_ptr->dsd_addr; } sle_dma = sg_dma_address(sg); -- 2.13.6