lkml.org 
[lkml]   [2019]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v8] PCI: imx6: limit DBI register length
Date
On Tue, 2019-02-26 at 14:06 +0100, Stefan Agner wrote:
> Define the length of the DBI registers and limit config space to its
> length. This makes sure that the kernel does not access registers
> beyond that point, avoiding the following abort on a i.MX 6Quad:
>
> +static void imx6_pcie_quirk(struct pci_dev *dev)
> +{
> + struct pci_bus *bus = dev->bus;
> + struct pcie_port *pp = bus->sysdata;
> +
> + /* Bus parent is the PCI bridge, its parent is this platform driver */
> + if (!bus->dev.parent || !bus->dev.parent->parent)
> + return;
> +
> + /* Make sure we only quirk devices associated with this driver */
> + if (bus->dev.parent->parent->driver != &imx6_pcie_driver.driver)
> + return;

This looks like it would be enough to prevent interfering with other
dwc-based pci drivers.

Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
\
 
 \ /
  Last update: 2019-02-26 14:28    [W:0.046 / U:1.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site