Re: [PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

2016-04-14 Thread Timur Tabi
On Tue, Mar 8, 2016 at 8:59 AM, Timur Tabi wrote: >> + /* Try setting the coherent_dma_mask to 64 bits, then try 32 bits >> */ >> + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); >> + if (ret) { >> + ret = dma_set_mask_and_coherent(&pdev->dev, >> DMA

RE: [PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

2016-03-08 Thread David Laight
From: Felipe Balbi > Sent: 08 March 2016 13:48 ... > wonder if we should provide a generic static inline for that. Seems like > that will replicate on many drivers. How about: > > static inline int dma_try_mask_and_coherent(struct device *dev) > { > int ret; > > ret = dma_set_mask

Re: [PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

2016-03-08 Thread Timur Tabi
Mathias Nyman wrote: Evolution of the patch can be found in this thread: http://www.spinics.net/lists/linux-usb/msg128495.html I think version 8 was the final one. I couldn't find any answers to my questions in that thread. The key change to the patch was made between v1 and v2: +

Re: [PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

2016-03-08 Thread Felipe Balbi
Hi, Mathias Nyman writes: > [ text/plain ] > On 04.03.2016 20:30, Timur Tabi wrote: >> On Fri, Oct 9, 2015 at 5:30 AM, Mathias Nyman >> wrote: >>> 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

Re: [PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

2016-03-08 Thread Mathias Nyman
On 04.03.2016 20:30, Timur Tabi wrote: On Fri, Oct 9, 2015 at 5:30 AM, Mathias Nyman wrote: 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 t

Re: [PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

2016-03-04 Thread Timur Tabi
On Fri, Oct 9, 2015 at 5:30 AM, Mathias Nyman wrote: > 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. I know this patch is a

[PATCH 4/6] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-10-09 Thread Mathias Nyman
From: 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 v4.3-rc1 and address new comment