scsi: hisi_sas: use wait_for_completion_timeout() when clearing ITCT
When injecting 2bit ecc errors, it will cause confusion inside SAS controller which needs host reset to recover it. If a device is gone at the same times inject 2bit ecc errors, we may not receive the ITCT interrupt so it will wait for completion in clear_itct_v3_hw() all the time. And host reset will also not occur because it can't require hisi_hba->sem, so the system will be suspended. To solve the issue, use wait_for_completion_timeout() instead of wait_for_completion(), and also don't mark the gone device as SAS_PHY_UNUSED when device gone. Link: https://lore.kernel.org/r/1571926105-74636-4-git-send-email-john.garry@huawei.com Signed-off-by:Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by:
John Garry <john.garry@huawei.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
Showing
- drivers/scsi/hisi_sas/hisi_sas.h 3 additions, 2 deletionsdrivers/scsi/hisi_sas/hisi_sas.h
- drivers/scsi/hisi_sas/hisi_sas_main.c 6 additions, 2 deletionsdrivers/scsi/hisi_sas/hisi_sas_main.c
- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c 4 additions, 2 deletionsdrivers/scsi/hisi_sas/hisi_sas_v1_hw.c
- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c 10 additions, 3 deletionsdrivers/scsi/hisi_sas/hisi_sas_v2_hw.c
- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c 10 additions, 3 deletionsdrivers/scsi/hisi_sas/hisi_sas_v3_hw.c
Loading
Please register or sign in to comment