---
name: "i2o_dma_map_single"
section: "9"
platform: "linux"
package: "linux-manual-2.6.26"
version: "2.6.26-29"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/i2o_dma_map_single"
---

# i2o\_dma\_map\_single(9)

Map pointer to controller and fill in I2O message.

## NAME

i2o\_dma\_map\_single - Map pointer to controller and fill in I2O message.

## SYNOPSIS

**dma\_addr\_t i2o\_dma\_map\_single(struct i2o\_controller \*** *c***, void \*** *ptr***, size\_t** *size***, enum dma\_data\_direction** *direction***, u32 \*\*** *sg\_ptr***);**

## ARGUMENTS

*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

## 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\_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**.

## COPYRIGHT
