mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wolfgang Mües" <wolfgang.mues@auerswald.de>
To: Pierre Ossman <drzeus@drzeus.cx>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	"Matt Fleming" <matt@console-pimps.org>,
	"David Brownell" <dbrownell@users.sourceforge.net>,
	linux-kernel@vger.kernel.org,
	"Mike Frysinger" <vapier.adi@gmail.com>
Subject: Re: [PATCH] Fixes and enhancements for the MMC SPI driver - revised
Date: Mon, 9 Feb 2009 12:53:57 +0100	[thread overview]
Message-ID: <200902091253.57594.wolfgang.mues@auerswald.de> (raw)
In-Reply-To: <20090208204452.0ecdb18e@mjolnir.drzeus.cx>

Pierre,

Am Sonntag, 8. Februar 2009 schrieb Pierre Ossman:
> Please split these things up into one patch for each item. It keeps the
> logs sensible and makes bisecting work better in case of problems.

OK. I will do.

> > +	/*
> > +	 * The MMC framework does a good job of computing timeouts
> > +	 * according to the mmc/sd standard. However, we found that in
> > +	 * SPI mode, there are many cards which need a longer timeout
> > +	 * of 1s after receiving a long stream of write data.
> > +	 */
> > +	tv = ktime_to_timeval(timeout);
> > +	if (tv.tv_sec == 0)
> > +		timeout = ktime_set(1, 0);
> >
> >  	if (host->mmc->use_spi_crc)
> >  		scratch->crc_val = cpu_to_be16(
>
> This might as well be handled when we compute the timeout in the core.
> Having things spread out is just confusing.

Hmmm. Inside the core, this timeout value will be calculated as:

timeout = 250ms;
if (driver == SPI)
   timeout = 1s;

I agree that it is confusing to have the timeout value set on two places.
Do you prefer to have it set in the mmc core, different for SPI and non-SPI?

> > -	if (host->mmc->use_spi_crc) {
> > +	/*
> > +	 * Omit the CRC check for CID and CSD reads. There are some SDHC

> Hmmm... I think this also better handled in the core. Reorder things in
> the init to not turn CRC checks on until after those registers have
> been read.

No! CRC checks are ONLY disabled for CID and CSD reads, NOT for the reading of 
data blocks. And I don't want to set use_spi_scc == 0 because I don't want to 
disable the safety of CRC for data blocks.

regards
 
i. A. Wolfgang Mües
-- 
Auerswald GmbH & Co. KG
Hardware Development
Telefon: +49 (0)5306 9219 0
Telefax: +49 (0)5306 9219 94 
E-Mail: Wolfgang.Mues@Auerswald.de
Web: http://www.auerswald.de
 
--------------------------------------------------------------
Auerswald GmbH & Co. KG, Vor den Grashöfen 1, 38162 Cremlingen
Registriert beim AG Braunschweig HRA 13289
p.h.G Auerswald Geschäftsführungsges. mbH
Registriert beim AG Braunschweig HRB 7463
Geschäftsführer: Dipl-Ing. Gerhard Auerswald

  reply	other threads:[~2009-02-09 11:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090113015904.606e3548.akpm@linux-foundation.org>
2009-01-26 13:18 ` Wolfgang Mües
2009-02-08 19:44   ` Pierre Ossman
2009-02-09 11:53     ` Wolfgang Mües [this message]
2009-02-21 14:16       ` Pierre Ossman

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=200902091253.57594.wolfgang.mues@auerswald.de \
    --to=wolfgang.mues@auerswald.de \
    --cc=akpm@linux-foundation.org \
    --cc=dbrownell@users.sourceforge.net \
    --cc=drzeus@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=vapier.adi@gmail.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

all inboxes | Powered by JetHome®