From: "Bernat, Yehezkel" <yehezkel.bernat@intel.com>
To: "Levy, Amir (Jer)" <amir.jer.levy@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Lukas Wunner <lukas@wunner.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andreas Noever <andreas.noever@gmail.com>,
"Jamet, Michael" <michael.jamet@intel.com>,
"Andy Lutomirski" <luto@kernel.org>,
"Mario.Limonciello@dell.com" <Mario.Limonciello@dell.com>,
"Jared.Dominguez@dell.com" <Jared.Dominguez@dell.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 18/24] thunderbolt: Store Thunderbolt generation in the switch structure
Date: Sun, 21 May 2017 09:55:55 +0000 [thread overview]
Message-ID: <BN4PR11MB0996888A4325444D0209D2FAE6FB0@BN4PR11MB0996.namprd11.prod.outlook.com> (raw)
In-Reply-To: <E607265CB020454880711A6F96C05A030106862B33@hasmsx107.ger.corp.intel.com>
> -----Original Message-----
> From: Levy, Amir (Jer)
> Sent: Sunday, May 21, 2017 11:07
> To: Mika Westerberg <mika.westerberg@linux.intel.com>; Lukas Wunner
> <lukas@wunner.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Andreas Noever
> <andreas.noever@gmail.com>; Jamet, Michael <michael.jamet@intel.com>;
> Bernat, Yehezkel <yehezkel.bernat@intel.com>; Andy Lutomirski
> <luto@kernel.org>; Mario.Limonciello@dell.com;
> Jared.Dominguez@dell.com; Andy Shevchenko
> <andriy.shevchenko@linux.intel.com>; linux-kernel@vger.kernel.org
> Subject: RE: [PATCH 18/24] thunderbolt: Store Thunderbolt generation in the
> switch structure
>
> On Sun, May 21 2017, 11:00 AM, Mika Westerberg wrote:
> > On Sun, May 21, 2017 at 10:40:41AM +0300, Mika Westerberg wrote:
> > > On Sun, May 21, 2017 at 07:35:21AM +0200, Lukas Wunner wrote:
> > > > On Sun, May 21, 2017 at 05:29:47AM +0000, Levy, Amir (Jer) wrote:
> > > > > On Sun, May 21 2017, 07:47 AM, Lukas Wunner wrote:
> > > > > > On Thu, May 18, 2017 at 05:39:08PM +0300, Mika Westerberg wrote:
> > > > > > > +
> > > > > > > + default:
> > > > > > > + sw->generation = 1;
> > > > > > > + break;
> > > > > >
> > > > > > If someone adds an entry for, say, a new TB3 controller to
> > > > > > nhi_ids[] but forgets to update this function, the controller
> > > > > > is assigned the wrong generation number. It might be better
> > > > > > to make TB3 the default and list each TB1 controller instead
> > > > > > since it's less likely for Intel to introduce an older gen chip.
> > > > > >
> > > > > > Generally I think it's problematic to require that multiple
> > > > > > files are touched whenever a new controller is added. Isn't
> > > > > > the generation number or link speed (10/20/40) stored in some
> > > > > > register in PCI config space (VSEC 0x1234) or TB config space?
> > > > >
> > > > > How about setting information, that isn't available from PCI, in
> > > > > pci_device_id.driver_data when initializing nhi_ids[]?
> > > >
> > > > Right, that would also be possible, though reading the generation
> > > > number from a register would be more elegant, if such a register exists.
> > >
> > > I don't think there is such register but I can put this information
> > > to the driver_data instead.
> >
> > Actually these are Thunderbolt switch IDs, not NHI PCI IDs so I don't
> > think driver_data is the right place after all. So if no objections,
> > I'll update the function to default to TBT3 but keep the switch case
> > and add the TBT1 IDs + Win Ridge there.
>
> There is correlation between switch ID to NHI ID.
I'm not sure defaulting to TBT3 is a good idea. ICM message format can be changed, DMA port can be different, nothing guaranties correct operation of the driver with newer unknown controllers.
next prev parent reply other threads:[~2017-05-21 9:56 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 14:38 [PATCH 00/24] Thunderbolt security levels and NVM firmware upgrade Mika Westerberg
2017-05-18 14:38 ` [PATCH 01/24] thunderbolt: Use const buffer pointer in write operations Mika Westerberg
2017-05-25 13:19 ` Greg Kroah-Hartman
2017-05-18 14:38 ` [PATCH 02/24] thunderbolt: Do not try to read UID if DROM offset is read as 0 Mika Westerberg
2017-05-21 13:46 ` Andreas Noever
2017-05-22 8:40 ` Mika Westerberg
2017-05-22 18:41 ` Andreas Noever
2017-05-22 20:38 ` Mika Westerberg
2017-05-22 20:57 ` Andreas Noever
2017-05-18 14:38 ` [PATCH 03/24] thunderbolt: Do not warn about newer DROM versions Mika Westerberg
2017-05-18 14:38 ` [PATCH 04/24] thunderbolt: Add MSI-X support Mika Westerberg
2017-05-21 17:51 ` Andreas Noever
2017-05-22 8:52 ` Mika Westerberg
2017-05-22 10:35 ` Bernat, Yehezkel
2017-05-22 11:01 ` Mika Westerberg
2017-05-18 14:38 ` [PATCH 05/24] thunderbolt: Rework capability handling Mika Westerberg
2017-05-18 16:38 ` Andy Shevchenko
2017-05-19 8:12 ` Mika Westerberg
2017-05-19 13:18 ` Andy Shevchenko
2017-05-21 19:09 ` Andreas Noever
2017-05-22 9:45 ` Mika Westerberg
2017-05-22 9:58 ` Levy, Amir (Jer)
2017-05-25 6:13 ` Lukas Wunner
2017-05-18 14:38 ` [PATCH 06/24] thunderbolt: Introduce thunderbolt bus and connection manager Mika Westerberg
2017-05-18 16:43 ` Andy Shevchenko
2017-05-19 8:15 ` Mika Westerberg
2017-05-19 13:16 ` Andy Shevchenko
2017-05-24 10:28 ` Lukas Wunner
2017-05-24 10:39 ` Mika Westerberg
2017-05-25 13:23 ` Greg Kroah-Hartman
2017-05-25 14:42 ` Mika Westerberg
2017-05-18 14:38 ` [PATCH 07/24] thunderbolt: Convert switch to a device Mika Westerberg
2017-05-18 16:49 ` Andy Shevchenko
2017-05-19 8:20 ` Mika Westerberg
2017-05-24 11:09 ` Lukas Wunner
2017-05-24 11:43 ` Mika Westerberg
2017-05-24 13:53 ` Lukas Wunner
2017-05-25 6:57 ` Mika Westerberg
2017-05-18 14:38 ` [PATCH 08/24] thunderbolt: Fail switch adding operation if reading DROM fails Mika Westerberg
2017-05-18 14:38 ` [PATCH 09/24] thunderbolt: Do not fail if DROM data CRC32 is invalid Mika Westerberg
2017-05-18 14:39 ` [PATCH 10/24] thunderbolt: Read vendor and device name from DROM Mika Westerberg
2017-05-18 19:19 ` Andy Shevchenko
2017-05-19 8:22 ` Mika Westerberg
2017-05-19 10:07 ` Lukas Wunner
2017-05-19 10:28 ` Mika Westerberg
2017-05-21 5:31 ` Lukas Wunner
2017-05-21 7:48 ` Mika Westerberg
2017-05-21 9:33 ` Lukas Wunner
2017-05-18 14:39 ` [PATCH 11/24] thunderbolt: Move control channel messages to tb_msgs.h Mika Westerberg
2017-05-18 14:39 ` [PATCH 12/24] thunderbolt: Expose get_route() to other files Mika Westerberg
2017-05-18 14:39 ` [PATCH 13/24] thunderbolt: Expose make_header() " Mika Westerberg
2017-05-18 14:39 ` [PATCH 14/24] thunderbolt: Let the connection manager handle all notifications Mika Westerberg
2017-05-24 14:00 ` Lukas Wunner
2017-05-25 7:02 ` Mika Westerberg
2017-05-18 14:39 ` [PATCH 15/24] thunderbolt: Rework control channel to be more reliable Mika Westerberg
2017-05-25 13:25 ` Greg Kroah-Hartman
2017-05-25 14:35 ` Mika Westerberg
2017-05-18 14:39 ` [PATCH 16/24] thunderbolt: Add Thunderbolt 3 PCI IDs Mika Westerberg
2017-05-18 14:39 ` [PATCH 17/24] thunderbolt: Add support for NHI mailbox Mika Westerberg
2017-05-18 14:39 ` [PATCH 18/24] thunderbolt: Store Thunderbolt generation in the switch structure Mika Westerberg
2017-05-21 4:47 ` Lukas Wunner
2017-05-21 5:29 ` Levy, Amir (Jer)
2017-05-21 5:35 ` Lukas Wunner
2017-05-21 7:40 ` Mika Westerberg
2017-05-21 8:00 ` Mika Westerberg
2017-05-21 8:07 ` Levy, Amir (Jer)
2017-05-21 9:55 ` Bernat, Yehezkel [this message]
2017-05-21 10:47 ` Mika Westerberg
2017-05-21 11:18 ` Bernat, Yehezkel
2017-05-21 11:47 ` Mika Westerberg
2017-05-21 10:44 ` Mika Westerberg
2017-05-18 14:39 ` [PATCH 19/24] thunderbolt: Add support for DMA configuration based mailbox Mika Westerberg
2017-05-18 14:39 ` [PATCH 20/24] thunderbolt: Do not touch the hardware if the NHI is gone on resume Mika Westerberg
2017-05-24 14:43 ` Lukas Wunner
2017-05-25 7:10 ` Mika Westerberg
2017-05-18 14:39 ` [PATCH 21/24] thunderbolt: Add support for Internal Connection Manager (ICM) Mika Westerberg
2017-05-18 14:39 ` [PATCH 22/24] thunderbolt: Add support for host and device NVM firmware upgrade Mika Westerberg
2017-05-18 19:35 ` Andy Shevchenko
2017-05-19 8:26 ` Mika Westerberg
2017-05-25 13:28 ` Greg Kroah-Hartman
2017-05-25 14:39 ` Mika Westerberg
2017-05-25 14:57 ` Greg Kroah-Hartman
2017-05-18 14:39 ` [PATCH 23/24] thunderbolt: Add documentation how Thunderbolt bus can be used Mika Westerberg
2017-05-18 14:39 ` [PATCH 24/24] MAINTAINERS: Add maintainers for Thunderbolt driver Mika Westerberg
2017-05-19 16:35 ` [PATCH 00/24] Thunderbolt security levels and NVM firmware upgrade Mario.Limonciello
2017-05-19 17:19 ` Mika Westerberg
2017-05-19 17:54 ` Mario.Limonciello
2017-05-20 8:24 ` Mika Westerberg
2017-05-22 11:37 ` Mika Westerberg
2017-05-22 20:07 ` Mario.Limonciello
2017-05-22 20:10 ` Bernat, Yehezkel
2017-05-22 23:54 ` Mario.Limonciello
2017-05-22 20:48 ` Mika Westerberg
2017-05-23 17:30 ` Mario.Limonciello
2017-05-24 11:11 ` Mika Westerberg
2017-05-24 19:06 ` Mario.Limonciello
2017-05-24 19:32 ` Jamet, Michael
2017-05-25 7:20 ` mika.westerberg
2017-05-25 8:04 ` mika.westerberg
2017-05-25 12:03 ` mika.westerberg
2017-08-11 15:13 ` mika.westerberg
2017-05-25 7:19 ` Mika Westerberg
2017-05-19 18:00 ` Mika Westerberg
2017-05-20 9:15 ` Levy, Amir (Jer)
2017-05-21 8:08 ` mika.westerberg
2017-05-23 13:25 ` Andy Shevchenko
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=BN4PR11MB0996888A4325444D0209D2FAE6FB0@BN4PR11MB0996.namprd11.prod.outlook.com \
--to=yehezkel.bernat@intel.com \
--cc=Jared.Dominguez@dell.com \
--cc=Mario.Limonciello@dell.com \
--cc=amir.jer.levy@intel.com \
--cc=andreas.noever@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=luto@kernel.org \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).