diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2012-02-09 14:14:05 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-18 09:43:26 -0500 |
commit | d051a5aa1c234c8de01fc0a488b1a18d65246150 (patch) | |
tree | 14e7e4e863383e8268c4a8d33749942ee47d37f0 /drivers/scsi/qla2xxx/qla_inline.h | |
parent | aa651be83dfec5587dabce0a9d471c1e2095c33e (diff) |
[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 9902834e0b74..7cc4f36cd539 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) | |||
131 | } | 131 | } |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | |||
135 | static inline int | ||
136 | qla2x00_reset_active(scsi_qla_host_t *vha) | ||
137 | { | ||
138 | scsi_qla_host_t *base_vha = pci_get_drvdata(vha->hw->pdev); | ||
139 | |||
140 | /* Test appropriate base-vha and vha flags. */ | ||
141 | return test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) || | ||
142 | test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) || | ||
143 | test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) || | ||
144 | test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
145 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); | ||
146 | } | ||