]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Block flash access from application when device is initialized for ISP82xx.
authorGiridhar Malavali <giridhar.malavali@qlogic.com>
Fri, 27 Jan 2012 15:09:15 +0000 (09:09 -0600)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 23 Jul 2012 08:02:41 +0000 (01:02 -0700)
This could lead to CRB initialization failures or as fail to capture minidump
data. So access to flash needs to be avoided when device is doing reset for
ISP82xx.

JIRA Key: V2632FC-148

drivers/scsi/qla2xxx/qla_bsg.c
drivers/scsi/qla2xxx/qla_sup.c

index d81985daf8b28b242c4792f7724d96d3894f8b54..9143d1a3af03d3a71b79bfbaf105f3780aac054a 100644 (file)
@@ -1367,6 +1367,9 @@ qla2x00_read_optrom(struct fc_bsg_job *bsg_job)
        struct qla_hw_data *ha = vha->hw;
        int rval = 0;
 
+       if (ha->flags.isp82xx_reset_hdlr_active)
+               return -EBUSY;
+
        rval = qla2x00_optrom_setup(bsg_job, vha, 0);
        if (rval)
                return rval;
index be5b4cf39a79d682a0497d8693f496885c8063fb..5c2d4ffdbf4cffde4e71c08be43f418d4bca5f6b 100644 (file)
@@ -1017,6 +1017,9 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha)
            !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha))
                return;
 
+       if (ha->flags.isp82xx_reset_hdlr_active)
+               return;
+
        ha->isp_ops->read_optrom(vha, (uint8_t *)&hdr,
            ha->flt_region_npiv_conf << 2, sizeof(struct qla_npiv_header));
        if (hdr.version == __constant_cpu_to_le16(0xffff))