diff options
author | Christoph Hellwig | 2019-08-16 08:24:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-08-21 10:03:35 -0700 |
commit | 7b81cb6bddd2c4f2489506771070924bd0ae9902 (patch) | |
tree | e93409bd98a306bc26cc19c1c6a29f70029d42a0 /drivers/usb/host/u132-hcd.c | |
parent | 0709831a50d31b3caf2237e8d7fe89e15b0d919d (diff) |
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>
Diffstat (limited to 'drivers/usb/host/u132-hcd.c')
-rw-r--r-- | drivers/usb/host/u132-hcd.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c index 400c40bc43a6..4efee34f154f 100644 --- a/drivers/usb/host/u132-hcd.c +++ b/drivers/usb/host/u132-hcd.c @@ -3077,8 +3077,6 @@ static int u132_probe(struct platform_device *pdev) retval = ftdi_read_pcimem(pdev, roothub.a, &rh_a); if (retval) return retval; - if (pdev->dev.dma_mask) - return -EINVAL; hcd = usb_create_hcd(&u132_hc_driver, &pdev->dev, dev_name(&pdev->dev)); if (!hcd) { |