Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-20 Thread Arnd Bergmann
On Wednesday 19 August 2015 14:28:33 Duc Dang wrote: > > Hi Arnd, > > So the check will look like this, please let me know what do you think: > if (!pdev->dev.dma_mask) { > WARN_ON(1); > /* Initialize dma_mask if the broken platform code has > not done so *

Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-19 Thread Duc Dang
On Sat, Aug 15, 2015 at 1:05 PM, Arnd Bergmann wrote: > > On Saturday 08 August 2015 13:31:02 Duc Dang wrote: > > > > > > If we know that pdev->dev.dma_mask will always be initialised at this > > > point, then the above change is fine. If not, it's introducing a > > > regression - dma_set_mask_an

Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-15 Thread Arnd Bergmann
On Saturday 08 August 2015 13:31:02 Duc Dang wrote: > > > > If we know that pdev->dev.dma_mask will always be initialised at this > > point, then the above change is fine. If not, it's introducing a > > regression - dma_set_mask_and_coherent() will fail if pdev->dev.dma_mask > > is NULL (depending

Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-08 Thread Duc Dang
On Sat, Aug 8, 2015 at 2:22 AM, Russell King - ARM Linux wrote: > On Fri, Aug 07, 2015 at 08:18:48PM -0700, Duc Dang wrote: >> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c >> index 890ad9d..5d03f8b 100644 >> --- a/drivers/usb/host/xhci-plat.c >> +++ b/drivers/usb/host/x

Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-08 Thread Russell King - ARM Linux
On Fri, Aug 07, 2015 at 08:18:48PM -0700, Duc Dang wrote: > diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c > index 890ad9d..5d03f8b 100644 > --- a/drivers/usb/host/xhci-plat.c > +++ b/drivers/usb/host/xhci-plat.c > @@ -93,14 +93,14 @@ static int xhci_plat_probe(struct plat

[PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-07 Thread Duc Dang
The xhci platform driver needs to work on systems that either only support 64-bit DMA or only support 32-bit DMA. Attempt to set a coherent dma mask for 64-bit DMA, and attempt again with 32-bit DMA if that fails. [dhdang: Regenerate the patch over 4.2-rc5] Signed-off-by: Mark Langsdorf Tested-by