All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: Andries.Brouwer@cwi.nl
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_error fix
Date: Fri, 7 Mar 2003 11:41:59 -0800	[thread overview]
Message-ID: <20030307114159.A941@beaverton.ibm.com> (raw)
In-Reply-To: <UTC200303062337.h26Nbv714178.aeb@smtp.cwi.nl>; from Andries.Brouwer@cwi.nl on Fri, Mar 07, 2003 at 12:37:57AM +0100

On Fri, Mar 07, 2003 at 12:37:57AM +0100, Andries.Brouwer@cwi.nl wrote:

> scsi_error.c: apart from similar trivialities the only change:
> 
>     If a command fails (e.g. because it belongs to a newer
>     SCSI version than the device), it is fed to
>     scsi_decide_disposition(). That routine must return
>     SUCCESS, unless the error handler should be invoked.
> 
>     In the situation where host_byte is DID_OK, and message_byte
>     is COMMAND_COMPLETE, and status is CHECK_CONDITION, there is
>     no reason at all to invoke aborts and resets. The situation
>     is normal. I see here UNIT ATTENTION, Power on occurred
>     and ILLEGAL REQUEST, Invalid field in cdb.
> 
>     The 2.5.64 code does not return SUCCESS, but it returns the
>     return code of scsi_check_sense(), and that may be FAILED
>     in case we do not have valid sense.
> 
>     Further discussion is possible here, but I changed the return
>     into "return SUCCESS" and 2.5.64 boots fine.
> 
> Andries
> 
> [Further discussion and things I did not yet investigate:
> What was changed to make this fail first in 2.5.63?
> Experience shows that we get into a loop when something else
> than SUCCESS is returned here. Probably that is a bug elsewhere.
> Probably the commands that cause problems should never have been
> sent in the first place.]

The scsi error handler is also used to retrieve sense data for
adapters/drivers that do not auto retrieve it. In such cases, it should
not issue any aborts, resets etc.

Your change effectively disables that support - we never hit the code in
scsi_eh_get_sense() to request sense. It would be very nice if we could
fix (or audit) all the scsi drivers, apply your change and remove
scsi_eh_get_sense, but AFAIK that has not and is not happening.

I don't know if your adapter/driver has auto sense retrieval (imm.c?).

I would guess a change in scsi_error.c related to sense (scsi_eh_get_sense)
handling is causing problems, and if your driver has auto sense then
something is wrong with the scmd->sense_buffer.

It would still be useful to see the console log output with scsi_logging=1
for your failure case.

-- Patrick Mansfield

  parent reply	other threads:[~2003-03-07 19:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-06 23:37 [PATCH] scsi_error fix Andries.Brouwer
2003-03-07  1:09 ` Rob Radez
2003-03-07 19:41 ` Patrick Mansfield [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-07 20:19 Andries.Brouwer
2003-03-07 21:17 ` Mike Anderson
2003-03-07 22:20   ` James Bottomley
2003-03-07 22:43     ` Mike Anderson
2003-03-07 22:56       ` James Bottomley
2003-03-09  1:41     ` Osamu Tomita
2003-03-07 23:22   ` Luben Tuikov

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=20030307114159.A941@beaverton.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=torvalds@transmeta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.