Subject: Re: CDROM oddity :-)
To: None <port-pmax@NetBSD.ORG>
From: Michael L. Hitch <mhitch@lightning.oscs.montana.edu>
List: port-pmax
Date: 04/05/1998 19:14:48
On Apr  5,  7:46pm, mjbedy wrote:
>   dd if=/dev/rz4a of=/dev/null
> 
>   I did this a couple times (I was basically amused that I had a singel
> speed CD-ROM - it says it's an RRD42, or something similar to that - I'm
> not sitting next to it right now.) Suddenly, BOOM, the system rebooted.

  This sounds like it might be the SCSI driver getting in trouble and
rebooting the system when it gets an unexpected condition.  It can't
reasonably do a panic() at that point, since the driver state is in the
middle of an operation and the driver doesn't know how to reset things.

  Most of the places where the driver will reboot the system will now
display a message with some information about what it found wrong (with
the idea that I might be able to glean enough information about the problem
to figure out how to recover from it).  There is one place where no message
is displayed unless the kernel was configured with DEBUG (which is not
the case with the GENERIC kernel).

> I'll see if a can reproduce it later. I have the kernal sources, so I can
> compile a new one if need be - is there a way to get it to drop into a
> debug mode instead of rebooting if Something Bad happens?

  I you can, try applying this patch to sys/dev/tc/asc.c.  This will always
display the missing message.  If you get this message before the system
reboots, then that will verify where this is happening and I can try to
analyze a recovery procedure.  I need to have a reproducible problem
before I try to fix it, since I want to make sure I don't introduce something
that may silently corrupt data.

--- asc.c.orig	Thu Mar 26 05:19:40 1998
+++ asc.c	Wed Apr  1 10:14:42 1998
@@ -1049,10 +1079,8 @@
 				state->script = asc->script;
 		} else if (state->flags & DMA_IN) {
 			if (len) {
-#ifdef DEBUG
-				printf("asc_intr: 1: bn %d len %d (fifo %d)\n",
-					asc_debug_bn, len, fifo); /* XXX */
-#endif
+				printf("asc_intr: 1: len %d (fifo %d)\n",
+					len, fifo); /* XXX */
 				goto abort;
 			}
 			/* setup state to resume to */


>   Also, does the current SCSI driver support reading audio CD info? I
> found lotsa docs on the MI version of the drivers, but noting on the
> version used in the pmax. I miss being able to snatch sound effects off of
> a CD. My current IDE drive on my PC won't do it... 

  Consider yourself lucky that the driver even supports data CDROMs :-)
I don't think the driver has any support for audio stuff, so you would
either have to add that to the driver, or use the SDIOCSFORMAT ioctl to
send raw commands to the device [which may also require modifying the
driver to allow audio commands to be accepted].

Michael

-- 
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA