All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Fix for the internal card reader and suspend on MacBooks
@ 2019-02-13 21:13 Ivan Mironov
  2019-02-13 21:13   ` [RFC,1/2] " Ivan Mironov
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Ivan Mironov @ 2019-02-13 21:13 UTC (permalink / raw)
  To: linux-usb
  Cc: linux-kernel, Greg Kroah-Hartman, Alan Stern, Martin Liu,
	YueHaibing, Mathias Nyman, Nicolas Boichat, Jon Flatley,
	Kai-Heng Feng, Benson Leung, Harry Pan, Jack Stocker,
	Danilo Krummrich, Samuel Sadok, Ivan Mironov

Hi all,

There is a known problem on some MacBooks: internal card reader
disappears after the first suspend/resume and all subsequent attempts
to suspend laptop are failing.

This was reported[1][2] and even discussed in the mailing lists[3],
without any real solution. After trying various things[4], including
some existing quirks, I discovered that switching link state to DISABLED
before suspend both fixes the card reader device and allows any subsequent
suspend to succeed.

First patch adds code for this new quirk, and second patch enables this
quirk for card reader device which is used in my macbook.

I'm not really familiar with either USB standards or kernel code to
support them, so this patch series is RFC. I'm especially unsure with the
"resume" part, because I implemented it by trial and error mostly.
However, I'm using kernel with these patches and it works for me.

Also, feel free to suggest other kernel patches or existing quirks or
quirk combinations to fix the same problem.

Oh, and by the way: I've checked schematics of various macbooks available
on the internet. It seems that the actual chip is Genesys Logic GL3219,
probably just with the custom ID. What I found curious, is that USB 2.0
pins of this chip (D+ and D-) are not really connected anywhere, but
instead shorted through the resistor. Could it be possible that this
somehow messes up some logic inside the device, host controller or
linux kernel?

[1] https://bugzilla.kernel.org/show_bug.cgi?id=111201
[2] https://bugzilla.kernel.org/show_bug.cgi?id=202509
[3] https://www.spinics.net/lists/linux-usb/msg164261.html
[4] https://github.com/im-0/investigate-card-reader-suspend-problem-on-mbp11.4

Ivan Mironov (2):
  usb: core: Add support of disabling SS link before system suspend
  usb: quirks: Add quirk to fix card reader and suspend on MacBooks

 drivers/usb/core/driver.c  |  6 +++
 drivers/usb/core/hub.c     | 84 ++++++++++++++++++++++++++++++++++++--
 drivers/usb/core/quirks.c  |  7 ++++
 include/linux/usb.h        |  3 ++
 include/linux/usb/quirks.h |  9 ++++
 5 files changed, 105 insertions(+), 4 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-02-25 13:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-13 21:13 [RFC PATCH 0/2] Fix for the internal card reader and suspend on MacBooks Ivan Mironov
2019-02-13 21:13 ` [RFC PATCH 1/2] usb: core: Add support of disabling SS link before system suspend Ivan Mironov
2019-02-13 21:13   ` [RFC,1/2] " Ivan Mironov
2019-02-13 21:13 ` [RFC PATCH 2/2] usb: quirks: Add quirk to fix card reader and suspend on MacBooks Ivan Mironov
2019-02-13 21:13   ` [RFC,2/2] " Ivan Mironov
2019-02-14  1:40 ` [RFC PATCH 0/2] Fix for the internal " Ivan Mironov
2019-02-14 17:32   ` Ivan Mironov
2019-02-25 13:52     ` Ivan Mironov
2019-02-14 15:03 ` Mathias Nyman
2019-02-14 15:03   ` [RFC,0/2] " Mathias Nyman
2019-02-14 17:20   ` [RFC PATCH 0/2] " Ivan Mironov
2019-02-14 17:20     ` [RFC,0/2] " Ivan Mironov
2019-02-18 18:50 ` [RFC PATCH 0/2] " Eric Blau

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.