diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-10 18:03:49 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-17 18:43:25 +0200 |
commit | 6eb0233ec2d0df288fe8515d5b0b2b15562e05bb (patch) | |
tree | c1783ef708221981298dc653bbaa7db2c851e1cb /drivers/of/unittest.c | |
parent | ARM/keystone: move the DMA offset handling under ifdef CONFIG_ARM_LPAE (diff) | |
download | linux-6eb0233ec2d0df288fe8515d5b0b2b15562e05bb.tar.xz linux-6eb0233ec2d0df288fe8515d5b0b2b15562e05bb.zip |
usb: don't inherity DMA properties for USB devices
As the comment in usb_alloc_dev correctly states, drivers can't use
the DMA API on usb device, and at least calling dma_set_mask on them
is highly dangerous. Unlike what the comment states upper level drivers
also can't really use the presence of a dma mask to check for DMA
support, as the dma_mask is set by default for most busses.
Setting the dma_mask comes from "[PATCH] usbcore dma updates (and doc)"
in BitKeeper times, as it seems like it was primarily for setting the
NETIF_F_HIGHDMA flag in USB drivers, something that has long been
fixed up since.
Setting the dma_pfn_offset comes from commit b44bbc46a8bb
("usb: core: setup dma_pfn_offset for USB devices and, interfaces"),
which worked around the fact that the scsi_calculate_bounce_limits
functions wasn't going through the proper driver interface to query
DMA information, but that function was removed in commit 21e07dba9fb1
("scsi: reduce use of block bounce buffers") years ago.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of/unittest.c')
0 files changed, 0 insertions, 0 deletions