Allows the caller to change parameters used by the target-mode device driver.
Note: This operation is not supported by all SCSI I/O controllers.
The TMCHGIMPARM ioctl operation allows the caller to change certain parameters used by the target-mode device driver for a particular device instance. This operation is allowed only for the initiator-mode device. The arg parameter to the TMCHGIMPARM operation specifies the address of the tm_chg_im_parm structure defined in /usr/include/sys/tmscsi.h file.
Default values used by the device driver for these parameters usually do not require change. However, for certain calling programs, default values can be changed to fine-tune timing parameters related to error recovery.
The initiator-mode device must be open for this command to succeed. Once a parameter is changed through the TMCHGIMPARM operation, it remains changed until another TMCHGIMPARM operation is received or until the device is closed. At open time, these parameters are set to the default values.
Parameters that can be changed with this operation are the amount of delay (in seconds) between device driver-initiated retries of SCSI send commands and the amount of time allowed before the running of any send command times out. To indicate which of the possible parameters are being changed, the caller sets the appropriate bit in the chg_option field. Values of 0, 1, or multiple flags can be set in this field to indicate which parameters are being changed.
To change the delay between send command retries, the caller sets the TM_CHG_RETRY_DELAY flag in the chg_option field and places the desired delay value (in seconds) in the new_delay field of the structure. The retry delay can be changed with this command to any value between 0 and 255, inclusive, where 0 instructs the device driver to use as little delay as possible between retries. The default value is approximately 2 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 places the desired time-out value in the new_timeout field of the structure. A single flag must be set in the time_out field to indicate the desired form of the timeout. If the TM_FIXED_TIMEOUT flag is set in the timeout_type field, then the value placed in 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, then the value placed in 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 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.
|/dev/tmscsi0, /dev/tmscsi1,..., /dev/tmscsin||Support processor-to-processor communications through the SCSI target-mode device driver.|
The rmt SCSI device driver, scdisk SCSI device driver, tmscsi SCSI device driver, SCSI Adapter device driver.