The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@stericsson.com>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: "cjb@laptop.org" <cjb@laptop.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc : Use wait_for_completion_timeout() instead of wait_for_completion in case of write.
Date: Tue, 20 Sep 2011 09:39:43 +0200	[thread overview]
Message-ID: <4E78433F.2050900@stericsson.com> (raw)
In-Reply-To: <1316359301-2263-1-git-send-email-linkinjeon@gmail.com>

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

  reply	other threads:[~2011-09-20  7:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-18 15:21 [PATCH] mmc : Use wait_for_completion_timeout() instead of wait_for_completion in case of write Namjae Jeon
2011-09-20  7:39 ` Ulf Hansson [this message]
2011-09-20  9:28   ` Murali Krishna Palnati
2011-09-20 10:35     ` NamJae Jeon
2011-09-20 10:55       ` Murali Krishna Palnati
2011-09-20 14:22         ` NamJae Jeon
2011-09-20 15:24           ` Murali Krishna Palnati
2011-09-21  0:26             ` NamJae Jeon
2011-09-21  1:14               ` NamJae Jeon
2011-09-21 10:48 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E78433F.2050900@stericsson.com \
    --to=ulf.hansson@stericsson.com \
    --cc=cjb@laptop.org \
    --cc=linkinjeon@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox