86 lines
2.1 KiB
C
86 lines
2.1 KiB
C
/*++
|
|
|
|
Copyright (c) 1993 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
scsi.h
|
|
|
|
Abstract:
|
|
|
|
This is a subset of the header file for SCSI definitions that is
|
|
located in the kernel tree.
|
|
|
|
Authors:
|
|
|
|
Mike Glass (mglass)
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
|
|
//
|
|
// Inquiry buffer structure. This is the data returned from the target
|
|
// after it receives an inquiry.
|
|
//
|
|
// This structure may be extended by the number of bytes specified
|
|
// in the field AdditionalLength. The defined size constant only
|
|
// includes fields through ProductRevisionLevel.
|
|
//
|
|
// The NT SCSI drivers are only interested in the first 36 bytes of data.
|
|
//
|
|
|
|
#define INQUIRYDATABUFFERSIZE 36
|
|
|
|
typedef struct _INQUIRYDATA {
|
|
UCHAR DeviceType : 5;
|
|
UCHAR DeviceTypeQualifier : 3;
|
|
UCHAR DeviceTypeModifier : 7;
|
|
UCHAR RemovableMedia : 1;
|
|
UCHAR Versions;
|
|
UCHAR ResponseDataFormat;
|
|
UCHAR AdditionalLength;
|
|
UCHAR Reserved[2];
|
|
UCHAR SoftReset : 1;
|
|
UCHAR CommandQueue : 1;
|
|
UCHAR Reserved2 : 1;
|
|
UCHAR LinkedCommands : 1;
|
|
UCHAR Synchronous : 1;
|
|
UCHAR Wide16Bit : 1;
|
|
UCHAR Wide32Bit : 1;
|
|
UCHAR RelativeAddressing : 1;
|
|
UCHAR VendorId[8];
|
|
UCHAR ProductId[16];
|
|
UCHAR ProductRevisionLevel[4];
|
|
UCHAR VendorSpecific[20];
|
|
UCHAR Reserved3[40];
|
|
} INQUIRYDATA, *PINQUIRYDATA;
|
|
|
|
//
|
|
// Inquiry defines. Used to interpret data returned from target as result
|
|
// of inquiry command.
|
|
//
|
|
// DeviceType field
|
|
//
|
|
|
|
#define DIRECT_ACCESS_DEVICE 0x00 // disks
|
|
#define SEQUENTIAL_ACCESS_DEVICE 0x01 // tapes
|
|
#define PRINTER_DEVICE 0x02 // printers
|
|
#define PROCESSOR_DEVICE 0x03 // scanners, printers, etc
|
|
#define WRITE_ONCE_READ_MULTIPLE_DEVICE 0x04 // worms
|
|
#define READ_ONLY_DIRECT_ACCESS_DEVICE 0x05 // cdroms
|
|
#define SCANNER_DEVICE 0x06 // scanners
|
|
#define OPTICAL_DEVICE 0x07 // optical disks
|
|
#define MEDIUM_CHANGER 0x08 // jukebox
|
|
#define COMMUNICATION_DEVICE 0x09 // network
|
|
#define LOGICAL_UNIT_NOT_PRESENT_DEVICE 0x7F
|
|
#define DEVICE_QUALIFIER_NOT_SUPPORTED 0x03
|
|
|
|
//
|
|
// DeviceTypeQualifier field
|
|
//
|
|
|
|
#define DEVICE_CONNECTED 0x00
|
|
|
|
|