All of lore.kernel.org
 help / color / mirror / Atom feed
From: "mika.westerberg@linux.intel.com" <mika.westerberg@linux.intel.com>
To: "mohamed.rayan@siemens.com" <mohamed.rayan@siemens.com>
Cc: "andreas.noever@gmail.com" <andreas.noever@gmail.com>,
	"michael.jamet@intel.com" <michael.jamet@intel.com>,
	"YehezkelShB@gmail.com" <YehezkelShB@gmail.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"mohamed.samy@siemens.com" <mohamed.samy@siemens.com>,
	"mohamed.el_nahas@siemens.com" <mohamed.el_nahas@siemens.com>,
	"ahmed_mohammed@siemens.com" <ahmed_mohammed@siemens.com>
Subject: Re: Inquiry about tb/usb4 driver
Date: Thu, 29 Feb 2024 14:30:42 +0200	[thread overview]
Message-ID: <20240229123042.GH8454@black.fi.intel.com> (raw)
In-Reply-To: <SEZPR06MB5439E9D11593D4550BDCA4AFF35F2@SEZPR06MB5439.apcprd06.prod.outlook.com>

Hi,

On Thu, Feb 29, 2024 at 12:18:31PM +0000, mohamed.rayan@siemens.com wrote:
>    Hello,
> 
>     
> 
>    Hope this mail finds you well,

It does but sending HTML has some issues if the receiver such as me uses
text based mail client ;-)

>    I am sending this mail asking you for some help in the usage of tb/usb4
>    driver,
> 
>    I have downloaded this driver for kernel v6.5 to install it with a certain
>    USB4 host controller, Here is the driver link:
>    [1]https://elixir.bootlin.com/linux/v6.5/source/drivers/thunderbol
> 
>     
> 
>    I have found something not clear to me in “switch.c”, and exactly at line
>    #2260: “[2]tb_switch_alloc”, which is responsible for allocating and
>    initialization a switch:
> 
>  1-    This function has a local variable called “upstream_port”
> 
>  2-    A “tb_cfg_get_upstream_port” is first called to get the value of “upstream_port” from Switch config space
> 
>  3-    When I checked “tb_cfg_get_upstream_port” function, I found that it reads first DW (DW#0) of the router configuration space
> 
>  4-    In USB4 standard specifications, the first DW of the router config space is Vendor/Product IDs, not the Upstream Adapter, please check the below snapshot from USB4 standard
> 
>  5-    Later in the code of the “[3]tb_switch_alloc” function, at line#2297, this value of “upstream_port”  is used to overwrite another variable in the struct as follow:
> 
>                  
> 
>   
> 
>   
> 
>   
> 
>  6-    So at the end, “sw->config.upstream_port_number” will get updated with incorrect settings, So I am wondering if this is an expected behavior, Am I missing something?

This is historic to support Thunderbolt 1-3 devices where the upstream
port could change. In USB4 routers it is read-only. Do you see any real
issue with this?

       reply	other threads:[~2024-02-29 12:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SEZPR06MB5439E9D11593D4550BDCA4AFF35F2@SEZPR06MB5439.apcprd06.prod.outlook.com>
2024-02-29 12:30 ` mika.westerberg [this message]
2024-02-29 12:48   ` Inquiry about tb/usb4 driver mohamed.rayan
2024-02-29 12:55     ` mika.westerberg
2024-03-11 11:11       ` mohamed.rayan
2024-03-11 11:56         ` mika.westerberg
2024-03-11 14:03           ` mohamed.rayan
2024-03-11 14:08             ` mika.westerberg

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=20240229123042.GH8454@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=ahmed_mohammed@siemens.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=michael.jamet@intel.com \
    --cc=mohamed.el_nahas@siemens.com \
    --cc=mohamed.rayan@siemens.com \
    --cc=mohamed.samy@siemens.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.