Re: [PATCH v2 01/10] PCI: Do not skip power managed bridges in pci_enable_wake()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 14, 2018 at 10:07 AM Mika Westerberg
<mika.westerberg@xxxxxxxxxxxxxxx> wrote:
>
> On Thu, Sep 13, 2018 at 04:33:39PM +0200, Rafael J. Wysocki wrote:
> > On Thursday, September 13, 2018 4:33:13 PM CEST Mika Westerberg wrote:
> > > Commit baecc470d5fd ("PCI / PM: Skip bridges in pci_enable_wake()")
> > > changed pci_enable_wake() so that all bridges are skipped when wakeup is
> > > enabled (or disabled) with the reasoning that bridges can only signal
> > > wakeup on behalf of their subordinate devices.
> > >
> > > However, there are bridges that can signal wakeup itself. For example
> > > PCIe downstream and root ports supporting hotplug may signal wakeup upon
> > > hotplug event.
> > >
> > > For this reason change pci_enable_wake() so that it skips all bridges
> > > except those that we power manage (->bridge_d3 is set). Those are the
> > > ones that can go into low power states and may need to signal wakeup.
> > >
> > > Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
> > > ---
> > >  drivers/pci/pci.c | 9 ++++++---
> > >  1 file changed, 6 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> > > index 29ff9619b5fa..1af6f1887986 100644
> > > --- a/drivers/pci/pci.c
> > > +++ b/drivers/pci/pci.c
> > > @@ -2133,10 +2133,13 @@ static int __pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable
> > >     int ret = 0;
> > >
> > >     /*
> > > -    * Bridges can only signal wakeup on behalf of subordinate devices,
> > > -    * but that is set up elsewhere, so skip them.
> > > +    * Bridges that are not power-manageable directly only signal
> > > +    * wakeup on behalf of subordinate devices which is set up
> > > +    * elsewhere, so skip them. However, bridges that are
> > > +    * power-manageable may signal wakeup for themselves (for example,
> > > +    * on a hotplug event) and they need to be covered here.
> > >      */
> > > -   if (pci_has_subordinate(dev))
> > > +   if (!pci_power_manageable(dev))
> > >             return 0;
> > >
> > >     /* Don't do the same thing twice in a row for one device. */
> > >
> >
> > Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> Thanks!
>
> For some reason this patch never hit the mailing lists (others did).
> Since you kept the whole context people should still be able to review
> it. I can resend this patch as well.

You may need to resend for Patchwork to pick it up, though.  Depends
on Bjorn I suppose.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux