Linux kernel -stable discussions
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting" failed to apply to 5.15-stable tree
@ 2021-11-14 14:13 gregkh
  2021-11-14 14:20 ` Pali Rohár
  0 siblings, 1 reply; 4+ messages in thread
From: gregkh @ 2021-11-14 14:13 UTC (permalink / raw)
  To: pali, kabel, lorenzo.pieralisi; +Cc: stable


The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From a4e17d65dafdd3513042d8f00404c9b6068a825c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Tue, 5 Oct 2021 20:09:41 +0200
Subject: [PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change PCIe Max Payload Size setting in PCIe Device Control register to 512
bytes to align with PCIe Link Initialization sequence as defined in Marvell
Armada 3700 Functional Specification. According to the specification,
maximal Max Payload Size supported by this device is 512 bytes.

Without this kernel prints suspicious line:

    pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 16384, max 512)

With this change it changes to:

    pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 512, max 512)

Link: https://lore.kernel.org/r/20211005180952.6812-3-kabel@kernel.org
Fixes: 8c39d710363c ("PCI: aardvark: Add Aardvark PCI host controller driver")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Marek Behún <kabel@kernel.org>
Cc: stable@vger.kernel.org

diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
index 596ebcfcc82d..884510630bae 100644
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -488,8 +488,9 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
 	reg = advk_readl(pcie, PCIE_CORE_PCIEXP_CAP + PCI_EXP_DEVCTL);
 	reg &= ~PCI_EXP_DEVCTL_RELAX_EN;
 	reg &= ~PCI_EXP_DEVCTL_NOSNOOP_EN;
+	reg &= ~PCI_EXP_DEVCTL_PAYLOAD;
 	reg &= ~PCI_EXP_DEVCTL_READRQ;
-	reg |= PCI_EXP_DEVCTL_PAYLOAD; /* Set max payload size */
+	reg |= PCI_EXP_DEVCTL_PAYLOAD_512B;
 	reg |= PCI_EXP_DEVCTL_READRQ_512B;
 	advk_writel(pcie, reg, PCIE_CORE_PCIEXP_CAP + PCI_EXP_DEVCTL);
 


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

* Re: FAILED: patch "[PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting" failed to apply to 5.15-stable tree
  2021-11-14 14:13 FAILED: patch "[PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting" failed to apply to 5.15-stable tree gregkh
@ 2021-11-14 14:20 ` Pali Rohár
  2021-11-15 15:33   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2021-11-14 14:20 UTC (permalink / raw)
  To: gregkh; +Cc: kabel, lorenzo.pieralisi, stable

On Sunday 14 November 2021 15:13:31 gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 5.15-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h

Hello Greg! Following patch is needed for PCI_EXP_DEVCTL_PAYLOAD_512B macro:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=460275f124fb072dca218a6b43b6370eebbab20d

> ------------------ original commit in Linus's tree ------------------
> 
> From a4e17d65dafdd3513042d8f00404c9b6068a825c Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
> Date: Tue, 5 Oct 2021 20:09:41 +0200
> Subject: [PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Change PCIe Max Payload Size setting in PCIe Device Control register to 512
> bytes to align with PCIe Link Initialization sequence as defined in Marvell
> Armada 3700 Functional Specification. According to the specification,
> maximal Max Payload Size supported by this device is 512 bytes.
> 
> Without this kernel prints suspicious line:
> 
>     pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 16384, max 512)
> 
> With this change it changes to:
> 
>     pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 512, max 512)
> 
> Link: https://lore.kernel.org/r/20211005180952.6812-3-kabel@kernel.org
> Fixes: 8c39d710363c ("PCI: aardvark: Add Aardvark PCI host controller driver")
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Signed-off-by: Marek Behún <kabel@kernel.org>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Reviewed-by: Marek Behún <kabel@kernel.org>
> Cc: stable@vger.kernel.org
> 
> diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
> index 596ebcfcc82d..884510630bae 100644
> --- a/drivers/pci/controller/pci-aardvark.c
> +++ b/drivers/pci/controller/pci-aardvark.c
> @@ -488,8 +488,9 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
>  	reg = advk_readl(pcie, PCIE_CORE_PCIEXP_CAP + PCI_EXP_DEVCTL);
>  	reg &= ~PCI_EXP_DEVCTL_RELAX_EN;
>  	reg &= ~PCI_EXP_DEVCTL_NOSNOOP_EN;
> +	reg &= ~PCI_EXP_DEVCTL_PAYLOAD;
>  	reg &= ~PCI_EXP_DEVCTL_READRQ;
> -	reg |= PCI_EXP_DEVCTL_PAYLOAD; /* Set max payload size */
> +	reg |= PCI_EXP_DEVCTL_PAYLOAD_512B;
>  	reg |= PCI_EXP_DEVCTL_READRQ_512B;
>  	advk_writel(pcie, reg, PCIE_CORE_PCIEXP_CAP + PCI_EXP_DEVCTL);
>  
> 

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

* Re: FAILED: patch "[PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting" failed to apply to 5.15-stable tree
  2021-11-14 14:20 ` Pali Rohár
@ 2021-11-15 15:33   ` Greg KH
  2021-11-15 15:38     ` Pali Rohár
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-11-15 15:33 UTC (permalink / raw)
  To: Pali Rohár; +Cc: kabel, lorenzo.pieralisi, stable

On Sun, Nov 14, 2021 at 03:20:33PM +0100, Pali Rohár wrote:
> On Sunday 14 November 2021 15:13:31 gregkh@linuxfoundation.org wrote:
> > The patch below does not apply to the 5.15-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hello Greg! Following patch is needed for PCI_EXP_DEVCTL_PAYLOAD_512B macro:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=460275f124fb072dca218a6b43b6370eebbab20d

Thanks, that solved the issue here for 5.10 and newer, but not for
4.9.y, 4.14.y, 4.19.y and 5.4.y.  Can you send fixes for them if it
matters?

thanks,

greg k-h

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

* Re: FAILED: patch "[PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting" failed to apply to 5.15-stable tree
  2021-11-15 15:33   ` Greg KH
@ 2021-11-15 15:38     ` Pali Rohár
  0 siblings, 0 replies; 4+ messages in thread
From: Pali Rohár @ 2021-11-15 15:38 UTC (permalink / raw)
  To: Greg KH; +Cc: Marek Behún, lorenzo.pieralisi, stable

On Monday 15 November 2021 16:33:35 Greg KH wrote:
> On Sun, Nov 14, 2021 at 03:20:33PM +0100, Pali Rohár wrote:
> > On Sunday 14 November 2021 15:13:31 gregkh@linuxfoundation.org wrote:
> > > The patch below does not apply to the 5.15-stable tree.
> > > If someone wants it applied there, or to any other stable or longterm
> > > tree, then please email the backport, including the original git commit
> > > id to <stable@vger.kernel.org>.
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > Hello Greg! Following patch is needed for PCI_EXP_DEVCTL_PAYLOAD_512B macro:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=460275f124fb072dca218a6b43b6370eebbab20d
> 
> Thanks, that solved the issue here for 5.10 and newer, but not for
> 4.9.y, 4.14.y, 4.19.y and 5.4.y.  Can you send fixes for them if it
> matters?

Marek told me that would take care of backporting aardvark related
patches to stable trees. He is already in CC list.

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

end of thread, other threads:[~2021-11-15 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-14 14:13 FAILED: patch "[PATCH] PCI: aardvark: Fix PCIe Max Payload Size setting" failed to apply to 5.15-stable tree gregkh
2021-11-14 14:20 ` Pali Rohár
2021-11-15 15:33   ` Greg KH
2021-11-15 15:38     ` Pali Rohár

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox