Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sg_queue_rq - generic handler for bsg requests*@hctx: hardware queue*@bd: queue data* On error the create_bsg_job function should return a -Exyz error value* that will be set to ->result.* Drivers/subsys should pass this to the queue init function.

Proto:static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd)

Type:blk_status_t

Parameter:

TypeParameterName
struct blk_mq_hw_ctx *hctx
const struct blk_mq_queue_data *bd
264  q = @queue: Pointer to the request queue that owns this hardware context.
265  dev = * The queue owner gets to use this for whatever they like. * ll_rw_blk doesn't touch it.
266  req = rq
267  bset = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(tag_set, structbsg_set, tag_set)
269  sts = BLK_STS_IOERR
272  blk_mq_start_request(req)
274  If Not get_device - atomically increment the reference count for the device. Then Return BLK_STS_IOERR
277  If Not sg_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 Then Go to out
280  ret = job_fn(lk_mq_rq_to_pdu - cast a request to a PDU*@rq: the request to be casted* Return: pointer to the PDU* Driver command data is immediately after the request. So add request to get* the PDU.)
281  If Not ret Then sts = BLK_STS_OK
284  out :
285  put_device(dev)
286  Return sts