Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:trigger_batched_requests_async_store

Proto:static ssize_t trigger_batched_requests_async_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)

Type:ssize_t

Parameter:

TypeParameterName
struct device *dev
struct device_attribute *attr
const char *buf
size_tcount
763  mutex_lock( & test_fw_mutex)
765  These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later. = vzalloc(array3_size() - Calculate size of 3-dimensional array.*@a: dimension one*@b: dimension two*@c: dimension three* Calculates size of 3-dimensional array: @a *@b *@c.* Returns: number of bytes needed to represent the array or SIZE_MAX on* overflow.)
768  If Not These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later. Then
769  rc = -ENOMEM
770  Go to out
773  pr_info("batched loading '%s' custom fallback mechanism %u times\n", name, num_requests)
776  send_uevent = If send_uevent Then FW_ACTION_HOTPLUG Else FW_ACTION_NOHOTPLUG
779  When i < num_requests cycle
780  req = These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.[i]
781  name = name
782  fw = NULL
783  idx = i
784  init_completion( & completion)
785  rc = request_firmware_nowait(THIS_MODULE, send_uevent, name, dev, GFP_KERNEL, req, We wait for each callback to return with the lock held, no need to lock here)
789  If rc Then
790  pr_info("#%u: batched async load failed setup: %d\n", i, rc)
792  rc = rc
793  Go to out_bail
794  Else sent = true
798  rc = count
800  out_bail :
810  When i < num_requests cycle
811  req = These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.[i]
812  If sent Then wait_for_completion( & completion)
817  If rc < 0 Then test_result = rc
820  out :
821  mutex_unlock( & test_fw_mutex)
823  Return rc