summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_bsg.c
diff options
context:
space:
mode:
authorGiridhar Malavali <giridhar.malavali@qlogic.com>2010-09-03 15:20:48 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-09-05 15:33:00 -0300
commitc9afb9a24db2e673971e790ee4c1bac55708f333 (patch)
treeee5d03921be66e8e6199654335dc26f5ab1cb1ee /drivers/scsi/qla2xxx/qla_bsg.c
parente3b3e6246726cd05950677ed843010b8e8c5884c (diff)
[SCSI] qla2xxx: Don't issue set or get port param MBC if port is not online.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_bsg.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_bsg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 9067629817ea..fdfbf83a6330 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -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;
}