[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

IDEIOINQU (Inquiry) IDE Adapter Device Driver ioctl Operation


Provides the means to issue an inquiry command to an Integrated Device Electronics (IDE) ATAPI device.


The IDEIOINQU operation allows the caller to issue an IDE device inquiry command to a selected device. This command can be used by system management routines to aid in configuration of IDE devices.

The arg parameter for the IDEIOINQU operation is the address of an ide_inquiry structure. This structure is defined in the /usr/include/sys/ide.h file. The ide_inquiry parameter block allows the caller to select the IDE device ID to be queried.

If successful, the returned inquiry data can be found at the address specified by the caller in the ide_inquiry structure. Successful completion occurs if a device responds at the requested IDE device ID. Refer to the ATA Packet Interface for CD-ROMs Specification or ATA Packet Interface for Streaming Tapes Specification for the applicable device for the format of the returned data.

Note: The IDE adapter device driver performs normal error-recovery procedures during execution of this command.

Return Values

When completed successfully, this operation returns a value of 0. Otherwise, a value of -1 is returned and the errno global variable is set to 1 of the following values:

EFAULT Indicates that a bad copy between kernel and user space occurred.
EINVAL Indicates that a IDEIOSTART command was not issued prior to this command.
EIO Indicates that an unrecoverable I/O error has occurred. If EIO is returned, the caller should retry the IDEIOINQU operation since the first command may have cleared an error condition with the device. In case of an unrecovered error, the adapter error-status information is logged in the system error log.
ENOCONNECT Indicates that a bus fault has occurred. Generally the IDE adapter device driver cannot determine which device caused the IDE bus fault, so this error is not logged.
ENODEV Indicates that no IDE device responded to the requested IDE device ID. This return value implies that no device exists on the requested IDE device ID. Therefore, when the ENODEV return value is encountered, the caller can skip this IDE device ID and go on to the next IDE device ID. This condition is not necessarily an error and is not logged.
ENOMEM Indicates insufficient memory is available to complete the command.
ETIMEDOUT Indicates that the device did not respond with a status before the internal command time-out value expired. On receiving the ETIMEDOUT return value, the caller should retry this command at least once, since the first command may have cleared an error condition with the device. This error is logged in the system error log.


/dev/ide0, /dev/ide1, ..., /dev/iden Provide an interface to allow IDE device drivers to access IDE devices or adapters.

Related Information

idedisk IDE device driver or idecdrom IDE device driver.

[ Previous | Next | Contents | Home | Search ]