All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongxing Zhu <hongxing.zhu@nxp.com>
To: Lucas Stach <l.stach@pengutronix.de>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH] PCI: imx6: Invoke the PHY exit function after PHY power off
Date: Thu, 17 Mar 2022 00:29:55 +0000	[thread overview]
Message-ID: <AS8PR04MB86761853B899882338FCE8678C129@AS8PR04MB8676.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <cf0943a1144e91048fc88fe9b11660bafe1a2d8d.camel@pengutronix.de>

> -----Original Message-----
> From: Lucas Stach <l.stach@pengutronix.de>
> Sent: 2022年3月16日 17:38
> To: Hongxing Zhu <hongxing.zhu@nxp.com>; bhelgaas@google.com;
> lorenzo.pieralisi@arm.com
> Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; kernel@pengutronix.de; dl-linux-imx
> <linux-imx@nxp.com>
> Subject: Re: [PATCH] PCI: imx6: Invoke the PHY exit function after PHY power
> off
> 
> Am Donnerstag, dem 03.03.2022 um 14:34 +0800 schrieb Richard Zhu:
> > To balance phy->init_count, invoke the phy_exit() after phy_power_off().
> >
> This looks okay as a fix, but overall I don't like that we need to have special PHY
> handling in the suspend path and PHY init hidden in
> imx6_pcie_assert_core_reset() in the resume path. Maybe we can make this
> PHY handling a bit more obvious by splitting it out of the core reset sequence. I
> don't see the full implications of such a change yet, but I think we should at
> least give it a try.
> 
> For now, this patch is:
> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Hi Lucas:
Thanks for your review comment.
Agree with you, the PHY handling shouldn't be include in the reset function.
I would plan to refine the PHY handling after this fix.

Best Regards
Richard Zhu

> 
> > Fixes: 178e244cb6e2 ("PCI: imx: Add the imx8mm pcie support")
> > Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> > ---
> >  drivers/pci/controller/dwc/pci-imx6.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> > b/drivers/pci/controller/dwc/pci-imx6.c
> > index 331490614d55..343fe1429e3c 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -973,6 +973,7 @@ static int imx6_pcie_suspend_noirq(struct device
> *dev)
> >  	case IMX8MM:
> >  		if (phy_power_off(imx6_pcie->phy))
> >  			dev_err(dev, "unable to power off PHY\n");
> > +		phy_exit(imx6_pcie->phy);
> >  		break;
> >  	default:
> >  		break;
> 


WARNING: multiple messages have this Message-ID (diff)
From: Hongxing Zhu <hongxing.zhu@nxp.com>
To: Lucas Stach <l.stach@pengutronix.de>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH] PCI: imx6: Invoke the PHY exit function after PHY power off
Date: Thu, 17 Mar 2022 00:29:55 +0000	[thread overview]
Message-ID: <AS8PR04MB86761853B899882338FCE8678C129@AS8PR04MB8676.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <cf0943a1144e91048fc88fe9b11660bafe1a2d8d.camel@pengutronix.de>

> -----Original Message-----
> From: Lucas Stach <l.stach@pengutronix.de>
> Sent: 2022年3月16日 17:38
> To: Hongxing Zhu <hongxing.zhu@nxp.com>; bhelgaas@google.com;
> lorenzo.pieralisi@arm.com
> Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; kernel@pengutronix.de; dl-linux-imx
> <linux-imx@nxp.com>
> Subject: Re: [PATCH] PCI: imx6: Invoke the PHY exit function after PHY power
> off
> 
> Am Donnerstag, dem 03.03.2022 um 14:34 +0800 schrieb Richard Zhu:
> > To balance phy->init_count, invoke the phy_exit() after phy_power_off().
> >
> This looks okay as a fix, but overall I don't like that we need to have special PHY
> handling in the suspend path and PHY init hidden in
> imx6_pcie_assert_core_reset() in the resume path. Maybe we can make this
> PHY handling a bit more obvious by splitting it out of the core reset sequence. I
> don't see the full implications of such a change yet, but I think we should at
> least give it a try.
> 
> For now, this patch is:
> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Hi Lucas:
Thanks for your review comment.
Agree with you, the PHY handling shouldn't be include in the reset function.
I would plan to refine the PHY handling after this fix.

Best Regards
Richard Zhu

> 
> > Fixes: 178e244cb6e2 ("PCI: imx: Add the imx8mm pcie support")
> > Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> > ---
> >  drivers/pci/controller/dwc/pci-imx6.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> > b/drivers/pci/controller/dwc/pci-imx6.c
> > index 331490614d55..343fe1429e3c 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -973,6 +973,7 @@ static int imx6_pcie_suspend_noirq(struct device
> *dev)
> >  	case IMX8MM:
> >  		if (phy_power_off(imx6_pcie->phy))
> >  			dev_err(dev, "unable to power off PHY\n");
> > +		phy_exit(imx6_pcie->phy);
> >  		break;
> >  	default:
> >  		break;
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-03-17  0:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03  6:34 [PATCH] PCI: imx6: Invoke the PHY exit function after PHY power off Richard Zhu
2022-03-03  6:34 ` Richard Zhu
2022-03-16  9:37 ` Lucas Stach
2022-03-16  9:37   ` Lucas Stach
2022-03-17  0:29   ` Hongxing Zhu [this message]
2022-03-17  0:29     ` Hongxing Zhu
2022-03-17  8:58 ` Lorenzo Pieralisi
2022-03-17  8:58   ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS8PR04MB86761853B899882338FCE8678C129@AS8PR04MB8676.eurprd04.prod.outlook.com \
    --to=hongxing.zhu@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.