lkml.org 
[lkml]   [2000]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] (new for ppa and imm) Re: [PATCH] Re: Patch to fix lockup on ppa insert
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.

Johndiff -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;
\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.046 / U:1.408 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site