VAXELN Device Drivers Guide

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      VAXELN Device Drivers Overview

  2      Ethernet/IEEE 802 Datalink Drivers

  2.1     Datalink Driver Images

  2.2     Building Datalink Drivers into VAXELN Systems

  3      Disk Drivers

  3.1     Disk Driver Images

  3.2     Building Disk Drivers into VAXELN Systems

  3.3     Disk Specifications
    3.3.1      RA Disk Drives
    3.3.2      RB Disk Drives
    3.3.3      RD Disk Drives
    3.3.4      RF Disk Drives
    3.3.5      RRD Compact Disc Drives
    3.3.6      RX Diskette Drives
    3.3.7      RZ Disk Drives
    3.3.8      TU58 Cassette Drive

  3.4     Disk Logical I/O

  3.5     Disk Driver Interface to the File Service

  3.6     Power-Failure Recovery for Disk Devices

  3.7     Direct Device Access for Disk Devices
    3.7.1      Establishing Circuits for the DDA Disk Interface
    3.7.2      Reading Data from and Writing Data to a Local Disk
      3.7.2.1      Creating a Message for Disk DDA Message Tranfers
      3.7.2.2      Transferring Disk DDA Data
    3.7.3      Reading Logical Blocks from an Unmounted Disk
    3.7.4      Reading Logical Blocks from a Mounted Disk
    3.7.5      Transferring Data to a System Region

  3.8     Virtual-Memory Disk Driver

  4      Tape Driver

  4.1     Tape Driver Image

  4.2     Building the Tape Driver into VAXELN Systems

  4.3     Tape Specifications

  4.4     Tape Logical I/O

  4.5     Tape Driver Interface to the File Service

  4.6     Power-Failure Recovery for Tape Devices

  4.7     Error Recovery

  5      Printer Drivers

  5.1     Printer Driver Images

  5.2     Building Printer Drivers into VAXELN Systems

  5.3     Gaining Access to Printer Devices from Application Programs

  5.4     Modifying Printer Driver Behavior

  6      Terminal Drivers

  6.1     Terminal Driver Images

  6.2     Building Terminal Drivers into VAXELN Systems

  6.3     Terminal I/O

  6.4     Type-Ahead and Synchronization

  6.5     Terminating Lines of Input

  6.6     Setting Up Point-to-Point DDCMP Communication

  6.7     Direct Device Access for Serial-Line Devices
    6.7.1      Establishing Circuits for Serial-Line Communication
    6.7.2      Retrieving and Setting Terminal Characteristics
    6.7.3      Reading and Writing Serial-Line Data
      6.7.3.1      Using a User-Defined Message to Read and Write Data
      6.7.3.2      Specifying Read Options
      6.7.3.3      Checking for Read Operation Error Conditions
      6.7.3.4      Programming Applications That Read and Write Serial-Line Data
    6.7.4      Setting Serial Lines to the Spacing State
    6.7.5      Monitoring the Use of Out-of-Band Characters
      6.7.5.1      Creating an Out-of-Band Character Response Port
      6.7.5.2      Requesting Out-of-Band Character Notification
      6.7.5.3      Waiting on the Out-of-Band Character Response Port
      6.7.5.4      Receiving Out-of-Band Characters
      6.7.5.5      Canceling Out-of-Band Character Notification
      6.7.5.6      Programming Applications that Monitor the Use of Out-of-Band Characters

  6.8     Using Control Characters

  6.9     Using Escape and Control Sequences
    6.9.1      Escape Sequence Syntax
    6.9.2      Control Sequence Syntax
    6.9.3      Using VT52 Terminal Escape Sequences

  6.10    Using Modem Control
    6.10.1     Retrieving and Setting Modem Characteristics
    6.10.2     Monitoring Modem Events
      6.10.2.1     Creating a Modem Event Response Port
      6.10.2.2     Requesting Modem Event Notification
      6.10.2.3     Waiting on the Modem Event Response Port
      6.10.2.4     Receiving Modem Event Data
      6.10.2.5     Canceling Modem Event Notification
      6.10.2.6     Programming Applications that Monitor Modem Events

  6.11    Performing Parallel I/O

  7      Small Computer System Interface Driver

  7.1     SCSI Class/Port Driver Architecture

  7.2     Mechanisms for Adding Device Support

  7.3     Using the VAXELN SCSI Disk Class Driver

  7.4     Using the VAXELN SCSI Generic Class Driver
    7.4.1      Creating Control Ports for Communicating with the Generic Class Driver
    7.4.2      Requesting SCSI Bus Configuration Data
    7.4.3      Connecting to SCSI Devices
    7.4.4      Issuing SCSI Commands
    7.4.5      Programming a Generic Class Driver Message Interface Application

  7.5     Developing User-Defined SCSI Class Drivers
    7.5.1      Modifying the SCSI Driver Start-Up Module
    7.5.2      Programming SCSI Class Drivers
      7.5.2.1      Including the VAXELN SCSI Driver Modules
      7.5.2.2      Declaring Routine Address and Device Lock Structures as External Data
      7.5.2.3      Setting Up an Entry Point
      7.5.2.4      Checking for Devices to Service
      7.5.2.5      Setting the Current Connection Flag
      7.5.2.6      Creating a SCSI Device Process
      7.5.2.7      Calling Port Interface Routines
      7.5.2.8      Allocating I/O Request Packets for Devices
      7.5.2.9      Mapping Data Buffers for I/O Requests
      7.5.2.10     Issuing SCSI Commands
      7.5.2.11     Initializing a SCSI Device Controller
      7.5.2.12     Servicing Asynchronous Events
      7.5.2.13     Programming a User-Defined SCSI Class Driver
    7.5.3      Compiling and Linking SCSI Driver Modules

  8      Realtime Device Drivers

  8.1     Using the ADQ32 Driver Interface
    8.1.1      Setting Up the ADC Parameter List
    8.1.2      Initializing an ADQ32 Module
    8.1.3      Reading Analog Data from an ADQ32 Module
      8.1.3.1      Allocating ADQ32 Memory Buffers
      8.1.3.2      Issuing ADQ32 Read Requests
      8.1.3.3      Starting ADQ32 Data Processing
      8.1.3.4      Polling for Completed ADQ32 Requests
    8.1.4      Reinitializing an ADQ32 Module
    8.1.5      Programming an ADQ32 Device Application

  8.2     Using the ADV11-C/AXV11-C Driver Interface
    8.2.1      Initializing an ADV11-C or AXV11-C Module
    8.2.2      Programming ADV11-C or AXV11-C Read and Write Operations
      8.2.2.1      Issuing ADV11-C or AXV11-C Read Requests
      8.2.2.2      Issuing AXV11-C Write Requests
    8.2.3      Reinitializing an ADV11-C or AXV11-C Module
    8.2.4      Initiating Data Conversions with a KWV11-C Realtime Clock

  8.3     Using the ADV11-D Driver Interface
    8.3.1      Initializing an ADV11-D Module
    8.3.2      Reading Analog Data from an ADV11-D Module
      8.3.2.1      Allocating ADV11-D Memory Buffers
      8.3.2.2      Issuing ADV11-D Read Requests
      8.3.2.3      Polling for Completed ADV11-D Requests
    8.3.3      Reinitializing an ADV11-D Module

  8.4     Using the DLVJ1 Driver Interface
    8.4.1      Initializing a DLV11-J Module
    8.4.2      Programming DLV11-J Read and Write Operations
      8.4.2.1      Issuing DLV11-J Read Requests
      8.4.2.2      Issuing DLV11-J Write Requests

  8.5     Using the DRB32 Driver Interface
    8.5.1      Initializing a DRB32 Device
    8.5.2      Programming DRB32 Read and Write Operations
      8.5.2.1      Allocating DRB32 Memory Buffers
      8.5.2.2      Preparing DRB32 Memory Buffers for Transfers
      8.5.2.3      Issuing DRB32 Transfer Requests
      8.5.2.4      Polling for Completed DRB32 Requests
    8.5.3      Reinitializing a DRB32 Device
    8.5.4      Using the DRB32 Control Registers
    8.5.5      Reading and Writing Data Between Two DRB32-W Devices
    8.5.6      Programming a DRB32 Device Application

  8.6     Using the DRQ3B Driver Interface
    8.6.1      Initializing a DRQ3B Device
    8.6.2      Programming DRQ3B Read and Write Operations
      8.6.2.1      Allocating Memory Buffers
      8.6.2.2      Setting Up DRQ3B Transfer Request Packets
      8.6.2.3      Preparing DRQ3B Memory Buffers for Transfers
      8.6.2.4      Issuing DRQ3B Transfer Requests
      8.6.2.5      Polling for Completed DRQ3B Transfer Requests
      8.6.2.6      Freeing DRQ3B Transfer Request Packets
    8.6.3      Reinitializing a DRQ3B Device
    8.6.4      Using the DRQ3B Function Bits
    8.6.5      Programming a DRQ3B Device Application

  8.7     Using the DRV11-J Driver Interface
    8.7.1      Initializing a DRV11-J Device
    8.7.2      Programming DRV11-J Read and Write Operations
      8.7.2.1      Preparing DRV11-J I/O Buffers for Data Transfers
      8.7.2.2      Issuing DRV11-J Transfer Requests

  8.8     Using the DRV11-WA Driver Interface
    8.8.1      Initializing a DRV11-WA Device
    8.8.2      Programming DRV11-WA Read and Write Operations
      8.8.2.1      Allocating DRV11-WA Memory Buffers
      8.8.2.2      Preparing DRV11-WA Memory Buffers for Transfers
      8.8.2.3      Issuing DRV11-WA Transfer Requests
      8.8.2.4      Polling for Completed DRV11-WA Requests
    8.8.3      Using the DRV11-WA Control Status Register
    8.8.4      Reading and Writing Data Between Two DRV11-WA Devices
    8.8.5      Programming a DRV11-WA Device Application

  8.9     Using the IEQ11-A/IEU11-A Driver Interface
    8.9.1      Establishing Communication with the IEQ11-A/IEU11-A Driver
    8.9.2      Configuring an IEC/IEEE 488 Instrument Bus
    8.9.3      Initializing IEQ11-A/IEU11-A Units
    8.9.4      Setting Up Modifier Data
    8.9.5      Setting Up Event Watching
      8.9.5.1      Setting Up an Application Event Process
      8.9.5.2      Defining Event Data
      8.9.5.3      Enabling Event Watching
    8.9.6      Establishing and Changing the Controller-In-Charge
    8.9.7      Sending Instrument Bus Commands
      8.9.7.1      Sending Interface Commands or Data
      8.9.7.2      Sending Auxiliary Commands
    8.9.8      Transferring Data on IEC/IEEE 488 Instrument Buses
      8.9.8.1      Defining Data Paths
      8.9.8.2      Initiating Data Transfers
    8.9.9      Issuing Service Requests
    8.9.10     Handling Service Requests
      8.9.10.1     Detecting Service Requests
      8.9.10.2     Initiating Serial Polls
      8.9.10.3     Performing Parallel Polls
        8.9.10.3.1      Configuring Devices for Parallel Polls
        8.9.10.3.2      Controlling Responses to Parallel Polls
        8.9.10.3.3      Initiating Parallel Polls
      8.9.10.4     Processing Service Requests
    8.9.11     Requesting Bus and Controller Status Information
    8.9.12     Programming an IEQ11-A/IEU11-A Device Application

  8.10    Using the KWV11-C Driver Interface
    8.10.1     Initializing a KWV11-C Clock
    8.10.2     Programming KWV11-C Read and Write Operations
      8.10.2.1     Issuing KWV11-C Read Requests
      8.10.2.2     Issuing KWV11-C Write Requests
    8.10.3     Reinitializing a KWV11-C Clock

  A   Status Values/Exception Names

  B   SCSI Port Driver Interface Routines

  B.1     Base SCSI Port Driver Interface Routines

  PORT ALLOCATE DEVICE

  PORT EXIT HANDLER

  PORT FREE DEVICE

  PORT INITIALIZE CONTROLLER

  PORT ISSUE COMMAND

  PORT MAP BUFFER

  PORT UNMAP BUFFER

  B.2     SCSI Port Driver Interface Extension Routines for Asynchronous Event Notification

  PORT ATTACH TARGET MODE

  PORT DETACH TARGET MODE

  PORT FINISH CMD

  PORT RECEIVE BYTES

  PORT RELEASE BUS

  PORT SEND BYTES

  PORT SENSE PHASE

  PORT SET PHASE

  C   VAXELN Requirements and Restrictions for Third-Party SCSI Devices

  C.1     Conformance to Standards

  C.2     Cabling

  C.3     Connector Requirements

  C.4     SCSI Bus Termination

  C.5     Terminator Power

  C.6     Dynamic Reconfiguration of Devices

  C.7     External Boxes

  C.8     Device Behavior Following Power-On

  C.9     Device Behavior Following Bus Reset

  C.10   Data Transfer

  C.11   Initiator/Target Operation

  C.12   SCSI IDs and Logical Unit Numbers

  C.13   Bus Phases

  C.14   Disconnect and Reselection

  C.15   Messages

  C.16   Commands

  C.17   INQUIRY Command

  C.18   Status

  C.19   Unsupported Features

  EXAMPLES

  3-1        Connecting to a Disk DDA Port

  3-2        Using an Aggregate to Represent a Disk DDA Message

  3-3        Gaining Access to a Disk DDA Data Buffer After a Read Operation

  3-4        Reading Logical Blocks from an Unmounted Disk

  3-5        Reading Logical Blocks from a Mounted Disk

  3-6        Transferring Data to a System Region

  3-7        Using the Virtual-Memory Driver

  6-1        Using Line TTA2 on a DHV11 Device for DDCMP Communication

  6-2        Using Line TTX1 on a DMF-32 Device for DDCMP Communication

  6-3        Connecting to a Serial-Line DDA Port

  6-4        Retrieving Terminal Characteristics

  6-5        Setting Terminal Characteristics

  6-6        Reading and Writing Serial-Line Data

  6-7        Reading and Writing Serial-Line Data Using a User-Defined Message

  6-8        Setting a Serial Line to the Spacing State

  6-9        Monitoring the Use of Out-of-Band Characters

  6-10       Monitoring Modem Events

  7-1        Creating SCSI Control Ports

  7-2        Requesting SCSI Bus Configuration Data

  7-3        Connecting to SCSI Devices

  7-4        Issuing SCSI Commands

  7-5        Programming a SCSI Generic Class Driver Message Interface Application

  7-6        Modifying the SCSI Driver Start-Up Module

  7-7        Declaring Routine Address and Device Lock Structures as External Data

  7-8        Setting Up an Entry Point

  7-9        Checking for Devices to Service

  7-10       Setting the Current Connection Flag

  7-11       Creating a SCSI Device Process

  7-12       Calling SCSI Port Interface Routines

  7-13       Allocating Request Packets for SCSI Devices

  7-14       Mapping Data Buffers for SCSI I/O Requests

  7-15       Issuing SCSI Commands from a Class Driver

  7-16       Initializing a SCSI Device Controller

  7-17       Programming a User-Defined SCSI Class Driver

  8-1        Setting Up an ADQ32 ADC Parameter List

  8-2        Initializing an ADQ32 Module

  8-3        Allocating ADQ32 Memory Buffers

  8-4        Issuing ADQ32 Transfer Requests

  8-5        Polling for Completed ADQ32 Transfer Requests

  8-6        Reinitializing an ADQ32 Module

  8-7        Using the ADQ32 Driver Interface

  8-8        Initializing an AXV11-C Module

  8-9        Issuing AXV11-C Read Requests

  8-10       Issuing AXV11-C Write Requests

  8-11       Reinitializing an AXV11-C Module

  8-12       Initializing an ADV11-D Module

  8-13       Allocating ADV11-D Memory Buffers

  8-14       Issuing ADV11-D Transfer Requests

  8-15       Polling for Completed ADV11-D Transfer Requests

  8-16       Reinitializing an ADV11-D Module

  8-17       Initializing a DLV11-J Module

  8-18       Issuing DLV11-J Read String Requests

  8-19       Issuing DLV11-J Read Block Requests

  8-20       Issuing DLV11-J Write Requests

  8-21       Initializing a DRB32 Device

  8-22       Allocating DRB32 Memory Buffers

  8-23       Issuing DRB32 Transfer Requests

  8-24       Polling for Completed DRB32 Transfer Requests

  8-25       Using the DRB32 Function Bits

  8-26       Using the DRB32 Driver Interface

  8-27       Initializing a DRQ3B Device

  8-28       Allocating Memory Buffers

  8-29       Mapping DRQ3B Transfer Request Buffers

  8-30       Issuing DRQ3B Transfer Requests

  8-31       Polling for Completed DRQ3B Transfer Requests

  8-32       Unmapping DRQ3B Transfer Request Buffers

  8-33       Reinitializing a DRQ3B Device

  8-34       Using the DRQ3B Function Bits

  8-35       Using the DRQ3B Driver Interface

  8-36       Initializing a DRV11-J Interface

  8-37       Issuing DRV11-J Transfer Requests

  8-38       Initializing a DRV11-WA Interface

  8-39       Allocating DRV11-WA Memory Buffers

  8-40       Issuing DRV11-WA Transfer Requests

  8-41       Polling for Completed DRV11-WA Transfer Requests

  8-42       Using the DRV11-WA CSR

  8-43       Using the DRV11-WA Driver Interface

  8-44       Establishing Communication with the IEQ11-A/IEU11-A Driver

  8-45       Setting Up Configuration Data for an IEC/IEEE 488 Instrument Bus

  8-46       Configuring an IEC/IEEE 488 Instrument Bus

  8-47       Initializing IEQ11-A and IEU11-A Units

  8-48       Setting Up Modifier Data

  8-49       Setting Up Event Watching

  8-50       Taking Control of the IEC/IEEE 488 Instrument Bus

  8-51       Changing the Controller-In-Charge

  8-52       Sending IEC/IEEE 488 Instrument Bus Commands or Data

  8-53       Setting Up Auxiliary Command Data

  8-54       Sending IEC/IEEE 488 Instrument Bus Auxiliary Commands

  8-55       Setting Up Data Path Characteristics for an IEC/IEEE 488 Instrument Bus

  8-56       Defining Data Paths for an IEC/IEEE 488 Instrument Bus

  8-57       Transferring Data on an IEC/IEEE 488 Instrument Bus

  8-58       Issuing a Service Request

  8-59       Performing a Serial Poll

  8-60       Configuring an IEC/IEEE Bus for Parallel Polls

  8-61       Loading Values into a Parallel-Poll Enable Register

  8-62       Initiating a Parallel Poll

  8-63       Retrieving Controller and Bus Status Information

  8-64       Using the IEQ11-A/IEU11-A Driver Interface

  8-65       Initializing a KWV11-C Clock

  8-66       Issuing KWV11-C Read Requests

  8-67       Issuing KWV11-C Write Requests

  8-68       Reinitializing a KWV11-C Clock

  FIGURES

  3-1        Disk DDA Message

  6-1        A VAXELN Serial DDCMP Link

  6-2        Terminal Characteristics Record

  6-3        Serial-Line DDA Message

  7-1        SCSI Class/Port Driver Architecture

  7-2        SCSI Bus Configuration Data

  7-3        Connecting to SCSI Devices

  7-4        SCSI Command Message Format

  7-5        SCSI Device Markers

  7-6        SCSI Class Driver Routine Address Structure

  7-7        SCSI Device Marker Structure

  7-8        Marker Array and Configuration Table Definitions

  7-9        Asynchronous Event Notification

  7-10       SCSI Bus Phase Longword Returned by PORT SENSE PHASE

  7-11       SCSI Bus Phase Longword Supplied by PORT SET PHASE

  8-1        ADQ32 Parameter Structure

  8-2        ADV11-C/AXV11-C Data Array Structure

  8-3        DRB32 Control Register Structure

  8-4        DRV11-WA CSR Structure

  8-5        Interfacing with IEC/IEEE Instrument Buses

  8-6        Establishing Communication with an IEQ11-A/IEU11-A Driver Job

  8-7        Using Multiple Subprocesses To Establish Communication with an IEQ11-A/IEU11-A Job

  8-8        IEC/IEEE 488 Instrument Bus Configuration Block Structure

  8-9        Event Modifier Structure

  8-10       Auxiliary Command Register Structure

  8-11       IEC/IEEE 488 Instrument Bus Data Path Structure

  8-12       IEC/IEEE 488 Instrument Bus Serial-Poll Block Structure

  8-13       IEC/IEEE 488 Instrument Bus Parallel-Poll Block Structure

  8-14       IEC/IEEE 488 Instrument Bus Status Structure

  8-15       KWV11-C Data Array

  TABLES

  2-1        Ethernet/IEEE 802 Datalink Driver Images

  3-1        Disk Driver Images

  3-2        Disk Devices

  3-3        Disk File Service Operations

  4-1        Tape Devices

  4-2        Tape File Service Operations

  5-1        Printer Driver Images

  5-2        Printer Driver Characteristics

  6-1        Terminal Driver Images

  6-2        Terminal Driver Interface Routines

  6-3        Terminal Driver Characteristics

  6-4        Control Characters

  6-5        Modem Control Signals

  6-6        Modem Characteristics

  7-1        SCSI Device Characteristics

  7-2        VAXELN SCSI Driver Components

  7-3        SCSI Class Driver Routine Address Structure Fields

  7-4        VAXELN SCSI Driver Include Modules

  8-1        Realtime Devices

  8-2        ADQ32 Device Driver Interface Routines

  8-3        ADQ32 Sampling Characteristics

  8-4        ADQ32 Clock Mode Options

  8-5        ADV11-C/AXV11-C Device Driver Interface Routines

  8-6        ADV11-D Device Driver Interface Routines

  8-7        DLV11-J Device Driver Interface Routines

  8-8        DRB32 Device Driver Interface Routines

  8-9        DRQ3B Device Driver Interface Routines

  8-10       DRQ3B DMA Transfer Types

  8-11       DRQ3B Memory Buffers

  8-12       DRV11-J Device Driver Interface Routines

  8-13       DRV11-WA Device Driver Interface Routines

  8-14       IEQ11-A/IEU11-A Device Driver Interface Routines

  8-15       IEC/IEEE 488 Instrument Bus Characteristics

  8-16       Event Modifier Flags

  8-17       IEC/IEEE 488 Instrument Bus Events

  8-18       IEC/IEEE 488 Instrument Bus Commands

  8-19       IEC/IEEE 488 Instrument Bus Auxiliary Commands

  8-20       IEC/IEEE 488 Instrument Bus Data Path Characteristics

  8-21       IEC/IEEE Instrument Bus Serial-Poll Block Characteristics

  8-22       IEC/IEEE Instrument Bus Parallel-Poll Block Characteristics

  8-23       IEC/IEEE 488 Instrument Bus Status Bits

  8-24       IEQ11-A/IEU11-A Controller Status Values

  8-25       KWV11-C Device Driver Interface Routines

  8-26       KWV11-C Clock Modes

  8-27       KWV11-C Clock Rates

  A-1        Status Values/Exception Names