public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: Gert Vervoort <gert.vervoort@hccnet.nl>
Cc: tconnors@astro.swin.edu.au, Robert Love <rml@tech9.net>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Re: 2.5.67: ppa driver & preempt == oops
Date: Wed, 16 Apr 2003 11:05:29 -0700	[thread overview]
Message-ID: <20030416110529.A5782@beaverton.ibm.com> (raw)
In-Reply-To: <3E9D984F.20402@hccnet.nl>; from gert.vervoort@hccnet.nl on Wed, Apr 16, 2003 at 07:52:15PM +0200

On Wed, Apr 16, 2003 at 07:52:15PM +0200, Gert Vervoort wrote:

> bh?: old sense key No Sense
> Non-extended sense class 0 code 0x0
> Waking error handler thread
> Error handler scsi_eh_0 waking up
> scsi_eh_prt_fail_stats: 0:0:6:0 cmds failed: 1, cancel: 0
> Total of 1 commands on 1 devices require eh work
> scsi_eh_0: requesting sense for id: 6
> scsi_add_timer: scmd: c7ea4060, time: 10000, (c0239f10)
> scsi_eh_done scmd: c7ea4060 result: 0
> scsi_send_eh_cmnd: scmd: c7ea4060, rtn:2002
> scsi_send_eh_cmnd: scsi_eh_completed_normally 2002
> sense requested for c7ea4060 result 2
> Current bh?: sense key Unit Attention
> Additional sense: Not ready to ready change, medium may have changed

The ppa driver did not do auto-sense, so we run the error handler
to get the sense code.

There was a missing call to scsi_queue_next_request for door locking (the
ioctl in the scsi log output, ALLOW_MEDIUM_REMOVAL value 30, or 0x1e),
Mike A posted this patch to linux-scsi in response to some debugging leg
work of Alan Stern, does this fix your problem?

Not sure if it patches clean against 2.5.67, but it's pretty simple.

DESC
The patch adds a call to scsi_queue_next_request from scsi_release_request. It
also removes a call in scsi_eh_lock_done to scsi_put_command.
scsi_release_request will do a call to scsi_put_command if needed.
EDESC


 drivers/scsi/scsi.c       |    2 ++
 drivers/scsi/scsi_error.c |    4 ----
 2 files changed, 2 insertions(+), 4 deletions(-)

diff -puN drivers/scsi/scsi.c~scsi-release-req drivers/scsi/scsi.c
--- sysfs-bleed-2.5/drivers/scsi/scsi.c~scsi-release-req	Mon Apr 14 15:34:14 2003
+++ sysfs-bleed-2.5-andmike/drivers/scsi/scsi.c	Mon Apr 14 15:34:14 2003
@@ -224,8 +224,10 @@ void scsi_release_request(Scsi_Request *
 {
 	if( req->sr_command != NULL )
 	{
+    		request_queue_t *q = req->sr_device->request_queue;
 		scsi_put_command(req->sr_command);
 		req->sr_command = NULL;
+		scsi_queue_next_request(q, NULL);
 	}
 
 	kfree(req);
diff -puN drivers/scsi/scsi_error.c~scsi-release-req drivers/scsi/scsi_error.c
--- sysfs-bleed-2.5/drivers/scsi/scsi_error.c~scsi-release-req	Mon Apr 14 15:34:14 2003
+++ sysfs-bleed-2.5-andmike/drivers/scsi/scsi_error.c	Mon Apr 14 15:34:14 2003
@@ -1334,10 +1334,6 @@ static void scsi_eh_lock_done(struct scs
 {
 	struct scsi_request *sreq = scmd->sc_request;
 
-	scmd->sc_request = NULL;
-	sreq->sr_command = NULL;
-
-	scsi_put_command(scmd);
 	scsi_release_request(sreq);
 }

  reply	other threads:[~2003-04-16 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3E982AAC.3060606@hccnet.nl>
     [not found] ` <1050172083.2291.459.camel@localhost>
     [not found]   ` <3E993C54.40805@hccnet.nl>
     [not found]     ` <1050255133.733.6.camel@localhost>
     [not found]       ` <3E99A1E4.30904@hccnet.nl>
     [not found]         ` <20030415120000.A30422@beaverton.ibm.com>
     [not found]           ` <3E9C6F10.10001@hccnet.nl>
2003-04-15 21:40             ` [PATCH] Re: 2.5.67: ppa driver & preempt == oops Patrick Mansfield
2003-04-16 17:52               ` Gert Vervoort
2003-04-16 18:05                 ` Patrick Mansfield [this message]
2003-04-16 19:45                   ` Gert Vervoort
2003-04-16 20:07                     ` Mike Anderson
2003-04-16 18:03               ` Gert Vervoort

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=20030416110529.A5782@beaverton.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=gert.vervoort@hccnet.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=tconnors@astro.swin.edu.au \
    /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