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: <20240604194056.16625-1-mpearson-lenovo@squebb.ca>
Date: Tue,  4 Jun 2024 15:40:44 -0400
From: Mark Pearson <mpearson-lenovo@...ebb.ca>
To: mpearson-lenovo@...ebb.ca
Cc: heikki.krogerus@...ux.intel.com,
	gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] usb: typec: ucsi: treat get_pdos not supported condition as info instead of error

On systems where the UCSI PDOs are not supported, the UCSI driver is
giving an error message. This can cause users to believe there is a HW
issue with their system when in fact it is working as designed.

Downgrade message to dev_info for EOPNOTSUPP condition.

Tested on Lenovo L14 G5 AMD and confirmed with Lenovo FW team that PDOs
are not supported on this platform.

Signed-off-by: Mark Pearson <mpearson-lenovo@...ebb.ca>
---
 drivers/usb/typec/ucsi/ucsi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index cb52e7b0a2c5..090be87d5485 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -632,8 +632,12 @@ static int ucsi_read_pdos(struct ucsi_connector *con,
 	command |= is_source(role) ? UCSI_GET_PDOS_SRC_PDOS : 0;
 	ret = ucsi_send_command(ucsi, command, pdos + offset,
 				num_pdos * sizeof(u32));
-	if (ret < 0 && ret != -ETIMEDOUT)
-		dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret);
+	if (ret < 0 && ret != -ETIMEDOUT) {
+		if (ret == -EOPNOTSUPP)
+			dev_info(ucsi->dev, "UCSI_GET_PDOS not supported on this hardware\n");
+		else
+			dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret);
+	}
 
 	return ret;
 }
-- 
2.45.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ