i2o_dma_map_sg — Map a SG List to controller and fill in I2O message.
int i2o_dma_map_sg
(struct i2o_controller * c, struct scatterlist * sg, int sg_count, enum dma_data_direction direction, u32 ** sg_ptr);
I2O controller
SG list to be mapped
number of elements in the SG list
DMA_TO_DEVICE / DMA_FROM_DEVICE
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_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.