[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BC567D27D6B7384F84318942321624DE16179EE6@hasmsx109.ger.corp.intel.com>
Date: Tue, 18 Nov 2014 08:15:21 +0000
From: "Jamet, Michael" <michael.jamet@...el.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>,
Bjorn Helgaas <bhelgaas@...gle.com>
CC: "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Levy, Amir (Jer)" <amir.jer.levy@...el.com>,
"Alloun, Dan" <dan.alloun@...el.com>,
Rafael Wysocki <rjw@...ysocki.net>,
Andreas Noever <andreas.noever@...il.com>
Subject: RE: [PATCH] pci: support Thunderbolt requirements for I/O resources.
> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko@...il.com]
> Sent: Wednesday, November 12, 2014 20:31
> To: Bjorn Helgaas
> Cc: Jamet, Michael; linux-pci@...r.kernel.org; linux-kernel@...r.kernel.org;
> Levy, Amir (Jer); Alloun, Dan; Rafael Wysocki; Andreas Noever
> Subject: Re: [PATCH] pci: support Thunderbolt requirements for I/O
> resources.
>
> On Wed, Nov 12, 2014 at 7:29 PM, Bjorn Helgaas <bhelgaas@...gle.com>
> wrote:
>
> []
>
> >> To prevent this, we detect a chain contains a Thunderbolt device by
> >> checking the Thunderbolt PCI device id.
> >
> > I'm really not happy about checking a list of device IDs to identify
> > Thunderbolt devices. Surely there's a better way, because a list like
> > this has to be updated regularly.
>
> I recently proposed internally to use quirks (pci_fixup_early) for that, but
> apparently Michael didn't have time to answer. It might be he can just
> comment here since the patch already public.
>
> --
> With Best Regards,
> Andy Shevchenko
Indeed, I've explored the quirks option.
Unfortunately the fixup hook seems to be called too late in the code
since pci_enable_device()calls pcibios_enable_device() which actually
send a PCI command with CMD |=PCI_COMMAND_IO and configure the PCI HW.
The IORESOURCE_MEM and IORESOURCE_IO flags are set at the time the
pci_enable_device(), pci_enable_device_mem() or pci_enable_device_io()
is called during device initializations, so an early fixup call won't help either.
At this stage, the PCI HW is configured and a fixup call won't resolve the issue
unless another PCI command is sent to revert it
(generally not advised to execute again on hardware).
Michael
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
Powered by blists - more mailing lists