[PATCH v3 3/7] PCI: imx6: Fix the regulator dump when link never came up
Richard Zhu
hongxing.zhu at nxp.com
Mon Oct 25 18:57:48 PDT 2021
> -----Original Message-----
> From: Francesco Dolcini <francesco.dolcini at toradex.com>
> Sent: Monday, October 25, 2021 7:13 PM
> To: Richard Zhu <hongxing.zhu at nxp.com>
> Cc: l.stach at pengutronix.de; bhelgaas at google.com;
> lorenzo.pieralisi at arm.com; jingoohan1 at gmail.com;
> linux-pci at vger.kernel.org; dl-linux-imx <linux-imx at nxp.com>;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org;
> kernel at pengutronix.de; Mark Brown <broonie at kernel.org>
> Subject: Re: [PATCH v3 3/7] PCI: imx6: Fix the regulator dump when link never
> came up
>
> Hello Richard,
> please see this comment from Mark,
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.ke
> rnel.org%2Fall%2FYXaGve1ZJq0DGZ9l%40sirena.org.uk%2F&data=04%7
> C01%7Chongxing.zhu%40nxp.com%7C27ddf15a4ef34496eff708d997a87097
> %7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637707571965246
> 405%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luM
> zIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nLZcGoLwXWEr
> HR14ZLg8prtPuotNWHBrQb8J99HiNT0%3D&reserved=0.
>
> Francesco
[Richard Zhu] Got that, thanks for your reminder.
Best Regards
Richard Zhu
>
>
> On Fri, Oct 22, 2021 at 03:12:26PM +0800, Richard Zhu wrote:
> > When PCIe PHY link never came up and vpcie regulator is present, there
> > would be following dump when try to put the regulator.
> > Disable this regulator to fix this dump when link never came up.
> >
> > imx6q-pcie 33800000.pcie: Phy link never came up
> > imx6q-pcie: probe of 33800000.pcie failed with error -110
> > ------------[ cut here ]------------
> > WARNING: CPU: 3 PID: 119 at drivers/regulator/core.c:2256
> _regulator_put.part.0+0x14c/0x158
> > Modules linked in:
> > CPU: 3 PID: 119 Comm: kworker/u8:2 Not tainted
> 5.13.0-rc7-next-20210625-94710-ge4e92b2588a3 #10
> > Hardware name: FSL i.MX8MM EVK board (DT)
> > Workqueue: events_unbound async_run_entry_fn
> > pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
> > pc : _regulator_put.part.0+0x14c/0x158
> > lr : regulator_put+0x34/0x48
> > sp : ffff8000122ebb30
> > x29: ffff8000122ebb30 x28: ffff800011be7000 x27: 0000000000000000
> > x26: 0000000000000000 x25: 0000000000000000 x24: ffff00000025f2bc
> > x23: ffff00000025f2c0 x22: ffff00000025f010 x21: ffff8000122ebc18
> > x20: ffff800011e3fa60 x19: ffff00000375fd80 x18: 0000000000000010
> > x17: 000000040044ffff x16: 00400032b5503510 x15:
> 0000000000000108
> > x14: ffff0000003cc938 x13: 00000000ffffffea x12: 0000000000000000
> > x11: 0000000000000000 x10: ffff80001076ba88 x9 : ffff80001076a540
> > x8 : ffff00000025f2c0 x7 : ffff0000001f4450 x6 : ffff000000176cd8
> > x5 : ffff000003857880 x4 : 0000000000000000 x3 : ffff800011e3fe30
> > x2 : ffff0000003cc4c0 x1 : 0000000000000000 x0 : 0000000000000001
> > Call trace:
> > _regulator_put.part.0+0x14c/0x158
> > regulator_put+0x34/0x48
> > devm_regulator_release+0x10/0x18
> > release_nodes+0x38/0x60
> > devres_release_all+0x88/0xd0
> > really_probe+0xd0/0x2e8
> > __driver_probe_device+0x74/0xd8
> > driver_probe_device+0x7c/0x108
> > __device_attach_driver+0x8c/0xd0
> > bus_for_each_drv+0x74/0xc0
> > __device_attach_async_helper+0xb4/0xd8
> > async_run_entry_fn+0x30/0x100
> > process_one_work+0x19c/0x320
> > worker_thread+0x48/0x418
> > kthread+0x14c/0x158
> > ret_from_fork+0x10/0x18
> > ---[ end trace 3664ca4a50ce849b ]---
> >
> > Link:
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
> > .kernel.org%2Fr%2F20201105211159.1814485-11-robh%40kernel.org&am
> p;data
> >
> =04%7C01%7Chongxing.zhu%40nxp.com%7C27ddf15a4ef34496eff708d997a
> 87097%7
> >
> C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63770757196524640
> 5%7CUnkno
> >
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h
> aWwiL
> >
> CJXVCI6Mn0%3D%7C1000&sdata=mJbSEVYuoGCbCOqqXdcUG00JXu74l
> 5%2BYxpzCX
> > yK96pE%3D&reserved=0
> > Fixes: 886a9c134755 ("PCI: dwc: Move link handling into common code")
> > Signed-off-by: Richard Zhu <hongxing.zhu at nxp.com>
> > ---
> > drivers/pci/controller/dwc/pci-imx6.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> > b/drivers/pci/controller/dwc/pci-imx6.c
> > index 3372775834a2..39a485bfc676 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -1180,8 +1180,12 @@ static int imx6_pcie_probe(struct
> platform_device *pdev)
> > return ret;
> >
> > ret = dw_pcie_host_init(&pci->pp);
> > - if (ret < 0)
> > + if (ret < 0) {
> > + if (imx6_pcie->vpcie
> > + && regulator_is_enabled(imx6_pcie->vpcie) > 0)
> > + regulator_disable(imx6_pcie->vpcie);
> > return ret;
> > + }
> >
> > if (pci_msi_enabled()) {
> > u8 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_MSI);
> > --
> > 2.25.1
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists
> > .infradead.org%2Fmailman%2Flistinfo%2Flinux-arm-kernel&data=04%
> 7C0
> >
> 1%7Chongxing.zhu%40nxp.com%7C27ddf15a4ef34496eff708d997a87097%7
> C686ea1
> >
> d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637707571965246405%7CUn
> known%7CTW
> >
> FpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
> VCI6
> >
> Mn0%3D%7C1000&sdata=SHLkdzTt2F1Nht9eoefHlEH9Klsnw3%2F7KOP
> uGGeI%2Ba
> > w%3D&reserved=0
More information about the linux-arm-kernel
mailing list