android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Rohith Kollalsi b269576798 usb: dwc3: Don't perform pm rt sync operations in atomic context
For mass storage function driver ep_disable will be called in worker
thread context. Making sure controller is active and then calling
ep_disable and then putting controller back to lpm is very difficult
to achieve in mass storage driver. The reason is that fsg_disable
raises an exception which actaully waits for the completion
callback to come from gadget driver and if for some reason (like
command timeout error) if it doesn't, then do_set_iterface will
not be called which will do put_sync. This can prevent controller
from going to lpm.

To solve above problem, commit ad8d260c33 ("usb: dwc3: gadget: Check
controller status with endpoint enable/disable") moved pm_runtime_sync
operations from mass storage driver to gadget driver. But there is a
chance that pm_runtime get_sync and put sync operations in gadget
driver can be called in atomic context (taking spin_lock in function
driver and then calling) and lead to crash. Adding in_lpm check and
performing these operations only if controller is in lpm will ensure
that these operations will be done only for mass storage driver and
not be done in atomic context. For other function drivers where
ep_disable will be called in atomic context, there is no chance that
ep_disable will be called when controller is in lpm as bh_work or
resume work will be called and will ensure controller to be out of
LPM before ep_disable is called.

Change-Id: I37635fd75e44a67deadbd4796b757d85d604aed4
Signed-off-by: Rohith Kollalsi <[email protected]>
2021-09-15 09:25:14 -07:00
..
atm
c67x00
cdns3
chipidea
class
common
core Merge "usb: core: Do not choose configuration if actconfig is valid" 2021-05-24 01:29:36 -07:00
dwc2
dwc3 usb: dwc3: Don't perform pm rt sync operations in atomic context 2021-09-15 09:25:14 -07:00
early
gadget USB: u_ether: Prevent unclocked access when running rndis interface down 2021-09-15 09:22:37 -07:00
host usb: xhci: Avoid NULL pointer access of sec event ring 2021-09-09 04:14:53 -07:00
image
isp1760
misc usb: misc: nb7vpq904m: fix disconnect api 2021-05-14 12:50:58 +08:00
mon
mtu3
musb
pd
phy Merge "usb: phy: Drive a pulse on DP on CDP detection" 2021-05-12 23:55:15 -07:00
renesas_usbhs
roles
serial
storage
typec Merge "Merge android11-5.4.86+ (5d7dfa3) into msm-5.4" 2021-04-26 08:14:44 -07:00
usbip
Kconfig
Makefile
usb-skeleton.c