[PATCH] (new for ppa and imm) Re: [PATCH] Re: Patch to fix lockup on ppa insert

From: John Cavan (johncavan@home.com)
Date: Thu Nov 16 2000 - 21:50:40 EST


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

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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 23 2000 - 21:00:12 EST