Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sc01(7) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

adsc(7)

dpt(7)

ioctl(2)

mcis(7)

sd01(7)

st01(7)

sw01(7)

wd7000(7)






       sc01(7)                                                      sc01(7)


       NAME
             sc01 - CD-ROM Target Driver

       DESCRIPTION
             sc01 is a Portable Device Interface (PDI)-compliant CD-ROM
             target driver that provides access to one or more CD-ROM
             drives.  Each drive must be attached to a SCSI bus controlled
             by an PDI-compliant host adapter driver [for example, see
             adsc(7)].

             Access to a particular drive is accomplished using the sc01
             device files located in /dev/[r]cdrom.  Each device file
             identifies a particular drive based on the SCSI ID assigned to
             that drive.  The binding between a device file and a CD-ROM
             drive is as follows:

             /dev/rcdrom/cd0     CD-ROM drive with lowest SCSI ID

             /dev/rcdrom/cd1     CD-ROM drive with next to lowest SCSI ID
             and so on.

             Most CD-ROM drives can handle CD-ROM disks that contain two
             types of data: informational data and audio data.  The sc01
             driver allows access to both types of data.

             A CD-ROM disk that contains informational data is treated as a
             random-access storage device, such as a hard disk.  The
             information on the disk is divided into consecutively
             numbered, fixed-size (usually 2 Kbytes) sectors that can be
             accessed in any order.  The standard tools for reading data
             from a random-access device, such as dd(1M) or read(2), can be
             used to read informational data from a CD-ROM.  However, all
             write operations are prohibited.

             Audio commands control the operation of the drive's audio
             output hardware (usually a headphone jack located on the
             drive).  For example, the C_PLAYAUDIO ioctl causes the audio
             hardware to decode and convert the audio data to analog at a
             specific location on the disk, and play the audio on the
             drive's audio output hardware.  Audio data is not returned to
             the host system.

             All audio data commands are executed through the ioctl
             interface and often require a parameter structure that
             identifies the audio data to be acted upon.  Unlike
             informational data, audio data is not referenced by a sector


                           Copyright 1994 Novell, Inc.               Page 1













      sc01(7)                                                      sc01(7)


            address.  The methods used to identify a particular section of
            audio data should be described in the SCSI interface section
            of the reference manual supplied with your CD-ROM drive.
            Audio data cannot be read as if it were informational data,
            and informational data cannot be played using the drive's
            audio hardware.

         sc01 Device Nodes
            /dev/cdrom:

                  Nodes in this directory provide "Block I/O" access to
                  the represented CD-ROM drives.

                  cCbBtTlL    C - Controller Number
                              B - SCSI Bus Number
                              T - SCSI Target ID
                              L - SCSI Logical Unit Number

            /dev/rcdrom:

                  Nodes in this directory provide "Raw (Character) I/O" access
                  to the represented CD-ROM drives.

                  cCbBtTlL    C - Controller Number
                              B - SCSI Bus Number
                              T - SCSI Target ID
                              L - SCSI Logical Unit Number

                  cdromN            N - The drive number. The drives are numbered
                                  sequentially starting at 1 as they are
                                  found by the system.


         ioctl Calls
            The sc01 driver uses several ioctl(2) commands, listed below.
            Many of these ioctl(2) commands provide a convenient method
            for sending one of the preselected SCSI commands directly to
            the drive.  SCSI commands not explicitly supported by the sc01
            driver can be sent to the drive using the pass-through
            facility provided by the SDI host adapter driver. For an
            example, see adsc(7).

            The following ioctls are used to identify a target driver and
            to get a pass-through major and minor number for a target
            device.



                          Copyright 1994 Novell, Inc.               Page 2













       sc01(7)                                                      sc01(7)


             B_GETTYPE
                   Returns the type of peripheral bus (for example, scsi)
                   used and the name of this driver (for example, sc01).

             B_GETDEV
                   Returns the major and minor number of the pass-through
                   device for the CD-ROM drive.  For example, see adsc(7)
                   for details.

             The following ioctls cause the appropriate Group-0, Group-1,
             or Group-6 SCSI commands to be sent to the device.  These
             commands are defined by the SCSI bus specification and should
             also be described in the SCSI Interface section of the
             reference manual supplied with your CD-ROM drive.

             Group 0

                   C_TESTUNIT
                         Sends a Test Unit Ready command to the device.

                   C_REZERO
                         Sends a Rezero Device command to the device.

                   C_SEEK
                         Sends a Seek command to the device.

                   C_INQUIR
                         Sends an Inquiry command to the device and returns
                         the resulting data back to the caller.  The passed
                         buffer for C_INQUIR needs to be at least IDENT_SZ
                         (36) bytes. Otherwise, an underflow error occurs
                         and the command fails.

                   C_STARTUNIT
                         Sends a Start Unit command to the device.

                   C_STOPUNIT
                         Sends a Stop Unit command to the device.

                   C_PREVMV
                         Sends a Prevent Media Removal command to the
                         device.

                   C_ALLOMV
                         Sends an Allow Media Removal command to the
                         device.


                           Copyright 1994 Novell, Inc.               Page 3













      sc01(7)                                                      sc01(7)


            Group-1

                  C_READCAPA
                        Sends a Read Capacity command to the device and
                        returns the data sent by the drive.

            Group-6

                  C_AUDIOSEARCH
                        Sends an Audio Search command to the device.

                  C_PLAYAUDIO
                        Sends a Play Audio command to the device.

                  C_STILL
                        Sends a Still command to the device.

                  C_TRAYOPEN
                        Sends a Tray Open command to the device.

                  C_TRAYCLOSE
                        Sends a Tray Close command to the device.

            Note:  The Group 6 IOCTL's support only the drives that are
            software compatible with the Toshiba XM-3201B.

            The following ioctls are also supported by the sc01 driver.

                  B_GET_SUBDEVS
                        Returns the number of sub-devices supported by
                        this driver (for example, 1).

         Files
            /usr/include/sys/cd_ioctl.h
            /usr/include/sys/cdrom.h
            /usr/include/sys/sc01.h
            /etc/conf/pack.d/sc01/space.c
            /dev/[r]cdrom/cd*
            /usr/include/sys/scsi.h
            /usr/include/sys/sdi.h
            /usr/include/sys/sdi_edt.h

      REFERENCES
            adsc(7), dpt(7), ioctl(2), mcis(7), sd01(7), st01(7), sw01(7),
            wd7000(7)



                          Copyright 1994 Novell, Inc.               Page 4








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026