[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E78433F.2050900@stericsson.com>
Date: Tue, 20 Sep 2011 09:39:43 +0200
From: Ulf Hansson <ulf.hansson@...ricsson.com>
To: Namjae Jeon <linkinjeon@...il.com>
Cc: "cjb@...top.org" <cjb@...top.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc : Use wait_for_completion_timeout() instead of wait_for_completion
in case of write.
Namjae Jeon wrote:
> host controller can not rise timeout interrupt in write not read in DMA status.
> because host can just know whether card is finish to program to use busy line.
> If unstable card is keep holding busy line while writing using DMA.
> hang problem happen by wait_for_completion. so I think that mmc driver need some exception to avoid this problem.
> I suggest to use wait_for_completion_timeout instead of wait_for_completion.
>
I see what you are trying to solve, but you can never calculate the
timeout for this type of operation in such a way. Your timeout involves
the entire data write operation, how can you ever know how long this
will take?
I think a much better approach is to make you host driver not using
"busy signaling" (if that is possible), thus when the DMA job is done
call mmc_request_done to finalize the data transfer. The mmc framework
will then send a CMD13 (SEND_STATUS) to make sure the data is written
before issuing the next request.
BR
Ulf Hansson
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists