patch-2.0.36 linux/drivers/block/paride/pt.c

Next file: linux/drivers/cdrom/sonycd535.c
Previous file: linux/drivers/block/paride/pg.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.35/linux/drivers/block/paride/pt.c linux/drivers/block/paride/pt.c
@@ -74,10 +74,11 @@
 			(default "pt").
 
             verbose     This parameter controls the amount of logging
-                        that is done while the driver probes for
-                        devices.  Set it to 0 for a quiet load, or 1 to
-                        see all the progress messages.  (default 0)
-
+                        that the driver will do.  Set it to 0 for
+                        normal operation, 1 to see autoprobe progress
+                        messages, or 2 to see additional debugging
+                        output.  (default 0)
+ 
         If this driver is built into the kernel, you can use 
         the following command line parameters, with the same values
         as the corresponding module parameters listed above:
@@ -99,10 +100,13 @@
 				for clearing error status.
 				Eliminate sti();
 	1.02    GRG 1998.06.16  Eliminate an Ugh.
-
+	1.03    GRG 1998.08.15  Adjusted PT_TMO, use HZ in loop timing,
+				extra debugging
+	1.04    GRG 1998.09.24  Repair minor coding error, added jumbo support
+	
 */
 
-#define PT_VERSION      "1.02s"
+#define PT_VERSION      "1.04s"
 #define PT_MAJOR	96
 #define PT_NAME		"pt"
 #define PT_UNITS	4
@@ -168,13 +172,13 @@
 #include "paride.h"
 
 #define PT_MAX_RETRIES  5
-#define PT_TMO          800             /* interrupt timeout in jiffies */
+#define PT_TMO          3000            /* interrupt timeout in jiffies */
 #define PT_SPIN_DEL     50              /* spin delay in micro-seconds  */
-#define PT_RESET_TMO    30		/* 3 seconds */
+#define PT_RESET_TMO    30		/* 30 seconds */
 #define PT_READY_TMO	60		/* 60 seconds */
 #define PT_REWIND_TMO	1200		/* 20 minutes */
 
-#define PT_SPIN         (10000/PT_SPIN_DEL)*PT_TMO  
+#define PT_SPIN         ((1000000/(HZ*PT_SPIN_DEL))*PT_TMO)  
 
 #define STAT_ERR        0x00001
 #define STAT_INDEX      0x00002
@@ -317,6 +321,12 @@
 
 {       int     err;
 
+#ifdef PARIDE_JUMBO
+       { extern paride_init();
+         paride_init();
+       } 
+#endif
+
         err = pt_init();
 
         return err;
@@ -498,7 +508,7 @@
         pt_media_access_cmd(unit,PT_TMO,wm_cmd,"write filemark");
 }
 
-#define DBMSG(msg)      NULL
+#define DBMSG(msg)      ((verbose>1)?(msg):NULL)
 
 static int pt_reset( int unit )
 
@@ -573,8 +583,8 @@
 	char	*ms[2] = {"master","slave"};
 	char	mf[10], id[18];
 	char    id_cmd[12] = { ATAPI_IDENTIFY,0,0,0,36,0,0,0,0,0,0,0};
-        char    ms_cmd[12] = { ATAPI_MODE_SENSE,0,0x2a,0,128,0,0,0,0,0,0,0};
-	char    ls_cmd[12] = { ATAPI_LOG_SENSE,0,0x71,0,0,0,0,0,128,0,0,0};
+        char    ms_cmd[12] = { ATAPI_MODE_SENSE,0,0x2a,0,36,0,0,0,0,0,0,0};
+	char    ls_cmd[12] = { ATAPI_LOG_SENSE,0,0x71,0,0,0,0,0,36,0,0,0};
 	char	buf[36];
 
         s = pt_atapi(unit,id_cmd,36,buf,"identify");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov