Skip to contentSkip to conversation

2.2.18pre19: ppa 2.05

PATCH New Tim Waugh 1 participant 1 message Nov 5, 2000 SCSI

lore
Share & tools
lore

Tim Waugh

author
#0 lore raw

PATCH 1/1 2.2.18pre19: ppa 2.05

Alan,

Here is a patch to update the ppa driver in 2.2.x to 2.05. I'm using it here.

Tim.
*/

drivers/scsi/ppa.c renamed from drivers/scsi/ppa.c.pjc +6 -11
@@ -299,12 +299,11 @@
     unsigned char r;
 
     k = PPA_SPIN_TMO;
-    do {
-	r = r_str(ppb);
-	k--;
-	udelay(1);
+    /* Wait for bit 6 and 7 - PJC */
+    for (r = r_str (ppb); ((r & 0xc0)!=0xc0) && (k); k--) {
+	    udelay (1);
+	    r = r_str (ppb);
     }
-    while (!(r & 0x80) && (k));
 
     /*
      * return some status information.
@@ -653,11 +652,7 @@
 	    (v == WRITE_6) ||
 	    (v == WRITE_10));
 
-    /*
-     * We only get here if the drive is ready to comunicate,
-     * hence no need for a full ppa_wait.
-     */
-    r = (r_str(ppb) & 0xf0);
+    r = ppa_wait(host_no); /* Need a ppa_wait() - PJC */
 
     while (r != (unsigned char) 0xf0) {
 	/*
@@ -695,7 +690,7 @@
 	    }
 	}
 	/* Now check to see if the drive is ready to comunicate */
-	r = (r_str(ppb) & 0xf0);
+	r = ppa_wait(host_no); /* need ppa_wait() - PJC */
 	/* If not, drop back down to the scheduler and wait a timer tick */
 	if (!(r & 0x80))
 	    return 0;
drivers/scsi/ppa.h renamed from drivers/scsi/ppa.h.pjc +9 -1
@@ -10,7 +10,7 @@
 #ifndef _PPA_H
 #define _PPA_H
 
-#define   PPA_VERSION   "2.03 (for Linux 2.2.x)"
+#define   PPA_VERSION   "2.05 (for Linux 2.2.x)"
 
 /* 
  * this driver has been hacked by Matteo Frigo ([email protected])
@@ -51,6 +51,13 @@
  *    CONFIG_SCSI_PPA_HAVE_PEDANTIC => CONFIG_SCSI_IZIP_EPP16
  *    added CONFIG_SCSI_IZIP_SLOW_CTR option
  *                                                      [2.03]
+ *
+ * Use ppa_wait() to check for ready AND connected status bits
+ * Add ppa_wait() calls to ppa_completion()
+ *  by Peter Cherriman <[email protected]> and
+ *     Tim Waugh <[email protected]>
+ *                                                      [2.04]
+ * Fix kernel panic on scsi timeout, 2000-08-18		[2.05]
  */
 /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */
 
@@ -166,6 +173,7 @@
 		eh_device_reset_handler:	NULL,			\
 		eh_bus_reset_handler:		ppa_reset,		\
 		eh_host_reset_handler:		ppa_reset,		\
+		use_new_eh_code:		1,			\
 		bios_param:			ppa_biosparam,		\
 		this_id:			-1,			\
 		sg_tablesize:			SG_ALL,			\

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