To facilitate the use of device managers across a variety of adapter device
drivers this specification defines a set of error codes that should be supplied
in the ErrorCode field of the IORB in the event of a failed operation.
The adapter device driver is responsible for translating device error data
into these error codes.
Use the following guidelines:
- Do not program an adapter device driver defensively;
that is, an adapter device driver should use the services of the device
manager and not implement excessive safeguards. On the other hand,
an adapter device driver must be protected against commands outside of its
implemented command set to permit upward compatibility.
- Program an adapter device driver to protect against
timeouts and hung devices, transient environmental factors, noise,
and so forth.
- Ensure that the adapter device driver has the capability
to properly process any scatter/gather list it receives.
- Device error information must be translated into the
error codes listed in Summary
of Error Codes for the OS/2 Device Manager.
Errors must be fully processed by the adapter device driver, as required
by the DASD Device Manager. For example, using the IOERR_ADAPTER_REFER_TO_STATUS
error code will result in incorrect operation.
- For other device managers, the same error translation
is recommended. If this translation does not produce a reliable error indication,
the IOERR_ADAPTER_REFER_TO_STATUS code can be used.
- An IOERR_RETRY flag is included on commands that must
be retried by the adapter device driver. Device managers will ignore this
flag because retries must be performed at the adapter device driver level.
This flag must be ignored also if the device manager has set the IORB_DISABLE_RETRY
bit in the IORB.
- An IOCM_GET_UNIT_STATUS command is not expected to
fail, regardless of the condition of the underlying devices.
- The IOCM_GET_DEVICE_TABLE command addresses the entire
adapter device driver rather than a specific unit; ALLOCATION checks should
not be performed.
[Back: GetDOSVar]
[Next: Summary of Error Codes]