[PATCH v5 5/6] PCI: imx6: Fix the regulator dump when link never came up

Hongxing Zhu hongxing.zhu at nxp.com
Wed Jan 5 19:49:38 PST 2022


> -----Original Message-----
> From: Fabio Estevam <festevam at gmail.com>
> Sent: Thursday, January 6, 2022 5:52 AM
> To: Hongxing Zhu <hongxing.zhu at nxp.com>
> Cc: Lucas Stach <l.stach at pengutronix.de>; Bjorn Helgaas
> <bhelgaas at google.com>; Mark Brown <broonie at kernel.org>;
> lorenzo.pieralisi at arm.com; jingoohan1 at gmail.com;
> stable at vger.kernel.org; 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
> Subject: Re: [PATCH v5 5/6] PCI: imx6: Fix the regulator dump when link
> never came up
> 
> Hi Richard,
> 
> On Wed, Jan 5, 2022 at 5:12 AM Richard Zhu <hongxing.zhu at nxp.com>
> wrote:
> >
> > When PCIe PHY link never came up and vpcie regulator is present, there
> > would be following dump when try to put the regulator.
> > Add a new host_exit() callback for i.MX PCIe driver to disable this
> > regulator and fix this dump when link never came up.
> >
> > The driver should undo any enables it did itself, and not undo any
> > enables that anything else did which means it should never be basing
> > decisions on regulator_is_enabled().
> >
> > To keep usage counter balance of the clocks, powers and so on. Do the
> > clock disable in the error handling after host_init too.
> >
> >   imx6q-pcie 33800000.pcie: Phy link never came up
> >   imx6q-pcie: probe of 33800000.pcie failed with error -110
> 
> Shouldn't we ignore the dw_pcie_wait_for_link() error?
> 
> At least, this was the intention of 886a9c134755 ("PCI: dwc: Move link
> handling into common code").
> 
> >   ------------[ cut here ]------------
> >   WARNING: CPU: 3 PID: 119 at drivers/regulator/core.c:2256
> _regulator_put.part.0+0x14c/0x158
> >   Modules linked in:
> 
> My concern is that this issue is still present in 5.15, which is LTS.
> 
> You only address this problem in 5/6 and I am not sure if the previous
> patches could be applied to stable as they are cleanups.
> 
> How can we fix this for 5.15 stable?
> 
> Could you make a minimal fix as the first patch of the series and cleanup
> patches later?
[Richard Zhu] Remove the stable kernel mail list firstly.
Yes, you're right.
It's difficult to merge this series back to 5.15 stable kernel, since the
 i.MX8MM PCIe support patch-set had been merged, and there are codes
 conflictions.

How about continue proceed your previous fix firstly?
https://patchwork.kernel.org/project/linux-pci/patch/20211104000202.4028036-1-festevam@gmail.com/
Then, I clean up the fix patch, and re-send my series later.
Because that I still want to save power consumption as much as possible
 when link is down.
BTW, please remove the timestamp in your patch if you agree this method,
and resend your patch.

Best Regards
Richard Zhu


More information about the linux-arm-kernel mailing list