linux-stable/drivers/usb
Thinh Nguyen 7441b27338 usb: dwc3: gadget: Fix event pending check
The DWC3_EVENT_PENDING flag is used to protect against invalid call to
top-half interrupt handler, which can occur when there's a delay in
software detection of the interrupt line deassertion.

However, the clearing of this flag was done prior to unmasking the
interrupt line, creating opportunity where the top-half handler can
come. This breaks the serialization and creates a race between the
top-half and bottom-half handler, resulting in losing synchronization
between the controller and the driver when processing events.

To fix this, make sure the clearing of the DWC3_EVENT_PENDING is done at
the end of the bottom-half handler.

Fixes: d325a1de49 ("usb: dwc3: gadget: Prevent losing events in event cache")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/8670aaf1cf52e7d1e6df2a827af2d77263b93b75.1656380429.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-29 21:04:54 +02:00
..
atm usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
c67x00 USB: c67x00: remove unnecessary check of res 2022-05-12 11:36:46 +02:00
cdns3 usb: cdnsp: Fixed setting last_trb incorrectly 2022-06-10 11:15:23 +02:00
chipidea usb: chipidea: udc: check request status before setting device address 2022-06-24 13:45:23 +02:00
class tty: remove CMSPAR ifdefs 2022-05-19 18:26:16 +02:00
common usb: common: usb-conn-gpio: Make VBUS supply completely optional 2022-03-15 18:22:15 +01:00
core USB: new quirk for Dell Gen 2 devices 2022-05-20 21:18:23 +02:00
dwc2 usb: dwc2: Fix memory leak in dwc2_hcd_init 2022-06-10 11:12:20 +02:00
dwc3 usb: dwc3: gadget: Fix event pending check 2022-06-29 21:04:54 +02:00
early usb: early: xhci-dbc: Fix xdbc number parsing 2022-03-15 18:20:34 +01:00
gadget USB: gadget: Fix double-free bug in raw_gadget driver 2022-06-24 13:45:21 +02:00
host xhci-pci: Allow host runtime PM as default for Intel Meteor Lake xHCI 2022-06-23 16:27:28 +02:00
image scsi: Remove drivers/scsi/scsi.h 2022-02-22 21:11:02 -05:00
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-05-19 18:10:59 +02:00
misc Revert "usb: misc: Add onboard_usb_hub driver" 2022-05-03 16:48:13 +02:00
mon
mtu3 usb: mtu3: fix USB 3.0 dual-role-switch from device to host 2022-04-21 19:06:41 +02:00
musb usb: musb: mediatek: Use clk_bulk API to simplify clock operations 2022-04-21 19:23:46 +02:00
phy Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
renesas_usbhs usb: renesas_usbhs: Use platform_get_irq() to get the interrupt 2021-12-21 08:51:57 +01:00
roles
serial USB: serial: option: add Quectel RM500K module support 2022-06-23 13:58:05 +02:00
storage usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
typec usb: typec: wcove: Drop wrong dependency to INTEL_SOC_PMIC 2022-06-21 16:28:05 +02:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-04-21 19:01:25 +02:00
Kconfig
Makefile
usb-skeleton.c