linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Eric Blau <eblau@eblau.com>
Cc: Ivan Mironov <mironov.ivan@gmail.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-usb@vger.kernel.org
Subject: [regression] USB power management failure to suspend / high CPU usage
Date: Thu, 21 Mar 2019 16:54:01 +0200	[thread overview]
Message-ID: <a2a27078-88b1-139b-d706-25a175fbf9e5@linux.intel.com> (raw)

On 21.3.2019 15.32, Eric Blau wrote:
> On Mon, Mar 4, 2019 at 10:13 AM Mathias Nyman
> <mathias.nyman@linux.intel.com> wrote:
>>
>> On 26.2.2019 0.11, Ivan Mironov wrote:
>>> Hi Mathias,
>>>
>>> I applied your patch on top of v5.0-rc8 and tested it on my laptop.
>>>
>>> It fixes the suspend problem from the kernel side, but there is another
>>> one: starting with the second suspend, XHCI controller wakes up the
>>> system just after few seconds after suspending. Laptop keeps looping
>>> through suspend/resume while lid is closed.
>>>
>>> Such behaviour is quite stable: I was able to reproduce this three
>>> times with reboots in between. Corresponding dmesg and traces are here
>>> (from one run only):
>>> https://github.com/im-0/investigate-card-reader-suspend-problem-on-mbp11.4/tree/master/test-22
>>>
>>> After disabling ACPI wake up on XHC1 (echo XHC1 >/proc/acpi/wakeup),
>>> everything works as expected: suspend/resume works fine multiple times,
>>> card reader remains missing after the first suspend/resume.
>>>
>>
>> Thanks, logs show it's no longer in a similar loop attempting so suspend
>> the bus, but device instead goes between polling, rxDetect and compliance,
>> modes, sometimes with cold attach status flag seen.
>>
>> Most of the time is now spent resetting the device.
>>
>> I have yet another patch, this one will just log the portstatus.
>> I'd like to know if we are doing something odd when resuming the port
>> that causes it to get stuck.
>>
>> Patch attached, can you try it out?
>>
>> Also available from my port-debug branch:
>> git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git port-debug
> 
> Where do we stand with this fix? Were you able to try out this port
> debug patch, Ivan?
> 
> I normally run with ACPI wakeup disabled on XHC1 but if more debugging
> is needed, I can enable wakeup again and try to reproduce what Ivan is
> seeing. Just let me know. For now, I've been applying Mathias previous
> patch to the latest kernels and have been suspending, hibernating and
> resuming successfully with the card reader disabled.
> 

Just added the patch to my for-usb-linus branch, will send it forward tomorrow

-Mathias

             reply	other threads:[~2019-03-21 14:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 14:54 Mathias Nyman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-21 15:40 [regression] USB power management failure to suspend / high CPU usage Eric Blau
2019-03-21 13:32 Eric Blau
2019-03-04 15:53 Eric Blau
2019-03-04 15:15 Mathias Nyman
2019-02-25 22:11 Ivan Mironov
2019-02-22  1:05 Eric Blau
2019-02-20 17:28 Mathias Nyman
2019-02-14 14:57 Mathias Nyman

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=a2a27078-88b1-139b-d706-25a175fbf9e5@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=eblau@eblau.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mironov.ivan@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).