From ef7830bb62c9edf34fc4e849a53d7e87bf51de4a Mon Sep 17 00:00:00 2001 From: Harish Zunjarrao Date: Mon, 1 Aug 2011 03:26:14 -0700 Subject: [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 Signed-off-by: Vikas Chaudhary Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/qla4xxx/ql4_def.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/scsi/qla4xxx/ql4_def.h') diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index 90dc621..74c71af 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) ql4xxx_sem_unlock(a, QL4022_DRVR_SEM_MASK); } +static inline int ql4xxx_reset_active(struct scsi_qla_host *ha) +{ + return test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) || + test_bit(DPC_RESET_HA, &ha->dpc_flags) || + test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags) || + test_bit(DPC_RESET_HA_INTR, &ha->dpc_flags) || + test_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags) || + test_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags); + +} /*---------------------------------------------------------------------------*/ /* Defines for qla4xxx_initialize_adapter() and qla4xxx_recover_adapter() */ -- cgit v1.1