[PARPORT] [PATCH] paride HZ dependencies


Artur Skawina (skawina@geocities.com)
Tue, 21 Sep 1999 21:55:40 +0200


diff -urNp /img/linux-2.3.18/drivers/block/paride/pcd.c linux-2.3.18as/drivers/block/paride/pcd.c
--- /img/linux-2.3.18/drivers/block/paride/pcd.c Sat Sep 11 00:07:23 1999
+++ linux-2.3.18as/drivers/block/paride/pcd.c Tue Sep 21 16:57:53 1999
@@ -571,7 +571,7 @@ static int pcd_reset( int unit )
         WR(0,6,0xa0 + 0x10*PCD.drive);
         WR(0,7,8);
 
- pcd_sleep(2); /* delay a bit */
+ pcd_sleep(20*HZ/1000); /* delay a bit */
 
         k = 0;
         while ((k++ < PCD_RESET_TMO) && (RR(1,6)&IDE_BUSY))
@@ -609,7 +609,7 @@ static int pcd_ready_wait( int unit, int
           if (!p) return 0;
           if (!(((p & 0xffff) == 0x0402)||((p & 0xff) == 6))) return p;
           k++;
- pcd_sleep(100);
+ pcd_sleep(HZ);
         }
         return 0x000020; /* timeout */
 }
diff -urNp /img/linux-2.3.18/drivers/block/paride/pf.c linux-2.3.18as/drivers/block/paride/pf.c
--- /img/linux-2.3.18/drivers/block/paride/pf.c Sat Sep 11 00:07:23 1999
+++ linux-2.3.18as/drivers/block/paride/pf.c Tue Sep 21 16:59:02 1999
@@ -666,11 +666,11 @@ static int pf_reset( int unit )
         WR(0,6,DRIVE);
         WR(0,7,8);
 
- pf_sleep(2);
+ pf_sleep(20*HZ/1000);
 
         k = 0;
         while ((k++ < PF_RESET_TMO) && (RR(1,6)&STAT_BUSY))
- pf_sleep(10);
+ pf_sleep(HZ/10);
 
         flg = 1;
         for(i=0;i<5;i++) flg &= (RR(0,i+1) == expect[i]);
diff -urNp /img/linux-2.3.18/drivers/block/paride/pg.c linux-2.3.18as/drivers/block/paride/pg.c
--- /img/linux-2.3.18/drivers/block/paride/pg.c Wed Dec 23 17:44:41 1998
+++ linux-2.3.18as/drivers/block/paride/pg.c Tue Sep 21 20:28:33 1999
@@ -463,7 +463,7 @@ static int pg_reset( int unit )
         WR(0,6,DRIVE);
         WR(0,7,8);
 
- pg_sleep(2);
+ pg_sleep(20*HZ/1000);
 
         k = 0;
         while ((k++ < PG_RESET_TMO) && (RR(1,6)&STAT_BUSY))
diff -urNp /img/linux-2.3.18/drivers/block/paride/pt.c linux-2.3.18as/drivers/block/paride/pt.c
--- /img/linux-2.3.18/drivers/block/paride/pt.c Tue Dec 22 16:29:00 1998
+++ linux-2.3.18as/drivers/block/paride/pt.c Tue Sep 21 17:01:59 1999
@@ -498,7 +498,7 @@ static void pt_media_access_cmd( int uni
                 return;
         }
         pi_disconnect(PI);
- pt_poll_dsc(unit,100,tmo,fun);
+ pt_poll_dsc(unit,HZ,tmo,fun);
 }
 
 static void pt_rewind( int unit )
@@ -526,11 +526,11 @@ static int pt_reset( int unit )
         WR(0,6,DRIVE);
         WR(0,7,8);
 
- pt_sleep(2);
+ pt_sleep(20*HZ/1000);
 
         k = 0;
         while ((k++ < PT_RESET_TMO) && (RR(1,6)&STAT_BUSY))
- pt_sleep(10);
+ pt_sleep(HZ/10);
 
         flg = 1;
         for(i=0;i<5;i++) flg &= (RR(0,i+1) == expect[i]);
@@ -559,7 +559,7 @@ static int pt_ready_wait( int unit, int
           if (!p) return 0;
           if (!(((p & 0xffff) == 0x0402)||((p & 0xff) == 6))) return p;
           k++;
- pt_sleep(100);
+ pt_sleep(HZ);
         }
         return 0x000020; /* timeout */
 }
@@ -809,7 +809,7 @@ static ssize_t pt_read(struct file * fil
 
         while (count > 0) {
 
- if (!pt_poll_dsc(unit,1,PT_TMO,"read")) return -EIO;
+ if (!pt_poll_dsc(unit,HZ/100,PT_TMO,"read")) return -EIO;
 
             n = count;
             if (n > 32768) n = 32768; /* max per command */
@@ -895,7 +895,7 @@ static ssize_t pt_write(struct file * fi
 
         while (count > 0) {
 
- if (!pt_poll_dsc(unit,1,PT_TMO,"write")) return -EIO;
+ if (!pt_poll_dsc(unit,HZ/100,PT_TMO,"write")) return -EIO;
 
             n = count;
             if (n > 32768) n = 32768; /* max per command */

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Tue 21 Sep 1999 - 18:08:51 EDT