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 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.

> (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.

Two more remarks:

* We should probably use a define for the magic value 512.

* 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.

Does this make sense to you?

Kind regards,

   Wolfram

Attachment: signature.asc
Description: PGP signature


[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