All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: "open list:THUNDERBOLT DRIVER" <linux-usb@vger.kernel.org>,
	linux-kernel@vger.kernel.org, Sanju.Mehta@amd.com
Subject: Re: [PATCH 3/5] drivers/thunderbolt: Don't make DROM read success compulsory
Date: Thu, 3 Mar 2022 09:47:22 +0200	[thread overview]
Message-ID: <YiByip/y6p68j6lP@lahna> (raw)
In-Reply-To: <20220302220709.3138846-3-mario.limonciello@amd.com>

Hi Mario,

On Wed, Mar 02, 2022 at 04:07:07PM -0600, Mario Limonciello wrote:
> 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...
> ```

You don't need to quote the spec for Thunderbolt patches. I can read,
and it's not like it is going to change anyway ;-)

> Other connection manager solutions don't necessarily read it or gate
> the usability of the device on whether it was read.

Indeed.

> 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

Also no need to "link" the spec. I know where the spec can be
downloaded.

Ditto for all patches.

> Signed-off-by: Mario Limonciello <mario.limonciello@amd.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

  reply	other threads:[~2022-03-03  7:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 22:07 [PATCH 1/5] drivers/thunderbolt: Retry DROM reads for more failure scenarios Mario Limonciello
2022-03-02 22:07 ` [PATCH 2/5] drivers/thunderbolt: don't resume switches without uid set Mario Limonciello
2022-03-03  7:43   ` Mika Westerberg
2022-03-02 22:07 ` [PATCH 3/5] drivers/thunderbolt: Don't make DROM read success compulsory Mario Limonciello
2022-03-03  7:47   ` Mika Westerberg [this message]
2022-03-02 22:07 ` [PATCH 4/5] drivers/thunderbolt: Clarify/correct register offsets for tb_cap_plug_events Mario Limonciello
2022-03-03  7:54   ` Mika Westerberg
2022-03-02 22:07 ` [PATCH 5/5] drivers/thunderbolt: Rename EEPROM handling bits to match USB4 spec Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YiByip/y6p68j6lP@lahna \
    --to=mika.westerberg@linux.intel.com \
    --cc=Sanju.Mehta@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.