From: Bob Rahe (
Date: Mon Jun 15 1992 - 22:46:29 CDT

  Well, the responses (the few there have been) have trickled off to
nothing so time for a summary. Thanks to :

    (Yaosen Ko)
    (David P. Maynard)

  The bottom line seems to be, if you can get a CDROM drive to work with
512byte blocks, it will work. If you can make it default to that, it will
probably even be bootable. Unfortunately, the NEC 73M will do neither.
According to NEC tech support, it isn't possible to set it to 512 at all,
so that kinda blows it altogether.

  In addition, the program to change the blocksize that was sent by a
couple of people (see below) uses a function that the man page claims will
only work on an SS1, even tho I see it do SOMETHING when I tried it.

Selected responses below, thanks to all who helped.

Subject: Re: CDRom blues

SUN expects it's CDrom to send 512 byte blocks. Most drives use 2048
byte blocks. What you see is a SCSI overrun message.

First, the Unrecognized vendor message is completely harmless, I
have checked with source.

Second, if you cannot change the blocksize by DIL switch, and you don't
have source, I am afraid you cannot get the drive to work.
The sr.c CD-rom driver is pretty broken.

Good luck,

Geert Jan


This was in response to a request for info, he had posted a previous
summary on a scsi/cdrom problem:

Subject: Re: Non-Sun CDROM drives


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I had posted this to the comp.sys.sun.hardware group before; It is
the answer to using a toshiba cd-rom drive to read data only, not
boot nor audio. The problems that you describe with the cd-rom and
phase error suggest that parity is not enabled on the cd-rom drive.
You can disable parity by changing bits in the "scsi_options" value
in the vmunix kernel, or by setting them and rebuilding a new kernel.
I can't recall the exact bits, but a grep for SCSI_OPTIONS in the
sys/*.h files should find it, and the definitions. This is based on
experiences from IPC's, but should work on other 4c types. I currently
have a toshiba drive 3201B hooked to IPC, works fine. One caveat,
there must be a disk caddy in the drive to allow setting the sector
transfer size. This code also works with toshiba 3301 drives. When
you want the "unsupported vendor" stuff to go away, search the
kernel for 'hitachi' (2 places, case change, i recall) and replace
with the ( coincidentally? ) same length toshiba. The above is only
cosmetic, not required ;-)
*********** here is bit 'o code --works for me **********
>From Mon Feb 3 13:11:57 1992
Return-Path: <>
Received: from by (4.1/SMI-4.11)
        id AA01178; Mon, 3 Feb 92 13:11:51 PST
Received: by
        (5.57/WWU-H1.2/UW-NDC Revision: 2.21 ) id AA01658; Mon, 3 Feb 92 13:09:47 -0800
Received: by (5.57/10.0i); Mon, 3 Feb 92 13:09:44 -0800
Received: by (4.1/SMI-4.1)
        id AA01140; Mon, 3 Feb 92 13:10:56 PST
Date: Mon, 3 Feb 92 13:10:56 PST
From: (Ralph Kling)
Message-Id: <>
Subject: Re: CD-ROM drives
Status: R

        YES, it is possible! I have managed to connect one to a SS-2.
        However, there are a few differences between the SUN (=SONY) drive
        and the Toshiba drive. In particular, the SUN drive seems to use
        a default transfer block size of 512 bytes versus 2048 for the
        Toshiba. I wrote a little program that uses SUNs user-scsi-driver
        to correct this. You have to run that before trying to mount the
        drive! The "unrecognized vendor" message can be neglected.
        If you want to use the CD-audio capabilities you'll have to write
        your own driver (also via SUNs user-scsi-driver) since those commands
        are totally different from the SUN drive. Call Toshiba of America
        (sorry, I lost the number) and order the CD rom drive spec from them
        (will cost you $15).
        One more thing: The scsi-id for the CD rom needs to be 6.
        Good luck!!!


        Here is the program to set the transfer length to 512 bytes:

        # include <sys/types.h>
        # include <sys/buf.h>
        # include <sun/dkio.h>
        # include <scsi/targets/srdef.h>
        # include <scsi/impl/uscsi.h>
        # include <strings.h>

        # include <stdio.h>

        char cdrom[] = "/dev/rsr0";

        extern char * cdrom_status();

        /* group 0 commands */

        #define TEST 0x00
        #define REZERO 0x01
        #define SENSEREQ 0x03
        #define READ 0x08
        #define SEEK 0x0b
        #define NOP 0x0d
        #define INQ 0x12
        #define MODESEL 0x15
        #define RESERVE 0x16
        #define RELEASE 0x17
        #define MODESENSE 0x1a
        #define STARTSTOP 0x1b
        #define DIAGRCV 0x1c
        #define DIAGSND 0x1d
        #define MEDIUMLOCK 0x1e

        /* group 1 commands */

        #define READCAP 0x25
        #define READEXT 0x28
        #define SEEKEXT 0x2b

        /* group 6 commands */

        #define AUDIOTRACK 0xc0
        #define AUDIOPLAY 0xc1
        #define AUDIOSTILL 0xc2
        #define AUDIOSTOP 0xc3
        #define EJECT 0xc4
        #define CLOSE 0xc5
        #define AUDIOSUB 0xc6
        #define AUDIODISK 0xc7
        #define ROMMODE 0xc8


        #define CMDLEN(cmd) ((cmd >= 0x20) ? 10 : 6)


        main() {
                int fd;
                int i;
                struct uscsi_cmd ucmd;
                char * s_command;
                char * s_buffer;

                if ((fd = open(cdrom, 0)) == -1) {
                        fprintf(stderr, "open: ");
                s_command = (char *) malloc(10);
                if (s_command == NULL) {
                        printf("malloc error (command)\n");
                bzero(s_command, 10);
                s_buffer = (char *) malloc(256);
                if (s_buffer == NULL) {
                        printf("malloc error (buffer)\n");
                bzero(s_buffer, 256);
                s_command[0] = MODESEL;
                s_command[1] = 0x10;
                s_command[4] = 12;
                s_buffer[3] = 0x08;
                s_buffer[10] = 0x02;
                ucmd.uscsi_cdb = s_command;
                ucmd.uscsi_cdblen = 6;
                ucmd.uscsi_bufaddr = s_buffer;
                ucmd.uscsi_buflen = 4096;
                ucmd.uscsi_flags = USCSI_WRITE;
                i = ioctl(fd, USCSICMD, ucmd);
Hope that this works for you, too --
Bob Hayes < >
Western Washington University
Computer Science Dept., Bond Hall 302 Mail Stop 9062
Bellingham, Washington 98225
Obbligato Disclaimer: Once upon a time, I believed that, too.

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:43 CDT