Skip to contentSkip to conversation

scsi: ufs: core: Fix bRefClkFreq write failure in HS-LSS mode

PATCH Peter Wang (王信友) 1 participant 1 message Apr 15 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Peter Wang (王信友)

author Reviewed-by
#1 lore raw
Quoted 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's dev_ref_clk_freq setting, 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. Call ufshcd_set_dev_ref_clk() only when both sub-links are in LS-MODE to ensure the attribute can be written successfully.