android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Fredrik Noring 9b39b507a1 USB: Fix incorrect DMA allocations for local memory pool drivers
commit f8c63edfd78905320e86b6b2be2b7a5ac768fa4e upstream.

Fix commit 7b81cb6bdd ("usb: add a HCD_DMA flag instead of
guestimating DMA capabilities") where local memory USB drivers
erroneously allocate DMA memory instead of pool memory, causing

	OHCI Unrecoverable Error, disabled
	HC died; cleaning up

The order between hcd_uses_dma() and hcd->localmem_pool is now
arranged as in hcd_buffer_alloc() and hcd_buffer_free(), with the
test for hcd->localmem_pool placed first.

As an alternative, one might consider adjusting hcd_uses_dma() with

 static inline bool hcd_uses_dma(struct usb_hcd *hcd)
 {
-	return IS_ENABLED(CONFIG_HAS_DMA) && (hcd->driver->flags & HCD_DMA);
+	return IS_ENABLED(CONFIG_HAS_DMA) &&
+		(hcd->driver->flags & HCD_DMA) &&
+		(hcd->localmem_pool == NULL);
 }

One can also consider unsetting HCD_DMA for local memory pool drivers.

Fixes: 7b81cb6bdd ("usb: add a HCD_DMA flag instead of guestimating DMA capabilities")
Cc: stable <[email protected]>
Signed-off-by: Fredrik Noring <[email protected]>
Link: https://lore.kernel.org/r/20191210172905.GA52526@sx9
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-12-21 11:04:21 +01:00
..
atm USB: atm: ueagle-atm: add missing endpoint check 2019-12-17 19:55:44 +01:00
c67x00
cdns3 usb: cdns3: gadget: Fix g_audio use case when connected to Super-Speed host 2019-10-30 14:39:07 +01:00
chipidea Add role switch class support for chipidea 2019-09-05 10:02:07 +02:00
class USB: usblp: fix use-after-free on disconnect 2019-10-15 20:19:19 +02:00
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-17 19:55:39 +01:00
core USB: Fix incorrect DMA allocations for local memory pool drivers 2019-12-21 11:04:21 +01:00
dwc2 usb: dwc2: use a longer core rest timeout in dwc2_core_reset() 2019-12-04 22:30:45 +01:00
dwc3 usb: dwc3: ep0: Clear started flag on completion 2019-12-17 19:55:58 +01:00
early
gadget USB: dummy-hcd: increase max number of devices to 32 2019-12-17 19:56:52 +01:00
host xhci: make sure interrupts are restored to correct state 2019-12-17 19:55:38 +01:00
image USB: microtek: fix info-leak at probe 2019-10-04 11:02:58 +02:00
isp1760
misc USB: adutux: fix interface sanity check 2019-12-17 19:55:47 +01:00
mon usb: mon: Fix a deadlock in usbmon between mmap and read 2019-12-17 19:55:49 +01:00
mtu3 usb: mtu3: fix missing include of mtu3_dr.h 2019-10-27 08:58:44 +02:00
musb
phy
renesas_usbhs usb: renesas_usbhs: fix type of buf 2019-10-27 08:58:44 +02:00
roles usb: roles: fix a potential use after free 2019-12-17 19:55:46 +01:00
serial USB: serial: io_edgeport: fix epic endpoint lookup 2019-12-17 19:55:46 +01:00
storage USB: Fix incorrect DMA allocations for local memory pool drivers 2019-12-21 11:04:21 +01:00
typec usb: typec: fix use after free in typec_register_port() 2019-12-17 19:56:00 +01:00
usbip usbip: Fix uninitialized symbol 'nents' in stub_recv_cmd_submit() 2019-11-29 10:10:22 +01:00
Kconfig usb: common: create Kconfig file 2019-09-03 19:00:39 +02:00
Makefile
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00