lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241008030845.25997-1-hy50.seo@samsung.com>
Date: Tue,  8 Oct 2024 12:08:45 +0900
From: SEO HOYOUNG <hy50.seo@...sung.com>
To: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	alim.akhtar@...sung.com, avri.altman@....com, jejb@...ux.ibm.com,
	martin.petersen@...cle.com, beanhuo@...ron.com, bvanassche@....org,
	kwangwon.min@...sung.com, kwmad.kim@...sung.com, sh425.lee@...sung.com,
	quic_nguyenb@...cinc.com, cpgs@...sung.com, h10.kim@...sung.com
Cc: SEO HOYOUNG <hy50.seo@...sung.com>
Subject: [PATCH v1] 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@...sung.com>
---
 drivers/ufs/core/ufshcd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 24a32e2fd75e..387eec6f19ef 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -4540,6 +4540,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.
-- 
2.26.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ