scsi: ufs: core: Fix bRefClkFreq write failure in HS-LSS mode
A message that is not in the archive (sent off-list or not yet received): [email protected]
Peter Wang (王信友)
Reviewed-byQuoted 7 lines · Wang Shuaiwei
According to the UFS spec, the bRefClkFreq attribute can only be written
when both sub-links are in LS-MODE. However, in HS LSS mode with resetmode =HS_MODE, if the UFS device's default bRefClkFreq value differs from the host controller'sdev_ref_clk_freqsetting, the write operation will fail.
Quoted 6 lines
To fix this issue, introduce
ufshcd_get_op_mode()function to detect the current link operational mode. Callufshcd_set_dev_ref_clk()only when both sub-links are in LS-MODE to ensure the attribute can be written successfully.Signed-off-by Wang Shuaiwei <[email protected]>
Reviewed-by Peter Wang <[email protected]>