Skip to content

Commit

Permalink
[SCSI] qla2xxx: Block flash access from application when device is in…
Browse files Browse the repository at this point in the history
…itialized for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Giridhar Malavali authored and James Bottomley committed May 10, 2012
1 parent f4e1648 commit a49393f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/qla2xxx/qla_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions drivers/scsi/qla2xxx/qla_sup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a49393f

Please sign in to comment.