diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-19 10:22:57 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-19 10:22:57 +0300 |
commit | 0ff555192a8d20385d49d1c420e2e8d409b3c0da (patch) | |
tree | b6e4b6cae1028a310a3488ebf745954c51694bfc /Documentation/DMA-API.txt | |
parent | 3218c178b41b420cb7e0d120c7a137a3969242e5 (diff) | |
parent | 9e43f0de690211cf7153b5f3ec251bc315647ada (diff) | |
download | linux-0ff555192a8d20385d49d1c420e2e8d409b3c0da.tar.xz |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'Documentation/DMA-API.txt')
-rw-r--r-- | Documentation/DMA-API.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index d8b63d164e41..b462bb149543 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -316,12 +316,10 @@ reduce current DMA mapping usage or delay and try again later). pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) -Maps a scatter gather list from the block layer. - Returns: the number of physical segments mapped (this may be shorter -than <nents> passed in if the block layer determines that some -elements of the scatter/gather list are physically adjacent and thus -may be mapped with a single entry). +than <nents> passed in if some elements of the scatter/gather list are +physically or virtually adjacent and an IOMMU maps them with a single +entry). Please note that the sg cannot be mapped again if it has been mapped once. The mapping process is allowed to destroy information in the sg. @@ -337,7 +335,7 @@ With scatterlists, you use the resulting mapping like this: int i, count = dma_map_sg(dev, sglist, nents, direction); struct scatterlist *sg; - for (i = 0, sg = sglist; i < count; i++, sg++) { + for_each_sg(sglist, sg, count, i) { hw_address[i] = sg_dma_address(sg); hw_len[i] = sg_dma_len(sg); } |