[parisc-linux-cvs] linux tausq

Randolph Chung Randolph Chung <randolph@tausq.org>
Fri, 15 Nov 2002 22:16:38 -0800


> disabled the iorl locking logic in the sym2 driver. Added the following
> comment:

here's the diff. -randolph

diff -u -p -r1.5 sym_glue.c
--- drivers/scsi/sym53c8xx_2/sym_glue.c 13 Nov 2002 15:15:44 -0000      1.5
+++ drivers/scsi/sym53c8xx_2/sym_glue.c 16 Nov 2002 06:09:19 -0000
@@ -142,10 +142,24 @@ spinlock_t sym53c8xx_lock = SPIN_LOCK_UN
 #define        SYM_LOCK_HCB(np, flags)   spin_lock_irqsave(&np->s.smp_lock, flags) #define        SYM_UNLOCK_HCB(np, flags) spin_unlock_irqrestore(&np->s.smp_lock, flags)

+/* Warning!
+ * sym2 driver used to hold iorl in sym53c8xx_intr and sym_timer
+ * with these macros. However, we have observed that this causes
+ * a deadlock with the iorl held by scsi_register_host. A survey
+ * of a couple of other scsi drivers that uses the "new" eh
+ * code seems to suggest that this is not required. I've disabled
+ * these for now, without having completely understood if this
+ * is correct.
+ */
+#ifndef CONFIG_PARISC /* hack */
 #define        SYM_LOCK_SCSI(np, flags) \
                spin_lock_irqsave(&io_request_lock, flags)
 #define        SYM_UNLOCK_SCSI(np, flags) \
                spin_unlock_irqrestore(&io_request_lock, flags)
+#else
+#define        SYM_LOCK_SCSI(np, flags)
+#define        SYM_UNLOCK_SCSI(np, flags)
+#endif

 /* Ugly, but will make things easier if this locking will ever disappear */
 #define        SYM_LOCK_SCSI_NOSAVE(np)        spin_lock_irq(&io_request_lock)