lkml.org 
[lkml]   [2022]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/5] thunderbolt: Do not make DROM read success compulsory
Date
The USB4 specification doesn't make any requirements that reading
a device router's DROM is needed for the operation of the device.

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 router.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v1->v2:
* Update commit message
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
\
 
 \ /
  Last update: 2022-03-03 14:16    [W:0.064 / U:1.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site