Specifications
Completing an I/O Request and Handling Timeouts
8.2 Timeout Handling Routines
• It sends a message to an operator mailbox and waits for a subsequent
interrupt or timeout.
8.2.1 Retrying an I/O Operation
Some devices might retry an I/O operation after a timeout. For example, a disk
driver’s timeout handling routine might take the following steps after a transfer
timeout:
1. Invokes the FORK macro to lower IPL to fork level.
2. Releases any owned map registers, data path, and controller data channel.
3. Determines whether it is possible to retry the I/O operation.
4. Examines the error retry count (UCB$B_ERTCNT) to determine whether it is
possible to retry the I/O operation.
If the retry count is exhausted, the timeout handling routine sets the error
code, performs a normal abort I/O cleanup operation, and issues the REQCOM
macro to complete the I/O request.
If the retry count is not exhausted, the routine proceeds to the next step.
5. Examines the power bit (UCB$V_POWER in UCB$L_STS) to determine if
it must take special steps before retrying the operation. For instance, the
timeout handling routine should load the address of the IRP into R3 and
reload the following fields of the IRP into the corresponding UCB fields, if
they have been altered by partial processing of the I/O request:
IRP$L_BCNT
IRP$L_BOFF
IRP$L_SVAPTE
These actions set up an environment in which the transfer can be retried
from the beginning.
6. Calls ERL$DEVICTMO to log the device timeout if the driver supports error
logging (see Section 4.2).
7. Decreases the error retry count (UCB$B_ERTCNT).
8. Clears the UCB timeout bit (UCB$V_TIMOUT) in UCB$L_STS.
9. Branches to the start-I/O routine to retry the operation.
8.2.2 Aborting an I/O Request
A driver’s timeout handling routine aborts the I/O request when it exhausts its
retry count or when, having read device registers, the driver determines that
some fatal error condition has occurred such that there is no point in retrying
the request. Similarly, the routine aborts a request if the device’s cancel-I/O bit
(UCB$V_CANCEL in UCB$L_STS) is set, signifying that a cancel-I/O request
was made.
To abort an I/O request, a timeout handling routine performs the following
sequence of steps:
1. Clears the device control and status register (CSR), if appropriate to the
device and controller
2. Invokes the FORK macro to lower IPL to fork level
3. Releases any owned map registers, data path, and controller data channel
4. Loads the abort status code (SS$_ABORT) into the low word of R0
8–5










