|
|
3c6e85 |
From ae0934db1ad3e7deceb2ce974ee80fbf892c021d Mon Sep 17 00:00:00 2001
|
|
|
3c6e85 |
From: Himanshu Madhani <hmadhani@redhat.com>
|
|
|
3c6e85 |
Date: Tue, 10 Sep 2019 01:07:18 -0400
|
|
|
3c6e85 |
Subject: [PATCH 122/124] [scsi] scsi: qla2xxx: Fix flash read for Qlogic ISPs
|
|
|
3c6e85 |
|
|
|
3c6e85 |
Message-id: <20190910010719.22540-2-hmadhani@redhat.com>
|
|
|
3c6e85 |
Patchwork-id: 271160
|
|
|
3c6e85 |
O-Subject: [RHEL7.8 e-stor PATCH 1/2] scsi: qla2xxx: Fix flash read for Qlogic ISPs
|
|
|
3c6e85 |
Bugzilla: 1743185
|
|
|
3c6e85 |
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
|
|
3c6e85 |
RH-Acked-by: Ewan Milne <emilne@redhat.com>
|
|
|
3c6e85 |
|
|
|
3c6e85 |
From: Quinn Tran <qutran@marvell.com>
|
|
|
3c6e85 |
|
|
|
3c6e85 |
Bugzilla 1743185
|
|
|
3c6e85 |
|
|
|
3c6e85 |
Use adapter specific callback to read flash instead of ISP adapter
|
|
|
3c6e85 |
specific.
|
|
|
3c6e85 |
|
|
|
3c6e85 |
Signed-off-by: Quinn Tran <qutran@marvell.com>
|
|
|
3c6e85 |
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
|
|
|
3c6e85 |
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
|
|
|
3c6e85 |
Link: https://lore.kernel.org/r/20190830222402.23688-3-hmadhani@marvell.com
|
|
|
3c6e85 |
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
|
3c6e85 |
(cherry picked from commit cb92cb1657c438efe7c88c9759f40c0a9d46c353)
|
|
|
3c6e85 |
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
|
|
|
3c6e85 |
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
|
|
3c6e85 |
---
|
|
|
3c6e85 |
drivers/scsi/qla2xxx/qla_init.c | 4 ++--
|
|
|
3c6e85 |
drivers/scsi/qla2xxx/qla_nx.c | 1 +
|
|
|
3c6e85 |
drivers/scsi/qla2xxx/qla_sup.c | 8 ++++----
|
|
|
3c6e85 |
3 files changed, 7 insertions(+), 6 deletions(-)
|
|
|
3c6e85 |
|
|
|
3c6e85 |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
|
|
|
3c6e85 |
index 4ca6fc8dce63..661ecb5bc0e4 100644
|
|
|
3c6e85 |
--- a/drivers/scsi/qla2xxx/qla_init.c
|
|
|
3c6e85 |
+++ b/drivers/scsi/qla2xxx/qla_init.c
|
|
|
3c6e85 |
@@ -8324,7 +8324,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
|
|
|
3c6e85 |
active_regions.aux.vpd_nvram == QLA27XX_PRIMARY_IMAGE ?
|
|
|
3c6e85 |
"primary" : "secondary");
|
|
|
3c6e85 |
}
|
|
|
3c6e85 |
- qla24xx_read_flash_data(vha, ha->vpd, faddr, ha->vpd_size >> 2);
|
|
|
3c6e85 |
+ ha->isp_ops->read_optrom(vha, ha->vpd, faddr << 2, ha->vpd_size);
|
|
|
3c6e85 |
|
|
|
3c6e85 |
/* Get NVRAM data into cache and calculate checksum. */
|
|
|
3c6e85 |
faddr = ha->flt_region_nvram;
|
|
|
3c6e85 |
@@ -8336,7 +8336,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
|
|
|
3c6e85 |
"Loading %s nvram image.\n",
|
|
|
3c6e85 |
active_regions.aux.vpd_nvram == QLA27XX_PRIMARY_IMAGE ?
|
|
|
3c6e85 |
"primary" : "secondary");
|
|
|
3c6e85 |
- qla24xx_read_flash_data(vha, ha->nvram, faddr, ha->nvram_size >> 2);
|
|
|
3c6e85 |
+ ha->isp_ops->read_optrom(vha, ha->nvram, faddr << 2, ha->nvram_size);
|
|
|
3c6e85 |
|
|
|
3c6e85 |
dptr = (uint32_t *)nv;
|
|
|
3c6e85 |
for (cnt = 0, chksum = 0; cnt < ha->nvram_size >> 2; cnt++, dptr++)
|
|
|
3c6e85 |
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
|
|
|
3c6e85 |
index 8b325a2e6715..e90de07a0ee2 100644
|
|
|
3c6e85 |
--- a/drivers/scsi/qla2xxx/qla_nx.c
|
|
|
3c6e85 |
+++ b/drivers/scsi/qla2xxx/qla_nx.c
|
|
|
3c6e85 |
@@ -2284,6 +2284,7 @@ qla82xx_disable_intrs(struct qla_hw_data *ha)
|
|
|
3c6e85 |
scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
|
|
|
3c6e85 |
|
|
|
3c6e85 |
qla82xx_mbx_intr_disable(vha);
|
|
|
3c6e85 |
+
|
|
|
3c6e85 |
spin_lock_irq(&ha->hardware_lock);
|
|
|
3c6e85 |
if (IS_QLA8044(ha))
|
|
|
3c6e85 |
qla8044_wr_reg(ha, LEG_INTR_MASK_OFFSET, 1);
|
|
|
3c6e85 |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
|
|
|
3c6e85 |
index a5d47ae24ef6..40ed07fc1fa6 100644
|
|
|
3c6e85 |
--- a/drivers/scsi/qla2xxx/qla_sup.c
|
|
|
3c6e85 |
+++ b/drivers/scsi/qla2xxx/qla_sup.c
|
|
|
3c6e85 |
@@ -680,8 +680,8 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr)
|
|
|
3c6e85 |
|
|
|
3c6e85 |
ha->flt_region_flt = flt_addr;
|
|
|
3c6e85 |
wptr = (uint16_t *)ha->flt;
|
|
|
3c6e85 |
- qla24xx_read_flash_data(vha, (void *)flt, flt_addr,
|
|
|
3c6e85 |
- (sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE) >> 2);
|
|
|
3c6e85 |
+ ha->isp_ops->read_optrom(vha, (void *)flt, flt_addr << 2,
|
|
|
3c6e85 |
+ (sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE));
|
|
|
3c6e85 |
|
|
|
3c6e85 |
if (le16_to_cpu(*wptr) == 0xffff)
|
|
|
3c6e85 |
goto no_flash_data;
|
|
|
3c6e85 |
@@ -948,11 +948,11 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *vha)
|
|
|
3c6e85 |
struct req_que *req = ha->req_q_map[0];
|
|
|
3c6e85 |
uint16_t cnt, chksum;
|
|
|
3c6e85 |
uint16_t *wptr = (void *)req->ring;
|
|
|
3c6e85 |
- struct qla_fdt_layout *fdt = (void *)req->ring;
|
|
|
3c6e85 |
+ struct qla_fdt_layout *fdt = (struct qla_fdt_layout *)req->ring;
|
|
|
3c6e85 |
uint8_t man_id, flash_id;
|
|
|
3c6e85 |
uint16_t mid = 0, fid = 0;
|
|
|
3c6e85 |
|
|
|
3c6e85 |
- qla24xx_read_flash_data(vha, (void *)fdt, ha->flt_region_fdt,
|
|
|
3c6e85 |
+ ha->isp_ops->read_optrom(vha, fdt, ha->flt_region_fdt << 2,
|
|
|
3c6e85 |
OPTROM_BURST_DWORDS);
|
|
|
3c6e85 |
if (le16_to_cpu(*wptr) == 0xffff)
|
|
|
3c6e85 |
goto no_flash_data;
|
|
|
3c6e85 |
--
|
|
|
3c6e85 |
2.13.6
|
|
|
3c6e85 |
|