Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Motorola System V 88k Release 3.2 Version 1.2C

Media Vault

Software Library

Restoration Projects

Artifacts Sought



  MVME350(7)                                             MVME350(7)



  NAME
       mvme350 - MVME350 Streamer Tape Controller VMEmodule
       Interface

  DESCRIPTION
       The MVME350 driver controls one streaming tape drive per
       controller.  It provides advanced read/write access and tape
       control, having a very similar user interface to that of 9-
       track tapes.  The general form for MVME350 file names is:

            /dev/{r}mt/{bcs}ctape{n}

       where {r} is optional r, "raw" option and {n} is optional n,
       "no-rewind-on-close" option.
       If the optional r is present, then the device is the raw (or
       character) interface, otherwise the device is the block
       interface.  If the optional n is present, then the device is
       the no-rewind-on-close device, otherwise the device is the
       rewind-on-close device.  If the optional bcs is present,
       then all I/O to the tape device will be unbuffered by the
       MVME350 driver.

       NOTE:.
            The way that end of media (EOM) is handled by the
            MVME350 driver when double buffering is not BCS
            compliant. Because of this, the bcs_ctape tape devices
            have been added. In the following discussion of double
            buffering, all references to the tape device refer to
            the non-BCS tape device.


     Double Buffering.
       The MVME350 driver has been implemented with double
       buffering I/O processing.  When making an open(2) system
       call on a character (or raw) tape device, the MVME350 will
       normally allocate two large system buffers to use during
       I/O.  (See the section below regarding open(2) processing
       for exceptions.)  These buffers will then be used for all
       direct memory accesses (DMA) to and from the MVME350
       Streaming Tape Controller.  When making a read(2) system


  Page 1                                                   May 1989


















  MVME350(7)                                             MVME350(7)



       call, the data will first be read into one of the buffers,
       and then transferred to the reading program.  When making a
       write(2) system call, the data will first be transferred
       from the writing program into one of the buffers.  Only when
       the buffer is full will it be written to a streaming tape.

       The advantage of this double buffering scheme is that most
       MVME350 DMA transfers will be done very efficiently, thus
       keeping the tape ``streaming'' and wasting little or no
       space on the tape due to streaming tape underruns.  The
       default buffer size of the double buffers is 64 Kbytes for
       each buffer.

       When reading using the double buffers, the double buffering
       software will attempt to read ahead of the current read
       point.  Therefore, when the first buffer is finally
       exhausted, it's likely that the second buffer has already
       been filled.  In this case, the new read(2) request may be
       completed immediately and a new read ahead may begin.  The
       double buffering scheme will then stay ahead of the program
       that is reading the tape, and provide enough I/O overlap to
       permit efficient tape reading.

       When writing using the double buffers, the double buffering
       software will accept new write(2) requests until the current
       buffer is full.  The software will then write out the full
       buffer and switch to the other buffer to accept more output.
       If the other buffer has not yet been completely written to
       tape, then the request will hold up the writing program
       until the I/O request is completed.

       The default double buffer size requested by the driver may
       be changed by modifying the value of m350maxbsize in the
       sysgen vme350 file.  Due to the requirement that the buffer
       be physically contiguous in memory, the system may not be
       able to dynamically obtain a buffer of the requested size.
       When this is the case, a statically allocated buffer is used
       instead.  The size of the static buffer is determined by the
       value of the DBUFSZ static parameter in the sysgen kernel
       file.


  Page 2                                                   May 1989


















  MVME350(7)                                             MVME350(7)



     open(2) Processing.
       When the open(2) system call is made on an MVME350 streaming
       tape, the following processing will occur:

       1.   If the minor device number is illegal, then the open(2)
            will fail, returning the error status ENXIO.

       2.   If the tape unit is already open, then the open(2) will
            fail, returning the error status EBUSY.

       3.   If the tape unit is not ``on line'', then the open(2)
            will fail, returning the error status EIO.

       4.   If the tape unit is being opened for writing and the
            tape is write-protected, then the open(2) will fail,
            returning the error status EIO.

       5.   If the open(2) call is made with the ONDELAY option,
            then no DMA buffers will be allocated and all character
            I/O will occur unbuffered by the MVME350 driver. (Non
            bcs tape device only)

       6.   If the open(2) call is not made with the ONDELAY
            option, and if the driver is unable to allocate DMA
            buffers on a character device open, then the open(2)
            will fail, returning the error status ENXIO.  (Non bcs
            tape device only)

       NOTE:.
            The tape is left in its current position on open.


     Close(2) Processing.
       The following processing will occur upon a close(2) on a
       rewind-on-close tape device:

       1.   If the tape was opened read-only (ORDONLY), the tape
            is rewound to beginning of tape.

       2.   If the tape was opened for writing (ORDWR or


  Page 3                                                   May 1989


















  MVME350(7)                                             MVME350(7)



            OWRONLY), a file mark is written at the current tape
            position, and then the tape is rewound to beginning of
            tape.

       The following processing will occur upon a close(2) on a
       no-rewind-on-close tape device:

       1.   If the tape was opened read-only (ORDONLY), and either
            a file mark has already been encountered or the last
            tape operation was a tape ioctl(2), then the tape is
            left in its current position.

       2.   If the tape was opened read-only (ORDONLY), a file
            mark has not been encountered, and the last tape
            operation was not a tape ioctl(2), then the tape is
            advanced to just after the next filemark.

       3.   If the tape was opened for writing (ORDWR or
            OWRONLY), a file mark is written at the current tape
            position and the tape is positioned immediately after
            this file mark.

       When a character (raw) device is closed, the double buffers
       (if any) will normally be deallocated.  (Non bcs tape device
       only) The only exception to this rule occurs when an end-
       of-media is encountered while writing a streamer tape.  This
       condition occurs when the program attempts to write off the
       end of a tape.  The operator is notified of the condition by
       a message printed on the system console.  The MVME350 driver
       will then retain the double buffers and all data currently
       residing in them (which is not yet written to tape).  If the
       same process then makes an open(2) request (for writing) on
       the same tape, then all remaining data in the double buffers
       will be written to tape prior to any new I/O requests.  In
       this way, programs like cpio(1) may be used to write files
       that span more than one tape.  If any other process opens
       the device next, or if the device is not opened for writing,
       then the double buffers will be flushed (with an error
       message printed on the system console).



  Page 4                                                   May 1989


















  MVME350(7)                                             MVME350(7)



       In all cases, the MVME350 driver will not complete close(2)
       processing until all streaming tape operations are done.
       Thus, the streaming tape should not be ejected before the
       program that is using the streaming tape is done.


     ioctl(2) Processing
       The MVME350 driver supports several ioctl(2) functions on
       the character or raw device.  These functions permit control
       functions beyond the normal open(2), close(2), read(2), and
       write(2) system calls.  The following functions, as
       specified by the ioctl(2) request parameter, are supported:

       MTIOCTOP
            performs various operations on the tape as specified by
            the mt_op field of the mtop structure, passed in the
            ioctl(2) argument parameter - see mtio(4)

            MTWEOF - Write end-of-file record(s) at the current
            tape position; the number of end-of-file records
            written is specified by mt_count.

            MTFSF - Forward space file(s) from the current tape
            position; mt_count specifies the number of files to be
            spaced forward.

            MTFSR - Forward space record(s) from the current tape
            position; mt_count specifies the number of records to
            be spaced forward.

            MTREW, MTOFFL - Rewind the tape.

            MTRET - Retension the tape.

            MTERA - Erase the tape.

       M350SETDMA (Non bcs tape device only)
            sets the character device DMA buffering size.  The
            ioctl(2) argument parameter is the new buffer size.  A
            buffer size of zero disables double buffering.  Only


  Page 5                                                   May 1989


















  MVME350(7)                                             MVME350(7)



            the superuser may set the DMA buffer size.

       M350GETDMA (Non bcs tape device only)
            returns the character device DMA (double) buffering
            size.  The ioctl(2) argument parameter is the address
            (in the user program) of the memory location to put the
            DMA buffering size.  If double buffering is currently
            enabled, this function returns the size of the smallest
            of the two buffers.

       M350BYTESWAP
            enables/disables the swapping of pairs of bytes in the
            data being read or written.  If the ioctl(2) argument
            parameter is nonzero, byte swapping is enabled; if
            zero, byte swapping is disabled.


     mt(1) Usage.
       The mt(1) utility can be used to gain quick access to the
       MVME350 devices.  See the mt(1) manual page for more
       details.  The program supports the following functions:
       rewind, retension, erase, and tape positioning.


     Error Messages
       The MVME350 generates many different error messages.  These
       error messages, printed in English, attempt to provide
       enough information to permit the operator to diagnose tape
       problems.  Most error messages start with a line that prints
       out the controller and drive number that has the error.  The
       first line of the error message looks like:

            MVME350: Error on controller 0, drive 0

       The second and subsequent lines of the error message
       describe the symptoms encountered:

       Filemark detected.
            The last operation encountered a filemark.  When
            encountered, a filemark will normally terminate reading


  Page 6                                                   May 1989


















  MVME350(7)                                             MVME350(7)



            and return without an error status.

       Unrecoverable data error.
            Some form of unrecoverable error has occurred.  The
            operation should be retried.  If the operation
            continues to get this error, then the tape may be
            damaged.

       End of Media.
            The tape has encountered the end-of-media indicator.
            Further reading or writing of this tape is not allowed
            without rewinding.

       Write Protected.
            The tape's write-protect switch is set to SAFE.
            Normally, the open(2) will fail when attempting to open
            a write-protected tape for write.

       Drive not online.
            The MVME350 does not detect an ``on-line'' status from
            the streamer tape drive.  Check that all cables are
            properly attached.  If so, then retry the operation.
            If the problem persists, then the streamer tape drive
            is probably damaged.

       Cartridge not in place.
            No streamer tape cartridge has been loaded into the
            selected tape drive.  Check to be sure the proper
            special file has been used to access the tape.  If this
            problem persists, then the streamer tape drive is
            probably damaged.

       Beginning of Media.
            The beginning-of-media has been encountered.  The tape
            is now rewound correctly.

       No data detected.
            The MVME350 has not detected any data on the tape
            during a read operation.  A read has probably been
            attempted past the end-of-data.


  Page 7                                                   May 1989


















  MVME350(7)                                             MVME350(7)



       No file mark encountered
            An attempt to find a filemark has failed.  The desired
            filemark appears not to be on the tape.

       Not at beginning of tape.
            The tape is not at the beginning-of-tape as expected.

       Tape reset did not occur.
            After every reported error, the MVME350 attempts to
            reset the tape drive.  If the reset fails, this error
            message will be printed.

       Timeout.
            Some internal timeout has occurred, aborting the
            operation.  Try the operation again.  If the problem
            persists, then try a new tape or tape drive.

       Bad Unit.
            A tape drive unit failed to respond.  Try the operation
            again.  If the error persists, then the cables or tape
            drive are probably damaged.

       Bad Drive.
            A tape drive unit failed to respond.  Try the operation
            again.  If the error persists, then the cables or tape
            drive is probably damaged.

       If an error message has only the first line, then retry the
       operation.  If the error persists, then the MVME350
       controller, the MVME350 driver software, or the streaming
       tape drive may be damaged or confused.  In persistent
       errors, resetting the machine or cycling power will
       sometimes clear the problem.

       The MVME350 driver also produces some warning messages.
       These warning messages are not fatal errors but are
       important to the operator.  The warning messages are:

       DMA buffers still active.
            The last write onto the tape (using double buffering)


  Page 8                                                   May 1989


















  MVME350(7)                                             MVME350(7)



            encountered the end-of-media.  The buffers are being
            retained for subsequent write operations (see the
            section on Double Buffering above).

       DMA buffers discarded.
            The new open(2) request is by a different program or is
            not requesting to write.  The retained buffers are
            discarded (see the section on Double Buffering above).

       Initialization error.
            The MVME350 initialization sequence did not succeed.
            The hexadecimal value following the error message
            should be reported to the system administrator.


  FILES
       /dev/rmt/*
       /usr/include/sys/mvme350.h


  SEE ALSO
       mt(1) in the User's Reference Manual.
       open(2), close(2), ioctl(2) in the Programmer's Reference
       Manual.
       mtio(4) Programmer's Reference Manual.

















  Page 9                                                   May 1989
















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