lkml.org 
[lkml]   [2011]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mmc : Use wait_for_completion_timeout() instead of wait_for_completion in case of write.
From
2011/9/21 NamJae Jeon <linkinjeon@gmail.com>:
> 2011/9/21 Murali Krishna Palnati <palnati.muralikrishna@gmail.com>:
>> On Tue, Sep 20, 2011 at 7:52 PM, NamJae Jeon <linkinjeon@gmail.com> wrote:
>>> It may be no good choice that sw timer is on host driver. also I don't
>>> know what is different.
>>
>> It helps to have this functionality implemented at host controller
>> layer so that the host layer is informed about this. If we just end
>> the request from the MMC core layer, host controller driver doesnt
>> even kow about that and it remains in the same state processing the
>> request (that already got timed out at core layer). It is good to have
>> the host layer trigger this timeout, do necessary clean up and then
>> duly end the request by informing the core layer by calling
>> mmc_request_done().
>>
>> Let me put the question in this way. If the core layer times out
>> (because of wait_for_completion_timeout) then in the patch that you
>> have submitted, i dont see how the host layer knows about it.
>> Apologize, if i sound like a broken record saying the same thing again
>> and again.
>>
>
> I understand what you want. So I will add emergency_cleanup for host
> driver like this.
> struct mmc_host_ops {
> ................
> .................
> void (*emergency_cleanup)(struct mmc_host *host);
>
> }
>
> When timeout error happen, mmc core will call this function as soon as
> sending stop cmd.
> And when timeout error happen by wait_for_completion_timeout, calling
> mmc_request_done is not needed.
>
> Thanks.
>

I'll follow the opinion of chris.

Thanks.


\
 
 \ /
  Last update: 2011-09-21 03:17    [W:0.045 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site