queue a request for Host Bus Adapter
long prefixsend(struct hbadata *hbap, int flag);
entry point routine
queues requests for HBAs,
and generally is used for every request.
After the target driver has entered the pointer
to the SCSI command block
in the device-specific request block
(previously allocated by the
which invokes the appropriate HBA-specific
The target driver has no awareness of the HBA request
a pointer to the device-specific request block
defining the request to be queued
indicates whether the request may sleep or not, and is set
to either KM_SLEEP or KM_NOSLEEP
On failure, it returns
For a request retry, it returns
routine should be
capable of handling an unlimited number of send requests
and can choose either to send or queue the request, depending
on the current state of the hardware.
Rather than requiring target drives to know how many
requests an HBA can handle under the best of conditions,
the target drivers typically provide no queuing and send down
all possible requests.
The HBA driver should have a simple and fast queue mechanism,
while maintaining the optimum number of active jobs at the
With this scheme, the HBA driver can achieve the maximum
throughput from the HBA hardware.
The argument passed to this routine is a
If the HBA hardware
supports scatter-gather or programmed I/O,
merging requests should be attempted while queuing the request.
As would be expected,
if no requests are currently pending,
or if the optimum number of active requests has not been
reached, the request being sent to the HBA driver should
be started immediately.
Sequential access devices, such as tape drivers, must process jobs
on a first-come/first-served basis.
To do otherwise risks data corruption.
Direct access devices can process jobs
in any order they see fit.
Context and synchronization
If flag is KM_SLEEP,
If flag is KM_NOSLEEP,
1, 2, 3, 4
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005