Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\direct.c Create Date:2022-07-28 10:33:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dma_direct_map_sg

Proto:int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs)

Type:int

Parameter:

TypeParameterName
struct device *dev
struct scatterlist *sgl
intnents
enum dma_data_directiondir
unsigned longattrs
393  dma_address = dma_direct_map_page(dev, sg_page(sg), offset, length, dir, attrs)
395  If dma_address == DMA_MAPPING_ERROR Then Go to out_unmap
397  sg_dma_len(sg) = length
400  Return nents
402  out_unmap :
403  dma_direct_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC: Allows platform code to skip synchronization of* the CPU cache for the given buffer assuming that it has been already* transferred to 'device' domain.)
404  Return 0
Caller
NameDescribe
dma_map_sg_attrsdma_maps_sg_attrs returns 0 on error and > 0 on success.* It should never return a value < 0.