public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: "Dong, Chuanxiao" <chuanxiao.dong@intel.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"cjb@laptop.org" <cjb@laptop.org>,
	"arjan@linux.intel.com" <arjan@linux.intel.com>,
	"alan@linux.intel.com" <alan@linux.intel.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"adrian.hunter@nokia.com" <adrian.hunter@nokia.com>,
	"prakity@marvell.com" <prakity@marvell.com>
Subject: Re: [PATCH v3 2/3]set timeout control reg for such SDHCI host
Date: Sat, 4 Dec 2010 22:33:48 +0100	[thread overview]
Message-ID: <20101204213348.GE671@pengutronix.de> (raw)
In-Reply-To: <5D8008F58939784290FAB48F54975198320B3E41F7@shsmsx502.ccr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]

On Fri, Dec 03, 2010 at 10:38:59AM +0800, Dong, Chuanxiao wrote:
>  > 
> > On Thu, Dec 02, 2010 at 07:26:13PM +0800, Chuanxiao Dong wrote:
> > 
> > > +	if (host->quirks & SDHCI_QUIRK_FORCE_ERASE_SINGLE) {
> > > +		/* Set the timeout to be the maximum value */
> > > +		if (cmd->erase_timeout)
> > > +			sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
> > > +	}
> > > +
> > >  	sdhci_writew(host, SDHCI_MAKE_CMD(cmd->opcode, flags),
> > > SDHCI_COMMAND);
> > 
> > Hmm, this looks like another argument for Philip's idea to always use the maximum
> > timeout value and skip the quirks related to it?
> 
> Yes, if always using the maximum timeout value is OK for other command, the patch2 can be removed I think.
> The new added quirk in the serials patches is used to set the limitation of request queue, not only just to set the timeout control reg.
> Even the timeout value was set to be 0xE (the maximum value), erasing too many sectors can still be failed since the timeout time was still not longer enough.
> So the count of erased sectors passed down by request queue should be reduced by using this quirk.

Yes, I think I understand the issue. Have you tried adding a callback, so we
don't have the options between MAX_UINT and '1' but rather MAX_UINT and return
value of the callback?

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2010-12-04 21:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 11:26 [PATCH v3 2/3]set timeout control reg for such SDHCI host Chuanxiao Dong
2010-12-02 11:53 ` Wolfram Sang
2010-12-03  2:38   ` Dong, Chuanxiao
2010-12-04 21:33     ` Wolfram Sang [this message]
2010-12-05 11:48       ` Dong, Chuanxiao

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=20101204213348.GE671@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=adrian.hunter@nokia.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=arjan@linux.intel.com \
    --cc=chuanxiao.dong@intel.com \
    --cc=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@marvell.com \
    /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