Re: [PATCH] mmc: block: avoid multiblock reads for the last sector in SPI mode

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

 



On 6 October 2018 at 12:00, Clément Péron <peron.clem@xxxxxxxxx> wrote:
> Hi Ulf,
>
>>
>> We are lacking a driver maintainer for "drivers/mmc/host/mmc_spi.c"
>> and unfortunate me personally, also has limited knowledge around the
>> SPI case.
>>
>> However, from the problem description and by looking at the mmc spi
>> driver code (which certainly would need a little love), I get the
>> feeling that this isn't really a card specific problem. The point is,
>> instead of adding a hack in the mmc core, for something that probably
>> should be fixed in the host driver, doesn't really make sense in the
>> long run. Of course I might be wrong, but in such case we should use a
>> so called mmc/sd card quirk instead.
>>
>> Another option to workaround the problem, is to implement the
>> ->multi_io_quirk host ops for mmc_spi. In that way you can for multi
>> block reads, return 1 as the required block size - thus telling the
>> mmc core to use single block read instead. Of course that would then
>> effect all multi block reads for mmc spi, then likely degrade
>> performance/throughput.
>>
>> What do you think?
>
> In one way I agree, this fix should be done in the host or use a
> quirk, multi_io_quirk seems to be here for that kind of issue.
> But i'm really not a fan of completely disable all the MULTI_READ cmd,
> the impact of the performance won't be negligible.

I buy that, I don't like it either.

> If the multi_io_quirk prototype can be modified to know if the last
> block will be read, fine for me.
> In another way there is already lots of trick done in the core block
> for SD Card over SPI look how many time we call "mmc_host_is_spi".
> And having this here instead of hacking the mmc_spi is surely more proper.

Fair enough, another check for "mmc_host_is_spi" wont make any difference.

However, would you mind re-writing the changelog? The current version
doesn't really state what the problem is and nor what the change
actually does. Moreover, the old gmane link doesn't work, so let's
just drop it.

Kind regards
Uffe




[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