Re: [PATCH 2/3] mmc: core: API for temporarily disabling auto-retuning due to errors

From: Adrian Hunter
Date: Tue May 28 2019 - 07:48:57 EST


On 28/05/19 2:21 PM, Arend Van Spriel wrote:
>
>
> On 5/28/2019 12:04 PM, Adrian Hunter wrote:
>> On 26/05/19 9:42 PM, Arend Van Spriel wrote:
>>> On 5/18/2019 12:54 AM, Douglas Anderson wrote:
>>>> Normally when the MMC core sees an "-EILSEQ" error returned by a host
>>>> controller then it will trigger a retuning of the card. This is
>>>> generally a good idea.
>>>
>>> Probably a question for Adrian, but how is this retuning scheduled. I recall
>>> seeing something in mmc_request_done. How about deferring the retuning upon
>>> a release host or is that too sdio specific.
>>
>> Below is what I have been carrying the last 4 years. But according to
>> Douglas'
>> patch, the release would need to be further down. See 2nd diff below.
>> Would that work?
>
> That makes sense. The loop is needed because the device can be a bit bone
> headed. So indeed after the loop the device should be awake and able to
> handle CMD19.

What if tuning is needed to read SBSDIO_FUNC1_SLEEPCSR successfully?