lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 9 May 2022 12:16:31 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
Cc:     ryder.lee@...iatek.com, jianjun.wang@...iatek.com,
        lorenzo.pieralisi@....com, robh@...nel.org, kw@...ux.com,
        bhelgaas@...gle.com, p.zabel@...gutronix.de,
        matthias.bgg@...il.com, linux-pci@...r.kernel.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, kernel@...labora.com,
        nfraprado@...labora.com
Subject: Re: [PATCH] PCI: mediatek-gen3: Assert resets to ensure expected
 init state

On Mon, May 09, 2022 at 02:18:34PM +0200, AngeloGioacchino Del Regno wrote:
> Il 04/04/22 16:48, AngeloGioacchino Del Regno ha scritto:
> > The controller may have been left out of reset by the bootloader,
> > in which case, before the powerup sequence, the controller will be
> > found preconfigured with values that were set before booting the
> > kernel: this produces a controller failure, with the result of
> > a failure during the mtk_pcie_startup_port() sequence as the PCIe
> > link never gets up.
> > 
> > To ensure that we get a clean start in an expected state, assert
> > both the PHY and MAC resets before executing the controller
> > power-up sequence.
> > 
> > Fixes: d3bf75b579b9 ("PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192")
> > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> 
> Friendly ping for an important fix :-)

d3bf75b579b9 appeared in v5.13-rc1 (May 2021, a year ago), so I assume
this is important for v5.19, but not urgent enough to require being in
v5.18.  Right?

> > ---
> >   drivers/pci/controller/pcie-mediatek-gen3.c | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> > 
> > diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
> > index f7048ea4c020..dccdfce12b1c 100644
> > --- a/drivers/pci/controller/pcie-mediatek-gen3.c
> > +++ b/drivers/pci/controller/pcie-mediatek-gen3.c
> > @@ -838,6 +838,14 @@ static int mtk_pcie_setup(struct mtk_gen3_pcie *pcie)
> >   	if (err)
> >   		return err;
> > +	/*
> > +	 * The controller may have been left out of reset by the bootloader
> > +	 * so make sure that we get a clean start by asserting resets here.
> > +	 */
> > +	reset_control_assert(pcie->phy_reset);
> > +	reset_control_assert(pcie->mac_reset);
> > +	usleep_range(10, 20);
> > +
> >   	/* Don't touch the hardware registers before power up */
> >   	err = mtk_pcie_power_up(pcie);
> >   	if (err)
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists