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

TMCHGIMPARM (Change Parameters) tmssa Device Driver ioctl Operation

Purpose

To allow the caller to change the parameters that are used by the target-mode device driver.

Description

This operation allows the caller to change the default set up of the device. It is allowed only for the initiator-mode device. The arg parameter to the TMCHGIMPARM operation contains the address of the tm_chg_im_parm structure that is defined in the /usr/include/sys/tmscsi.h file.

Default values that are used by the device driver for these parameters usually do not require change. For some calling programs, however, default values can be changed to fine tune timing parameters that are related to error recovery.

When a parameter is changed, it remains changed until another TMCHGIMPARM operation occurs, or until the device is closed. When the device is opened, the parameters are set to the default values.

Parameters that can be changed with this operation are:

To indicate which of the possible 0 parameters the caller is changing, the caller sets the appropriate bit in the chg_option field. The caller can change only the retry parameters, or only the time out parameters, or both types of parameter.

To change the delay between send command retries, the caller sets the TM_CHG_RETRY_DELAY flag in the chg_option field and puts the required delay value (in seconds) into the new_delay field of the structure. With this command, the retry delay can be changed with this command to any value 0 through 255, where 0 instructs the device driver to use as little delay as possible between retries. The default value is approximately two seconds.

To change the send command time-out value, the caller sets the TM_CHG_SEND_TIMEOUT flag in the chg_option field, sets the desired flag in the timeout_type field, and puts the desired time-out value into the new_timeout field of the structure. One flag must be set in the time_out field to indicate the required form of the timeout. If the TM_FIXED_TIMEOUT flag is set in the timeout_type field, the value that is put into the new_timeout field is a fixed time-out value for all send commands. If the TM_SCALED_TIMEOUT flag is set in the timeout_type field, the value that is put into the new_timeout field is a scaling-factor used in the calculation for timeouts as shown under the description of the write entry point. The default send command time-out value is a scaled time-out with a scaling factor of 10.

Regardless of the value of the timeout_type field, if the new_timeout field is set to a value of 0, the caller specifies "no time out" for the send command, allowing the command to take an indefinite amount of time. If the calling program wants to end a write operation, it generates a signal. This option is only allowed for nonblocking write operations.


[ Previous | Next | Contents | Home | Search ]