HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
a
autochanger(7) autochanger(7)
CHGR_SSRFC_IS_PRESENT
For developers. To determine if the surface module functionality (
ssrfc) is currently configured in
the kernel.
CHGR_CLEAR_RESET
For developers. autox0 driver only. To clear a powerfail recovery condition in the SCSI changer
driver. The
CHGR_CLEAR_RESET
ioctl function will be necessary for developers using the SCSI
changer driver (autox0) to move media within the medium changer, but not using the surface
module for transparent access to magneto-optical disks. In the event of an [ECONNRESET] error
return from any changer ioctl call, a
CHGR_CLEAR_RESET call will be necessary prior to any
further media moves. This alerts the application of a possible power failure, and allows the
developer an opportunity to reset data structures, and re-reserve elements in the medium changer,
prior to further operations.
The following ioctl functions and structure definitions are included from
<sys/scsi.h>:
#define SIOC_INIT_ELEM_STAT _IO(’S’, 51)
#define SIOC_ELEMENT_ADDRESSES _IOW(’S’, 52, struct element_addresses)
#define SIOC_ELEMENT_STATUS _IOWR(’S’, 53, struct element_status)
#define SIOC_RESERVE _IOW(’S’, 54, struct reservation_parms)
#define SIOC_RELEASE _IOW(’S’, 55, struct reservation_parms)
#define SIOC_MOVE_MEDIUM _IOW(’S’, 56, struct move_medium_parms)
#define SIOC_EXCHANGE_MEDIUM _IOW(’S’, 57, struct exchange_medium_parms)
/* structure for SIOC_ELEMENT_ADDRESSES ioctl */
struct element_addresses {
unsigned short first_transport;
unsigned short num_transports;
unsigned short first_storage;
unsigned short num_storages;
unsigned short first_import_export;
unsigned short num_import_exports;
unsigned short first_data_transfer;
unsigned short num_data_transfers;
};
/* structure for SIOC_ELEMENT_STATUS ioctl */
struct element_status {
unsigned short element; /* element address */
unsigned int resv1:2;
unsigned int import_enable:1; /* allows media insertion (load) */
unsigned int export_enable:1; /* allows media removal (eject) */
unsigned int access:1; /* transport element accessible */
unsigned int except:1; /* is in an abnormal state */
unsigned int operatr:1; /* medium positioned by operator */
unsigned int full:1; /* holds a a unit of media */
unsigned char resv2;
unsigned char sense_code; /* info. about abnormal state */
unsigned char sense_qualifier; /* info. about abnormal state */
unsigned int not_bus:1; /* transfer device SCSI bus differs */
unsigned int resv3:1;
unsigned int id_valid:1; /* bus_address is valid */
unsigned int lu_valid:1; /* lun is valid */
unsigned int sublu_valid:1; /* sub_lun is valid */
unsigned int lun:3; /* transfer device SCSI LUN */
unsigned char bus_address; /* transfer device SCSI address */
unsigned char sub_lun; /* sub-logical unit number */
unsigned int source_valid:1; /* source_element is valid */
unsigned int invert:1; /* media in element was inverted */
unsigned int resv4:6;
HP-UX 11i Version 2: September 2004 − 4 − Hewlett-Packard Company Section 7−−7