Re: RFC : mmc : Use wait_for_completion_timeout() instead ofwait_for_completion in case of multiple write blocks.

From: NamJae Jeon
Date: Sun Sep 04 2011 - 20:30:19 EST


2011/9/4 Linus Walleij <linus.walleij@xxxxxxxxxx>:
> 2011/9/2 NamJae Jeon <linkinjeon@xxxxxxxxx>:
>
>> We should consider DMA situation. As I know, host controller can not
>> rise timeout interrupt in write not read in DMA status.
>
> Which host controller are you talking about?
As I know, this controller is using on many ARM core. I can not
disclose the information in my situation.

>
>> host
>> controller can just know whether card is finish to program to use busy
>> line. If unstable card is holding busy line while writing using DMA,
>> hang problem will happen by wait_for_completion.
>> so I think that mmc driver need some exception to avoid this problem.
>
> Yes you can add a timeout in the driver itself. Just set up
> a common timer, no big deal.
>
> Yours,
> Linus Walleij
>

I didn't decide, how much timeout should I add ? first, I think that I
try to add timeout_ns * the number of blocks. but If timeout_ns is 1.6
sec and the number of blocks is 512, the timeout will be very long. or
If I just add 10*HZ(10 sec), Is it proper ?
Would you advise more for me ?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/