diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2012-02-09 11:14:05 -0800 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-18 08:43:26 -0600 |
commit | d051a5aa1c234c8de01fc0a488b1a18d65246150 (patch) | |
tree | 14e7e4e863383e8268c4a8d33749942ee47d37f0 /drivers/scsi/qla2xxx/qla_inline.h | |
parent | aa651be83dfec5587dabce0a9d471c1e2095c33e (diff) | |
download | op-kernel-dev-d051a5aa1c234c8de01fc0a488b1a18d65246150.zip op-kernel-dev-d051a5aa1c234c8de01fc0a488b1a18d65246150.tar.gz |
[SCSI] qla2xxx: Add an "is reset active" helper.
Many locations within the driver would use an inconsistent set of
checks to determine ISP-reset state. Consolidate the checks into
this inline-helper.
Signed-off-by: Andrew Vasquez <andrew.vasquez@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_inline.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_inline.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 9902834..7cc4f36 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -131,3 +131,16 @@ qla2x00_hba_err_chk_enabled(srb_t *sp) } return 0; } + +static inline int +qla2x00_reset_active(scsi_qla_host_t *vha) +{ + scsi_qla_host_t *base_vha = pci_get_drvdata(vha->hw->pdev); + + /* Test appropriate base-vha and vha flags. */ + return test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) || + test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) || + test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || + test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); +} |