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

IDEIOIDENT (Identify Device) IDE Adapter Device Driver ioctl Operation

Purpose

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

Description

The IDEIOIDENT operation allows the caller to issue an IDE identify device 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 IDEIOIDENT operation is the address of an identify_device structure. This structure is defined in the /usr/include/sys/ide.h file. The identify_device parameter block allows the caller to select the IDE device ID to be queried.

If successful, the returned device data can be found at the address specified by the caller in the identify_device structure. Successful completion occurs if a device responds at the requested IDE deivce ID. Refer to the ATA Specification or the ATA Packet Interface for CD-ROMs Specification or the ATA Packet Interface for Streaming Tapes Specification for the applicable device for the format of the returned data. The data within the identify_deivce structure is in little endian format; it normally will need to be byte swapped in order to correctly interpret the data. Each 16-bit word, at 16-bit offsets, will need to swap the most significant 8-bit byte with the least significant 8-bit byte.

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 an IDEIOSTART command was not issued prior to this command.
EIO Indicates that an unrecoverable I/O error has occurred. In the 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.

Files

/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 ]