[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YC5VmRTIylDHSFPt@rocinante>
Date: Thu, 18 Feb 2021 12:55:05 +0100
From: Krzysztof Wilczyński <kw@...ux.com>
To: Richard Zhu <hongxing.zhu@....com>
Cc: l.stach@...gutronix.de, helgaas@...nel.org, stefan@...er.ch,
lorenzo.pieralisi@....com, linux-pci@...r.kernel.org,
linux-imx@....com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie
Hi Richard,
Thank you for sending the patch over!
> Refer to commit 075af61c19cd ("PCI: imx6: Limit DBI register length"),
> i.MX6QP PCIe has the similar issue.
> Define the length of the DBI registers and limit config space to its
> length for i.MX6QP PCIe too.
You could probably flip these two sentences around to make the commit
message read slightly better, so what about this (a suggestion):
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 that otherwise would lead to an abort on a i.MX 6QuadPlus.
See commit 075af61c19cd ("PCI: imx6: Limit DBI register length") that
resolves a similar issue on a i.MX 6Quad PCIe.
> Signed-off-by: Richard Zhu <hongxing.zhu@....com>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 0cf1333c0440..853ea8e82952 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1175,6 +1175,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
> .variant = IMX6QP,
> .flags = IMX6_PCIE_FLAG_IMX6_PHY |
> IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE,
> + .dbi_length = 0x200,
> },
> [IMX7D] = {
> .variant = IMX7D,
Reviewed-by: Krzysztof Wilczyński <kw@...ux.com>
Krzysztof
Powered by blists - more mailing lists