scsi_dmaget() allocates DMA resources for an already allocated SCSI packet. pkt is a
pointer to the previously allocated SCSI packet (see scsi_pktalloc(9F)).
dmatoken is a pointer to an implementation dependent object which defines the length, direction, and address of the data transfer associated with this SCSI packet (command). The dmatoken must be a pointer to a buf(9S) structure. If dmatoken is NULL, no resources are allocated.
callback indicates what scsi_dmaget() should do when resources are not available:
- Do not wait for resources. Return a NULL pointer.
- Wait indefinitely for resources.
- Other Values
callback points to a function which is called when resources may have become available. callback
must return either 0 (indicating that it attempted to allocate resouces but failed to do so again), in which case it is put back on a list to be called again later, or 1 indicating either success in allocating resources or indicating that it no longer cares for a retry.
scsi_dmafree() frees the DMA resources associated with the SCSI packet. The packet itself remains allocated.