Re: [PATCH v4] mmc: sdio: check the buffer address for sdio API

2017-02-15 Thread Russell King - ARM Linux
On Wed, Feb 15, 2017 at 12:12:47PM +0800, Shawn Lin wrote: > Hi Russell, > > On 2017/2/15 3:34, Russell King - ARM Linux wrote: > >On Tue, Feb 14, 2017 at 09:18:43AM -0700, Jens Axboe wrote: > >>The current situation seems like a bit of a mess. Why don't you have two > >>entry points, one for DMA

Re: [PATCH v4] mmc: sdio: check the buffer address for sdio API

2017-02-14 Thread Shawn Lin
Hi Russell, On 2017/2/15 3:34, Russell King - ARM Linux wrote: On Tue, Feb 14, 2017 at 09:18:43AM -0700, Jens Axboe wrote: The current situation seems like a bit of a mess. Why don't you have two entry points, one for DMA and one for PIO. If the caller doesn't know if he can use DMA, he'd bette

Re: [PATCH v4] mmc: sdio: check the buffer address for sdio API

2017-02-14 Thread Russell King - ARM Linux
On Tue, Feb 14, 2017 at 09:18:43AM -0700, Jens Axboe wrote: > The current situation seems like a bit of a mess. Why don't you have two > entry points, one for DMA and one for PIO. If the caller doesn't know if > he can use DMA, he'd better call the PIO variant. Either that, or audit > all callers a

Re: [PATCH v4] mmc: sdio: check the buffer address for sdio API

2017-02-14 Thread Jens Axboe
On 02/14/2017 02:17 AM, Ulf Hansson wrote: > +Russell, Jens, Christoph, linux-block (asking for help in review) > > On 7 February 2017 at 01:54, Shawn Lin wrote: >> It's fine if the host driver use PIO mode to transfer the >> vmalloc area buffer but not for DMA mode. The sdio APIs haven't >> prov

Re: [PATCH v4] mmc: sdio: check the buffer address for sdio API

2017-02-14 Thread Ulf Hansson
+Russell, Jens, Christoph, linux-block (asking for help in review) On 7 February 2017 at 01:54, Shawn Lin wrote: > It's fine if the host driver use PIO mode to transfer the > vmalloc area buffer but not for DMA mode. The sdio APIs haven't > provide the capability to tell the caller whether it wil