sdi_start_gauntlet(D3sdi)
sdi_start_gauntlet --
start error recovery gauntlet for failed I/O request
Synopsis
#include <sys/sdi.h>
void sdi_start_gauntlet(struct sb *sbp, void (*func)());
Description
sdi_start_gauntlet( )
causes the error recovery routine pointed to
by func to be called
with sbp as the first argument.
The second argument to func will be non-zero
if sbp can be guaranteed
to be cleanly aborted from the controller.
If error recovery has been started
for any target on the same bus as sbp,
this job will be queued and processed
when all jobs ahead of it are through
the error recovery gauntlet.
An SFB_SUSPEND function will be issued
to the HBA driver
and the target to which sbp was sent.
Arguments
sbp-
the command block associated with the failed command
func-
the target driver function to execute to start error recovery
Return values
If the HBA to which
sbp was sent does not specify
the HBA_TIMEOUT_RESET flag,
sdi_start_gauntlet returns zero.
Otherwise it returns non-zero.
Usage
sdi_start_gauntlet( )
is used by target drivers to begin error recovery.
It will usually be called as a result of a
job timeout or an interrupt.
As such, it will be on the interrupt thread.
The caller must exit
the timeout function or interrupt function
to allow processing of error recovery functions to complete.
If the second argument to func is zero,
func should not immediately retry it
because the job might still be on the HBA,
possibly resulting in two interrupts for the same job.
A Bus Device Reset or Bus Reset
to clear the job might be suitable.
If these are not, simply failing the job might be safest.
func must call the
sdi_end_gauntlet(D3sdi)
function when the error recovery process
for sbp is complete.
Context and synchronization
Blockable
context.
Synchronization constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep
locks can be held across calls to this function.
Applicable hardware
All
Version applicability
sdi:
3, 4
target drivers.
References
sdi_bus_reset(D3sdi),
sdi_device_reset(D3sdi),
sdi_end_gauntlet(D3sdi)
``SDI bus timeout/reset recovery'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005