Re: [PATCH] mmc_spi: do propper retry managment in the block layer - 3rd try



On Thu, May 28, 2009 at 10:28:29AM +0200, Wolfgang Mües wrote:
Pierre,

Am Mittwoch, 27. Mai 2009 schrieb Pierre Ossman:


[...]

+ /* Do retries for all sort of transmission errors */
+ switch (error) {

- /*
- * A block was successfully transferred.
+ case 0: /* no error: continue, reset error variables */
+ disable_multi = 0;
+ retries = 3;
+ break;
+
+ /* Card has not understand command. As we do only send
+ * valid commands, this must be a transmission error. */
+ case -EPROTO: /* fall through */

This indicates a layering problem. The host driver should not be aware
of anything but pure bit errors.

Also, this special meaning should be documented in core.h should we
decide to keep it.

This is not MY error code. EPROTO is send from mmc_spi_writeblock(), and I
have listed it here because it is a transmission error.

So there seems to be contrary objections: Matt Flemming has requested that the
exact cause of error is reported by the driver (because otherwise the caller
will loose information), and you requested to distinguish only between
transmission errors and the rest.

Matt Flemming has pointed out that further changes in the code will request to
get the exact cause of error in the block layer, and that error codes might
have interpreted different according to the command class, so IMHO it is
better to transport the exact error cause into block.c and do the error
handling here, according to the type of request.


When I said "report the correct error" I was objecting to using EILSEQ
as The One True Error Code based on the fact that a transmission error
may, or may not, have occurred.

That is not contrary to Pierre's comments. I was not advocating
layering violations ;-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: I need help to understand a double fault
    ... If the processor also has MCA feature available (For example Intel ... O ID Other Information Error Code Error Code ... Now my driver> will ... > the request is still in the driver since I don't remove requests from> queue ...
    (microsoft.public.development.device.drivers)
  • Re: I need help to understand a double fault
    ... If the processor also has MCA feature available (For example Intel ... O ID Other Information Error Code Error Code ... Now my driver> will ... > the request is still in the driver since I don't remove requests from> queue ...
    (microsoft.public.development.device.drivers)
  • Re: MS Update Website problem
    ... occurred to me and my point is that the error code wasn't listed on the page ... You may not agree that the response I got was stupid, ... before I discovered this I'd sent a request for help to MS. ... before trying to diagnose a problem based on a bogus symptom generated ...
    (microsoft.public.windowsupdate)
  • Re: Problems using HttpContext.Current.Request.Url.Host
    ... Error Code: -2147467259 ... Request: 'HttpContext.Current.Request' threw an exception of type 'System.Web.HttpException' ... Now if I comment out the subdomain = ...
    (microsoft.public.dotnet.languages.csharp)
  • folder size query returns 501 error code
    ... get the folder size of a public folder ... // Add the network credentials to the request. ... // done before writing data to the request stream. ... The last line gives the non supported error code 501. ...
    (microsoft.public.exchange.development)

Loading