Re: [PATCH v8] PCI: imx6: limit DBI register length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux