Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-04-10 Thread Mathias Nyman
On 10.04.2017 14:11, Peter Chen wrote: On Mon, Apr 10, 2017 at 01:13:54PM +0300, Mathias Nyman wrote: On 10.04.2017 05:57, Peter Chen wrote: On Thu, Mar 30, 2017 at 11:29:57AM +0300, Mathias Nyman wrote: the other way around. First you patch dma_alloc_coherent() to dma_zalloc_coherent() and t

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-04-10 Thread Peter Chen
On Mon, Apr 10, 2017 at 01:13:54PM +0300, Mathias Nyman wrote: > On 10.04.2017 05:57, Peter Chen wrote: > >On Thu, Mar 30, 2017 at 11:29:57AM +0300, Mathias Nyman wrote: > > the other way around. First you patch dma_alloc_coherent() to > dma_zalloc_coherent() and that could go in durin

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-04-10 Thread Mathias Nyman
On 10.04.2017 05:57, Peter Chen wrote: On Thu, Mar 30, 2017 at 11:29:57AM +0300, Mathias Nyman wrote: the other way around. First you patch dma_alloc_coherent() to dma_zalloc_coherent() and that could go in during the -rc and possibly get a stable tag, since spec requires kernel to zero the mem

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-04-09 Thread Peter Chen
On Thu, Mar 30, 2017 at 11:29:57AM +0300, Mathias Nyman wrote: > >> > >>the other way around. First you patch dma_alloc_coherent() to > >>dma_zalloc_coherent() and that could go in during the -rc and possibly > >>get a stable tag, since spec requires kernel to zero the memory area. > >> > >>-- > >>

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-30 Thread Mathias Nyman
On 30.03.2017 04:48, Peter Chen wrote: On Wed, Mar 29, 2017 at 11:06:53AM +0300, Felipe Balbi wrote: Hi, Peter Chen writes: According to xHCI ch4.20 Scratchpad Buffers A Scratchpad Buffer is a PAGESIZE block of system memory located on a PAGESIZE boundary ...

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-29 Thread Peter Chen
On Wed, Mar 29, 2017 at 11:06:53AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> > According to xHCI ch4.20 Scratchpad Buffers > >> > A Scratchpad Buffer is a PAGESIZE block of system memory > >> > located on a PAGESIZE boundary > >> > ... > >> > Software clears the

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-29 Thread Felipe Balbi
Hi, Peter Chen writes: >> > According to xHCI ch4.20 Scratchpad Buffers >> >A Scratchpad Buffer is a PAGESIZE block of system memory >> >located on a PAGESIZE boundary >> >... >> >Software clears the Scratchpad Buffer to ‘0’ >> > >> > So, we need to use dma pool for PAGES

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-29 Thread Peter Chen
On Wed, Mar 29, 2017 at 08:50:23AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > > According to xHCI ch4.20 Scratchpad Buffers > > A Scratchpad Buffer is a PAGESIZE block of system memory > > located on a PAGESIZE boundary > > ... > > Software clears the Scr

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-28 Thread Felipe Balbi
Hi, Peter Chen writes: > According to xHCI ch4.20 Scratchpad Buffers > A Scratchpad Buffer is a PAGESIZE block of system memory > located on a PAGESIZE boundary > ... > Software clears the Scratchpad Buffer to ‘0’ > > So, we need to use dma pool for PAGESIZE bound

[PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-28 Thread Peter Chen
According to xHCI ch4.20 Scratchpad Buffers A Scratchpad Buffer is a PAGESIZE block of system memory located on a PAGESIZE boundary ... Software clears the Scratchpad Buffer to ‘0’ So, we need to use dma pool for PAGESIZE boundary buffer, and zeroed its region using