sioc_io.7 (2010 09)

s
sioc_io(7) sioc_io(7)
NAME
sioc_io - SCSI pass-through interface
DESCRIPTION
SCSI devices are controlled by a device-specific driver, when one exists. Device-specific drivers, such as
those for SCSI direct access (disk) and sequential access (tape) devices, coordinate device and driver
states to accomplish correct logical device behavior. The
sioc_io pass-through interface enables the
use of SCSI devices and commands not normally supported by these device-specific drivers. It is com-
posed of two ioctls:
SIOC_IO_EXT, and SIOC_IO
.
SIOC_IO_EXT is the pass-through interface introduced with HP-UX 11i V3 release. It is the recom-
mended interface. It should be issued on persistent device files (see intro (7)). It allows to send the SCSI
command through any of the available LUN paths or through a specific LUN path.
SIOC_IO is the pass-through interface that existed prior to HP-UX 11i V3. This interface is deprecated
with HP-UX 11i V3 release. It is maintained for backward compatibility. It can be used on persistent
device files or legacy device files. If issued on a persistent device file, the SCSI command is sent through
any of the available LUN paths. If issued on a legacy device file, the SCSI command will be sent through
any available LUN paths. However, if multi-pathing is disabled legacy device files (see
leg_mpath_enable
in scsimgr (1M)), the SCSI command will be sent only through the LUN path
corresponding to the legacy device file.
All reserved fields in the data structure associated to the interface must be zero-filled.
The
SIOC_IO_EXT/SIOC_IO ioctl allows an arbitrary SCSI command to be sent to a device. All details
of the SCSI command protocol are handled automatically.
The data structure for the
SIOC_IO_EXT/SIOC_IO ioctl is included from <sys/scsi.h>:
/* SCSI device control ioctls */
#define SIOC_IO_EXT _IOWR(’S’, 102, esctl_io_t)
#define SIOC_IO _IOWR(’S’, 22, struct sctl_io)
/* Structure for SIOC_IO_EXT ioctl */
typedef struct {
int version;
escsi_sctl_io_flags_t flags;
int max_msecs;
uint32_t cdb_length;
uint32_t data_length;
ptr64_t data;
union sense_data sense;
escsi_hw_path_t lpt_hwp;
uint32_t data_xfer;
uint32_t sense_xfer;
uint32_t cdb_status;
uint32_t sense_status;
uint8_t cdb[ESCSI_MAX_CDB_LEN];
uint32_t rsvd[32]; /* Reserved for
* future use
*/
} esctl_io_t;
/* Structure for SIOC_IO ioctl */
typedef struct sctl_io {
unsigned flags;
unsigned char cdb_length;
unsigned char cdb[16];
void *data;
unsigned data_length;
unsigned max_msecs;
unsigned data_xfer;
unsigned cdb_status;
unsigned char sense[256];
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (6 pages)