Re: [PATCH 4/4] mmc: sdhci: Add DMA memory boundary workaround

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

 



Christoph Hellwig <hch@xxxxxxxxxxxxx> 于2019年12月3日周二 下午3:36写道:
>
> On Tue, Dec 03, 2019 at 11:29:15AM +0800, Jun Nie wrote:
> > Thanks for the reminder! So I need to parse the segment_boundary from
> > device tree and use below code to set it, right?
> > For the max_segments accounting error, I did not see it so far though I
> > believe it is true in theory. Maybe it is due to segment boundary value is
> > very large.
> >
> > +++ b/drivers/mmc/core/queue.c
> > @@ -374,6 +374,7 @@ static void mmc_setup_queue(struct mmc_queue *mq,
> > struct mmc_card *card)
> >                 WARN(!blk_queue_can_use_dma_map_merging(mq->queue,
> >                                                         mmc_dev(host)),
> >                      "merging was advertised but not possible");
> > +       blk_queue_segment_boundary(mq->queue, mmc->segment_boundary);
> >         blk_queue_max_segments(mq->queue, mmc_get_max_segments(host));
>
> Yes, I think should do it.  Maybe modulo a check if the low-level
> driver actually sets a segment boundary.

For the block device, such as SD card, it is right solution. But I
have concern on SDIO case. Maybe we should add workaround together
with block layer segment boundary restriction. How do you think about
it?

Jun




[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