IDEIOSTUNIT (Start Unit) IDE Adapter Device Driver ioctl Operation

Purpose

Provides the means to issue an Integrated Device Electronics (IDE) IDE Start Unit command to a selected IDE ATAPI device.

Description

The IDEIOSTUNIT operation allows the caller to issue an IDE Start Unit command to a selected IDE device. This command can be used by system management routines to aid in configuration of IDE devices. For the IDEIOSTUNIT operation, the arg parameter operation is the address of an ide_startunit structure. This structure is defined in the /usr/include/sys/ide.h file.

The ide_startunit structure allows the caller to specify the IDE device ID of the device on the IDE adapter that is to be started.

The start_flag field in the parameter block allows the caller to indicate the start option to the IDEIOSTUNIT operation. When the start_flag field is set to TRUE, the logical unit is to be made ready for use. When FALSE, the logical unit is to be stopped.

Note: The IDE adapter device driver performs normal error-recovery procedures during execution of the IDEIOSTUNIT operation.

Return Values

When completed successfully, the IDEIOSTUNIT 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:

Value Description
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. If EIO is received, the caller should retry this command at least once, as 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 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 status before the internal command time-out value expired. If ETIMEDOUT is received, the caller should retry this command at least once, as the first command may have cleared an error condition with the device. This error is logged in the system error log.

Files

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