• subhashj@codeaurora.org's avatar
    scsi: ufs: fix setting init power mode · d2aebb9b
    subhashj@codeaurora.org authored
    Immediately after successful UFS link startup, UFS link power mode would
    be in PWM-G1, 1-lane, SLOW-AUTO mode. But currently we are doing few
    of the DME local/peer attributes access before setting the "hba->pwr_info"
    to default power mode. If we are doing link startup as part of error
    recovery then old power mode might be set to FAST mode and doing DME peer
    access (after link startup but before updating "hba->pwr_info" to default
    power mode) unintentionally tries to switch from FAST to FAST_AUTO mode (if
    UFSHCD_QUIRK_DME_PEER_ACCESS_AUTO_MODE quirk is enabled).
    
    Above issue is fixed by setting the default power mode immediately after
    successful link startup.
    Reviewed-by: default avatarSahitya Tummala <stummala@codeaurora.org>
    Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    d2aebb9b
ufshcd.c 195 KB