linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Cavan <johncavan@home.com>
To: Jens Axboe <axboe@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] (new for ppa and imm) Re: [PATCH] Re: Patch to fix lockup on ppa  insert
Date: Thu, 16 Nov 2000 21:50:40 -0500	[thread overview]
Message-ID: <3A149D00.9D38FA24@home.com> (raw)
In-Reply-To: <3A13D4BA.AD4A580B@home.com> <3A13D8D6.8C12E31A@home.com> <20001116162027.C597@suse.de>

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

Jens Axboe wrote:
> Wouldn't it be more interesting to fix the reason the new error
> handling code dies with imm and ppa?

Yes it would... :o) I think I've got it here.

The new error handling code spinlocks the IRQ which cause the lowlevel
parport driver to choke. This patch unlocks, allows the lowlevel driver
to do it's probes, and then relocks. It could probably be more granular
in the parport_pc code, but my own home tests show it to be working
fine.

John

[-- Attachment #2: zip.patch --]
[-- Type: text/plain, Size: 1316 bytes --]

diff -urN -X /usr/src/dontdiff linux.clean/drivers/scsi/imm.c linux.current/drivers/scsi/imm.c
--- linux.clean/drivers/scsi/imm.c	Thu Nov 16 07:25:29 2000
+++ linux.current/drivers/scsi/imm.c	Thu Nov 16 21:39:10 2000
@@ -122,7 +122,15 @@
     struct Scsi_Host *hreg;
     int ports;
     int i, nhosts, try_again;
-    struct parport *pb = parport_enumerate();
+    struct parport *pb;
+
+    /*
+     * unlock to allow the lowlevel parport driver to probe
+     * the irqs
+     */
+    spin_unlock_irq(&io_request_lock);
+    pb = parport_enumerate();
+    spin_lock_irq(&io_request_lock);
 
     printk("imm: Version %s\n", IMM_VERSION);
     nhosts = 0;
diff -urN -X /usr/src/dontdiff linux.clean/drivers/scsi/ppa.c linux.current/drivers/scsi/ppa.c
--- linux.clean/drivers/scsi/ppa.c	Thu Nov 16 07:25:29 2000
+++ linux.current/drivers/scsi/ppa.c	Thu Nov 16 21:37:33 2000
@@ -111,7 +111,15 @@
     struct Scsi_Host *hreg;
     int ports;
     int i, nhosts, try_again;
-    struct parport *pb = parport_enumerate();
+    struct parport *pb;
+
+    /*
+     * unlock to allow the lowlevel parport driver to probe
+     * the irqs
+     */
+    spin_unlock_irq(&io_request_lock);
+    pb = parport_enumerate();
+    spin_lock_irq(&io_request_lock);
 
     printk("ppa: Version %s\n", PPA_VERSION);
     nhosts = 0;

  reply	other threads:[~2000-11-17  3:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-16 12:36 Patch to fix lockup on ppa insert John Cavan
2000-11-16 12:53 ` [PATCH] " John Cavan
2000-11-16 15:20   ` Jens Axboe
2000-11-17  2:50     ` John Cavan [this message]
2000-11-17 10:24       ` [PATCH] (new for ppa and imm) " Tim Waugh
2000-11-18 22:10         ` John Cavan
2000-11-20 12:51           ` Tim Waugh

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=3A149D00.9D38FA24@home.com \
    --to=johncavan@home.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).