All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Len Brown <lenb@kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>
Subject: Re: [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications
Date: Thu, 28 Mar 2013 22:27:08 +0100	[thread overview]
Message-ID: <2990024.LMTIBUbM3d@vostro.rjw.lan> (raw)
In-Reply-To: <51548C9E.9090703@fold.natur.cuni.cz>

On Thursday, March 28, 2013 07:31:58 PM Martin Mokrejs wrote:
> Hi Bjorn,
> 
> Bjorn Helgaas wrote:
> > On Thu, Mar 28, 2013 at 11:26 AM, Martin Mokrejs
> > <mmokrejs@fold.natur.cuni.cz> wrote:
> >>
> >>
> >> Rafael J. Wysocki wrote:
> >>> On Thursday, March 28, 2013 10:46:10 AM Bjorn Helgaas wrote:
> >>>> On Thu, Mar 28, 2013 at 10:41 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> >>>>> On Thursday, March 28, 2013 10:21:30 AM Bjorn Helgaas wrote:
> >>>>>> On Thu, Mar 28, 2013 at 6:57 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> >>>>>>> Hi Bjorn,
> >>>>>>>
> >>>>>>> I wonder what you think about the patch below?
> >>>>>>
> >>>>>> Seems fine to me (I'm trusting your and Matthew's judgment here since
> >>>>>> I don't know much about it).  Why don't you resend it with Matthew's
> >>>>>> ack and the appropriate stable tags, and I'll put it in.
> >>>>>
> >>>>> I will, thanks!
> >>>>>
> >>>>>> If you have
> >>>>>> a URL for a bugzilla or mailing list report of the original problem,
> >>>>>> that would be good, too.  It'd be nice if users and distros could
> >>>>>> match problem reports with this solution, but I can't tell what the
> >>>>>> user-visible issue was.  I assume that Sarah tested this (or somebody
> >>>>>> else reproduced the problem and tested the fix)?
> >>>>>
> >>>>> Sarah reported it to me privately and I'm afraid I don't have any pointers
> >>>>> to publicly available mailing list archives etc.
> >>>>
> >>>> Do you at least have a description of how a user could determine
> >>>> whether he is seeing the problem fixed by this patch?
> >>>
> >>> Yeah.  For example, when the problem is visible on a USB controller and that
> >>> controller is runtime-suspended, then plugging a new USB device into one
> >>> of the controller's ports won't wake the controller up without the patch.
> >>
> >> Hi,
> >>  I am wondering for a week or two why nobody answered any of my bug reports,
> >> not even Sarah who asked for more details. I am think the fix is about my report
> >> under thread "Re: 3.8.2: xhci port is dead until pcieport PME# goes to disabled"
> >> and I really wonder why I wasn't Cc:ed and listed as a reporter provided it is
> >> about my report. But I should better wait what Sarah says. ;-)
> > 
> > I haven't forgotten about your hotplug issues, but I've been on
> > vacation for a week and have been working on the similar issue
> > reported by Chris Clayton
> > (https://bugzilla.kernel.org/show_bug.cgi?id=54981) because it seemed
> > a bit more tractable.  But I'll get back to yours eventually :)
> > Unfortunately nobody else seems to be jumping in to help, and I can
> > only do so much by myself.
> > 
> > I haven't been following your XHCI issue at all, but one thing you
> 
> But please do so now. If we are talking about an existing patch it should be
> possible to say whether what I observed is likely to be fixed by the patch.
> I will happily discuss then why I loose interrupts in a same way for my
> rtl8169 network card and why this PME# stuff happens for me only with 3.8
> and not 3.7 (unlike what Sarah claims). I am not arguing that something 
> else makes 3.7 be able to wakeup the device and overcome the same bug
> while "it" is gone from 3.8. I think this should be an easy task for you,
> pci devs. ;-)

OK, let's try to establish facts.

Does the patch below causes the PCI PM issues you're seeing to go away?

If it doesn't make all of them go away, does it make *some* of them go away?

If that is the case, which of the problems remain after applying it (on top
of the Linus' current tree)?

Rafael


---
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Subject: PCI / PM: Disable runtime PM of PCIe ports

The runtime PM of PCIe ports turns out to be quite fragile, as in
some cases things work while in some other cases they don't and we
don't seem to have a good way to determine whether or not they are
going to work in advance.

For this reason, avoid enabling runtime PM for PCIe ports by
keeping their runtime PM reference counters always above 0 for the
time being.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/pci/pcie/portdrv_pci.c |    5 -----
 1 file changed, 5 deletions(-)

Index: linux-pm/drivers/pci/pcie/portdrv_pci.c
===================================================================
--- linux-pm.orig/drivers/pci/pcie/portdrv_pci.c
+++ linux-pm/drivers/pci/pcie/portdrv_pci.c
@@ -225,16 +225,11 @@ static int pcie_portdrv_probe(struct pci
 	 * it by default.
 	 */
 	dev->d3cold_allowed = false;
-	if (!pci_match_id(port_runtime_pm_black_list, dev))
-		pm_runtime_put_noidle(&dev->dev);
-
 	return 0;
 }
 
 static void pcie_portdrv_remove(struct pci_dev *dev)
 {
-	if (!pci_match_id(port_runtime_pm_black_list, dev))
-		pm_runtime_get_noresume(&dev->dev);
 	pcie_port_device_remove(dev);
 	pci_disable_device(dev);
 }

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-03-28 21:19 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-23 14:33 [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications Rafael J. Wysocki
2013-03-23 16:22 ` Matthew Garrett
2013-03-25 16:45 ` Sarah Sharp
2013-03-25 22:34   ` Rafael J. Wysocki
2013-03-28 12:57 ` Rafael J. Wysocki
2013-03-28 16:21   ` Bjorn Helgaas
2013-03-28 16:41     ` Rafael J. Wysocki
2013-03-28 16:46       ` Bjorn Helgaas
2013-03-28 16:59         ` Rafael J. Wysocki
2013-03-28 17:26           ` Martin Mokrejs
2013-03-28 17:49             ` Bjorn Helgaas
2013-03-28 18:23               ` Sarah Sharp
2013-03-28 19:12                 ` Bjorn Helgaas
2013-03-28 19:42                   ` Martin Mokrejs
2013-03-28 18:31               ` Martin Mokrejs
2013-03-28 21:27                 ` Rafael J. Wysocki [this message]
2013-03-29  7:41                   ` huang ying
2013-03-31  2:29                     ` Martin Mokrejs
2013-03-30  2:03                   ` Martin Mokrejs
2013-04-02  5:25                     ` huang ying
2013-04-02 15:02                       ` Martin Mokrejs
2013-04-02 16:08                         ` huang ying
2013-04-02 16:53                           ` Martin Mokrejs
2013-04-02 16:30                         ` Bjorn Helgaas
     [not found]                           ` <515B17D9.6030805@fold.natur.cuni.cz>
2013-04-02 20:55                             ` Martin Mokrejs
2013-04-02 22:16                               ` Sarah Sharp
2013-04-03 10:35                                 ` Martin Mokrejs
2013-04-03  2:34                               ` huang ying
2013-04-03 10:39                                 ` Martin Mokrejs
2013-04-03 12:16                               ` Martin Mokrejs
2013-04-04 11:30                                 ` Huang Ying
2013-04-04 19:19                                   ` Sarah Sharp
2013-04-05 12:30                                     ` Martin Mokrejs
2013-04-05 12:40                                   ` Martin Mokrejs
2013-04-19 23:49                                     ` Martin Mokrejs
2013-04-30 20:47                                       ` Martin Mokrejs
2013-04-02 22:49                           ` Rafael J. Wysocki
2013-04-02 23:58                             ` Bjorn Helgaas
2013-04-03 11:00                               ` Rafael J. Wysocki
2013-04-03  2:04                           ` huang ying
2013-04-03 17:29                             ` Bjorn Helgaas
2013-03-30 22:38                   ` [Update][PATCH] PCI / PM: Disable runtime PM of PCIe ports Rafael J. Wysocki
2013-04-01 17:34                     ` Bjorn Helgaas
2013-04-01 20:51                       ` Rafael J. Wysocki
2013-04-01 20:53                         ` Bjorn Helgaas
2013-04-01 21:24                           ` Rafael J. Wysocki
2013-04-01 23:20                             ` Rafael J. Wysocki
2013-04-01 21:48                           ` Martin Mokrejs
2013-04-02  5:34                           ` huang ying
2013-04-02  5:28                         ` huang ying
2013-04-02  5:31                           ` huang ying
2013-04-03 22:34                     ` Bjorn Helgaas
2013-03-28 17:10 ` [Resend][PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications Rafael J. Wysocki
2013-03-28 21:07   ` [Update][PATCH] " Rafael J. Wysocki
2013-03-29 15:05     ` Martin Mokrejs
2013-03-29 16:05       ` Sarah Sharp
2013-03-29 17:11         ` Martin Mokrejs
2013-03-29 18:16           ` Martin Mokrejs
2013-03-29 21:37         ` Rafael J. Wysocki
2013-03-29 21:34       ` Rafael J. Wysocki
2013-04-03 22:38     ` Bjorn Helgaas

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=2990024.LMTIBUbM3d@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=bhelgaas@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=mmokrejs@fold.natur.cuni.cz \
    --cc=sarah.a.sharp@linux.intel.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.