mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wolfgang Mües" <wolfgang.mues@auerswald.de>
To: "David Brownell" <david-b@pacbell.net>
Cc: "Matt Fleming" <matt@console-pimps.org>,
	"Pierre Ossman" <drzeus@drzeus.cx>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Mike Frysinger" <vapier.adi@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc_spi: use EILSEQ for possible transmission errors
Date: Wed, 20 May 2009 12:31:53 +0200	[thread overview]
Message-ID: <200905201231.53873.wolfgang.mues@auerswald.de> (raw)
In-Reply-To: <200905200220.46569.david-b@pacbell.net>

Matt,

Am Mittwoch, 20. Mai 2009 schrieb David Brownell:
> > R1_SPI_ERASE_SEQ and R1_SPI_ERASE_RESET are responses to a sector erase
> > command. block.c is not sending such commands, so block.c can safely
> > assume that each such response is a transmission error.
>
> Hmm, would hope that's not a long-term plan.  Remember that the
> firmware in the card can leverage "that's erased" knowledge for
> things like wear leveling.  SSDs and other storage devices would
> likewise benefit from such knowledge.  I'm quite certain there's
> been discussion about adding support for that in the block layer.

But if the block layer IS sending such erase commands in the future, it CAN 
treat these error codes different:

if (read or write block command)
   erase errors must be transmission errors
else
   accept erase errors;

As it is not neccessary to change the handling of these errors in mmc_spi.c, 
no information is lost.

> And the key issue is -- correct me if I'm wrong -- that returning
> EINVAL makes trouble

Yes, because EINVAL is used for TWO different purposes:
- reporting an error of the driver or host controller
  (which is by nature non-recoverable, a retry is harmless,
   but makes no sense).
- reporting an error from the SD card (in mmc_spi).
  (which might be a transmission error and retries make
   sense).

> so you need to change those three codes.  

Yepp.

> The others don't much matter, right?

Yes. I can simple treat them as transmission errors in block.c

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

      parent reply	other threads:[~2009-05-20 10:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 11:24 Wolfgang Mües
2009-05-19 11:29 ` Matt Fleming
2009-05-19 11:47   ` Wolfgang Mües
2009-05-20  7:53     ` Matt Fleming
2009-05-20  4:49   ` David Brownell
2009-05-20  8:35     ` Wolfgang Mües
2009-05-20  9:20       ` David Brownell
2009-05-20 10:08         ` Pierre Ossman
2009-05-21  2:02           ` David Brownell
2009-05-25  9:04             ` Wolfgang Mües
2009-05-25  9:43               ` David Brownell
2009-05-25 10:18                 ` Wolfgang Mües
2009-05-25 11:50                   ` Pierre Ossman
2009-05-25 14:59                     ` Wolfgang Mües
2009-06-09 18:07                       ` Pierre Ossman
2009-06-10  7:29                         ` Wolfgang Mües
2009-06-10  7:37                           ` Matt Fleming
2009-06-13 10:57                           ` Pierre Ossman
2009-05-25 11:48             ` Pierre Ossman
2009-05-20 10:31         ` Wolfgang Mües [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=200905201231.53873.wolfgang.mues@auerswald.de \
    --to=wolfgang.mues@auerswald.de \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.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®