linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie
@ 2021-02-18  5:09 Richard Zhu
  2021-02-18  8:59 ` Lucas Stach
  2021-02-18 11:55 ` Krzysztof Wilczyński
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Zhu @ 2021-02-18  5:09 UTC (permalink / raw)
  To: l.stach, bhelgaas, stefan, lorenzo.pieralisi
  Cc: linux-pci, linux-imx, linux-arm-kernel, linux-kernel, kernel,
	Richard Zhu

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.

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,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie
  2021-02-18  5:09 [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie Richard Zhu
@ 2021-02-18  8:59 ` Lucas Stach
  2021-02-18 11:55 ` Krzysztof Wilczyński
  1 sibling, 0 replies; 7+ messages in thread
From: Lucas Stach @ 2021-02-18  8:59 UTC (permalink / raw)
  To: Richard Zhu, bhelgaas, stefan, lorenzo.pieralisi
  Cc: linux-pci, linux-imx, linux-arm-kernel, linux-kernel, kernel

Am Donnerstag, dem 18.02.2021 um 13:09 +0800 schrieb Richard Zhu:
> 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.
> 
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

> ---
>  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,



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie
  2021-02-18  5:09 [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie Richard Zhu
  2021-02-18  8:59 ` Lucas Stach
@ 2021-02-18 11:55 ` Krzysztof Wilczyński
  2021-02-18 17:34   ` Krzysztof Wilczyński
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Wilczyński @ 2021-02-18 11:55 UTC (permalink / raw)
  To: Richard Zhu
  Cc: l.stach, helgaas, stefan, lorenzo.pieralisi, linux-pci,
	linux-imx, linux-arm-kernel, linux-kernel, kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie
  2021-02-18 11:55 ` Krzysztof Wilczyński
@ 2021-02-18 17:34   ` Krzysztof Wilczyński
  2021-02-20  1:27     ` [EXT] " Richard Zhu
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Wilczyński @ 2021-02-18 17:34 UTC (permalink / raw)
  To: Richard Zhu
  Cc: l.stach, helgaas, stefan, lorenzo.pieralisi, linux-pci,
	linux-imx, linux-arm-kernel, linux-kernel, kernel

[...]
> > 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.
[...]

If you do decide to send another version, then also use "PCIe" in the
subject, rather than "pcie".  I forgot to mention this in the previous
message, apologies.

Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [EXT] Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie
  2021-02-18 17:34   ` Krzysztof Wilczyński
@ 2021-02-20  1:27     ` Richard Zhu
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Zhu @ 2021-02-20  1:27 UTC (permalink / raw)
  To: Krzysztof Wilczyński
  Cc: l.stach, helgaas, stefan, lorenzo.pieralisi, linux-pci,
	dl-linux-imx, linux-arm-kernel, linux-kernel, kernel


> -----Original Message-----
> From: Krzysztof Wilczyński <kw@linux.com>
> Sent: Friday, February 19, 2021 1:34 AM
> 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; dl-linux-imx
> <linux-imx@nxp.com>; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; kernel@pengutronix.de
> Subject: [EXT] Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie
> [...]
> > > 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.
> [...]
> 
> If you do decide to send another version, then also use "PCIe" in the subject,
> rather than "pcie".  I forgot to mention this in the previous message,
> apologies.
> 
[Richard Zhu] Never mind. Thanks a lot for your comments.
Would issue another version a moment later.

Best Regards
Richard Zhu

> Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] PCI: imx6: Limit DBI register length for imx6qp PCIe
  2021-02-20  2:49 [PATCH] PCI: imx6: Limit DBI register length for imx6qp PCIe Richard Zhu
@ 2021-06-22  9:28 ` Lorenzo Pieralisi
  0 siblings, 0 replies; 7+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-22  9:28 UTC (permalink / raw)
  To: Richard Zhu, stefan, l.stach, bhelgaas, kw
  Cc: Lorenzo Pieralisi, linux-imx, linux-arm-kernel, linux-pci,
	kernel, linux-kernel

On Sat, 20 Feb 2021 10:49:47 +0800, Richard Zhu wrote:
> Changes from v1 to v2:
> - Add reviewed by Lucas and Krzysztof.
> - Refine the subject and commit refer to Krzysztof comments.
> 
> drivers/pci/controller/dwc/pci-imx6.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> [...]

Applied to pci/imx6, thanks!

[1/1] PCI: imx6: Limit DBI register length for imx6qp PCIe
      https://git.kernel.org/lpieralisi/pci/c/36ff5224f1

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] PCI: imx6: Limit DBI register length for imx6qp PCIe
@ 2021-02-20  2:49 Richard Zhu
  2021-06-22  9:28 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Zhu @ 2021-02-20  2:49 UTC (permalink / raw)
  To: l.stach, kw, bhelgaas, stefan, lorenzo.pieralisi
  Cc: linux-pci, linux-imx, linux-arm-kernel, linux-kernel, kernel

Changes from v1 to v2:
- Add reviewed by Lucas and Krzysztof.
- Refine the subject and commit refer to Krzysztof comments.

drivers/pci/controller/dwc/pci-imx6.c | 1 +
1 file changed, 1 insertion(+)

[PATCH v2] PCI: imx6: Limit DBI register length for imx6qp PCIe

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-22  9:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18  5:09 [PATCH] PCI: imx6: Limit DBI register length for imx6qp pcie Richard Zhu
2021-02-18  8:59 ` Lucas Stach
2021-02-18 11:55 ` Krzysztof Wilczyński
2021-02-18 17:34   ` Krzysztof Wilczyński
2021-02-20  1:27     ` [EXT] " Richard Zhu
2021-02-20  2:49 [PATCH] PCI: imx6: Limit DBI register length for imx6qp PCIe Richard Zhu
2021-06-22  9:28 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).