diff options
author | Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> | 2010-07-23 06:28:22 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:06:07 -0400 |
commit | 17cf2c5d76b468ca03e59c7cf60decfcef6c08c4 (patch) | |
tree | bab1ff8bafde5df545fc04eb7bd61dc2976496b0 /drivers/scsi | |
parent | c01be6dcb2b5cce4feaf48035be6395e5cd7d47c (diff) |
[SCSI] qla2xxx: Don't issue set or get port param MBC if invalid port loop id
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 3a0248388505..20eaa1c42ae2 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c | |||
@@ -1222,6 +1222,13 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job) | |||
1222 | return -EINVAL; | 1222 | return -EINVAL; |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | if (fcport->loop_id == FC_NO_LOOP_ID) { | ||
1226 | DEBUG2(printk(KERN_ERR "%s(%ld): Invalid port loop id, " | ||
1227 | "loop_id = 0x%x\n", | ||
1228 | __func__, vha->host_no, fcport->loop_id)); | ||
1229 | return -EINVAL; | ||
1230 | } | ||
1231 | |||
1225 | if (port_param->mode) | 1232 | if (port_param->mode) |
1226 | rval = qla2x00_set_idma_speed(vha, fcport->loop_id, | 1233 | rval = qla2x00_set_idma_speed(vha, fcport->loop_id, |
1227 | port_param->speed, mb); | 1234 | port_param->speed, mb); |