#include <sys/types.h> #include <sys/buf.h> #include <sys/ddi.h>
uchar_t bcb_addrtypes; /* type(s) of addresses accepted */ uchar_t bcb_flags; /* misc flags */ size_t bcb_max_xfer; /* maximum transfer length; total */ /* xfer if not BA_SCGTH, else per */ /* ba_scgth_t entry */ size_t bcb_granularity; /* minimum acceptable offset/size */ /* unit (sector size, for disks) */ physreq_t *bcb_physreqp; /* physical alignment requirements */
BA_SCGTH may not be used with BA_KVIRT.
Drivers that support only character access
(in other words, no buffer cache use)
set the BA_UIO flag only
for a bcb that is used
for data transfers within the operating system.
Drivers that support I/O operations
that use the buffer cache
must set both BA_UIO and BA_KVIRT
addrtypes for such data transfers.
Drivers that set multiple
must be able to distinguish one from the other
and be coded to use the buffers appropriately.
bcb_max_xfermay be zero, meaning unlimited; otherwise, it must be a multiple of the
bcb_granularitydoes not need to be a power of 2, but it must not be zero.
bcb_flag is supported
only in DDI versions before version 8.
bcb_physreqmember in preference to BCB_PHYSCONTIG.
The following values are accepted for
in pre-DDI 8 drivers:
BA_KVIRT is the only b_addrtypes specification that can be used for both DDI 8 and pre-DDI 8 drivers.
Earlier releases erroneously stated that
bcb_max_xfer member determined
the maximum transfer length of each piece
for scatter/gather operations.
Earlier releases documented a BA_PHYS value
This was never correctly implemented and should not be used.
``Buffered I/O buffers, allocating'' in HDK Technical Reference
``DMA up to 64 bits (DDI only)'' in HDK Technical Reference
``Extended SCSI addressing scheme'' in HDK Technical Reference
``Memory allocation'' in HDK Technical Reference
``Scatter/gather operations'' in HDK Technical Reference