函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bsg-lib.c Create Date:2022-07-27 19:14:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:bsg_map_buffer

函数原型:static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)

返回类型:int

参数:

类型参数名称
struct bsg_buffer *buf
struct request *req
203  sz等于sizeof(structscatterlist)乘* Number of scatter-gather DMA addr+len pairs after * physical address coalescing is performed.
205  BUG_ON(!* Number of scatter-gather DMA addr+len pairs after * physical address coalescing is performed.)
207  sg_list等于分配内存并置零
208  如果非sg_list则返回:负ENOMEM
210  初始化散列表
211  sg_cnt等于map a request to scatterlist, return number of sg entries setup. Caller* must make sure sg can hold rq->nr_phys_segments entries
212  payload_len等于blk_rq_bytes(req)
213  返回:0
调用者
名称描述
bsg_prepare_jobsg_prepare_job - create the bsg_job structure for the bsg request*@dev: device that is being sent the bsg request*@req: BSG request that needs a job structure