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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220302220709.3138846-3-mario.limonciello@amd.com>
Date:   Wed, 2 Mar 2022 16:07:07 -0600
From:   Mario Limonciello <mario.limonciello@....com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
CC:     "open list:THUNDERBOLT DRIVER" <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <Sanju.Mehta@....com>,
        Mario Limonciello <mario.limonciello@....com>
Subject: [PATCH 3/5] drivers/thunderbolt: Don't make DROM read success compulsory

The USB4 specification doesn't make any requirements that reading
a device router's DROM is needed for the operation of the device.

On page 207 of the USB4 1.0 spec it does mention that a CM may use
the DROM to make decision though:
```
After enumerating a Router, the Connection Manager may read the
contents of the Router’s DROM. If, after reading the contents of
DROM, the Connection Manager decides that it does not want the
Router in its Domain...
```
Other connection manager solutions don't necessarily read it or gate
the usability of the device on whether it was read.

So make failures when reading the DROM show warnings but not
fail the initialization of the switch.

Link: https://www.usb.org/sites/default/files/USB4%20Specification%2020211116.zip
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
 drivers/thunderbolt/switch.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 294518af4ee4..ac87e8b50e52 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2784,10 +2784,8 @@ int tb_switch_add(struct tb_switch *sw)
 
 		/* read drom */
 		ret = tb_drom_read(sw);
-		if (ret) {
-			dev_err(&sw->dev, "reading DROM failed\n");
-			return ret;
-		}
+		if (ret)
+			dev_warn(&sw->dev, "reading DROM failed: %d\n", ret);
 		tb_sw_dbg(sw, "uid: %#llx\n", sw->uid);
 
 		tb_check_quirks(sw);
-- 
2.34.1

Powered by blists - more mailing lists