Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Christian Kellner
On Fri, 2019-10-04 at 18:16 +0300, Mika Westerberg wrote: > > Is there any harm of also having the 'generation' exposed > > as well? I like the simplicity of the mapping from that value to > > Thunderbolt/USB4 standard version (e.g. I would show that in > > 'boltctl > > list'); 'hw_version' will ne

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
On Fri, Oct 04, 2019 at 05:02:37PM +0200, Christian Kellner wrote: > Should work. What would the value be for Thunderbolt 3 (and before)? I > guess '0' if I am looking at the right thing (bits 31:24 in > ROUTER_CS_4)? Yes, it would be 0x10 and below that depending on the generation. > Is there an

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mario.Limonciello
.com.au; Lukas Wunner; > gre...@linuxfoundation.org; st...@rowland.harvard.edu; Anthony Wong; LKML > Subject: RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > > > On Fri, Oct 4, 2019 at 11:19 AM Mika Westerberg > > wrote: > > > > > > On Fri, Oct 0

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
+Christian On Fri, Oct 04, 2019 at 02:05:46PM +, mario.limoncie...@dell.com wrote: > > > > On Fri, Oct 4, 2019 at 11:19 AM Mika Westerberg > > wrote: > > > > > > On Fri, Oct 04, 2019 at 11:07:34AM +0300, Yehezkel Bernat wrote: > > > > > Also if you can get the hw_vendor_id and hw_product_id

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mario.Limonciello
> > On Fri, Oct 4, 2019 at 11:19 AM Mika Westerberg > wrote: > > > > On Fri, Oct 04, 2019 at 11:07:34AM +0300, Yehezkel Bernat wrote: > > > > Also if you can get the hw_vendor_id and hw_product_id from the kernel > > > > does that mean you don't need to do the two reads or you still need > > > >

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Yehezkel Bernat
On Fri, Oct 4, 2019 at 11:19 AM Mika Westerberg wrote: > > On Fri, Oct 04, 2019 at 11:07:34AM +0300, Yehezkel Bernat wrote: > > > Also if you can get the hw_vendor_id and hw_product_id from the kernel > > > does that mean you don't need to do the two reads or you still need > > > those? > > > > Ar

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
On Fri, Oct 04, 2019 at 11:07:34AM +0300, Yehezkel Bernat wrote: > > Also if you can get the hw_vendor_id and hw_product_id from the kernel > > does that mean you don't need to do the two reads or you still need > > those? > > Are those the chip vendor or the OEM, in case they are different? Thos

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Yehezkel Bernat
org; st...@rowland.harvard.edu; > > > anthony.w...@canonical.com; linux-kernel@vger.kernel.org > > > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > > > > > > > [EXTERNAL EMAIL] > > > > > > On Wed, Oct 02, 2019

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-04 Thread Mika Westerberg
; > > andreas.noe...@gmail.com; michael.ja...@intel.com; > > rajmohan.m...@intel.com; nicholas.johnson-opensou...@outlook.com.au; > > lu...@wunner.de; gre...@linuxfoundation.org; st...@rowland.harvard.edu; > > anthony.w...@canonical.com; linux-kernel@vger.kernel.org > > Sub

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-03 Thread Mario.Limonciello
holas.johnson-opensou...@outlook.com.au; > lu...@wunner.de; gre...@linuxfoundation.org; st...@rowland.harvard.edu; > anthony.w...@canonical.com; linux-kernel@vger.kernel.org > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > [EXTERNAL EMAIL] > > On Wed, Oct

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-03 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 04:00:55PM +, mario.limoncie...@dell.com wrote: > > It's not even "same location - another meaning", the vendor ID comes from > > the > > DROM section, so it takes a few internal jumps inside the NVM to find the > > location. One of the "pointers" or section headers wil

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mario.Limonciello
ukas > Wunner; gre...@linuxfoundation.org; st...@rowland.harvard.edu; Anthony > Wong; LKML > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > [EXTERNAL EMAIL] > > On Wed, Oct 2, 2019 at 6:09 PM wrote: > > > > > -Original Message- &g

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Yehezkel Bernat
.com; yehezkel...@gmail.com; rajmohan.m...@intel.com; > > nicholas.johnson-opensou...@outlook.com.au; lu...@wunner.de; > > gre...@linuxfoundation.org; st...@rowland.harvard.edu; > > anthony.w...@canonical.com; linux-kernel@vger.kernel.org > > Subject: Re: [RFC PATCH 17/22] thunde

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mario.Limonciello
holas.johnson-opensou...@outlook.com.au; lu...@wunner.de; > gre...@linuxfoundation.org; st...@rowland.harvard.edu; > anthony.w...@canonical.com; linux-kernel@vger.kernel.org > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > [EXTERNAL EMAIL] > > On Tue, Oct

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mario.Limonciello
holas.johnson-opensou...@outlook.com.au; lu...@wunner.de; > gre...@linuxfoundation.org; st...@rowland.harvard.edu; > anthony.w...@canonical.com; linux-kernel@vger.kernel.org > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > [EXTERNAL EMAIL] > > On Tue, Oct

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Wed, Oct 02, 2019 at 10:39:54AM +0200, Greg Kroah-Hartman wrote: > On Wed, Oct 02, 2019 at 11:30:34AM +0300, Mika Westerberg wrote: > > On Tue, Oct 01, 2019 at 06:27:42PM +0200, Oliver Neukum wrote: > > > Am Dienstag, den 01.10.2019, 18:07 +0300 schrieb Mika Westerberg: > > > > > > Hi, > > > >

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Greg Kroah-Hartman
On Wed, Oct 02, 2019 at 11:30:34AM +0300, Mika Westerberg wrote: > On Tue, Oct 01, 2019 at 06:27:42PM +0200, Oliver Neukum wrote: > > Am Dienstag, den 01.10.2019, 18:07 +0300 schrieb Mika Westerberg: > > > > Hi, > > > > > OK, but does that break existing .configs? I mean if you have already > > >

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 06:14:23PM +, mario.limoncie...@dell.com wrote: > One more thought; would you consider exporting to sysfs sw->config.vendor_id? > Maybe an attribute that is switch_vendor? > > Userland fwupd also does validation on the NVM and will need to follow this. > The same check

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 05:05:09PM +, mario.limoncie...@dell.com wrote: > > @@ -322,9 +398,21 @@ static int tb_switch_nvm_add(struct tb_switch *sw) > > u32 val; > > int ret; > > > > - if (!sw->dma_port) > > + if (!nvm_readable(sw)) > > return 0; > > > > + /* > > +

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-02 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 06:27:42PM +0200, Oliver Neukum wrote: > Am Dienstag, den 01.10.2019, 18:07 +0300 schrieb Mika Westerberg: > > Hi, > > > OK, but does that break existing .configs? I mean if you have already > > CONFIG_THUNDERBOLT in your .config/defconfig does it now just get > > dropped

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mario.Limonciello
an; Alan Stern; Anthony Wong; linux- > ker...@vger.kernel.org > Subject: RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > @@ -322,9 +398,21 @@ static int tb_switch_nvm_add(struct tb_switch *sw) > > u32 val; > > int ret; >

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mario.Limonciello
> @@ -322,9 +398,21 @@ static int tb_switch_nvm_add(struct tb_switch *sw) > u32 val; > int ret; > > - if (!sw->dma_port) > + if (!nvm_readable(sw)) > return 0; > > + /* > + * The NVM format of non-Intel hardware is not known so > + * currently restr

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Oliver Neukum
Am Dienstag, den 01.10.2019, 18:07 +0300 schrieb Mika Westerberg: Hi, > OK, but does that break existing .configs? I mean if you have already > CONFIG_THUNDERBOLT in your .config/defconfig does it now just get > dropped silently? People will have to look at this new stuff anyway. > For example

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
> > > To: Mika Westerberg > > > Cc: linux-...@vger.kernel.org; Andreas Noever; Michael Jamet; Yehezkel > > > Bernat; > > > Rajmohan Mani; Nicholas Johnson; Lukas Wunner; Alan Stern; Limonciello, > > > Mario; > > > Anthony Wong; linux-kerne

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 05:19:35PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 06:07:34PM +0300, Mika Westerberg wrote: > > On Tue, Oct 01, 2019 at 04:53:54PM +0200, Greg Kroah-Hartman wrote: > > > On Tue, Oct 01, 2019 at 04:09:05PM +0300, Mika Westerberg wrote: > > > > On Tue, Oct 0

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Greg KH
Michael Jamet; Yehezkel > > Bernat; > > Rajmohan Mani; Nicholas Johnson; Lukas Wunner; Alan Stern; Limonciello, > > Mario; > > Anthony Wong; linux-kernel@vger.kernel.org > > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > >

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Greg Kroah-Hartman
On Tue, Oct 01, 2019 at 06:07:34PM +0300, Mika Westerberg wrote: > On Tue, Oct 01, 2019 at 04:53:54PM +0200, Greg Kroah-Hartman wrote: > > On Tue, Oct 01, 2019 at 04:09:05PM +0300, Mika Westerberg wrote: > > > On Tue, Oct 01, 2019 at 02:47:48PM +0200, Greg Kroah-Hartman wrote: > > > > > - Thu

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
Michael Jamet; Yehezkel > > Bernat; > > Rajmohan Mani; Nicholas Johnson; Lukas Wunner; Alan Stern; Limonciello, > > Mario; > > Anthony Wong; linux-kernel@vger.kernel.org > > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > >

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 04:53:54PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 01, 2019 at 04:09:05PM +0300, Mika Westerberg wrote: > > On Tue, Oct 01, 2019 at 02:47:48PM +0200, Greg Kroah-Hartman wrote: > > > > - Thunderbolt Controller driver. This driver is required if you > > > > -

RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mario.Limonciello
, Mario; > Anthony Wong; linux-kernel@vger.kernel.org > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 > > > [EXTERNAL EMAIL] > > On Tue, Oct 01, 2019 at 04:09:05PM +0300, Mika Westerberg wrote: > > On Tue, Oct 01, 2019

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Greg Kroah-Hartman
On Tue, Oct 01, 2019 at 04:09:05PM +0300, Mika Westerberg wrote: > On Tue, Oct 01, 2019 at 02:47:48PM +0200, Greg Kroah-Hartman wrote: > > > - Thunderbolt Controller driver. This driver is required if you > > > - want to hotplug Thunderbolt devices on Apple hardware or on PCs > > > - with Int

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2019 at 02:47:48PM +0200, Greg Kroah-Hartman wrote: > > - Thunderbolt Controller driver. This driver is required if you > > - want to hotplug Thunderbolt devices on Apple hardware or on PCs > > - with Intel Falcon Ridge or newer. > > + USB4 (Thunderbolt) driver. USB4

Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4

2019-10-01 Thread Greg Kroah-Hartman
On Tue, Oct 01, 2019 at 02:38:25PM +0300, Mika Westerberg wrote: > USB4 is a public spec based on Thunderbolt protocol. There are some > differences in register layouts and flows. In addition to PCIe and DP > tunneling, USB4 supports tunneling of USB 3.x. USB4 is also backward > compatible with Thu