[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Floppy problems after long uptime

On Thu, 18 Feb 1999, Christopher C Chimelis wrote:

> I found the offending code in 2.2.1 (at least for the floppy
> driver...others could be involved).  I can work up a patch for that and
> 2.0.36 in a matter of hours, if you'd like.  I'm not sure how far reaching
> the problem is right now, though, and the changes may affect other things
> (doesn't look like it, though...the problem looks fairly well isolated).

Here's the patch for floppy.c that should solve the problem.  I haven't
tested it, but can if needed.  Let me know how it works, though.  Most
likely, the same fix will be needed for 2.0.36 (haven't gotten to it yet).

--- floppy.c	Sun Jan 10 17:59:59 1999
+++ /home/chris/floppy.new.c	Thu Feb 18 19:01:16 1999
@@ -604,10 +604,10 @@
 #define OLOGSIZE 20
 static void (*lasthandler)(void) = NULL;
-static int interruptjiffies=0;
-static int resultjiffies=0;
+static long int interruptjiffies=0;
+static long int resultjiffies=0;
 static int resultsize=0;
-static int lastredo=0;
+static long int lastredo=0;
 static struct output_log {
 	unsigned char data;
@@ -1824,7 +1824,7 @@
 	printk("floppy driver state\n");
-	printk("now=%ld last interrupt=%d last called handler=%p\n",
+	printk("now=%ld last interrupt=%ld last called handler=%p\n",
 	       jiffies, interruptjiffies, lasthandler);
@@ -1836,8 +1836,8 @@
 		       output_log[(i+output_log_pos) % OLOGSIZE].data,
 		       output_log[(i+output_log_pos) % OLOGSIZE].status,
 		       output_log[(i+output_log_pos) % OLOGSIZE].jiffies);
-	printk("last result at %d\n", resultjiffies);
-	printk("last redo_fd_request at %d\n", lastredo);
+	printk("last result at %ld\n", resultjiffies);
+	printk("last redo_fd_request at %ld\n", lastredo);
 	for (i=0; i<resultsize; i++){
 		printk("%2x ", reply_buffer[i]);

Reply to: