diff options
author | SEO HOYOUNG <hy50.seo@samsung.com> | 2024-10-10 16:52:28 +0900 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-10-25 14:37:38 -0400 |
commit | 10c58d7eea443c6961135a7f16f9fa03bf8e5823 (patch) | |
tree | ea7860ee88be408fdf87b9e12eb2e66173e21637 | |
parent | a3517717c3c0dbad771f5e491191b4b7b69808fb (diff) |
scsi: ufs: core: check asymmetric connected lanes
Performance problems may occur if there is a problem with the asymmetric
connected lane such as h/w failure. Currently, only check connected
lane for rx/tx is checked if it is not 0. But it should also be checked
if it is asymmetrically connected.
Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
Link: https://lore.kernel.org/r/e82b4b65b5f6501a687c624dd06e5c362e160f32.1728544727.git.hy50.seo@samsung.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/ufs/core/ufshcd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 9e6d008f4ea4..945253eb590e 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -4535,6 +4535,14 @@ static int ufshcd_get_max_pwr_mode(struct ufs_hba *hba) return -EINVAL; } + if (pwr_info->lane_rx != pwr_info->lane_tx) { + dev_err(hba->dev, "%s: asymmetric connected lanes. rx=%d, tx=%d\n", + __func__, + pwr_info->lane_rx, + pwr_info->lane_tx); + return -EINVAL; + } + /* * First, get the maximum gears of HS speed. * If a zero value, it means there is no HSGEAR capability. |