From: Giridhar Malavali Date: Fri, 27 Jan 2012 15:09:15 +0000 (-0600) Subject: qla2xxx: Block flash access from application when device is initialized for ISP82xx. X-Git-Tag: v2.6.39-400.9.0~482 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bde84108c2fb31c0153667a59b01706f1d8eaa5d;p=users%2Fjedix%2Flinux-maple.git qla2xxx: Block flash access from application when device is initialized for ISP82xx. 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 --- diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index d81985daf8b2..9143d1a3af03 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -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; diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index be5b4cf39a79..5c2d4ffdbf4c 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -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))