Function report |
Source Code:block\bsg-lib.c |
Create Date:2022-07-28 17:38:45 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:sg_setup_queue - Create and add the bsg hooks so we can receive requests*@dev: device to attach bsg device to*@name: device to give bsg device*@job_fn: bsg job handler*@timeout: timeout handler function pointer*@dd_job_size: size of LLD data needed for
Proto:struct request_queue *bsg_setup_queue(struct device *dev, const char *name, bsg_job_fn *job_fn, bsg_timeout_fn *timeout, int dd_job_size)
Type:struct request_queue
Parameter:
Type | Parameter | Name |
---|---|---|
struct device * | dev | |
const char * | name | |
bsg_job_fn * | job_fn | |
bsg_timeout_fn * | timeout | |
int | dd_job_size |
370 | bset = 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). |
375 | timeout_fn = timeout |
378 | ops = bsg_mq_ops , nr_hw_queues = 1 |
380 | queue_depth = 128 |
381 | numa_node = NUMA_NO_NODE |
382 | cmd_size = sizeof(structbsg_job) + dd_job_size |
383 | flags = BLK_MQ_F_NO_SCHED | BLK_MQ_F_BLOCKING |
387 | q = blk_mq_init_queue(set) |
396 | ret = bsg_register_queue(q, dev, name, & bsg_transport_ops) |
397 | If ret Then |
400 | Go to out_cleanup_queue |
403 | Return q |
404 | out_cleanup_queue : |
406 | out_queue : |
407 | blk_mq_free_tag_set(set) |
408 | out_tag_set : |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |