• Xiaofei Tan's avatar
    scsi: hisi_sas: Fix losing directly attached disk when hot-plug · b6c9b15e
    Xiaofei Tan authored
    Hot-plugging SAS wire of direct hard disk backplane may cause disk lost. We
    have done this test with several types of SATA disk from different venders,
    and only two models from Seagate has this problem, ST4000NM0035-1V4107 and
    ST3000VM002-1ET166.
    
    The root cause is that the disk doesn't send D2H frame after OOB finished.
    SAS controller will issue phyup interrupt only when D2H frame is received,
    otherwise, will be waiting there all the time.
    
    When this issue happen, we can find the disk again with link reset.  To fix
    this issue, we setup an timer after OOB finished. If the PHY is not up in
    20s, do link reset. Notes: the 20s is an experience value.
    Signed-off-by: default avatarXiaofei Tan <tanxiaofei@huawei.com>
    Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    b6c9b15e
hisi_sas_v2_hw.c 108 KB