diff options
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index c3c59d763037..10a233e65bc9 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -864,8 +864,9 @@ static void qla4xxx_flush_active_srbs(struct scsi_qla_host *ha) | |||
864 | * qla4xxx_recover_adapter - recovers adapter after a fatal error | 864 | * qla4xxx_recover_adapter - recovers adapter after a fatal error |
865 | * @ha: Pointer to host adapter structure. | 865 | * @ha: Pointer to host adapter structure. |
866 | * @renew_ddb_list: Indicates what to do with the adapter's ddb list | 866 | * @renew_ddb_list: Indicates what to do with the adapter's ddb list |
867 | * after adapter recovery has completed. | 867 | * |
868 | * 0=preserve ddb list, 1=destroy and rebuild ddb list | 868 | * renew_ddb_list value can be 0=preserve ddb list, 1=destroy and rebuild |
869 | * ddb list. | ||
869 | **/ | 870 | **/ |
870 | static int qla4xxx_recover_adapter(struct scsi_qla_host *ha, | 871 | static int qla4xxx_recover_adapter(struct scsi_qla_host *ha, |
871 | uint8_t renew_ddb_list) | 872 | uint8_t renew_ddb_list) |
@@ -874,6 +875,7 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha, | |||
874 | 875 | ||
875 | /* Stall incoming I/O until we are done */ | 876 | /* Stall incoming I/O until we are done */ |
876 | clear_bit(AF_ONLINE, &ha->flags); | 877 | clear_bit(AF_ONLINE, &ha->flags); |
878 | |||
877 | DEBUG2(printk("scsi%ld: %s calling qla4xxx_cmd_wait\n", ha->host_no, | 879 | DEBUG2(printk("scsi%ld: %s calling qla4xxx_cmd_wait\n", ha->host_no, |
878 | __func__)); | 880 | __func__)); |
879 | 881 | ||
@@ -1600,9 +1602,12 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
1600 | return FAILED; | 1602 | return FAILED; |
1601 | } | 1603 | } |
1602 | 1604 | ||
1603 | if (qla4xxx_recover_adapter(ha, PRESERVE_DDB_LIST) == QLA_SUCCESS) { | 1605 | /* make sure the dpc thread is stopped while we reset the hba */ |
1606 | clear_bit(AF_ONLINE, &ha->flags); | ||
1607 | flush_workqueue(ha->dpc_thread); | ||
1608 | |||
1609 | if (qla4xxx_recover_adapter(ha, PRESERVE_DDB_LIST) == QLA_SUCCESS) | ||
1604 | return_status = SUCCESS; | 1610 | return_status = SUCCESS; |
1605 | } | ||
1606 | 1611 | ||
1607 | dev_info(&ha->pdev->dev, "HOST RESET %s.\n", | 1612 | dev_info(&ha->pdev->dev, "HOST RESET %s.\n", |
1608 | return_status == FAILED ? "FAILED" : "SUCCEDED"); | 1613 | return_status == FAILED ? "FAILED" : "SUCCEDED"); |