RE: [PATCH v2 2/2] mmc: renesas_sdhi: use multiple segments if possible

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

 



Hi Wolfram-san,

> From: Wolfram Sang, Sent: Monday, May 13, 2019 6:01 PM
> 
> Hi Shimoda-san,
> 
> thank you for this update!
> 
> > +static void renesas_sdhi_init_card(struct mmc_host *mmc, struct mmc_card *card)
> > +{
> > +	struct tmio_mmc_host *host = mmc_priv(mmc);
> > +
> > +	if (host->pdev->dev.iommu_group &&
> 
> I wonder if I am too cautious, but maybe we should have another
> condition here to be checked first, namely "host->mmc->max_segs < 512"?

I got it. I'll fix it on v3 patch.

> > +	    (mmc_card_mmc(card) || mmc_card_sd(card)))
> > +		host->mmc->max_segs = 512;
> > +	else
> > +		host->mmc->max_segs = host->pdata->max_segs;
> 
> max_segs can be 0, so we should probably have:
> 
>  +		host->mmc->max_segs = host->pdata->max_segs ?: 32;

Thank you for the point! I'll fix it on v3 patch.

> That also means, for the sys-dmac and Gen2, we then use 512 for the
> IOMMU case and 32 (default TMIO value) for the non IOMMU case. My
> understanding is that SYS DMAC can handle 512 in both cases. Maybe it
> makes sense then to make an incremental patch setting the max_segs value
> explicitly to 512 in the sys-dmac driver for Gen2?

I also think SYS DMAC can handle 512 segments. However, I'm not sure
it can improve the performance or not though. Anyway, an incremental patch
makes sense if needed, I think.

Best regards,
Yoshihiro Shimoda

> Kind regards,
> 
>    Wolfram





[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