]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: core: Configure only active lanes during link
authorPalash Kambar <palash.kambar@oss.qualcomm.com>
Thu, 23 Apr 2026 10:20:22 +0000 (15:50 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 May 2026 02:19:08 +0000 (22:19 -0400)
commite72323f3b09f9c890fa93a74197bbc290d39d981
tree8eb468c8d757934a3b7e9bed50a07e2d6ba48bc5
parentaa3b8f56ef27ed72394a752820abdec4608b731c
scsi: ufs: core: Configure only active lanes during link

The number of connected lanes detected during UFS link startup can be
fewer than the lanes specified in the device tree. The current driver
logic attempts to configure all lanes defined in the device tree,
regardless of their actual availability. This mismatch may cause
failures during power mode changes.

Hence, Add a check during link startup to ensure that only the lanes
actually discovered are considered valid. If a mismatch is detected,
fail the initialization early, preventing the driver from entering an
unsupported configuration that could cause power mode transition
failures.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Palash Kambar <palash.kambar@oss.qualcomm.com>
Link: https://patch.msgid.link/20260423102023.3779489-2-palash.kambar@oss.qualcomm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c