perform address translations required for I/O operation
int prefixxlat(struct hbadata *hbap, int b_flags, struct proc *procp, int flag);
entry point routine
performs any address translation required
for the I/O operation
SCSI command block
virtual addresses to physical addresses
in DDI versions prior to version 8.
a pointer to the SCSI command block
b_flags member of the
buffer header structure
a pointer to the process structure
indicates whether the translation may sleep or not and is
set to KM_SLEEP or KM_NOSLEEP.
On success, xlat returns
On failure, it returns
entry point routine
is required for all HBA drivers.
SDI calls this routine
for each I/O operation
to perform the translation that is required
to complete the I/O operation.
For most DDI 8 drivers,
the driver does not need to perform any translation
and simply returns.
If the KM_SLEEP flag is set,
the HBA driver should block
if resources are not available;
it should not return without the translation.
Target drivers do not check for an error in this case,
so returning without the translation can cause
Context and synchronization
If flag is KM_SLEEP,
If flag is KM_NOSLEEP,
1, 2, 3, 4
Differences between versions
In DDI versions prior to version 8,
converts the virtual address of the data buffer
into the physical address.
The proc pointer is passed to the
function to do this translation.
Note that the
routine is not available to DDI 8 drivers.
If the data buffer is not physically contiguous
or if it is too large to be handled
by a single operation,
a driver written for DDI versions prior to version 8
must break the buffer into scatter/gather lists.
A DDI 8 driver does not need to do this breakup,
but instead specifies its requirement in the
structure by setting BA_SCGTH
When BA_SCGTH is set,
a driver always gets a buffer
that is already broken into scatter/gather lists.
``Scatter/gather operations'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005