• John Garry's avatar
    scsi: hisi_sas: Fix for setting the PHY linkrate when disconnected · c63b88cc
    John Garry authored
    In commit efdcad62 ("scsi: hisi_sas: Set PHY linkrate when
    disconnected"), we use the sas_phy_data.enable flag to track whether the
    PHY was enabled or not, so that we know if we should set the PHY negotiated
    linkrate at SAS_LINK_RATE_UNKNOWN or SAS_PHY_DISABLED.
    
    However, it is not proper to use sas_phy_data.enable, since it is only set
    when libsas attempts to set the PHY disabled/enabled; hence, it may not
    even have an initial value.
    
    As a solution to this problem, introduce hisi_sas_phy.enable to track
    whether the PHY is enabled or not, so that we can set the negotiated
    linkrate properly when the PHY comes down.
    Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    c63b88cc
hisi_sas_v2_hw.c 108 KB