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: Wednesday, May 22, 2019 6:57 AM
> 
> Hi Shimoda-san,
> 
> > > > > +	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.
> >
> > I'm afraid but I misunderstood this condition is
> > "host->pdata->max_segs", not "host->mmc->max_segs", to avoid small
> > max_segs value than pdata->max_segs?
> 
> You are right. I was in deed thinking mmc->max_segs because it will be
> set at probe time, so it would work with values > 512. But I missed the
> case you described, I am sorry. But using pdata->max_segs should work.

Thank you for the reply. I got it!

> > (No one has such max_segs value at the moment though.)
> 
> Yes. I want to be future-proof here. Just to avoid that the value might
> be "magically" decreased if the value might be bigger than 512. It would
> be hard to find then because it is kinda deep in the driver.

I got it.

> Two more remarks:
> 
> * We should probably use a define for the magic value 512.

I think so. I also would like to use a define for a magic value 32.

> * Maybe you could add a comment to the init_card function describing why
>   we can increase max_segs in that case. Basically, a short summary of
>   your patch description.

It's a good idea! I'll add such a short summary.

> Does this make sense to you?

Yes. Thank you for your comments. I'll make v3 patch later.

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