On Sun, Apr 29 2018, Christian Lütke-Stetzkamp wrote: > Current code uses linked DMA mode only when there is more than one > entry in the scatterlist. But the overhead of the linked DMA is very > small, so the code is easier when only using linked DMA and this is > also the way, the upstream driver mtk-sd handles it. > > Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx> > --- > drivers/staging/mt7621-mmc/sd.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c > index b51a4b156605..706eab4e1237 100644 > --- a/drivers/staging/mt7621-mmc/sd.c > +++ b/drivers/staging/mt7621-mmc/sd.c > @@ -1169,10 +1169,7 @@ static void msdc_dma_setup(struct msdc_host *host, struct msdc_dma *dma, > dma->sg = sg; > dma->sglen = sglen; > > - if (sglen == 1 && sg_dma_len(sg) <= MAX_DMA_CNT) > - dma->mode = MSDC_MODE_DMA_BASIC; > - else > - dma->mode = MSDC_MODE_DMA_DESC; > + dma->mode = MSDC_MODE_DMA_DESC; So now you can remove the MSDC_MODE_DMA_BASIC code, and remove the switch statement which chooses it, and the name itself. Lots of good cleanups happening here, thanks. NeilBrown > > N_MSG(DMA, "DMA mode<%d> sglen<%d> xfersz<%d>", dma->mode, dma->sglen, > host->xfer_size); > -- > 2.16.1
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel