Skip to content

Commit 45d3944

Browse files
svenpeter42gregkh
authored andcommitted
usb: dwc3: support 64 bit DMA in platform driver
Currently, the dwc3 platform driver does not explicitly ask for a DMA mask. This makes it fall back to the default 32-bit mask which breaks the driver on systems that only have RAM starting above the first 4G like the Apple M1 SoC. Fix this by calling dma_set_mask_and_coherent with a 64bit mask. Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20210607061751.89752-1-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 60dfe48 commit 45d3944

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/dwc3/core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,10 @@ static int dwc3_probe(struct platform_device *pdev)
15451545

15461546
dwc3_get_properties(dwc);
15471547

1548+
ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64));
1549+
if (ret)
1550+
return ret;
1551+
15481552
dwc->reset = devm_reset_control_array_get_optional_shared(dev);
15491553
if (IS_ERR(dwc->reset))
15501554
return PTR_ERR(dwc->reset);

0 commit comments

Comments
 (0)