All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Philip Rakity <prakity@marvell.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
	Chuanxiao Dong <chuanxiao.dong@intel.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"cjb@laptop.org" <cjb@laptop.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	"w.sang@pengutronix.de" <w.sang@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]mmc: set timeout for SDHCI host before sending busy cmds
Date: Mon, 14 Mar 2011 08:52:56 +0900	[thread overview]
Message-ID: <4D7D58D8.6070402@samsung.com> (raw)
In-Reply-To: <BD70BE74-9C18-4497-A2EE-DB6DCC13CBEA@marvell.com>

Philip Rakity wrote:
> On Mar 9, 2011, at 6:29 PM, Jaehoon Chung wrote:
> 
>> Chuanxiao Dong wrote:
>>> Hi all,
>>>   From the previous discussion, I do not think we have got a clear conclusion
>>>   about using maximum timeout value. At least we know from Jae hoon Chung
>>>   using 0xE for every case is not a good. So I want to suggest only use 0xE for
>>>   busy command. I personally preferred below implementation, which is similar
>>>   with a RFC patch submitted by Jae hoon Chung, but only without adding a new
>>>   quirk.
>> thanks for remind. 
>> Yes, i tested without quirks, i think that is not problem.
>> (Just sent RFC patch with quirks, because i want to ask how think about adding quirks or not).
> 
> 
> 
> Sorry I am confused.
> 
> Setting 0x0E all the time does not solve the problem and has side effects ?
> What are the side effects ?

Side effect?? i didn't mention "side effect", just not resolved for every case..
That case is SDHCI didn't support the specific cards during suspend/resume.

i didn't know Mr.Chuanxiao's case.

> 
> Using BUSY patch for 0x0e (below) works ?
> 
>>>   I think sdhci_calc_timeout should be left for data transfer since at least we
>>>   can get a warning if 0xE is not enough for host to use. And if the host
>>>   controller and the card have no bugs, then the calculated timeout should be
>>>   safe. Left the old implementation unchanged is also compatible with all
>>>   existed host controllers and cards.
>>>
>>>   But for busy command, we are not clear about how long is safe enough for
>>>   waiting and there is also no function to do the calculation for them. So
>>>   preferred just using 0xE. Below the patch and comment:
>>>
>>> Set the timeout control register for SDHCI host when send some commands which
>>> need busy signal. Use the maximum timeout value 0xE will be safe.
>>>
>>> Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
>>> ---
>>> drivers/mmc/host/sdhci.c |    9 ++++++++-
>>> 1 files changed, 8 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>>> index 99c372e..8306323 100644
>>> --- a/drivers/mmc/host/sdhci.c
>>> +++ b/drivers/mmc/host/sdhci.c
>>> @@ -659,8 +659,15 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
>>>
>>> 	WARN_ON(host->data);
>>>
>>> -	if (data == NULL)
>>> +	if (data == NULL) {
>>> +		/*
>>> +		 * set the timeout to be maximum value for commands those with
>>> +		 * busy signal
>>> +		 */
>>> +		if (host->cmd->flags & MMC_RSP_BUSY)
>>> +			sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
>>> 		return;
>>> +	}
>>>
>>> 	/* Sanity checks */
>>> 	BUG_ON(data->blksz * data->blocks > 524288);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


      reply	other threads:[~2011-03-13 23:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09  8:06 [PATCH]mmc: set timeout for SDHCI host before sending busy cmds Chuanxiao Dong
2011-03-10  2:29 ` Jaehoon Chung
2011-03-10  2:29   ` Jaehoon Chung
2011-03-13 18:35   ` Philip Rakity
2011-03-13 23:52     ` Jaehoon Chung [this message]

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=4D7D58D8.6070402@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=chuanxiao.dong@intel.com \
    --cc=cjb@laptop.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@marvell.com \
    --cc=w.sang@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.