USB: Fix ehci infinite suspend-resume loop issue in zhaoxin
authorWeitao Wango <WeitaoWang-oc@zhaoxin.com>
Thu, 24 Mar 2022 12:17:35 +0000 (20:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Apr 2022 16:53:53 +0000 (18:53 +0200)
commitf085bd4bfe0907ce2fad2c787fc65871ec5ca6d6
tree77617e99a6b76fb214b5dd767c35c9efa2010540
parent8d084b2eae7fc5fcfc9f143cd7321a88e1cd76aa
USB: Fix ehci infinite suspend-resume loop issue in zhaoxin

In zhaoxin platform, some ehci projects will latch a wakeup signal
internal when plug in a device on port during system S0. This wakeup
signal will turn on when ehci runtime suspend, which will trigger a
system control interrupt that will resume ehci back to D0. As no
device connect, ehci will be set to runtime suspend and turn on the
internal latched wakeup signal again. It will cause a suspend-resume
loop and generate system control interrupt continuously.

Fixed this issue by clear wakeup signal latched in ehci internal when
ehci resume callback is called.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Weitao Wang <WeitaoWang-oc@zhaoxin.com>
Link: https://lore.kernel.org/r/20220324121735.3803-1-WeitaoWang-oc@zhaoxin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci.h