Skip to content

Commit 10c58d7

Browse files
SEO HOYOUNGmartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/e82b4b65b5f6501a687c624dd06e5c362e160f32.1728544727.git.hy50.seo@samsung.com Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent a351771 commit 10c58d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4535,6 +4535,14 @@ static int ufshcd_get_max_pwr_mode(struct ufs_hba *hba)
45354535
return -EINVAL;
45364536
}
45374537

4538+
if (pwr_info->lane_rx != pwr_info->lane_tx) {
4539+
dev_err(hba->dev, "%s: asymmetric connected lanes. rx=%d, tx=%d\n",
4540+
__func__,
4541+
pwr_info->lane_rx,
4542+
pwr_info->lane_tx);
4543+
return -EINVAL;
4544+
}
4545+
45384546
/*
45394547
* First, get the maximum gears of HS speed.
45404548
* If a zero value, it means there is no HSGEAR capability.

0 commit comments

Comments
 (0)