scsi: qla2xxx: Use flag PFLG_DISCONNECTED.
There is already flag defined PFLG_DISCONNECTED, which is set for PCI or register disconnect error condition. There is no need to have flag PCI_ERR, which has same purpose. Remove use of PCI_ERR flag and use PFLG_DISCONNECTED flag during error condition. Signed-off-by: Sawan Chandak <sawan.chandak@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
694833ee00
commit
ba17589199
@ -4017,7 +4017,6 @@ typedef struct scsi_qla_host {
|
|||||||
#define PFLG_DISCONNECTED 0 /* PCI device removed */
|
#define PFLG_DISCONNECTED 0 /* PCI device removed */
|
||||||
#define PFLG_DRIVER_REMOVING 1 /* PCI driver .remove */
|
#define PFLG_DRIVER_REMOVING 1 /* PCI driver .remove */
|
||||||
#define PFLG_DRIVER_PROBING 2 /* PCI driver .probe */
|
#define PFLG_DRIVER_PROBING 2 /* PCI driver .probe */
|
||||||
#define PCI_ERR 30
|
|
||||||
|
|
||||||
uint32_t device_flags;
|
uint32_t device_flags;
|
||||||
#define SWITCH_FOUND BIT_0
|
#define SWITCH_FOUND BIT_0
|
||||||
|
@ -124,7 +124,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* if PCI error, then avoid mbx processing.*/
|
/* if PCI error, then avoid mbx processing.*/
|
||||||
if (test_bit(PCI_ERR, &base_vha->dpc_flags)) {
|
if (test_bit(PFLG_DISCONNECTED, &base_vha->dpc_flags) &&
|
||||||
|
test_bit(UNLOADING, &base_vha->dpc_flags)) {
|
||||||
ql_log(ql_log_warn, vha, 0x1191,
|
ql_log(ql_log_warn, vha, 0x1191,
|
||||||
"PCI error, exiting.\n");
|
"PCI error, exiting.\n");
|
||||||
return QLA_FUNCTION_TIMEOUT;
|
return QLA_FUNCTION_TIMEOUT;
|
||||||
@ -384,8 +385,6 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
|
|||||||
* then only PCI ERR flag would be set.
|
* then only PCI ERR flag would be set.
|
||||||
* we will do premature exit for above case.
|
* we will do premature exit for above case.
|
||||||
*/
|
*/
|
||||||
if (test_bit(UNLOADING, &base_vha->dpc_flags))
|
|
||||||
set_bit(PCI_ERR, &base_vha->dpc_flags);
|
|
||||||
ha->flags.mbox_busy = 0;
|
ha->flags.mbox_busy = 0;
|
||||||
rval = QLA_FUNCTION_TIMEOUT;
|
rval = QLA_FUNCTION_TIMEOUT;
|
||||||
goto premature_exit;
|
goto premature_exit;
|
||||||
|
Reference in New Issue
Block a user