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

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

 



On Tue, 3 Dec 2019 01:18:24 -0800 Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:


> 
> 
> On Tue, Dec 03, 2019 at 09:05:23AM +0000, Jisheng Zhang wrote:
> > > >
> > > > eg. drivers/mmc/host/sdhci-of-dwcmshc.c
> > > >  
> > > Thanks for the suggestion! Christoph's suggestion can prevent the the issue
> > > from the block layer, thus the code can be shared across all  
> >
> > To be honest, I did consider similar solution from block layer, I.E set
> > the seg_boundary_mask, when submitting the workaround last year, but per
> > my understanding, SDHCI limitation is the physical DMA addr can't span one
> > specific boundary,  
> 
> As in exactly one boundary and not an alignment?  Where the one
> boundary is not a power of two and thus can't be expressed?

Take drivers/mmc/host/sdhci-of-dwcmshc.c for example, target physical DMA addr
can't span 128MB, 256MB, 128*3MB, ...128*nMB

I'm not sure whether blk_queue_segment_boundary could solve this limitation.

> 
> 
> > so setting seg_boundary_mask w/ blk_queue_segment_boundary
> > can't work. I'm not sure I understand blk_queue_segment_boundary() properly.
> > May Christoph help to clarify?
> >
> > From another side, drivers/ata/libata-sff.c also workaround the 64K phy DMA
> > boundary limitation itself rather than from block layer.  
> 
> As far as I can tell that workaround should use the segment boundary
> setting as well.





[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