summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Kumar <hemantk@codeaurora.org>2016-06-17 19:14:47 -0700
committerKyle Yan <kyan@codeaurora.org>2016-06-21 15:14:45 -0700
commit99cc257e08b666fde7ac5a9820f42c5c403772a2 (patch)
treec6d4d996cc2d1163195485c947b3db3e2a8c81c4
parent479ce8b7e82a3814e53a5ad41082bb537b990de7 (diff)
Revert "usb: dwc3: core: only setting the dma_mask when needed"
commit 19bacdc925055f020a ("usb: dwc3: core: only setting the dma_mask when needed") does not allow to modify dma mask if it is already set. Since the platform device has default 32-bit dma mask set change prevents to update the dma mask to 64-bit. This leads to kernel panic due to out of SW-IOMMU space when a function driver tries to map more than 32-bit wide address. Change-Id: I38b178f38277f9a2fa40735f4e15385638403ae6 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
-rw-r--r--drivers/usb/dwc3/core.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 03f71bf574e0..a395097a2098 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1194,11 +1194,9 @@ static int dwc3_probe(struct platform_device *pdev)
spin_lock_init(&dwc->lock);
- if (!dev->dma_mask) {
- dev->dma_mask = dev->parent->dma_mask;
- dev->dma_parms = dev->parent->dma_parms;
- dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask);
- }
+ dev->dma_mask = dev->parent->dma_mask;
+ dev->dma_parms = dev->parent->dma_parms;
+ dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask);
pm_runtime_no_callbacks(dev);
pm_runtime_set_active(dev);