HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man7/!!!intro.7
________________________________________________________________
___ ___
s
scsi(7) scsi(7)
NAME
scsi - Small Computer System Interface device drivers
DESCRIPTION
The Small Computer System Interface (SCSI) is an American National Standard for interconnecting com-
puters and peripheral devices. HP-UX supports the SCSI device protocol on parallel SCSI interfaces (see
ANSI Std X3.131-199X, ‘‘SCSI-2’’) and Fibre Channel interfaces (see ANSI Std X3.269-199X, "Fibre Channel
Protocol for SCSI"). The SCSI standard includes specifications for a variety of device types. This section
describes the general SCSI interface for all SCSI device drivers. Information about specific device types
can be found in the manual sections which describe SCSI peripheral device drivers for those device types.
The SIOC_INQUIRY ioctl is supported by all SCSI device drivers. This ioctl returns the SCSI device-
specific INQUIRY command data. This data contains device identification and capability information.
Since there have been multiple versions of the SCSI standard for inquiry data, multiple versions of the
inquiry data declaration are provided. The SCSI-1 version is provided for backward compatibility only.
The SIOC_CAPACITY ioctl indicates the current device size. A device size is defined to be a logical block
size and some number of logical blocks. The means of determining this device-size data is particular to the
specific device type. Logical block size and/or number of logical blocks equal to zero indicates: the device
size is unknown, the device is not currently capable of I/O operations, or I/O operations are not meaningful
for the device. Note that DIOC_CAPACITY
is preferred (see disk(7)).
The header file <
sys/scsi.h> has useful information for SCSI devices. The following is included from
<sys/scsi.h>:
#define SIOC_INQUIRY _IOR(’S’, 2, union inquiry_data)
#define SIOC_CAPACITY _IOR(’S’, 3, struct capacity)
/* SCSI-1 inquiry structure */
struct inquiry {
unsigned char dev_type;
unsigned int rmb:1;
unsigned int dtq:7;
unsigned int iso:2;
unsigned int ecma:3;
unsigned int ansi:3;
unsigned int resv:4;
unsigned int rdf:4;
unsigned char added_len;
unsigned char dev_class[3];
char vendor_id[8];
char product_id[16];
char rev_num[4];
unsigned char vendor_spec[20];
unsigned char resv4[40];
unsigned char vendor_parm_bytes[32];
};
/* SCSI-2 inquiry structure */
struct inquiry_2 {
unsigned int periph_qualifier:3;
unsigned int dev_type:5;
unsigned int rmb:1;
unsigned int dtq:7;
unsigned int iso:2;
unsigned int ecma:3;
unsigned int ansi:3;
unsigned int aenc:1;
unsigned int trmiop:1;
unsigned int resv1:2;
unsigned int rdf:4;
unsigned char added_len;
unsigned char resv2[2];
unsigned int reladr:1;
unsigned int wbus32:1;
HP-UX Release 11i: December 2000 − 1 − Section 7−−111
___
___