• X
    scsi: hisi_sas: Init disks after controller reset · 6175abde
    Xiaofei Tan 提交于
    After the controller is reset, it is possible that the disks attached still
    have outstanding IO to complete.
    
    Thus, when the PHYs come back up after controller reset, it is possible
    that these IOs complete at some unknown point later.
    
    We want to ensure that all IOs are complete after the controller reset so
    that all associated IPTT and other resources can be recycled safely.
    
    To achieve this, re-init the disks by TMF or softreset (in case of ATA
    devices).
    
    If the init fails - maybe because the device was removed or link has not
    come up - then do not release the device resources, but rather rely on SCSI
    EH to handle the timeout for these resources later on.
    
    This patch also does some cleanup to hisi_sas_init_disk(), including
    removing superfluous cases in the switch statement.
    Signed-off-by: NXiaofei Tan <tanxiaofei@huawei.com>
    Signed-off-by: NJohn Garry <john.garry@huawei.com>
    Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
    6175abde
hisi_sas_main.c 61.3 KB