i2o_dma_map_single — Map pointer to controller and fill in I2O message.
dma_addr_t i2o_dma_map_single ( | struct i2o_controller * | c, |
void * | ptr, | |
size_t | size, | |
enum dma_data_direction | direction, | |
u32 ** | sg_ptr) ; |
c
I2O controller
ptr
pointer to the data which should be mapped
size
size of data in bytes
direction
DMA_TO_DEVICE / DMA_FROM_DEVICE
sg_ptr
pointer to the SG list inside the I2O message
This function does all necessary DMA handling and also writes the I2O
SGL elements into the I2O message. For details on DMA handling see also
dma_map_single
. The pointer sg_ptr will only be set to the end of the
SG list if the allocation was successful.
Returns DMA address which must be checked for failures using
dma_mapping_error
.