linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gert Vervoort <gert.vervoort@hccnet.nl>
To: Patrick Mansfield <patmans@us.ibm.com>
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 21:45:22 +0200	[thread overview]
Message-ID: <3E9DB2D2.4070401@hccnet.nl> (raw)
In-Reply-To: 20030416110529.A5782@beaverton.ibm.com

  Patrick Mansfield wrote:

>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?
>
>  
>
Yes, this fixes the problem. So far, the zip disk seems to work normal 
(mount/umount, eject a disk, reading from disk).

>Not sure if it patches clean against 2.5.67, but it's pretty simple.
>  
>
The following workaround is needed to make the patch compile  (otherwise 
the linker complains about scsi_queue_next_request not being defined):

--- scsi_lib.c.1        2003-04-16 21:23:37.000000000 +0200
+++ scsi_lib.c  2003-04-16 21:23:46.000000000 +0200
@@ -351,7 +351,7 @@
  *             permutations grows as 2**N, and if too many more special 
cases
  *             get added, we start to get screwed.
  */
-static void scsi_queue_next_request(request_queue_t *q, struct 
scsi_cmnd *cmd)
+/*static*/ void scsi_queue_next_request(request_queue_t *q, struct 
scsi_cmnd *cmd)
 {
        struct scsi_device *sdev, *sdev2;
        struct Scsi_Host *shost;


    Gert

>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 19:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-12 15:03 2.5.67: ppa driver & preempt == oops Gert Vervoort
2003-04-12 18:28 ` Robert Love
2003-04-13 10:30   ` Gert Vervoort
2003-04-13 17:32     ` Robert Love
2003-04-13 17:44       ` Gert Vervoort
2003-04-15 19:00         ` [PATCH] " Patrick Mansfield
2003-04-15 20:44           ` Gert Vervoort
2003-04-15 21:40             ` Patrick Mansfield
2003-04-16 17:52               ` Gert Vervoort
2003-04-16 18:05                 ` Patrick Mansfield
2003-04-16 19:45                   ` Gert Vervoort [this message]
2003-04-16 20:07                     ` Mike Anderson
2003-04-16 18:03               ` Gert Vervoort
2003-04-15 21:37           ` Robert Love
2003-04-15 21:51             ` Randy.Dunlap
2003-04-15 22:07               ` Patrick Mansfield
2003-04-15 22:29                 ` Randy.Dunlap
2003-04-15 22:35                   ` Patrick Mansfield
2003-04-12 21:12 ` Andrew Morton
2003-04-13 11:45   ` Gert Vervoort
2003-04-13 20:44     ` Andrew Morton
     [not found] <fa.chdor2j.u72387@ifi.uio.no>
     [not found] ` <fa.gs8uudl.196640l@ifi.uio.no>
2003-04-15 23:04   ` [PATCH] " walt
2003-04-15 23:25     ` Patrick Mansfield
2003-04-16  3:30       ` walt
     [not found] <fa.hdvi4hc.152sj34@ifi.uio.no>
     [not found] ` <fa.fnhqqrs.ok0028@ifi.uio.no>
2003-04-15 23:51   ` walt
2003-04-16  0:07     ` Randy.Dunlap
     [not found] <fa.fo1ils5.o4kt21@ifi.uio.no>
     [not found] ` <fa.jt2b7k8.20qj0c@ifi.uio.no>
2003-04-16  3:19   ` walt
2003-04-16  9:45 Chuck Ebbert
     [not found] <fa.cde0mrb.127uv05@ifi.uio.no>
     [not found] ` <fa.i9on98t.1gg0toj@ifi.uio.no>
2003-04-17 19:37   ` walt

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=3E9DB2D2.4070401@hccnet.nl \
    --to=gert.vervoort@hccnet.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=patmans@us.ibm.com \
    --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;
as well as URLs for NNTP newsgroup(s).