Re: [PATCH] [RFC] mmc: sdhci: Always apply sdhci-caps-mask and sdhci-caps to caps

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

 



On 20/12/22 05:42, Marek Vasut wrote:
> On 12/20/22 04:04, Bough Chen wrote:
>>> -----Original Message-----
>>> From: Marek Vasut <marex@xxxxxxx>
>>> Sent: 2022年12月20日 9:53
>>> To: linux-mmc@xxxxxxxxxxxxxxx
>>> Cc: Marek Vasut <marex@xxxxxxx>; Adrian Hunter <adrian.hunter@xxxxxxxxx>;
>>> Ulf Hansson <ulf.hansson@xxxxxxxxxx>; Zach Brown <zach.brown@xxxxxx>
>>> Subject: [PATCH] [RFC] mmc: sdhci: Always apply sdhci-caps-mask and
>>> sdhci-caps to caps
>>>
>>> The original implementation in the commit referenced below only modifies
>>> caps in case no caps are passed to sdhci_read_caps() via parameter, this does
>>> not seem correct. Always modify the caps according to the properties from DT.
>>>
>>> 92e0c44b92e4 ("mmc: sdhci: Use sdhci-caps-mask and sdhci-caps to change
>>
>> Need to add Fixes as below:
>> Fixes: 92e0c44b92e4 ("mmc: sdhci: Use sdhci-caps-mask and sdhci-caps to change the caps read during __sdhci_read_caps")
>>
>> I did a grep under the /drivers/mmc/host, seems all callers use NULL for the parameter caps and caps1,
>> So maybe we could just simplify the code like this:
> 
> That would make backporting harder, so subsequent patch please.
> 
> But I am more interested in knowing whether this change even makes sense, since it was broken for like 6 years and nobody noticed.

If all drivers pass NULL then the patch does not change anything
and consequently is not a fix, and a fixes tag is not appropriate.

The caps and caps1 variables were added to allow __sdhci_read_caps()
to be used to remove the use of SDHCI_QUIRK_MISSING_CAPS, so I would
leave them for now and I will try to finally send some patches to
actually do that.

Otherwise the change seems reasonable as is, except for the commit
message which could just be something like:

The original implementation in commit 92e0c44b92e4 ("mmc: sdhci: Use
sdhci-caps-mask and sdhci-caps to change the caps read during
__sdhci_read_caps") only modifies caps in case no caps are passed to
sdhci_read_caps() via parameter, this does not seem correct. Always modify
the caps according to the properties from DT.




[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