i2o_dma_map_sg(9)
NAME
i2o_dma_map_sg - Map a SG List to controller and fill in I2O message.
SYNOPSIS
int i2o_dma_map_sg(struct i2o_controller * c, struct scatterlist * sg,
int sg_count, enum dma_data_direction direction,
u32 ** sg_ptr);
ARGUMENTS
- c
- I2O controller
- sg
- SG list to be mapped
- sg_count
- number of elements in the SG list
- direction
- DMA_TO_DEVICE / DMA_FROM_DEVICE
- sg_ptr
- pointer to the SG list inside the I2O message
DESCRIPTION
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_sg. The pointer sg_ptr will only be set to the end of the SG
list if the allocation was successful.
Returns 0 on failure or 1 on success.