Re: [GIT PULL] MMC fixes for v5.13-rc8

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

 



Hi,

On 28/06/2021 09:49, Ulf Hansson wrote:
> + Neil, Robin
> 
> On Thu, 24 Jun 2021 at 20:00, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> On Thu, Jun 24, 2021 at 5:32 AM Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
>>>
>>> Neil Armstrong (1):
>>>       mmc: meson-gx: use memcpy_to/fromio for dram-access-quirk
>>
>> Ugh. How horribly ugly.
>>
>> Why is that 'host->dram_access_quirk' test _inside_ the loop, rather
>> than be something like
>>
>>         if (host->dram_access_quirk)
>>                 return sg_copy_to_buffer(data->sg, data->sg_len,
>>                                 host->bounce_buf, xfer_bytes);
>>
>> at the top of the function, with meson_mmc_copy_buffer() then only
>> handling the mmio case?
>>
>> No, I don't know this code, I'm just looking at the patch and going
>> "that looks really ugly".
>>
>> Anyway, I've pulled it, but I thought I'd voice my reaction to it..
> 
> Thanks, good point!
> 
> Robin and Neil did discuss some cleanup that could be made on top [1],
> but it looks like that was targeting a different part.

Yes this was a quick hack (and obviously not the optimal way to) to address the fatal system crash.

> 
> In any case, Neil, would you mind sending a cleanup according to the
> comment from Linus?

Sure, as discussed with Robin, the plan is to introduce sg_copy_to_buffer_to/fromio
and remove this crappy hack, but this requires multiple subsystems involved.

> 
> Kind regards
> Uffe

Thanks,
Neil

> 
> [1]
> https://www.spinics.net/lists/arm-kernel/msg901045.html
> 




[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