Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bsg-lib.c Create Date:2022-07-28 17:38:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bsg_map_buffer

Proto:static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)

Type:int

Parameter:

TypeParameterName
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 = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
208  If Not sg_list Then Return -ENOMEM
210  sg_init_table - Initialize SG table*@sgl: The SG table*@nents: Number of entries in table* Notes:* If this is part of a chained sg table, sg_mark_end() should be* used only on the last table part.
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  Return 0
Caller
NameDescribe
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