Commit 37ce4f35 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: qla2xxx: Fix endianness annotations

Fix all recently introduced endianness annotation issues.

Link: https://lore.kernel.org/r/20210320232359.941-4-bvanassche@acm.org
Cc: Quinn Tran <qutran@marvell.com>
Cc: Mike Christie <michael.christie@oracle.com>
Reviewed-by: default avatarDaniel Wagner <dwagner@suse.de>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: default avatarLee Duncan <lduncan@suse.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 634b9774
...@@ -1527,7 +1527,7 @@ struct init_sf_cb { ...@@ -1527,7 +1527,7 @@ struct init_sf_cb {
* BIT_12 = Remote Write Optimization (1 - Enabled, 0 - Disabled) * BIT_12 = Remote Write Optimization (1 - Enabled, 0 - Disabled)
* BIT 11-0 = Reserved * BIT 11-0 = Reserved
*/ */
uint16_t flags; __le16 flags;
uint8_t reserved1[32]; uint8_t reserved1[32];
uint16_t discard_OHRB_timeout_value; uint16_t discard_OHRB_timeout_value;
uint16_t remote_write_opt_queue_num; uint16_t remote_write_opt_queue_num;
......
...@@ -2379,7 +2379,8 @@ qla24xx_prli_iocb(srb_t *sp, struct logio_entry_24xx *logio) ...@@ -2379,7 +2379,8 @@ qla24xx_prli_iocb(srb_t *sp, struct logio_entry_24xx *logio)
cpu_to_le32(NVME_PRLI_SP_FIRST_BURST); cpu_to_le32(NVME_PRLI_SP_FIRST_BURST);
if (sp->vha->flags.nvme2_enabled) { if (sp->vha->flags.nvme2_enabled) {
/* Set service parameter BIT_7 for NVME CONF support */ /* Set service parameter BIT_7 for NVME CONF support */
logio->io_parameter[0] |= NVME_PRLI_SP_CONF; logio->io_parameter[0] |=
cpu_to_le32(NVME_PRLI_SP_CONF);
/* Set service parameter BIT_8 for SLER support */ /* Set service parameter BIT_8 for SLER support */
logio->io_parameter[0] |= logio->io_parameter[0] |=
cpu_to_le32(NVME_PRLI_SP_SLER); cpu_to_le32(NVME_PRLI_SP_SLER);
......
...@@ -3440,7 +3440,7 @@ qla24xx_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, ...@@ -3440,7 +3440,7 @@ qla24xx_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
return; return;
abt = &sp->u.iocb_cmd; abt = &sp->u.iocb_cmd;
abt->u.abt.comp_status = le16_to_cpu(pkt->comp_status); abt->u.abt.comp_status = pkt->comp_status;
orig_sp = sp->cmd_sp; orig_sp = sp->cmd_sp;
/* Need to pass original sp */ /* Need to pass original sp */
if (orig_sp) if (orig_sp)
......
...@@ -2621,10 +2621,11 @@ qla24xx_read_optrom_data(struct scsi_qla_host *vha, void *buf, ...@@ -2621,10 +2621,11 @@ qla24xx_read_optrom_data(struct scsi_qla_host *vha, void *buf,
} }
static int static int
qla28xx_extract_sfub_and_verify(struct scsi_qla_host *vha, uint32_t *buf, qla28xx_extract_sfub_and_verify(struct scsi_qla_host *vha, __le32 *buf,
uint32_t len, uint32_t buf_size_without_sfub, uint8_t *sfub_buf) uint32_t len, uint32_t buf_size_without_sfub, uint8_t *sfub_buf)
{ {
uint32_t *p, check_sum = 0; uint32_t check_sum = 0;
__le32 *p;
int i; int i;
p = buf + buf_size_without_sfub; p = buf + buf_size_without_sfub;
...@@ -2790,8 +2791,8 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr, ...@@ -2790,8 +2791,8 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
goto done; goto done;
} }
rval = qla28xx_extract_sfub_and_verify(vha, dwptr, dwords, rval = qla28xx_extract_sfub_and_verify(vha, (__le32 *)dwptr,
buf_size_without_sfub, (uint8_t *)sfub); dwords, buf_size_without_sfub, (uint8_t *)sfub);
if (rval != QLA_SUCCESS) if (rval != QLA_SUCCESS)
goto done; goto done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment