On Mon, Mar 4, 2019 at 10:13 AM Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> 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. Thanks, Eric