CONTENTS Title Page Copyright Page Preface 1 Introduction 1.1 VMS SCSI Class/Port Architecture 1.2 VMS SCSI Third-Party Device Support Mechanisms 1.3 Hardware Considerations 1.3.1 Connecting a Non-Digital-Supplied SCSI Disk or Tape Drive to a VMS SCSI Port 2 Using the VMS Generic SCSI Class Driver 2.1 Overview of the VMS Generic SCSI Class Driver 2.2 Accessing the VMS Generic SCSI Class Driver 2.3 SCSI Port Features Under Application Control 2.3.1 Setting the Data Transfer Mode 2.3.2 Enabling Disconnection and Reselection 2.3.3 Disabling Command Retry 2.3.4 Setting Command Timeouts 2.4 Configuring a Device Using the Generic Class Driver 2.4.1 Disabling the Autoconfiguration of a SCSI Device 2.5 Assigning a Channel to GKDRIVER 2.6 Issuing a $QIO Request to the Generic Class Driver 2.7 Obtaining Device Information 2.8 Programming Example 3 Writing a VMS SCSI Class Driver 3.1 SCSI Class/Port Architecture 3.1.1 SCSI Port Interface 3.1.2 SCSI-Specific Data Structures 3.1.3 SCSI Template Class Driver 3.2 Connecting to a SCSI Device 3.3 Setting Up a SCSI Command 3.3.1 Preparing a SCSI Command Descriptor Block 3.3.2 Setting Command Timeouts 3.3.3 Disabling Command Retry 3.4 Performing a SCSI Data Transfer 3.4.1 Setting the Data Transfer Mode 3.4.2 Enabling Disconnection and Reselection 3.4.3 Determining the Maximum Data Transfer Size 3.4.4 Initializing the SCDRP to Reflect Class Driver Data Buffering Mechanisms 3.4.5 Making a Class Driver Data Buffer Accessible to the Port 3.4.6 Examining Port and SCSI Status 3.4.6.1 Examining Port Status 3.4.6.2 Examining the SCSI Status Byte 3.4.6.3 Testing for Incomplete Transfers 3.5 Other SCSI Class Driver Issues 3.5.1 Preserving Local Context 3.5.2 Error Logging 3.6 Flow of a Read I/O Request Through the SCSI Class and Port Drivers 3.7 Components of a SCSI Class Driver 3.7.1 Data Definitions 3.7.2 Driver Prologue Table 3.7.3 Driver Dispatch Table 3.7.4 Function Decision Table and FDT Routines 3.7.5 Controller Initialization Routine 3.7.6 Unit Initialization Routine 3.7.7 Start-I/O Routine 3.7.8 Cancel-I/O Routine 3.7.9 Register Dumping Routine 3.8 Servicing Asynchronous Events from a SCSI Device 3.9 Configuring a SCSI Third-Party Device 3.9.1 Disabling the Autoconfiguration of a SCSI Device 3.10 Debugging a SCSI Class Driver 3.10.1 Selecting a SCSI Bus Analyzer A SCSI Device Driver Data Structures A.1 SCSI Class Driver Request Packet (SCDRP) A.2 SCSI Connection Descriptor Table (SCDT) A.3 SCSI Port Descriptor Table (SPDT) B VMS Macros Invoked by SCSI Class Drivers B.1 Standard SCSI Port Interface Macros SPI$ABORT_COMMAND SPI$ALLOCATE_COMMAND_BUFFER SPI$CONNECT SPI$DEALLOCATE_COMMAND_BUFFER SPI$DISCONNECT SPI$GET_CONNECTION_CHAR SPI$MAP_BUFFER SPI$RESET SPI$SEND_COMMAND SPI$SET_CONNECTION_CHAR SPI$UNMAP_BUFFER B.2 SCSI Port Interface Extension Macros for Asynchronous Event Notification SPI$FINISH_COMMAND SPI$RECEIVE_BYTES SPI$RELEASE_BUS SPI$SEND_BYTES SPI$SENSE_PHASE SPI$SET_PHASE C VMS Template SCSI Class Driver D Interpreting SCSI Driver Error Log Entries D.1 SCSI Port Driver Error Log Entries D.2 SCSI Class Driver Error Log Entries D.3 Resolving SCSI Class Driver Problems Using Error Logs E VMS Requirements and Restrictions for Non-Digital-Supplied SCSI Devices E.1 VMS Requirements E.1.1 Conformance to Standards E.1.2 Cabling E.1.3 Connector Requirements E.1.4 SCSI Bus Termination E.1.5 Terminator Power E.1.6 Dynamic Reconfiguration of Devices E.1.7 External Boxes E.1.8 Device Behavior Following Power-On E.1.9 Device Behavior Following Bus Reset E.1.10 Data Transfer E.1.11 Initiator/Target Operation E.1.12 SCSI IDs and Logical Unit Numbers E.1.13 Bus Phases E.1.14 Disconnect and Reselection E.1.15 Messages E.1.16 Commands E.1.17 INQUIRY Command E.1.18 Status E.1.19 Unsupported Features Glossary EXAMPLES D-1 SCSI Bus Phase Error Port Driver Error Log Entry D-2 SCSI Bus Reset Port Driver Error Log Entry D-3 SCSI Bus Reset Class Driver Error Log Entry FIGURES 1-1 VMS SCSI Class/Port Interface 1-2 MicroVAX/VAXstation 3100 System Configuration 1-3 VAXstation 3520/3540 System Configuration 1-4 SCSI Bus Configuration 2-1 Generic SCSI Class Driver Flow 2-2 VMSD2 System Parameter 3-1 VMS SCSI Class/Port Interface 3-2 VMS SCSI Port Driver Configuration 3-3 VMS SCSI Class Driver Configuration 3-4 SCSI Driver Data Structures 3-5 VMSD2 System Parameter A-1 SCSI Class Driver Request Packet (SCDRP) A-2 SCSI Connection Descriptor Table (SCDT) A-3 SCSI Port Descriptor Table (SPDT) B-1 SCSI Bus Phase Longword Returned to SPI$SENSE_PHASE B-2 SCSI Bus Phase Longword Supplied to SPI$SET_PHASE TABLES 3-1 SCSI Port Interface (SPI) Macros 3-2 Data Structures 3-3 SCSI Status Byte Format 3-4 Error Message Buffer Extension for SCSI Class Drivers 3-5 SPI Extension Macros Supporting Asynchronous Event Notification A-1 Contents of SCSI Class Driver Request Packet A-2 Contents of SCSI Connection Descriptor Table A-3 Contents of SCSI Port Descriptor Table D-1 Key to Port Driver Error Log Entries D-2 Key to Class Driver Error Log Entries