HP-UX Reference (11i v3 07/02) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
s
scsi_ctl(7) scsi_ctl(7)
SIOC_REL_TGT_EXCL
release exclusive access to target
SIOC_SET_TGT_EXCL
obtain exclusive access to target
SIOC_REL_BUS_EXCL
release exclusive access to bus
SIOC_SET_BUS_EXCL
obtain exclusive access to bus
The ioctl
SIOC_PRIORITY_MODE
is deprecated with HP-UX release 11i V3. If called, it will just fake suc-
cess. This ioctl was used to workaround situations where it is not possible to set exclusive access to the
device. It put the device in "Priority mode". This caused all device-specific driver I/O operations (for exam-
ple, file system I/O and virtual memory page swapping) and all SCSI device driver open calls (including
pass-through driver open calls) to the associated LUN to block. These I/O operations and open calls were
blocked for the entire duration that priority mode was in effect. While priority mode was in effect only
SIOC_IO operations could be attempted. (these operations will not be blocked). It was very easy to cause
system deadlock through incorrect use of the
SIOC_PRIORITY_MODE
ioctl. It normally required to lock
the calling process into memory (see plock(2)) prior to enabling priority mode.
The header file
<sys/scsi.h> has useful information for SCSI device control. The following is included
from <sys/scsi.h> :
/* SCSI device control ioctls */
#define SIOC_IO _IOWR(’S’, 22, struct sctl_io)
#define SIOC_RESET_DEV _IO(’S’, 16)
#define SIOC_RESET_BUS _IO(’S’, 9)
#define SIOC_PRIORITY_MODE _IOW(’S’, 67, int)
#define SIOC_IO_EXT _IOWR(’S’, 102, esctl_io_t)
#define SIOC_TASK_MGMT _IOWR(’S’, 104, sioc_task_mgmt_t)
/* 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 */
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];
unsigned sense_status;
unsigned char sense_xfer;
unsigned char reserved[64];
} sctl_io_t;
160 Hewlett-Packard Company − 7 − HP-UX 11i Version 3: February 2007