diff options
author | Harish Zunjarrao <harish.zunjarrao@qlogic.com> | 2011-08-01 06:26:14 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:36:30 -0400 |
commit | ef7830bb62c9edf34fc4e849a53d7e87bf51de4a (patch) | |
tree | e2b1585eb1833328f696a7684c8f4b1e2204ecff /drivers/scsi/qla4xxx/ql4_def.h | |
parent | 943c157b7934a3b9fcf5290328be3b84d1a1a104 (diff) |
[SCSI] qla4xxx: Code cleanup for read/update flash using BSG
- Corrected return status
- Added reset active check
- Removed unused dma_map_sg calls
- Added debug prints on failure
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_def.h')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_def.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index 90dc621a926a..74c71af7cb5d 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h | |||
@@ -803,6 +803,16 @@ static inline void ql4xxx_unlock_drvr(struct scsi_qla_host *a) | |||
803 | ql4xxx_sem_unlock(a, QL4022_DRVR_SEM_MASK); | 803 | ql4xxx_sem_unlock(a, QL4022_DRVR_SEM_MASK); |
804 | } | 804 | } |
805 | 805 | ||
806 | static inline int ql4xxx_reset_active(struct scsi_qla_host *ha) | ||
807 | { | ||
808 | return test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) || | ||
809 | test_bit(DPC_RESET_HA, &ha->dpc_flags) || | ||
810 | test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags) || | ||
811 | test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) || | ||
812 | test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags) || | ||
813 | test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags); | ||
814 | |||
815 | } | ||
806 | /*---------------------------------------------------------------------------*/ | 816 | /*---------------------------------------------------------------------------*/ |
807 | 817 | ||
808 | /* Defines for qla4xxx_initialize_adapter() and qla4xxx_recover_adapter() */ | 818 | /* Defines for qla4xxx_initialize_adapter() and qla4xxx_recover_adapter() */ |