android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Weitao Wang 5d952c7ae3 USB: HCD: Fix URB giveback issue in tasklet function
commit 26c6c2f8a907c9e3a2f24990552a4d77235791e6 upstream.

Usb core introduce the mechanism of giveback of URB in tasklet context to
reduce hardware interrupt handling time. On some test situation(such as
FIO with 4KB block size), when tasklet callback function called to
giveback URB, interrupt handler add URB node to the bh->head list also.
If check bh->head list again after finish all URB giveback of local_list,
then it may introduce a "dynamic balance" between giveback URB and add URB
to bh->head list. This tasklet callback function may not exit for a long
time, which will cause other tasklet function calls to be delayed. Some
real-time applications(such as KB and Mouse) will see noticeable lag.

In order to prevent the tasklet function from occupying the cpu for a long
time at a time, new URBS will not be added to the local_list even though
the bh->head list is not empty. But also need to ensure the left URB
giveback to be processed in time, so add a member high_prio for structure
giveback_urb_bh to prioritize tasklet and schelule this tasklet again if
bh->head list is not empty.

At the same time, we are able to prioritize tasklet through structure
member high_prio. So, replace the local high_prio_bh variable with this
structure member in usb_hcd_giveback_urb.

Fixes: 94dfd7edfd ("USB: HCD: support giveback of URB in tasklet context")
Cc: stable <[email protected]>
Reviewed-by: Alan Stern <[email protected]>
Signed-off-by: Weitao Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-08-25 11:17:26 +02:00
..
atm
c67x00
cdns3 usb: cdns3: fix race condition before setting doorbell 2021-10-06 15:42:30 +02:00
chipidea usb: chipidea: udc: check request status before setting device address 2022-06-29 08:58:47 +02:00
class usb: cdc-wdm: fix reading stuck on device close 2022-05-18 09:47:26 +02:00
common usb: ulpi: Call of_node_put correctly 2022-02-16 12:52:52 +01:00
core USB: HCD: Fix URB giveback issue in tasklet function 2022-08-25 11:17:26 +02:00
dwc2 usb: dwc2: Fix memory leak in dwc2_hcd_init 2022-06-22 14:11:23 +02:00
dwc3 usb: dwc3: gadget: Fix event pending check 2022-07-21 20:59:28 +02:00
early
gadget usb: gadget: u_ether: fix regression in setting fixed MAC address 2022-06-25 12:44:35 +02:00
host xhci: turn off port power in shutdown 2022-06-29 08:58:47 +02:00
image
isp1760
misc usb: misc: fix improper handling of refcount in uss720_probe() 2022-05-09 09:03:21 +02:00
mon
mtu3 usb: mtu3: fix USB 3.0 dual-role-switch from device to host 2022-05-09 09:03:20 +02:00
musb usb: musb: Fix missing of_node_put() in omap2430_probe 2022-06-14 18:11:51 +02:00
phy usb: phy: tahvo: add IRQ check 2021-09-15 09:47:35 +02:00
renesas_usbhs
roles
serial USB: serial: ftdi_sio: add Belimo device ids 2022-07-21 20:59:27 +02:00
storage USB: storage: karma: fix rio_karma_init return 2022-06-14 18:11:51 +02:00
typec usb: typec: add missing uevent when partner support PD 2022-07-21 20:59:28 +02:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-06-14 18:11:51 +02:00
Kconfig
Makefile
usb-skeleton.c