Skip to content

Commit a49393f

Browse files
Giridhar MalavaliJames Bottomley
authored andcommitted
[SCSI] qla2xxx: Block flash access from application when device is initialized for ISP82xx.
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Chad Dupuis <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent f4e1648 commit a49393f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/scsi/qla2xxx/qla_bsg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,6 +1367,9 @@ qla2x00_read_optrom(struct fc_bsg_job *bsg_job)
13671367
struct qla_hw_data *ha = vha->hw;
13681368
int rval = 0;
13691369

1370+
if (ha->flags.isp82xx_reset_hdlr_active)
1371+
return -EBUSY;
1372+
13701373
rval = qla2x00_optrom_setup(bsg_job, vha, 0);
13711374
if (rval)
13721375
return rval;

drivers/scsi/qla2xxx/qla_sup.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,9 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha)
10171017
!IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha))
10181018
return;
10191019

1020+
if (ha->flags.isp82xx_reset_hdlr_active)
1021+
return;
1022+
10201023
ha->isp_ops->read_optrom(vha, (uint8_t *)&hdr,
10211024
ha->flt_region_npiv_conf << 2, sizeof(struct qla_npiv_header));
10221025
if (hdr.version == __constant_cpu_to_le16(0xffff))

0 commit comments

Comments
 (0)