Commit c9afb9a2 authored by Giridhar Malavali's avatar Giridhar Malavali Committed by James Bottomley

[SCSI] qla2xxx: Don't issue set or get port param MBC if port is not online.

Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent e3b3e624
......@@ -1254,10 +1254,9 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job)
return -EINVAL;
}
if (fcport->loop_id == FC_NO_LOOP_ID) {
DEBUG2(printk(KERN_ERR "%s(%ld): Invalid port loop id, "
"loop_id = 0x%x\n",
__func__, vha->host_no, fcport->loop_id));
if (atomic_read(&fcport->state) != FCS_ONLINE) {
DEBUG2(printk(KERN_ERR "%s(%ld): Port not online\n",
__func__, vha->host_no));
return -EINVAL;
}
......
......@@ -2785,6 +2785,9 @@ qla2x00_iidma_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
if (!IS_IIDMA_CAPABLE(ha))
return;
if (atomic_read(&fcport->state) != FCS_ONLINE)
return;
if (fcport->fp_speed == PORT_SPEED_UNKNOWN ||
fcport->fp_speed > ha->link_data_rate)
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment