Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\dma-mapping.h Create Date:2022-07-28 05:51:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dma_maps_sg_attrs returns 0 on error and > 0 on success.* It should never return a value < 0.

Proto:static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, unsigned long attrs)

Type:int

Parameter:

TypeParameterName
struct device *dev
struct scatterlist *sg
intnents
enum dma_data_directiondir
unsigned longattrs
312  ops = get_dma_ops(dev)
315  BUG_ON(!valid_dma_direction(dir))
316  If dma_is_direct(ops) Then ents = dma_direct_map_sg(dev, sg, nents, dir, attrs)
318  Else ents = map_sg(dev, sg, nents, dir, attrs)
320  BUG_ON(ents < 0)
321  debug_dma_map_sg(dev, sg, nents, ents, dir)
323  Return ents