linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: brcmstb: Assert fundamental reset on initialization
@ 2020-05-07 17:20 Nicolas Saenz Julienne
  2020-05-09 22:13 ` Jim Quinlan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicolas Saenz Julienne @ 2020-05-07 17:20 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, Lorenzo Pieralisi, Rob Herring,
	Florian Fainelli, bcm-kernel-feedback-list, Jeremy Linton,
	Andrew Murray, Jim Quinlan
  Cc: s.nawrocki, tim.gover, Bjorn Helgaas, linux-rpi-kernel,
	linux-arm-kernel, linux-pci, linux-kernel

While preparing the driver for upstream this detail was missed.

If not asserted during the initialization process, devices connected on
the bus will not be made aware of the internal reset happening. This,
potentially resulting in unexpected behavior.

Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 drivers/pci/controller/pcie-brcmstb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 0b97b94c4a9a..795a03be4150 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -699,6 +699,7 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
 
 	/* Reset the bridge */
 	brcm_pcie_bridge_sw_init_set(pcie, 1);
+	brcm_pcie_perst_set(pcie, 1);
 
 	usleep_range(100, 200);
 
-- 
2.26.2


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

* Re: [PATCH] PCI: brcmstb: Assert fundamental reset on initialization
  2020-05-07 17:20 [PATCH] PCI: brcmstb: Assert fundamental reset on initialization Nicolas Saenz Julienne
@ 2020-05-09 22:13 ` Jim Quinlan
  2020-05-09 22:19 ` Florian Fainelli
  2020-05-11 10:45 ` Lorenzo Pieralisi
  2 siblings, 0 replies; 4+ messages in thread
From: Jim Quinlan @ 2020-05-09 22:13 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: Lorenzo Pieralisi, Rob Herring, Florian Fainelli,
	maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE, Jeremy Linton,
	Andrew Murray, s.nawrocki, tim.gover, Bjorn Helgaas,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
	open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS, open list

On Thu, May 7, 2020 at 1:20 PM Nicolas Saenz Julienne
<nsaenzjulienne@suse.de> wrote:
>
> While preparing the driver for upstream this detail was missed.
>
> If not asserted during the initialization process, devices connected on
> the bus will not be made aware of the internal reset happening. This,
> potentially resulting in unexpected behavior.
Hi Nicolas,
I believe that most chips by design have the PERST signal asserted by
default during start-up but this will certainly cover any that do not.
Looks good.
Regards,
Jim
>
> Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver")
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>  drivers/pci/controller/pcie-brcmstb.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> index 0b97b94c4a9a..795a03be4150 100644
> --- a/drivers/pci/controller/pcie-brcmstb.c
> +++ b/drivers/pci/controller/pcie-brcmstb.c
> @@ -699,6 +699,7 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
>
>         /* Reset the bridge */
>         brcm_pcie_bridge_sw_init_set(pcie, 1);
> +       brcm_pcie_perst_set(pcie, 1);
>
>         usleep_range(100, 200);
>
> --
> 2.26.2
>

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

* Re: [PATCH] PCI: brcmstb: Assert fundamental reset on initialization
  2020-05-07 17:20 [PATCH] PCI: brcmstb: Assert fundamental reset on initialization Nicolas Saenz Julienne
  2020-05-09 22:13 ` Jim Quinlan
@ 2020-05-09 22:19 ` Florian Fainelli
  2020-05-11 10:45 ` Lorenzo Pieralisi
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2020-05-09 22:19 UTC (permalink / raw)
  To: Nicolas Saenz Julienne, Lorenzo Pieralisi, Rob Herring,
	Florian Fainelli, bcm-kernel-feedback-list, Jeremy Linton,
	Andrew Murray, Jim Quinlan
  Cc: s.nawrocki, tim.gover, Bjorn Helgaas, linux-rpi-kernel,
	linux-arm-kernel, linux-pci, linux-kernel



On 5/7/2020 10:20 AM, Nicolas Saenz Julienne wrote:
> While preparing the driver for upstream this detail was missed.
> 
> If not asserted during the initialization process, devices connected on
> the bus will not be made aware of the internal reset happening. This,
> potentially resulting in unexpected behavior.
> 
> Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver")
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH] PCI: brcmstb: Assert fundamental reset on initialization
  2020-05-07 17:20 [PATCH] PCI: brcmstb: Assert fundamental reset on initialization Nicolas Saenz Julienne
  2020-05-09 22:13 ` Jim Quinlan
  2020-05-09 22:19 ` Florian Fainelli
@ 2020-05-11 10:45 ` Lorenzo Pieralisi
  2 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2020-05-11 10:45 UTC (permalink / raw)
  To: Nicolas Saenz Julienne
  Cc: Rob Herring, Florian Fainelli, bcm-kernel-feedback-list,
	Jeremy Linton, Andrew Murray, Jim Quinlan, s.nawrocki, tim.gover,
	Bjorn Helgaas, linux-rpi-kernel, linux-arm-kernel, linux-pci,
	linux-kernel

On Thu, May 07, 2020 at 07:20:20PM +0200, Nicolas Saenz Julienne wrote:
> While preparing the driver for upstream this detail was missed.
> 
> If not asserted during the initialization process, devices connected on
> the bus will not be made aware of the internal reset happening. This,
> potentially resulting in unexpected behavior.
> 
> Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver")
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>  drivers/pci/controller/pcie-brcmstb.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to pci/brcmstb, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> index 0b97b94c4a9a..795a03be4150 100644
> --- a/drivers/pci/controller/pcie-brcmstb.c
> +++ b/drivers/pci/controller/pcie-brcmstb.c
> @@ -699,6 +699,7 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie)
>  
>  	/* Reset the bridge */
>  	brcm_pcie_bridge_sw_init_set(pcie, 1);
> +	brcm_pcie_perst_set(pcie, 1);
>  
>  	usleep_range(100, 200);
>  
> -- 
> 2.26.2
> 

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

end of thread, other threads:[~2020-05-11 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 17:20 [PATCH] PCI: brcmstb: Assert fundamental reset on initialization Nicolas Saenz Julienne
2020-05-09 22:13 ` Jim Quinlan
2020-05-09 22:19 ` Florian Fainelli
2020-05-11 10:45 ` 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).