* [PATCH 0/2] qla2xxx: Fixes for the driver
@ 2019-10-22 19:36 Himanshu Madhani
2019-10-22 19:36 ` [PATCH 1/2] qla2xxx: Initialized mailbox to prevent driver load failure Himanshu Madhani
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Himanshu Madhani @ 2019-10-22 19:36 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: hmadhani, linux-scsi
Hi Martin,
This series has couple bug fixes for the driver.
First patch addresses initialization error with the newer adapter on a
blade systems.
Second patch adds protection for accidental flash corruption using SysFS path.
Please apply them to 5.4/scsi-fixes branch for inclusion in 5.4-rc5.
Thanks,
Himanshu
Himanshu Madhani (1):
qla2xxx: Initialized mailbox to prevent driver load failure
Quinn Tran (1):
qla2xxx: Fix partial flash write of MBI
drivers/scsi/qla2xxx/qla_attr.c | 7 +++----
drivers/scsi/qla2xxx/qla_mbx.c | 3 ++-
2 files changed, 5 insertions(+), 5 deletions(-)
--
2.12.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] qla2xxx: Initialized mailbox to prevent driver load failure
2019-10-22 19:36 [PATCH 0/2] qla2xxx: Fixes for the driver Himanshu Madhani
@ 2019-10-22 19:36 ` Himanshu Madhani
2019-10-22 19:36 ` [PATCH 2/2] qla2xxx: Fix partial flash write of MBI Himanshu Madhani
2019-10-23 2:36 ` [PATCH 0/2] qla2xxx: Fixes for the driver Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Himanshu Madhani @ 2019-10-22 19:36 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: hmadhani, linux-scsi
This patch fixes issue with Gen7 adapter in a blade enviornment,
where one of the port will not be detected by driver. Firmware
expectes mailbox 11 to be set or clear by driver for newer ISP.
Following message is seen in the log file
[ 18.810892] qla2xxx [0000:d8:00.0]-1820:1: **** Failed=102 mb[0]=4005 mb[1]=37 mb[2]=20 mb[3]=8
[ 18.819596] cmd=2 ****
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
---
drivers/scsi/qla2xxx/qla_mbx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 1cc6913f76c4..4a1f21c11758 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -702,6 +702,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)
mcp->mb[2] = LSW(risc_addr);
mcp->mb[3] = 0;
mcp->mb[4] = 0;
+ mcp->mb[11] = 0;
ha->flags.using_lr_setting = 0;
if (IS_QLA25XX(ha) || IS_QLA81XX(ha) || IS_QLA83XX(ha) ||
IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
@@ -746,7 +747,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)
if (ha->flags.exchoffld_enabled)
mcp->mb[4] |= ENABLE_EXCHANGE_OFFLD;
- mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1;
+ mcp->out_mb |= MBX_4 | MBX_3 | MBX_2 | MBX_1 | MBX_11;
mcp->in_mb |= MBX_3 | MBX_2 | MBX_1;
} else {
mcp->mb[1] = LSW(risc_addr);
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] qla2xxx: Fix partial flash write of MBI
2019-10-22 19:36 [PATCH 0/2] qla2xxx: Fixes for the driver Himanshu Madhani
2019-10-22 19:36 ` [PATCH 1/2] qla2xxx: Initialized mailbox to prevent driver load failure Himanshu Madhani
@ 2019-10-22 19:36 ` Himanshu Madhani
2019-10-23 2:36 ` [PATCH 0/2] qla2xxx: Fixes for the driver Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Himanshu Madhani @ 2019-10-22 19:36 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: hmadhani, linux-scsi
From: Quinn Tran <qutran@marvell.com>
For new adapter with multiple flash regions to write to, current code
allows FW & Boot regions to be written, while other regions are blocked
via sysfs. The fix is to block all flash read/write through sysfs
interface.
Fixes: e81d1bcbde06 ("scsi: qla2xxx: Further limit FLASH region write access from SysFS")
Cc: stable@vger.kernel.org # 5.2
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Girish Basrur <gbasrur@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
---
drivers/scsi/qla2xxx/qla_attr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 8b3015361428..8705ca6395e4 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -440,9 +440,6 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,
valid = 0;
if (ha->optrom_size == OPTROM_SIZE_2300 && start == 0)
valid = 1;
- else if (start == (ha->flt_region_boot * 4) ||
- start == (ha->flt_region_fw * 4))
- valid = 1;
else if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha))
valid = 1;
if (!valid) {
@@ -489,8 +486,10 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,
"Writing flash region -- 0x%x/0x%x.\n",
ha->optrom_region_start, ha->optrom_region_size);
- ha->isp_ops->write_optrom(vha, ha->optrom_buffer,
+ rval = ha->isp_ops->write_optrom(vha, ha->optrom_buffer,
ha->optrom_region_start, ha->optrom_region_size);
+ if (rval)
+ rval = -EIO;
break;
default:
rval = -EINVAL;
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] qla2xxx: Fixes for the driver
2019-10-22 19:36 [PATCH 0/2] qla2xxx: Fixes for the driver Himanshu Madhani
2019-10-22 19:36 ` [PATCH 1/2] qla2xxx: Initialized mailbox to prevent driver load failure Himanshu Madhani
2019-10-22 19:36 ` [PATCH 2/2] qla2xxx: Fix partial flash write of MBI Himanshu Madhani
@ 2019-10-23 2:36 ` Martin K. Petersen
2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2019-10-23 2:36 UTC (permalink / raw)
To: Himanshu Madhani; +Cc: James.Bottomley, martin.petersen, linux-scsi
Himanshu,
> This series has couple bug fixes for the driver.
>
> First patch addresses initialization error with the newer adapter on a
> blade systems.
>
> Second patch adds protection for accidental flash corruption using SysFS path.
Applied to 5.4/scsi-fixes, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/2] qla2xxx: fixes for the driver
@ 2018-01-22 20:04 Himanshu Madhani
0 siblings, 0 replies; 5+ messages in thread
From: Himanshu Madhani @ 2018-01-22 20:04 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: himanshu.madhani, linux-scsi
Hi Martin,
This series has small fixes for the driver.
Please apply to 4.16/scsi-queue.
Thanks,
Himanshu
Himanshu Madhani (2):
qla2xxx: Fix warning reported for req_que_no in qla24xx_async_cmd()
qla2xxx: Fix logo flag for qlt_free_session_done()
drivers/scsi/qla2xxx/qla_init.c | 5 +++--
drivers/scsi/qla2xxx/qla_target.c | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.12.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-23 2:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 19:36 [PATCH 0/2] qla2xxx: Fixes for the driver Himanshu Madhani
2019-10-22 19:36 ` [PATCH 1/2] qla2xxx: Initialized mailbox to prevent driver load failure Himanshu Madhani
2019-10-22 19:36 ` [PATCH 2/2] qla2xxx: Fix partial flash write of MBI Himanshu Madhani
2019-10-23 2:36 ` [PATCH 0/2] qla2xxx: Fixes for the driver Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2018-01-22 20:04 [PATCH 0/2] qla2xxx: fixes " Himanshu Madhani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).