From: "Bjørn Mork" <bjorn@mork.no>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Dan Williams <dan.j.williams@intel.com>,
USB list <linux-usb@vger.kernel.org>,
Linux-pm mailing list <linux-pm@vger.kernel.org>
Subject: Re: v3.16-rc1 regression? unexpected usb_autopm_get_interface error
Date: Mon, 16 Jun 2014 17:53:33 +0200 [thread overview]
Message-ID: <8738f426ma.fsf@nemi.mork.no> (raw)
In-Reply-To: <874mzkga1p.fsf@nemi.mork.no> ("Bjørn Mork"'s message of "Mon, 16 Jun 2014 17:15:46 +0200")
[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]
Bjørn Mork <bjorn@mork.no> writes:
> Alan Stern <stern@rowland.harvard.edu> writes:
>> On Mon, 16 Jun 2014, Bjørn Mork wrote:
>>> Bjørn Mork <bjorn@mork.no> writes:
>>>
>>> > So the problem is related to runtime suspend before first use. I
>>> > strongly suspect
>>> >
>>> > aae4518b3124 PM / sleep: Mechanism to avoid resuming runtime-suspended devices unnecessarily
>>>
>>> Nope, that was not it. So if blind guessing isn't going to work, then I
>>> guess there is no way around a bisect :-)
>>
>> You could simply wait for someone who knows the code to answer the
>> question. :-)
>
> Wait? Do I look like I'm patient :-)
>
> Besides, it was actually relieving to bisect a reliably reproducible
> non-crashing bug for once ;-)
>
>> I'm pretty sure this resulted from one of Dan Williams's changes to USB
>> port runtime PM. A whole bunch of them were added in 3.15-rc1.
>
> You are *so* much better at guessing than me:
>
> 9262c19d14c433a6a1ba25c3ff897cb89e412309 is the first bad commit
And for completeness, I just tried the following partial revert on top
of v3.16-rc1 and can confirm that it works fine for me:
[-- Attachment #2: 0001-usb-fix-port-runtime-pm-regression.patch --]
[-- Type: text/x-diff, Size: 1736 bytes --]
>From f8cba987220ae6cca98d662704256839968c6a61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
Date: Mon, 16 Jun 2014 17:26:05 +0200
Subject: [PATCH] usb: fix port runtime pm regression
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is a partial revert of commit 9262c19d14c4 ("usb: disable port
power control if not supported in wHubCharacteristics")
Fixes: 9262c19d14c4 ("usb: disable port power control if not supported in wHubCharacteristics")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
drivers/usb/core/port.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
index 62036faf56c0..13a2ffb4b18a 100644
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -411,15 +411,12 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
pm_runtime_set_active(&port_dev->dev);
- /*
- * Do not enable port runtime pm if the hub does not support
- * power switching. Also, userspace must have final say of
- * whether a port is permitted to power-off. Do not enable
- * runtime pm if we fail to expose pm_qos_no_power_off.
+ /* It would be dangerous if user space couldn't
+ * prevent usb device from being powered off. So don't
+ * enable port runtime pm if failed to expose port's pm qos.
*/
- if (hub_is_port_power_switchable(hub)
- && dev_pm_qos_expose_flags(&port_dev->dev,
- PM_QOS_FLAG_NO_POWER_OFF) == 0)
+ if (!dev_pm_qos_expose_flags(&port_dev->dev,
+ PM_QOS_FLAG_NO_POWER_OFF))
pm_runtime_enable(&port_dev->dev);
device_enable_async_suspend(&port_dev->dev);
--
1.7.10.4
[-- Attachment #3: Type: text/plain, Size: 162 bytes --]
But I'm not submitting that patch as I assume Dan wants to fix this up
properly. Whatever that is... I don't understand any of the port magic.
Bjørn
next prev parent reply other threads:[~2014-06-16 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87egyp8f70.fsf@nemi.mork.no>
2014-06-16 11:31 ` v3.16-rc1 regression? unexpected usb_autopm_get_interface error Bjørn Mork
2014-06-16 12:04 ` Bjørn Mork
2014-06-16 15:08 ` Alan Stern
2014-06-16 15:15 ` Bjørn Mork
2014-06-16 15:53 ` Bjørn Mork [this message]
2014-06-16 17:21 ` Alan Stern
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=8738f426ma.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=dan.j.williams@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox