|
|
3d7c23 |
From 0077e04435309e3923c2a39b6cd3979b7360a110 Mon Sep 17 00:00:00 2001
|
|
|
3d7c23 |
From: Himanshu Madhani <hmadhani@redhat.com>
|
|
|
3d7c23 |
Date: Mon, 16 Dec 2019 17:58:31 -0500
|
|
|
3d7c23 |
Subject: [PATCH 153/155] [scsi] scsi: qla2xxx: Correctly retrieve and
|
|
|
3d7c23 |
interpret active flash region
|
|
|
3d7c23 |
|
|
|
3d7c23 |
Message-id: <20191216175833.14530-2-hmadhani@redhat.com>
|
|
|
3d7c23 |
Patchwork-id: 292028
|
|
|
3d7c23 |
Patchwork-instance: patchwork
|
|
|
3d7c23 |
O-Subject: [RHEL 7.8 e-stor PATCH 1/3] scsi: qla2xxx: Correctly retrieve and interpret active flash region
|
|
|
3d7c23 |
Bugzilla: 1783016
|
|
|
3d7c23 |
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
3d7c23 |
RH-Acked-by: Ewan Milne <emilne@redhat.com>
|
|
|
3d7c23 |
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
|
|
3d7c23 |
|
|
|
3d7c23 |
From: Himanshu Madhani <hmadhani@marvell.com>
|
|
|
3d7c23 |
|
|
|
3d7c23 |
Bugzilla 1783016
|
|
|
3d7c23 |
|
|
|
3d7c23 |
ISP27XX/28XX supports multiple flash regions. This patch fixes issue where
|
|
|
3d7c23 |
active flash region was not interpreted correctly during secure flash
|
|
|
3d7c23 |
update process.
|
|
|
3d7c23 |
|
|
|
3d7c23 |
[mkp: typo]
|
|
|
3d7c23 |
|
|
|
3d7c23 |
Fixes: 5fa8774c7f38c ("scsi: qla2xxx: Add 28xx flash primary/secondary status/image mechanism")
|
|
|
3d7c23 |
Cc: stable@vger.kernel.org
|
|
|
3d7c23 |
Link: https://lore.kernel.org/r/20191203223657.22109-2-hmadhani@marvell.com
|
|
|
3d7c23 |
Signed-off-by: Michael Hernandez <mhernandez@marvell.com>
|
|
|
3d7c23 |
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
|
|
|
3d7c23 |
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
|
3d7c23 |
(cherry picked from commit 4e71dcae0c4cd1e9d19b8b3d80214a4bcdca5a42)
|
|
|
3d7c23 |
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
|
|
|
3d7c23 |
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
|
|
3d7c23 |
---
|
|
|
3d7c23 |
drivers/scsi/qla2xxx/qla_attr.c | 1 +
|
|
|
3d7c23 |
drivers/scsi/qla2xxx/qla_bsg.c | 2 +-
|
|
|
3d7c23 |
drivers/scsi/qla2xxx/qla_sup.c | 6 +++---
|
|
|
3d7c23 |
3 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
3d7c23 |
|
|
|
3d7c23 |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
|
|
|
3d7c23 |
index 21c18702010f..d25a5040cc91 100644
|
|
|
3d7c23 |
--- a/drivers/scsi/qla2xxx/qla_attr.c
|
|
|
3d7c23 |
+++ b/drivers/scsi/qla2xxx/qla_attr.c
|
|
|
3d7c23 |
@@ -176,6 +176,7 @@ qla2x00_sysfs_read_nvram(struct file *filp, struct kobject *kobj,
|
|
|
3d7c23 |
|
|
|
3d7c23 |
faddr = ha->flt_region_nvram;
|
|
|
3d7c23 |
if (IS_QLA28XX(ha)) {
|
|
|
3d7c23 |
+ qla28xx_get_aux_images(vha, &active_regions);
|
|
|
3d7c23 |
if (active_regions.aux.vpd_nvram == QLA27XX_SECONDARY_IMAGE)
|
|
|
3d7c23 |
faddr = ha->flt_region_nvram_sec;
|
|
|
3d7c23 |
}
|
|
|
3d7c23 |
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
|
|
|
3d7c23 |
index c59a56aa626b..1f7199468933 100644
|
|
|
3d7c23 |
--- a/drivers/scsi/qla2xxx/qla_bsg.c
|
|
|
3d7c23 |
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
|
|
|
3d7c23 |
@@ -2349,7 +2349,7 @@ qla2x00_get_flash_image_status(struct fc_bsg_job *bsg_job)
|
|
|
3d7c23 |
struct qla_active_regions regions = { };
|
|
|
3d7c23 |
struct active_regions active_regions = { };
|
|
|
3d7c23 |
|
|
|
3d7c23 |
- qla28xx_get_aux_images(vha, &active_regions);
|
|
|
3d7c23 |
+ qla27xx_get_active_image(vha, &active_regions);
|
|
|
3d7c23 |
regions.global_image = active_regions.global;
|
|
|
3d7c23 |
|
|
|
3d7c23 |
if (IS_QLA28XX(ha)) {
|
|
|
3d7c23 |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
|
|
|
3d7c23 |
index 40ed07fc1fa6..a7d69a0b3436 100644
|
|
|
3d7c23 |
--- a/drivers/scsi/qla2xxx/qla_sup.c
|
|
|
3d7c23 |
+++ b/drivers/scsi/qla2xxx/qla_sup.c
|
|
|
3d7c23 |
@@ -845,15 +845,15 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr)
|
|
|
3d7c23 |
ha->flt_region_img_status_pri = start;
|
|
|
3d7c23 |
break;
|
|
|
3d7c23 |
case FLT_REG_IMG_SEC_27XX:
|
|
|
3d7c23 |
- if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
|
|
|
3d7c23 |
+ if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
|
|
|
3d7c23 |
ha->flt_region_img_status_sec = start;
|
|
|
3d7c23 |
break;
|
|
|
3d7c23 |
case FLT_REG_FW_SEC_27XX:
|
|
|
3d7c23 |
- if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
|
|
|
3d7c23 |
+ if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
|
|
|
3d7c23 |
ha->flt_region_fw_sec = start;
|
|
|
3d7c23 |
break;
|
|
|
3d7c23 |
case FLT_REG_BOOTLOAD_SEC_27XX:
|
|
|
3d7c23 |
- if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
|
|
|
3d7c23 |
+ if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
|
|
|
3d7c23 |
ha->flt_region_boot_sec = start;
|
|
|
3d7c23 |
break;
|
|
|
3d7c23 |
case FLT_REG_AUX_IMG_PRI_28XX:
|
|
|
3d7c23 |
--
|
|
|
3d7c23 |
2.13.6
|
|
|
3d7c23 |
|