|
|
#include <sys/types.h> #include <sys/buf.h> #include <sys/ddi.h>typedef bcb_t;
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 */
bcb_addrtypes
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
in addrtypes
for such data transfers.
Drivers that set multiple addrtypes
must be able to distinguish one from the other
and be coded to use the buffers appropriately.
bcb_flags
bcb_max_xfer
bcb_max_xfer
may be zero,
meaning unlimited;
otherwise, it must be a multiple
of the bcb_granularity
value.
bcb_granularity
bcb_granularity
does not need to be a power of 2,
but it must not be zero.
bcb_physreqp
The following bcb_flag
is supported
only in DDI versions before version 8.
bcb_physreq
member
in preference to BCB_PHYSCONTIG.
The following values are accepted for
the b_addrtypes
member
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
thebcb_max_xfer
member determined
the maximum transfer length of each piece
for scatter/gather operations.
Earlier releases documented a BA_PHYS value
for the bcb_addrtypes
member.
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