Re: cdu31a not working..

Marty Leisner (leisner@sdsp.mc.xerox.com)
Sat, 2 May 1998 19:50:12 PDT


I've been having problems with cdu31a for 2.1 for about 6
months...

I'm propagating these changes when I need to...

Methinks it might be some type of timing thing (a few well placed
prints solves the problem).

--- cdu31a.c.~1~ Mon Feb 9 19:12:54 1998
+++ cdu31a.c Thu Apr 30 00:21:09 1998
@@ -864,7 +864,7 @@
}
if (is_busy() || (!(is_result_ready())))
{
-#if DEBUG
+#if 1
printk("CDU31A timeout out %d\n", __LINE__);
#endif
result_buffer[0] = 0x20;
@@ -923,7 +923,7 @@
}
if (!is_result_ready())
{
-#if DEBUG
+#if 1
printk("CDU31A timeout out %d\n", __LINE__);
#endif
result_buffer[0] = 0x20;
@@ -952,7 +952,7 @@
}
if (!is_result_ready())
{
-#if DEBUG
+#if 1
printk("CDU31A timeout out %d\n", __LINE__);
#endif
result_buffer[0] = 0x20;
@@ -1034,7 +1034,7 @@
}
if (is_busy())
{
-#if DEBUG
+#if 1
printk("CDU31A timeout out %d\n", __LINE__);
#endif
result_buffer[0] = 0x20;
@@ -1090,7 +1090,7 @@
volatile int val;


-#if 0*DEBUG
+#if DEBUG
printk("Entering handle_sony_cd_attention\n");
#endif
if (is_attention())
@@ -1171,7 +1171,7 @@
}

num_consecutive_attentions = 0;
-#if 0*DEBUG
+#if DEBUG
printk("Leaving handle_sony_cd_attention at %d\n", __LINE__);
#endif
return(0);
@@ -1328,7 +1328,7 @@
#endif
return(0);
}
-#if DEBUG
+#if DEBUG || 1
printk("Leaving start_request at %d\n", __LINE__);
#endif
}
@@ -1586,7 +1586,7 @@
}
else
{
-#if DEBUG
+#if DEBUG || 1
printk("CDU31A timeout out %d\n", __LINE__);
#endif
res_reg[0] = 0x20;
@@ -1611,7 +1611,7 @@

if (!is_result_ready())
{
-#if DEBUG
+#if DEBUG || 1
printk("CDU31A timeout out %d\n", __LINE__);
#endif
res_reg[0] = 0x20;
@@ -1840,7 +1840,7 @@
new one. */
else if (block != sony_next_block)
{
-#if DEBUG
+#if DEBUG || 1
printk("CDU31A Warning: Read for block %d, expected %d\n",
block,
sony_next_block);
@@ -1977,14 +1977,14 @@
No need to check session 0, since session 0 is the same as session
1; the command returns different information if you give it 0.
*/
-#if DEBUG
+#if DEBUG || 1
memset(&sony_toc, 0x0e, sizeof(sony_toc));
memset(&single_toc, 0x0f, sizeof(single_toc));
#endif
session = 1;
while (1)
{
-#if DEBUG
+#if DEBUG || 1
printk("Trying session %d\n", session);
#endif
parms[0] = session;
@@ -1994,7 +1994,7 @@
res_reg,
&res_size);

-#if DEBUG
+#if DEBUG || 1
printk("%2.2x %2.2x\n", res_reg[0], res_reg[1]);
#endif

@@ -2003,7 +2003,7 @@
/* An error reading the TOC, this must be past the last session. */
break;
}
-#if DEBUG
+#if DEBUG || 1
printk("Reading session %d\n", session);
#endif

@@ -2097,8 +2097,6 @@
single_toc.dummyc0[5],
single_toc.dummyc0[6]);
#endif
-#undef DEBUG
-#define DEBUG 0

sony_toc.lead_out_start_msf[0] = bcd_to_int(single_toc.lead_out_start_msf[0]);
sony_toc.lead_out_start_msf[1] = bcd_to_int(single_toc.lead_out_start_msf[1]);

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