A method and apparatus in a data controller in a storage drive for
retrieving, evaluating, and processing a context that describes a direct
memory access (DMA) request. The data controller includes a buffer for
storing data transferred in response to execution of a DMA transfer
request, a host address pointer pointing to a current location in the
buffer, and a retrieval channel device. The retrieval channel device is
configured to: fetch a context that describes a DMA transfer requested by
a host computer, determine whether a current capacity of the buffer for
transferring data exceeds a threshold, generate an instruction to
transfer a second amount of data to complete at least a portion of the
requested DMA transfer if the current capacity does exceed the threshold,
assert the instruction generated by the retrieval channel device, and
adjust the host address pointer by the second amount of data.