On Fri, Jan 20, 2017 at 3:38 PM, Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> wrote: > The warn on is a bit too much, we will anyway set the dma mask if not set > previously. > > The main reason for this fix is that 4.10-rc1 has a dwc3 change that > pass a parent sysdev dev pointer instead of setting the dma mask of > its xhci platform device. xhci platform driver can then get more > attributes from the sysdev than just the dma mask. > > The usb core and xhci changes are not yet in 4.10, and a fix like > this was preferred instead of taking those big changes this late in > the rc-cycle. > 100% reproducible on Intel Edison BEFORE # uname -a Linux buildroot 4.10.0-rc4-next-20170120+ #245 SMP Fri Jan 20 15:49:08 EET 2017 x86_64 GNU/Linux # dmesg | grep WARN [ 19.251111] WARNING: CPU: 0 PID: 1 at /home/andy/prj/linux-topic-mfld/drivers/usb/host/xhci-plat.c:168 xhci_pla t_probe+0x4a9/0x550 AFTER # uname -a Linux buildroot 4.10.0-rc4-next-20170120+ #246 SMP Fri Jan 20 15:52:10 EET 2017 x86_64 GNU/Linux # dmesg | grep WARN # Tested-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> > --- > drivers/usb/host/xhci-plat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c > index ddfab30..e5834dd 100644 > --- a/drivers/usb/host/xhci-plat.c > +++ b/drivers/usb/host/xhci-plat.c > @@ -165,7 +165,7 @@ static int xhci_plat_probe(struct platform_device *pdev) > return -ENODEV; > > /* Try to set 64-bit DMA first */ > - if (WARN_ON(!pdev->dev.dma_mask)) > + if (!pdev->dev.dma_mask) > /* Platform did not initialize dma_mask */ > ret = dma_coerce_mask_and_coherent(&pdev->dev, > DMA_BIT_MASK(64)); -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html