diff mbox series

PCI: brcmstb: Assert fundamental reset on initialization

Message ID 20200507172020.18000-1-nsaenzjulienne@suse.de (mailing list archive)
State Mainlined
Commit 22e21e51ce755399fd42055a3f668ee4af370881
Headers show
Series PCI: brcmstb: Assert fundamental reset on initialization | expand

Commit Message

Nicolas Saenz Julienne May 7, 2020, 5:20 p.m. UTC
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(+)

Comments

Jim Quinlan May 9, 2020, 10:13 p.m. UTC | #1
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
>
Florian Fainelli May 9, 2020, 10:19 p.m. UTC | #2
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>
Lorenzo Pieralisi May 11, 2020, 10:45 a.m. UTC | #3
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
>
diff mbox series

Patch

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);