public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com
Subject: Re: [PATCH] normalize fixed and descriptor sense data
Date: Sun, 29 Aug 2004 10:36:03 +1000	[thread overview]
Message-ID: <413124F3.6090505@torque.net> (raw)
In-Reply-To: <20040828202335.GA18962@lst.de>

Christoph Hellwig wrote:
> On Sat, Aug 28, 2004 at 03:05:35PM +1000, Douglas Gilbert wrote:
> 
>>Here is a second cut of the patch.
>>
>>If James accepts it naturally he is free to enforce the
>>appropriate coding style.
>>
>>I believe that cleaning up scsi error processing is going
>>to be a "work in progress" for a while.
> 
> 
> Here's a version with a few small adjustments:
> 
>  - moved the code to the scsi_error.c/scsi_eh.c
>  - small style cleanups
>  - added the two helpers I suggested
>  - don't do the memset if we return failure, callers shouldn't look at
>    it then
> 
> --- linux-2.6.9-rc1-mm1/drivers/scsi/scsi_error.c	2004-08-28 12:17:33.000000000 +0200
> +++ linux-2.6.9-rc1-mm1-hch/drivers/scsi/scsi_error.c	2004-08-28 13:20:30.000000000 +0200
> @@ -1850,3 +1850,79 @@
>  	scsi_next_command(scmd);
>  	return rtn;
>  }
> +
> +/**
> + * scsi_normalize_sense - normalize main elements from either fixed or
> + *			descriptor sense data format into a common format.
> + *
> + * @sense_buffer:	byte array containing sense data returned by device
> + * @sb_len:		number of valid bytes in sense_buffer
> + * @sshdr:		pointer to instance of structure that common
> + *			elements are written to. Ignored if NULL.

Christoph,
I'm happy with this patch. Now it's my turn to be a reviewer ...
The "Ignored if NULL." sentence above is no longer correct and
should be removed. Actually it's my oversight.


So if this could be applied we could refine an error reporting
policy after the comments from Kai. Obviously if the midlevel
issues the command then it should handle all of the errors/alerts
(e.g. midlevel device discovery). At the other extreme are
pass through interfaces which want no retries and all errors
and alerts "returned to sender". Then there are the cases in
between.

Doug Gilbert

  reply	other threads:[~2004-08-29  0:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-27  8:56 [PATCH] normalize fixed and descriptor sense data Douglas Gilbert
2004-08-27 15:18 ` Christoph Hellwig
2004-08-27 15:45   ` Luben Tuikov
2004-08-27 15:52     ` Christoph Hellwig
2004-08-27 15:46 ` Randy.Dunlap
2004-08-28  5:05 ` Douglas Gilbert
2004-08-28 20:23   ` Christoph Hellwig
2004-08-29  0:36     ` Douglas Gilbert [this message]
2004-08-29  8:59       ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2004-08-27 14:56 Pat LaVarre
2004-08-28  4:07 ` Douglas Gilbert
2004-08-28  6:31   ` Kai Makisara
     [not found]     ` <3CC78E D C-FAAA-11D8-85F1-00039398BB5E@ieee.org>
2004-08-30 17:30     ` Pat LaVarre
2004-08-30 19:51       ` Kai Makisara
2004-08-30 20:03         ` Pat LaVarre

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=413124F3.6090505@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@SteelEye.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    /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