From: "Krzysztof Wilczyński" <kw@linux.com> To: Richard Zhu <hongxing.zhu@nxp.com> Cc: l.stach@pengutronix.de, helgaas@kernel.org, stefan@agner.ch, lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie Date: Thu, 18 Feb 2021 12:55:05 +0100 [thread overview] Message-ID: <YC5VmRTIylDHSFPt@rocinante> (raw) In-Reply-To: <1613624980-29382-1-git-send-email-hongxing.zhu@nxp.com> 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@nxp.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@linux.com> Krzysztof
WARNING: multiple messages have this Message-ID (diff)
From: "Krzysztof Wilczyński" <kw@linux.com> To: Richard Zhu <hongxing.zhu@nxp.com> Cc: lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, stefan@agner.ch, helgaas@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, l.stach@pengutronix.de Subject: Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie Date: Thu, 18 Feb 2021 12:55:05 +0100 [thread overview] Message-ID: <YC5VmRTIylDHSFPt@rocinante> (raw) In-Reply-To: <1613624980-29382-1-git-send-email-hongxing.zhu@nxp.com> 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@nxp.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@linux.com> Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-02-18 13:49 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-18 5:09 [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie Richard Zhu 2021-02-18 5:09 ` Richard Zhu 2021-02-18 8:59 ` Lucas Stach 2021-02-18 8:59 ` Lucas Stach 2021-02-18 11:55 ` Krzysztof Wilczyński [this message] 2021-02-18 11:55 ` Krzysztof Wilczyński 2021-02-18 17:34 ` Krzysztof Wilczyński 2021-02-18 17:34 ` Krzysztof Wilczyński 2021-02-20 1:27 ` [EXT] " Richard Zhu 2021-02-20 1:27 ` Richard Zhu 2021-02-20 2:49 [PATCH] PCI: imx6: Limit DBI register length for imx6qp PCIe Richard Zhu 2021-02-20 2:49 ` Richard Zhu 2021-06-22 9:28 ` Lorenzo Pieralisi 2021-06-22 9:28 ` Lorenzo Pieralisi
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=YC5VmRTIylDHSFPt@rocinante \ --to=kw@linux.com \ --cc=helgaas@kernel.org \ --cc=hongxing.zhu@nxp.com \ --cc=kernel@pengutronix.de \ --cc=l.stach@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=stefan@agner.ch \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.