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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251028-ucsi-glink-skip-orientation-for-ucsi-v2-v1-1-93e936ac59b4@linaro.org>
Date: Tue, 28 Oct 2025 16:39:19 +0200
From: Abel Vesa <abel.vesa@...aro.org>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>, 
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Bjorn Andersson <andersson@...nel.org>, 
 Konrad Dybcio <konradybcio@...nel.org>, Dmitry Baryshkov <lumag@...nel.org>, 
 linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org, 
 linux-kernel@...r.kernel.org, Abel Vesa <abel.vesa@...aro.org>
Subject: [PATCH] usb: typec: ucsi: Skip setting orientation for UCSI
 version 2.0 and above

In case of UCSI version 2.0 and above, if the orientation is set from
glink as well, it will trigger the consumers along the graph (PHYs,
repeaters and so on) to reconfigure a second time. This might break
the consumer drivers which aren't currently implemented to drop the
second request of setting the same orientation.

So lets leave the orientation setting to the UCSI generic implementation
for all platform that implement UCSI spec 2.0 and above.

Signed-off-by: Abel Vesa <abel.vesa@...aro.org>
---
 drivers/usb/typec/ucsi/ucsi_glink.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index 11b3e24e34e2b4c21df20b6bec69619a0292c7bb..e68fd3fd0f54bfa3c5998519b17cf187bb363ec8 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -209,6 +209,10 @@ static void pmic_glink_ucsi_connector_status(struct ucsi_connector *con)
 	struct pmic_glink_ucsi *ucsi = ucsi_get_drvdata(con->ucsi);
 	int orientation;
 
+	/* For UCSI 2.0 and above, orientation is part of UCSI payload */
+	if (ucsi->ucsi->version >= UCSI_VERSION_2_0)
+		return;
+
 	if (!UCSI_CONSTAT(con, CONNECTED)) {
 		typec_set_orientation(con->port, TYPEC_ORIENTATION_NONE);
 		return;

---
base-commit: f7d2388eeec24966fc4d5cf32d706f0514f29ac5
change-id: 20251028-ucsi-glink-skip-orientation-for-ucsi-v2-6d52c6644d46

Best regards,
-- 
Abel Vesa <abel.vesa@...aro.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ