Hi, Shuah Khan writes: > During dwc3_exynos_probe(), WARN_ON(!pdev->dev.dma_mask) is triggered from > xhci_plat_probe(). dwc3_host_init() doesn't configure DMA prior to adding > the platform device. > > dwc3_host_init() was changed to not configure DMA with the change to use > bus->sysdev for DMA config. > > sysdev_is_parent is not true for dwc3-exynos. This might be the reason why > there is a need to configure DMA in dwc3_host_init() prior to adding the > platform device for xhci in this path. > > This fix adds the DMA config to dwc3_host_init() without undoing any other > changes in > commit d64ff406e51e ("usb: dwc3: use bus->sysdev for DMA configuration") > > [ 3.372356] WARNING: CPU: 2 PID: 108 at drivers/usb/host/xhci-plat.c:168 xhc0 > [ 3.381381] Modules linked in: > [ 3.384373] CPU: 2 PID: 108 Comm: kworker/2:1 Not tainted 4.10.0-rc2-00250-g8 > [ 3.392783] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) > [ 3.398854] Workqueue: events deferred_probe_work_func > [ 3.403994] [] (unwind_backtrace) from [] (show_stack+0x) > [ 3.411696] [] (show_stack) from [] (dump_stack+0x78/0x8) > [ 3.418877] [] (dump_stack) from [] (__warn+0xe8/0x100) > [ 3.425796] [] (__warn) from [] (warn_slowpath_null+0x20) > [ 3.433344] [] (warn_slowpath_null) from [] (xhci_plat_p) > [ 3.441845] [] (xhci_plat_probe) from [] (platform_drv_p) > [ 3.450157] [] (platform_drv_probe) from [] (driver_prob) > [ 3.458994] [] (driver_probe_device) from [] (bus_for_ea) > [ 3.467485] [] (bus_for_each_drv) from [] (__device_atta) > [ 3.475716] [] (__device_attach) from [] (bus_probe_devi) > [ 3.483872] [] (bus_probe_device) from [] (device_add+0x) > [ 3.491741] [] (device_add) from [] (platform_device_add) > [ 3.499892] [] (platform_device_add) from [] (dwc3_host_) > [ 3.508379] [] (dwc3_host_init) from [] (dwc3_probe+0x94) > [ 3.516091] [] (dwc3_probe) from [] (platform_drv_probe+) > [ 3.523975] [] (platform_drv_probe) from [] (driver_prob) > [ 3.532814] [] (driver_probe_device) from [] (bus_for_ea) > [ 3.541306] [] (bus_for_each_drv) from [] (__device_atta) > [ 3.549538] [] (__device_attach) from [] (bus_probe_devi) > [ 3.557684] [] (bus_probe_device) from [] (device_add+0x) > [ 3.565582] [] (device_add) from [] (of_platform_device_) > [ 3.574586] [] (of_platform_device_create_pdata) from []) > [ 3.584722] [] (of_platform_bus_create) from [] (of_plat) > [ 3.593828] [] (of_platform_populate) from [] (dwc3_exyn) > [ 3.602660] [] (dwc3_exynos_probe) from [] (platform_drv) > [ 3.611150] [] (platform_drv_probe) from [] (driver_prob) > [ 3.619988] [] (driver_probe_device) from [] (bus_for_ea) > [ 3.628480] [] (bus_for_each_drv) from [] (__device_atta) > [ 3.636712] [] (__device_attach) from [] (bus_probe_devi) > [ 3.644857] [] (bus_probe_device) from [] (deferred_prob) > [ 3.653798] [] (deferred_probe_work_func) from [] (proce) > > Signed-off-by: Shuah Khan > --- > Arnd! I isolated the smallest change to avoid the WARN_ON. Please let me > know if this problem could be fixed in another way. > > drivers/usb/dwc3/host.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c > index 487f0ff..f68f71f 100644 > --- a/drivers/usb/dwc3/host.c > +++ b/drivers/usb/dwc3/host.c > @@ -84,7 +84,10 @@ int dwc3_host_init(struct dwc3 *dwc) > return -ENOMEM; > } > > + dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); > xhci->dev.parent = dwc->dev; > + xhci->dev.dma_mask = dwc->dev->dma_mask; > + xhci->dev.dma_parms = dwc->dev->dma_parms; this is the result of a missed patch. Mathias is discussing the proper fix for this. -- balbi