GENERIC SCSI SOFTWARE The Generic SCSI Interface is, simply, a common interface to the system's SCSI host adapter. This interface allows device-specific drivers and/or applications to access (and share) the SCSI bus without requiring knowledge of the specific host adapter hardware interface. Along with the Generic SCSI Interface, a set of routines collectively call the "SCSI Low Level Interface" will be provided. These routines are provided in a library file called "SCSI.LIB". They provide the interface to the Generic SCSI Interface. The routines provide access to the SCSI Bus at the command level. Routines exist for all of the more common commands used to access SCSI devices. In addition, routines exist to allow the developer to build unique commands and send them to any combination of SCSI ID and Logical Unit Number (LUN). Another file, named SCSI.H, is included in the package. This file contains TYPDEFs for all structures used by the routines and function prototypes for all of them. This file should be INCLUDEd in any application or device driver that calls any of the routines in SCSI.LIB. All of the routines in SCSI.LIB are written in the "C" programming language. However, they use the PASCAL calling conventions so that they are compatible with other application interfaces such as the OS/2 API and Windows API. The Streaming Tape Utility will be the first application to use the routines in the SCSI.LIB library file. SCSI.LIB ROUTINES The SCSI.LIB file is composed of the following routines: BLD_BFI_DEFLIST - builds "bytes from index" format defect list entries. BLD_BLOCK_DEFLIST - builds "block" format defect list entries. BLD_BLOCK_DESCR - builds block descriptors for the MODE SELECT command. BLD_COPYPARMS - builds "segments" for the COPY command. BLD_DEFLIST_HDR - builds the defect list header for the FORMAT command. BLD_EXTENT_DESCR - builds extent descriptors for the RESERVE command. BLD_PAGE_1 - builds a CCS "page" for page code 1. BLD_PAGE_2 - builds a CCS "page" for page code 2. BLD_PAGE_3 - builds a CCS "page" for page code 3. BLD_PAGE_4 - builds a CCS "page" for page code 4. BLD_PAGE_5 - builds a CCS "page" for page code 5. BLD_PSF_DEFLIST - builds "physical sector" format defect list entries. BLD_WRITEBUF_HDR - builds the write buffer header for WRITE BUFFER. COMPARE - sends a COMPARE command to the specified device. COPY - sends a COPY command to the specified device. COPY_AND_VERIFY - sends a COPY AND VERIFY command to the device. DEVICE_RESET - performs a Bus Device Reset on the specified device. DO_SCSI - routine used as the direct interface to the Generic SCSI Driver. ERASE - sends an ERASE command to the specified device. FLUSH_BUFFER - sends a FLUSH BUFFER command to the specified device. FORMAT - sends a FORMAT command to the specified device. FORMAT_UNIT - sends a FORMAT UNIT command to the specified device. GET_DRIVER_ID - returns the SCSI ID of the system's host adapter. INIT_COMMAND - initializes a structure used by other routines. INQUIRY - sends an INQUIRY command to the specified device. LOAD_UNLOAD - sends a LOAD/UNLOAD command to the specified device. MODE_SELECT - sends a MODE SELECT command to the specified device. MODE_SENSE - sends a MODE SENSE command to the specified device. PREVENT_ALLOW - sends a PREVENT/ALLOW MEDIA REMOVAL command. PRINT - sends a PRINT command to the specified device. READ_BLOCK_LIMITS - sends a READ BLOCK LIMITS command to the device. READ_CAPACITY - sends a READ CAPACITY command to the specified device. READ_DEFECT_DATA - sends a READ DEFECT DATA command to the device. READ_REVERSE - sends a READ REVERSE command to the specified device. READ_WRITE_BUFFER - sends a READ BUFFER or WRITE BUFFER command. SCSI.LIB ROUTINES (continued) READ_WRITE_DIRECT - sends a READ or WRITE command to the device. READ_WRITE_SEQUENTIAL - sends a READ or WRITE command to the device. REASSIGN_BLOCKS - sends a REASSIGN BLOCKS command to the device. RECEIVE_DIAGNOSTIC - sends a RECEIVE DIAGNOSTIC RESULTS command. RECOVER_BUFF - sends a RECOVER BUFFERED DATA command to the device. RELEASE - sends a RELEASE command to the specified device. REQUEST_SENSE - sends a REQUEST SENSE command to the specified device. RESERVE - sends a RESERVE command to the specified device. RESERVE_RELEASE_UNIT - sends a RESERVE or RELEASE UNIT command. RESET_BUS - performs a SCSI Bus Reset. RETRY_COMMAND - resends the last command to the speicifed device. REWIND_SEQ - sends a REWIND command to the specified device. REZERO_UNIT - sends a REZERO UNIT command to the specified device. SEEK - sends a SEEK command to the specified device. SEND_DIAGNOSTIC - sends a SEND DIAGNOSTIC command to the device. SEND_RECEIVE - sends a SEND or RECEIVE command to the specified device. SLEW_AND_PRINT - sends a SLEW AND PRINT command to the device. SPACE - sends a SPACE command to the specified device. START_STOP - sends a START/STOP UNIT command to the specified device. STOP_PRINT - sends a STOP PRINT command to the specified device. TEST_UNIT_READY - sends a TEST UNIT READY command to the device. TRACK_SELECT - sends a TRACK SELECT command to the specified device. VERIFY_DIRECT - sends a VERIFY command to the specified device. VERIFY_SEQUENTIAL - sends a VERIFY command to the specified device. WRITE_FILEMARKS - sends a WRITE FILEMARKS command to the device. WRITE_VERIFY - sends a WRITE AND VERIFY command to the specified device.