]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: add a HCD_DMA flag instead of guestimating DMA capabilities
authorChristoph Hellwig <hch@lst.de>
Fri, 16 Aug 2019 06:24:32 +0000 (08:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Aug 2019 17:03:35 +0000 (10:03 -0700)
commit7b81cb6bddd2c4f2489506771070924bd0ae9902
treee93409bd98a306bc26cc19c1c6a29f70029d42a0
parent0709831a50d31b3caf2237e8d7fe89e15b0d919d
usb: add a HCD_DMA flag instead of guestimating DMA capabilities

The usb core is the only major place in the kernel that checks for
a non-NULL device dma_mask to see if a device is DMA capable.  This
is generally a bad idea, as all major busses always set up a DMA mask,
even if the device is not DMA capable - in fact bus layers like PCI
can't even know if a device is DMA capable at enumeration time.  This
leads to lots of workaround in HCD drivers, and also prevented us from
setting up a DMA mask for platform devices by default last time we
tried.

Replace this guess with an explicit HCD_DMA that is set by drivers that
appear to have DMA support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20190816062435.881-4-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35 files changed:
drivers/staging/octeon-usb/octeon-hcd.c
drivers/usb/core/hcd.c
drivers/usb/dwc2/hcd.c
drivers/usb/host/ehci-grlib.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-pmcmsp.c
drivers/usb/host/ehci-ppc-of.c
drivers/usb/host/ehci-ps3.c
drivers/usb/host/ehci-sh.c
drivers/usb/host/ehci-xilinx-of.c
drivers/usb/host/fhci-hcd.c
drivers/usb/host/fotg210-hcd.c
drivers/usb/host/imx21-hcd.c
drivers/usb/host/isp116x-hcd.c
drivers/usb/host/isp1362-hcd.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-ppc-of.c
drivers/usb/host/ohci-ps3.c
drivers/usb/host/ohci-sa1111.c
drivers/usb/host/ohci-sm501.c
drivers/usb/host/ohci-tmio.c
drivers/usb/host/oxu210hp-hcd.c
drivers/usb/host/r8a66597-hcd.c
drivers/usb/host/sl811-hcd.c
drivers/usb/host/u132-hcd.c
drivers/usb/host/uhci-grlib.c
drivers/usb/host/uhci-pci.c
drivers/usb/host/uhci-platform.c
drivers/usb/host/xhci.c
drivers/usb/isp1760/isp1760-core.c
drivers/usb/isp1760/isp1760-if.c
drivers/usb/musb/musb_host.c
drivers/usb/renesas_usbhs/mod_host.c
include/linux/usb.h
include/linux/usb/hcd.h