From 93474d5f292138642e18c54a9dce9ce91904a035 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 28 Dec 2020 17:59:51 +0000 Subject: [PATCH] qla2x00t-32gbit: Fix the return value A negative error code should be returned. Link: https://lore.kernel.org/r/20200829075746.19166-1-tian.xianting@h3c.com Acked-by: Nilesh Javali Signed-off-by: Xianting Tian Signed-off-by: Martin K. Petersen See also upstream commit e5f48ac42cc9 ("scsi: qla2xxx: Fix the return value"). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9248 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_def.h | 2 +- qla2x00t-32gbit/qla_init.c | 6 +++--- qla2x00t-32gbit/qla_target.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qla2x00t-32gbit/qla_def.h b/qla2x00t-32gbit/qla_def.h index 87709f057..a84b6d427 100644 --- a/qla2x00t-32gbit/qla_def.h +++ b/qla2x00t-32gbit/qla_def.h @@ -1652,7 +1652,7 @@ typedef struct { */ uint8_t firmware_options[2]; - uint16_t frame_payload_size; + __le16 frame_payload_size; __le16 max_iocb_allocation; __le16 execution_throttle; uint8_t retry_count; diff --git a/qla2x00t-32gbit/qla_init.c b/qla2x00t-32gbit/qla_init.c index eecde3244..fc5043904 100644 --- a/qla2x00t-32gbit/qla_init.c +++ b/qla2x00t-32gbit/qla_init.c @@ -4603,18 +4603,18 @@ qla2x00_nvram_config(scsi_qla_host_t *vha) nv->firmware_options[1] = BIT_7 | BIT_5; nv->add_firmware_options[0] = BIT_5; nv->add_firmware_options[1] = BIT_5 | BIT_4; - nv->frame_payload_size = 2048; + nv->frame_payload_size = cpu_to_le16(2048); nv->special_options[1] = BIT_7; } else if (IS_QLA2200(ha)) { nv->firmware_options[0] = BIT_2 | BIT_1; nv->firmware_options[1] = BIT_7 | BIT_5; nv->add_firmware_options[0] = BIT_5; nv->add_firmware_options[1] = BIT_5 | BIT_4; - nv->frame_payload_size = 1024; + nv->frame_payload_size = cpu_to_le16(1024); } else if (IS_QLA2100(ha)) { nv->firmware_options[0] = BIT_3 | BIT_1; nv->firmware_options[1] = BIT_5; - nv->frame_payload_size = 1024; + nv->frame_payload_size = cpu_to_le16(1024); } nv->max_iocb_allocation = cpu_to_le16(256); diff --git a/qla2x00t-32gbit/qla_target.c b/qla2x00t-32gbit/qla_target.c index 64038f206..f193ad62d 100644 --- a/qla2x00t-32gbit/qla_target.c +++ b/qla2x00t-32gbit/qla_target.c @@ -3828,7 +3828,7 @@ int qlt_abort_cmd(struct qla_tgt_cmd *cmd) */ ql_dbg(ql_dbg_tgt_mgt, vha, 0xf016, "multiple abort. %p\n", cmd); - return EIO; + return -EIO; } cmd->aborted = 1; cmd->trc_flags |= TRC_ABORT;