android_kernel_msm-6.1_noth.../include/linux/usb
Weitao Wang 26c6c2f8a9 USB: HCD: Fix URB giveback issue in tasklet function
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 <stable@kernel.org>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Weitao Wang <WeitaoWang-oc@zhaoxin.com>
Link: https://lore.kernel.org/r/20220726074918.5114-1-WeitaoWang-oc@zhaoxin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-27 14:30:19 +02:00
..
audio-v2.h usb: audio-v2: add ability to define feature unit descriptor 2021-07-21 10:10:11 +02:00
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc-wdm.h
cdc.h
cdc_ncm.h
ch9.h headers/deps: USB: Optimize <linux/usb/ch9.h> dependencies, remove <linux/device.h> 2022-01-05 16:21:44 +01:00
chipidea.h
composite.h
ehci-dbgp.h
ehci_def.h USB: EHCI: Add alias for Broadcom INSNREG 2021-08-18 22:28:28 +02:00
ehci_pdriver.h
ezusb.h
functionfs.h
g_hid.h
gadget.h USB: gadget: Add ID numbers to gadget names 2022-05-11 18:59:25 +02:00
gadget_configfs.h
hcd.h USB: HCD: Fix URB giveback issue in tasklet function 2022-07-27 14:30:19 +02:00
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
m66592.h
musb-ux500.h
musb.h
net2280.h
of.h
ohci_pdriver.h
onboard_hub.h usb: misc: Add onboard_usb_hub driver 2022-07-08 14:53:50 +02:00
otg-fsm.h usb: otg-fsm: Fix hrtimer list corruption 2021-07-27 16:31:31 +02:00
otg.h usb: common: add helper to get role-switch-default-mode 2021-07-27 15:58:37 +02:00
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
pd_ado.h
pd_bdo.h usb: typec: tcpm: Fix undefined behavior due to shift overflowing the constant 2022-04-21 18:33:56 +02:00
pd_ext_sdb.h
pd_vdo.h
phy.h
phy_companion.h
quirks.h
r8a66597.h
r8152.h
renesas_usbhs.h
rndis_host.h rndis_host: enable the bogus MAC fixup for ZTE devices from cdc_ether 2022-04-14 15:08:12 +02:00
role.h usb: roles: fix include/linux/usb/role.h compile issue 2022-01-25 18:30:15 +01:00
serial.h USB-serial updates for 5.14-rc1 2021-06-24 12:54:28 +02:00
sl811.h
storage.h
tcpci.h usb: typec: tcpci: move tcpci.h to include/linux/usb/ 2022-07-08 14:51:16 +02:00
tcpm.h
tegra_usb_phy.h usb: phy: tegra: Support OTG mode programming 2021-10-05 12:47:49 +02:00
typec.h usb: typec: USB Power Delivery helpers for ports and partners 2022-06-12 06:49:47 +02:00
typec_altmode.h usb: typec_altmode: add a missing "@" at a kernel-doc parameter 2022-06-29 21:00:16 +02:00
typec_dp.h
typec_mux.h usb: typec: mux: Add CONFIG guards for functions 2022-06-21 16:38:14 +02:00
typec_retimer.h usb: typec: Add support for retimers 2022-07-14 16:24:05 +02:00
typec_tbt.h
uas.h
ulpi.h
usb338x.h
usb_phy_generic.h
usbnet.h cdc_ether: export usbnet_cdc_zte_rx_fixup 2022-04-14 15:08:12 +02:00
xhci-dbgp.h usb: early: xhci-dbc: Remove duplicate keep parsing 2022-03-15 18:20:34 +01:00