linux/drivers/usb
Linyu Yuan 1ec145277a usb: dwc3: fix gadget mode suspend interrupt handler issue
[ Upstream commit 4e8ef34e36 ]

When work in gadget mode, currently driver doesn't update software level
link_state correctly as link state change event is not enabled for most
devices, in function dwc3_gadget_suspend_interrupt(), it will only pass
suspend event to UDC core when software level link state changes, so when
interrupt generated in sequences of suspend -> reset -> conndone ->
suspend, link state is not updated during reset and conndone, so second
suspend interrupt event will not pass to UDC core.

Remove link_state compare in dwc3_gadget_suspend_interrupt() and add a
suspended flag to replace the compare function.

Fixes: 799e9dc829 ("usb: dwc3: gadget: conditionally disable Link State change events")
Cc: stable <stable@kernel.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/20230512004524.31950-1-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 14:03:16 +01:00
..
atm
c67x00
cdns3
chipidea usb: chipidea: fix missing goto in ci_hdrc_probe 2023-05-11 23:03:30 +09:00
class USB: usbtmc: Fix direction for 0-length ioctl control messages 2023-05-24 17:32:48 +01:00
common
core
dwc2
dwc3 usb: dwc3: fix gadget mode suspend interrupt handler issue 2023-05-30 14:03:16 +01:00
early
gadget Revert "usb: gadget: udc: core: Invoke usb_gadget_connect only when started" 2023-05-24 17:32:49 +01:00
host xhci: Fix incorrect tracking of free space on transfer rings 2023-05-24 17:32:49 +01:00
image
isp1760
misc
mon
mtu3 usb: mtu3: fix kernel panic at qmu transfer done irq handler 2023-05-11 23:03:30 +09:00
musb
phy
renesas_usbhs
roles
serial
storage usb-storage: fix deadlock when a scsi command timeouts more than once 2023-05-24 17:32:48 +01:00
typec usb: typec: altmodes/displayport: fix pin_assignment_show 2023-05-24 17:32:48 +01:00
usbip
Kconfig
Makefile
usb-skeleton.c