diff options
author | Chad Dupuis <chad.dupuis@qlogic.com> | 2012-08-22 14:21:24 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-24 12:10:52 +0400 |
commit | bf5b8ad7bd7ad56fc4d4132996babb74443672d6 (patch) | |
tree | 402f2494d8230c8dded4048d6013e69aec3b813a /drivers/scsi/qla2xxx/qla_bsg.c | |
parent | e92e4a8f003910d985b5e5f721724b1e1327208b (diff) | |
download | op-kernel-dev-bf5b8ad7bd7ad56fc4d4132996babb74443672d6.zip op-kernel-dev-bf5b8ad7bd7ad56fc4d4132996babb74443672d6.tar.gz |
[SCSI] qla2xxx: Fix for handling some error conditions in loopback.
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>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_bsg.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index d25f0fa..2f9bddd 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -568,9 +568,17 @@ qla81xx_set_loopback_mode(scsi_qla_host_t *vha, uint16_t *config, if (!wait_for_completion_timeout(&ha->dcbx_comp, (20 * HZ))) { ql_dbg(ql_dbg_user, vha, 0x7022, "State change notification not received.\n"); - } else - ql_dbg(ql_dbg_user, vha, 0x7023, - "State change received.\n"); + rval = -EINVAL; + } else { + if (ha->flags.idc_compl_status) { + ql_dbg(ql_dbg_user, vha, 0x70c3, + "Bad status in IDC Completion AEN\n"); + rval = -EINVAL; + ha->flags.idc_compl_status = 0; + } else + ql_dbg(ql_dbg_user, vha, 0x7023, + "State change received.\n"); + } ha->notify_dcbx_comp = 0; |