SUMMARY: Toshiba CDROM on Solaris 2.2

From: Daniel R. Bidwell (bidwell@andrews.edu)
Date: Fri Sep 10 1993 - 03:53:42 CDT


Daniel R. Bidwell said:

> I have a Toshiba CDROM which has a minimum block size of 2048 bytes per
> transfer. The Sun drivers don't like that large of a block size.
> Anyone have any ideas for how to convince the driver to accept the 2048
> byte block size? I will summerize.

Summary:
1) 2 programs to change the scsi interface.
2) 1 vender eprom upgrade.
3) 1 description of how to cut some traces on the CD drive
4) 1 kernel patch to /kernel/drv/sd

I tried both of the two programs to change the scsi interface but could
not get the system to allow me to open the devices to change them. I
didn't try contacting the vendor or cutting the traces, (sounds a little
too permanent). The 3 word patch to the sd driver worked mostly. I
applied the 3 word patch to the sd driver and was able to boot a machine
from the cdrom as well as use it subsequently.

The patched sd driver works for any kind of floppy that I have used but
vold can't seem to mount anything with it. Vold just loops eating up
cpu time until I kill it. I don't really need vold at this time anyway
so no great loss.

The following are the full comments. Thanks to all that responded.

>From rackow@mcs.anl.gov (Gene Rackow)

Suggested to check with the archives at Louisiana Tech with gopher.

I did this and came up with two summaries that used a program to change
the scsi block size.

From: msuomi@tiger.ttl.fi (Suomi Mika ttl)

        Hello,

        You need sun_cd.c. FTP it from ftp.cdrom.com.
        It works fine with XM-3401B and SS10+4.1.3

        I dont forward it now, but if you not get 20+n copy of
        that program or can't FTP it, ask it from me.

        It's very short program.

        Mika Suomi msuomi@ttl.fi
        Turku Telephone Company, Finland

From: hkatz@nucmed.NYU.EDU (Henry Katz)

you're in luck if you have the tosh. 3401, this one I understand is board
configurable to boot up on a sun. Call up toshiba and ask engineers or
check previous WAIS for this info.

Henry Katz
hkatz@nucmed.med.nyu.edu

From: n2976@rodnite.cray.com (Andrew T. Rodnite)

Toshiba CD-ROM

Hi,

        I have one too, the only solution to the problem is to take an
        exacto knife to two traces found on the CD-ROM's PCB board.
        This will change the drive's addressing scheme. Ideally this
        drive you bought from a reliable vendor so that you can send
        it back and have them do the work. :-) If you are a do it your-
        selfer the fix is as follows:

        Take apart the drive. At the rear end of the drive's PCB board
        on the top you will see two circular solder blobs(?) if you take
        a magnifying glass or scope to the these blobs you will see a
        fine line of solder connecting the two halves of solder that make
        up the circle. With an exacto knife carefully cut the trace found
        within each circle. BE VERY CAREFULL AS THE BOARD IS A MULTI LAYER
        BOARD AND CUTTING TO DEEPLY CAN DAMAGE INNER TRACES. Try out the
        drive if you did not cut deeply enough the first time repeat the
        proceedure. This of course voids your warrantee with Toshiba.

                                                Andrew Rodnite
                                                Cray Research
                                                rodnite@steamboat
                                                (715) 726-4650

From: larry@ma.pdc.com (Larry Freeman)

Daniel,

Toshiba has an EPROM that emulates Sun's High Sierra format. If your intention
is to be able to read Sun format CD-ROM's, Call your dealer or Toshiba to get
the upgrade. If you need phone numbers for Toshiba, I probably have them
around here somewhere.

Regards,

Larry Freeman Phone: 1-617-861-7800
System Engineer Fax: 1-617-861-7891
PDC Corporation EMAIL: larry@ma.pdc.com

From: Keith White <kwhite@csi.UOttawa.CA>
Daniel R. Bidwell said:

> I have a Toshiba CDROM which has a minimum block size of 2048 bytes per
> transfer. The Sun drivers don't like that large of a block size.
> Anyone have any ideas for how to convince the driver to accept the 2048
> byte block size? I will summerize.

A patch for Solaris2.1 was posted by jk@tools.de to the newsgroup
comp.unix.solaris. I have modified it for Solaris2.2 and include it
here:

---cut here---
From: jk@tools.de (Juergen Keil)
Newsgroups: comp.unix.solaris,alt.cd-rom
Subject: Re: HELP: Toshiba XM-3401B CD-ROM drive does not work on Solaris2.1
Date: 7 Aug 93 15:42:55
Organization: TooLs GmbH, Bonn, Germany
Message-ID: <JK.93Aug7154255@leo.tools.de>

> I got Toshiba XM-3401B CD-ROM drive. And I tried to attach/use
> on SPARCstation on Solaris2.1. But this CD-ROM drive sets default
> (initial) block size 2048 byte/sec. So, Sun's sd driver does not
> work correctly.

>From the console messages included in your posting I conclude that
you're using a sun4m kernel. I'm using the patch below on a sun4c
machine, I don't know if the procedure/patch below works for the sun4m
kernel architecture, too.

=====================================================================

For installing Solaris 2.2 from a Toshiba XM-3[34]01 or a NEC CDR 84.1
CDROM drive you can use the following procedure:

  1. At the monitor prompt, boot kadb from the Solaris 2.2 CD
     (Btw. you need at least Boot Prom revision 2.4, older Boot
     Proms can't boot from a 2048 bytes/sector CDROM drive)

        ok boot cdrom kadb -d

     The monitor load kadb an says something like

        Rebooting with command: cdrom kadb -d
        Boot device: /sbus/esp..../sd@6,0:c File and Args: kadb -d
        kadb:

  2. At the kadb: prompt press <RETURN>, this will load
     /kernel/unix from the cd.

        kadb: /kernel/unix
        Size: xxx+yyy+zzz bytes
        /kernel/unix loaded - wwwwww bytes used
        kadb[0]:

  3. At the kadb[0]: prompt, set a breakpoint at main+10 and start the
     kernel:

        kadb[0]: main+10:b
        kadb[0]: :c

     The kernel starts and loads all required device drivers (esp. the
     harddisk driver, which we'll want to patch). Then it will stop at
     our breakpoint. The following messages appear on the screen:

        SunOS Release 5.2 Version ....
          .
          .
          .
        breakpoint main+10: call clkstart
        kadb[0]:

  4. Now the harddisk driver (which also supports cdrom drives) is loaded
     and we can install the patch: Again at the kadb[0]: prompt type

        kadb[0]: sr_mode_select+24?W 1b054400 9e07bff8 da27bff8

     Before patching, you might want to verify the original code: Type

        kadb[0]: sr_mode_select?i

     and some more returns. The original code should look like this:

        sr_mode_select: save %sp, -0x68, %sp
        sr_mode_select+4: mov 0x24, %o0
        sr_mode_select+8: call sr_mode_select + 8
        sr_mode_select+0xc: clr %o1
        sr_mode_select+0x10: mov %o0, %i5
        sr_mode_select+0x14: add %fp, -0x8, %o0
        sr_mode_select+0x18: call sr_mode_select + 0x18
        sr_mode_select+0x1c: mov 0x6, %o1
        sr_mode_select+0x20: stb %i2, [%fp - 0x4]
        sr_mode_select+0x24: mov 0x15, %o5
        sr_mode_select+0x28: add %fp, -0x8, %o7
        sr_mode_select+0x2c: stb %o5, [%fp - 0x8]

     After the patch is installed, we have

        sr_mode_select+0x24: sethi %hi(0x15100000), %o5
        sr_mode_select+0x28: add %fp, -0x8, %o7
        sr_mode_select+0x2c: st %o5, [%fp - 0x8]

  5. Continue the installation with :c at the kadb[0]: prompt

        kadb[0]: :c

The kernel will complain once about a data overrun on the first access
to the CDROM, but should have no further problems with the Toshiba/NEC
CDROM drive.

The same patch can be used on an already installed Solaris 2.2 system:
As root, type:

        # cp /kernel/drv/sd /kernel/drv/sd.orig
        # adb -w /kernel/drv/sd
        sr_mode_select+24?W 1b054400 9e07bff8 da27bff8
        $q
        #

and reboot.

With this patch installed you can access mode1 data cds and audio cds
(with x_cdplayer, workman). To make use of the other features of the
Toshiba drives (reading XA type discs (Electronic Book CDs, Photo
CDs), multisession discs (PhotoCD) or the digital audio samples from
audio tracks) you'll need a third party scsi target driver (e.g our's
:-), though.

--
Juergen Keil          jk@tools.de ...!{uunet,mcsun}!unido!tools!jk

---cut here--- ...keith -- Keith White, Department of Computer Science, University of Ottawa kwhite@csi.uottawa.ca [+1 613 564 5455]

A special thanks to:

>From rackow@mcs.anl.gov (Gene Rackow) From: msuomi@tiger.ttl.fi (Suomi Mika ttl) From: hkatz@nucmed.NYU.EDU (Henry Katz) From: n2976@rodnite.cray.com (Andrew T. Rodnite) From: larry@ma.pdc.com (Larry Freeman) From: Keith White <kwhite@csi.UOttawa.CA> -- Daniel R. Bidwell | bidwell@andrews.edu Andrews University Computer Science & Information Systems Department If two always agree, one of them is unnecesary "Friends don't let friends do DOS" "In theory, theory and practice are the same. In practice, however, they are not."



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:10 CDT