Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static bool bsg_prepare_job(struct device *dev, struct request *req)

Type:bool

Parameter:

TypeParameterName
struct device *dev
struct request *req
223  job = 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.
226  timeout = timeout
228  If bio Then
229  ret = bsg_map_buffer( & DMA payloads for the request/response , req)
230  If ret Then Go to failjob_rls_job
233  If BIDI support Then
234  ret = bsg_map_buffer( & reply_payload, BIDI support )
235  If ret Then Go to failjob_rls_rqst_payload
238  dev = dev
240  get_device - atomically increment the reference count for the device.
241  kref_init - initialize object.*@kref: object in question.
242  Return true
244  failjob_rls_rqst_payload :
245  kfree(sg_list)
246  failjob_rls_job :
247  result = -ENOMEM
248  Return false
Caller
NameDescribe
bsg_queue_rqsg_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.