cdu31a flakyness in 2.1.89

Marty Leisner (leisner@sdsp.mc.xerox.com)
Thu, 12 Mar 1998 17:10:06 PST


I'm running modutils 2.1.71 (is there a newer one? I couldn't find it).

insmod cdu31a.o

gives me:
: leisner@compaq;insmod /lib/modules/2.1.89/cdrom/cdu31a.o
/lib/modules/2.1.89/cdrom/cdu31a.o: init_module: Device or resource busy

but modprobe works fine.

Anyway, the cdu31a.o driver is very flakey.
I compiled it with debug, and haven't had a problem in a few
tries (better than anything I've seen in a long time).

I started taking out debug statements until it normally logging,
only mounts wrote to the screen.

I didn't figure out why...this is working consistently:

--- cdu31a.c 1998/03/08 17:58:08 1.1
+++ cdu31a.c 1998/03/12 01:34:03
@@ -223,7 +223,7 @@
#define CDU31A_READAHEAD 4 /* 128 sector, 64kB, 32 reads read-ahead */
#define CDU31A_MAX_CONSECUTIVE_ATTENTIONS 10

-#define DEBUG 0
+#define DEBUG 1

/* Define the following if you have data corruption problems. */
#undef SONY_POLL_EACH_BYTE
@@ -1262,7 +1262,7 @@
unsigned int retry_count;


-#if DEBUG
+#if DEBUG*0
printk("Entering start_request\n");
#endif
log_to_msf(sector, params);
@@ -1305,7 +1305,7 @@
if (is_busy())
{
printk("CDU31A: Timeout while waiting to issue command\n");
-#if DEBUG
+#if DEBUG*0
printk("Leaving start_request at %d\n", __LINE__);
#endif
return(1);
@@ -1323,7 +1323,7 @@
sony_next_block = sector * 4;
readahead_dataleft = 0;
readahead_bad = 0;
-#if DEBUG
+#if DEBUG*0
printk("Leaving start_request at %d\n", __LINE__);
#endif
return(0);
@@ -1375,7 +1375,7 @@
{
unsigned long flags;

-#if DEBUG
+#if DEBUG*0
printk("Entering handle_abort_timeout\n");
#endif
save_flags(flags);
@@ -1397,7 +1397,7 @@
abort_read_started = 1;
}
restore_flags(flags);
-#if DEBUG
+#if DEBUG*0
printk("Leaving handle_abort_timeout\n");
#endif
}
@@ -1414,7 +1414,7 @@
volatile unsigned char val;


-#if DEBUG
+#if DEBUG*0
printk("Entering input_data\n");
#endif
/* If an XA disk on a CDU31A, skip the first 12 bytes of data from
@@ -1465,7 +1465,7 @@
val = read_data_register();
}
}
-#if DEBUG
+#if DEBUG*0
printk("Leaving input_data at %d\n", __LINE__);
#endif
}
@@ -1484,7 +1484,7 @@
unsigned int skip;


-#if DEBUG
+#if DEBUG*0
printk("Entering read_data_block\n");
#endif

@@ -1553,7 +1553,7 @@
{
get_result(res_reg, res_size);
}
-#if DEBUG
+#if DEBUG*0
printk("Leaving read_data_block at %d\n", __LINE__);
#endif
return;
@@ -1675,7 +1675,7 @@
}
}
}
-#if DEBUG
+#if DEBUG*0
printk("Leaving read_data_block at %d\n", __LINE__);
#endif
}
@@ -1700,7 +1700,7 @@
unsigned long flags;


-#if DEBUG
+#if 0*DEBUG
printk("Entering do_cdu31a_request\n");
#endif

@@ -1721,7 +1721,7 @@
end_request(0);
}
restore_flags(flags);
-#if DEBUG
+#if 0*DEBUG
printk("Leaving do_cdu31a_request at %d\n", __LINE__);
#endif
return;
@@ -1911,7 +1911,7 @@
sony_inuse = 0;
wake_up_interruptible(&sony_wait);
restore_flags(flags);
-#if DEBUG
+#if DEBUGi*0
printk("Leaving do_cdu31a_request at %d\n", __LINE__);
#endif
}
@@ -1933,7 +1933,7 @@
int mint = 99;
int maxt = 0;

-#if DEBUG
+#if DEBUG*0
printk("Entering sony_get_toc\n");
#endif

When it comes up with a mount, it prints:
Trying session 1
00 00
Reading session 1
add0 1, con0 4, poi0 a0, 1st trk 1, dsktyp 0, dum0 0
add1 1, con1 0, poi1 a1, lst trk 11, dummy1 0, dum2 0
add2 1, con2 1, poi2 a2 leadout start min 67, sec 43, frame 33
Trying session 2
20 11
VFS: Disk change detected on device 0f:00
CDU31A Warning: Read for block 68, expected 66

marty leisner@sdsp.mc.xerox.com
Don't confuse education with schooling.
Milton Friedman to Yogi Berra

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu