Re: [PATCH] mmc: jz4740: rework pre_req/post_req implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Nov 2018 at 14:20, Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx> wrote:
>
> On Tuesday, November 20, 2018 19:19 -03, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
>
> > On 20 November 2018 at 19:21, Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx> wrote:
> > > As reported by Aaro, the JZ4740 MMC driver throws a warning
> > > when the kernel is built without preemption (CONFIG_PREEMPT_NONE=y).
> > >
> > > [   16.461094] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 567 host->next_data.cookie 568
> > > [   16.473120] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 568 host->next_data.cookie 569
> > > [   16.485144] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 569 host->next_data.cookie 570
> > > [   16.497170] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 570 host->next_data.cookie 571
> > > [   16.509194] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 571 host->next_data.cookie 572
> > > [   16.532421] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 572 host->next_data.cookie 573
> > > [   16.544594] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 573 host->next_data.cookie 574
> > > [   16.556621] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 574 host->next_data.cookie 575
> > > [   16.568638] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 575 host->next_data.cookie 576
> > > [   16.601092] jz4740-mmc 13450000.mmc: [jz4740_mmc_prepare_dma_data] invalid cookie: data->host_cookie 582 host->next_data.cookie 583
> > >
> > > The problem seems to be related to how pre_req/post_req is implemented.
> > > Currently, it seems the driver expects jz4740_mmc_prepare_dma_data()
> > > to be called with monotonically increasing host_cookie values,
> > > which is wrong.
> > >
> > > Moreover, the implementation is overly complicated, keeping track
> > > of unneeded "next cookie" state.
> > >
> > > So, instead of attempting to fix the current pre_req/post_req
> > > implementation, this commit refactors the driver, dropping
> > > the state, following other drivers such as dw_mmc and sdhci.
> > >
> > > Cc: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
> > > Cc: Mathieu Malaterre <malat@xxxxxxxxxx>
> > > Reported-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
> > > Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>
> >
> > This looks good to me, however because of the rather big changes I
> > doubt this can be tagged for stable - or did you have a try to apply
> > it for an old kernel?
> >
> > In either case, I can queue this up for next, which anyway seems like
> > it should be sufficient. Right?
> >
>
> Yes, that is enough for me.
>
> If anyone is interested in a fix for stable, it might go with
> disabling pre_req/post_req altogether.

Great!

[...]

Applied for next then, thanks!

Kind regards
Uffe



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux