| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/26 08:11 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"USB_CXACRU",
"USB_SPEEDTOUCH",
"USB_ATM",
"ATM",
"USB"
],
"FocusSymbols": [
"cxacru_find_firmware",
"cxacru_heavy_init",
"speedtch_find_firmware",
"speedtch_heavy_init"
],
"KMSANReasoning": "The patch modifies firmware loading calls in `cxacru.c` and `speedtch.c` from `request_firmware()` to `request_firmware_direct()`. This change avoids user-helper/sysfs fallback timeouts when searching for optional firmware files. It does not alter any buffer allocations, bounds, data initialization, or kernel-to-user memory transfers. No uninitialized memory usage or info-leak risks are introduced or affected; therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies firmware loading behavior in the Conexant AccessRunner (cxacru) and Alcatel SpeedTouch (speedtch) USB ATM modem drivers by replacing request_firmware() with request_firmware_direct(). These USB device drivers are reachable in standard virtualized environments via USB emulation frameworks such as Raw Gadget or dummy_hcd. During device probing and initialization (heavy_init), the drivers execute cxacru_find_firmware() and speedtch_find_firmware() to locate required firmware files. Because reachable executable driver code is altered, this patch warrants fuzzing.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/26 08:11 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 3da3978988df028da79eaededad891f87a5ddbdb\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Sep 26 08:11:26 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c\nindex 636f7886fc260..7d1944487fd8d 100644\n--- a/drivers/usb/atm/cxacru.c\n+++ b/drivers/usb/atm/cxacru.c\n@@ -993,7 +993,7 @@ static int cxacru_find_firmware(struct cxacru_data *instance,\n \tsprintf(buf, \"cxacru-%s.bin\", phase);\n \tusb_dbg(usbatm, \"cxacru_find_firmware: looking for %s\\n\", buf);\n \n-\tif (request_firmware(fw_p, buf, dev)) {\n+\tif (request_firmware_direct(fw_p, buf, dev)) {\n \t\tusb_dbg(usbatm, \"no stage %s firmware found\\n\", phase);\n \t\treturn -ENOENT;\n \t}\ndiff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c\nindex 9d28c652bcd80..c82db2f7a699a 100644\n--- a/drivers/usb/atm/speedtch.c\n+++ b/drivers/usb/atm/speedtch.c\n@@ -357,15 +357,15 @@ static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interfa\n \tsprintf(buf, \"speedtch-%d.bin.%x.%02x\", phase, major_revision, minor_revision);\n \tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n \n-\tif (request_firmware(fw_p, buf, dev)) {\n+\tif (request_firmware_direct(fw_p, buf, dev)) {\n \t\tsprintf(buf, \"speedtch-%d.bin.%x\", phase, major_revision);\n \t\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n \n-\t\tif (request_firmware(fw_p, buf, dev)) {\n+\t\tif (request_firmware_direct(fw_p, buf, dev)) {\n \t\t\tsprintf(buf, \"speedtch-%d.bin\", phase);\n \t\t\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n \n-\t\t\tif (request_firmware(fw_p, buf, dev)) {\n+\t\t\tif (request_firmware_direct(fw_p, buf, dev)) {\n \t\t\t\tusb_err(usbatm, \"%s: no stage %d firmware found!\\n\", __func__, phase);\n \t\t\t\treturn -ENOENT;\n \t\t\t}\n"
} |
| 2/1 | 2026/09/26 08:11 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": [
"USB_CXACRU",
"USB_SPEEDTOUCH",
"USB_ATM",
"ATM",
"USB"
],
"FocusSymbols": [
"cxacru_find_firmware",
"cxacru_heavy_init",
"speedtch_find_firmware",
"speedtch_heavy_init"
],
"Reasoning": "The patch modifies firmware loading behavior in the Conexant AccessRunner (cxacru) and Alcatel SpeedTouch (speedtch) USB ATM modem drivers by replacing request_firmware() with request_firmware_direct(). These USB device drivers are reachable in standard virtualized environments via USB emulation frameworks such as Raw Gadget or dummy_hcd. During device probing and initialization (heavy_init), the drivers execute cxacru_find_firmware() and speedtch_find_firmware() to locate required firmware files. Because reachable executable driver code is altered, this patch warrants fuzzing.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 3da3978988df028da79eaededad891f87a5ddbdb
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 26 08:11:26 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 636f7886fc260..7d1944487fd8d 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -993,7 +993,7 @@ static int cxacru_find_firmware(struct cxacru_data *instance,
sprintf(buf, "cxacru-%s.bin", phase);
usb_dbg(usbatm, "cxacru_find_firmware: looking for %s\n", buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
usb_dbg(usbatm, "no stage %s firmware found\n", phase);
return -ENOENT;
}
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
index 9d28c652bcd80..c82db2f7a699a 100644
--- a/drivers/usb/atm/speedtch.c
+++ b/drivers/usb/atm/speedtch.c
@@ -357,15 +357,15 @@ static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interfa
sprintf(buf, "speedtch-%d.bin.%x.%02x", phase, major_revision, minor_revision);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
sprintf(buf, "speedtch-%d.bin.%x", phase, major_revision);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
sprintf(buf, "speedtch-%d.bin", phase);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
usb_err(usbatm, "%s: no stage %d firmware found!\n", __func__, phase);
return -ENOENT;
}
|
| 3/2 | 2026/09/26 08:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3358 output: 28 thoughts: 811 Thoughts: **Analyzing the Firmware Request Patch** Okay, so I'm looking at this patch series, and it seems like a straightforward change. It's replacing `request_firmware` with `request_firmware_direct` in two USB ATM drivers, `cxacru.c` and `speedtch.c`. This is a fairly common optimization, but let's dive deeper and see what's actually happening here. My immediate thought is to understand the context. What's the impact of this change? Are there any potential downsides? I need to understand how these drivers are used, how they're probed, and what the overall firmware loading process looks like. I'll need to check the Kconfig options to see which configurations enable these drivers, as this will help me understand their scope and relevance. Given the nature of the drivers, I'm already wondering about USB emulation and fuzzing. These are USB-based ATM drivers, and the kernel has extensive USB fuzzing capabilities through syzkaller. Can these devices be emulated using raw-gadget or dummy_hcd? If so, this opens the door to thorough testing with syzkaller. I'll need to investigate whether this is a viable avenue for testing these specific drivers. Basically, I need to know: * How does `request_firmware_direct` improve anything in this context? * How are these drivers configured and loaded? * How can this change be tested - can we emulate these devices and fuzz them effectively? Let's start by digging into the drivers and their respective Kconfig options. |
| 4/2 | 2026/09/26 08:11 | tool | grepper |
0mArgs:{
"Expression": "cxacru",
"PathPrefix": "drivers/usb/atm"
}Results: {
"Output": "drivers/usb/atm/Kconfig=32=config USB_CXACRU\n--\ndrivers/usb/atm/Kconfig-41-\t To compile this driver as a module, choose M here: the\ndrivers/usb/atm/Kconfig:42:\t module will be called cxacru.\ndrivers/usb/atm/Kconfig-43-\n--\ndrivers/usb/atm/Makefile-4-#\ndrivers/usb/atm/Makefile:5:obj-$(CONFIG_USB_CXACRU)\t+= cxacru.o\ndrivers/usb/atm/Makefile-6-obj-$(CONFIG_USB_SPEEDTOUCH)\t+= speedtch.o\n--\ndrivers/usb/atm/cxacru.c-2-/******************************************************************************\ndrivers/usb/atm/cxacru.c:3: * cxacru.c - driver for USB ADSL modems based on\ndrivers/usb/atm/cxacru.c-4- * Conexant AccessRunner chipset\n--\ndrivers/usb/atm/cxacru.c-33-\ndrivers/usb/atm/cxacru.c:34:static const char cxacru_driver_name[] = \"cxacru\";\ndrivers/usb/atm/cxacru.c-35-\n--\ndrivers/usb/atm/cxacru.c-58- * firmware is loaded */\ndrivers/usb/atm/cxacru.c:59:enum cxacru_fw_request {\ndrivers/usb/atm/cxacru.c-60-\tFW_CMD_ERR,\n--\ndrivers/usb/atm/cxacru.c-70- * firmware is loaded */\ndrivers/usb/atm/cxacru.c:71:enum cxacru_cm_request {\ndrivers/usb/atm/cxacru.c-72-\tCM_REQUEST_UNDEFINED = 0x80,\n--\ndrivers/usb/atm/cxacru.c-108- */\ndrivers/usb/atm/cxacru.c:109:enum cxacru_cm_flash {\ndrivers/usb/atm/cxacru.c-110-\tCM_FLASH_READ = 0xa1,\n--\ndrivers/usb/atm/cxacru.c-114-/* reply codes to the commands above */\ndrivers/usb/atm/cxacru.c:115:enum cxacru_cm_status {\ndrivers/usb/atm/cxacru.c-116-\tCM_STATUS_UNDEFINED,\n--\ndrivers/usb/atm/cxacru.c-126-/* indices into CARD_INFO_GET return array */\ndrivers/usb/atm/cxacru.c:127:enum cxacru_info_idx {\ndrivers/usb/atm/cxacru.c-128-\tCXINF_DOWNSTREAM_RATE,\n--\ndrivers/usb/atm/cxacru.c-156-\ndrivers/usb/atm/cxacru.c:157:enum cxacru_poll_state {\ndrivers/usb/atm/cxacru.c-158-\tCXPOLL_STOPPING,\n--\ndrivers/usb/atm/cxacru.c-163-\ndrivers/usb/atm/cxacru.c:164:struct cxacru_modem_type {\ndrivers/usb/atm/cxacru.c-165-\tu32 pll_f_clk;\n--\ndrivers/usb/atm/cxacru.c-169-\ndrivers/usb/atm/cxacru.c:170:struct cxacru_data {\ndrivers/usb/atm/cxacru.c-171-\tstruct usbatm_data *usbatm;\ndrivers/usb/atm/cxacru.c-172-\ndrivers/usb/atm/cxacru.c:173:\tconst struct cxacru_modem_type *modem_type;\ndrivers/usb/atm/cxacru.c-174-\n--\ndrivers/usb/atm/cxacru.c-180-\tstruct mutex poll_state_serialize;\ndrivers/usb/atm/cxacru.c:181:\tenum cxacru_poll_state poll_state;\ndrivers/usb/atm/cxacru.c-182-\n--\ndrivers/usb/atm/cxacru.c-192-\ndrivers/usb/atm/cxacru.c:193:static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,\ndrivers/usb/atm/cxacru.c-194-\tu8 *wdata, int wsize, u8 *rdata, int rsize);\ndrivers/usb/atm/cxacru.c:195:static void cxacru_poll_status(struct work_struct *work);\ndrivers/usb/atm/cxacru.c-196-\n--\ndrivers/usb/atm/cxacru.c=208=static ssize_t _name##_show(struct device *dev, \\\n--\ndrivers/usb/atm/cxacru.c-210-{ \\\ndrivers/usb/atm/cxacru.c:211:\tstruct cxacru_data *instance = to_usbatm_driver_data(\\\ndrivers/usb/atm/cxacru.c-212-\t\tto_usb_interface(dev)); \\\n--\ndrivers/usb/atm/cxacru.c-216-\\\ndrivers/usb/atm/cxacru.c:217:\treturn cxacru_sysfs_showattr_##_type(instance-\u003ecard_info[_value], buf); \\\ndrivers/usb/atm/cxacru.c-218-} \\\ndrivers/usb/atm/cxacru.c=219=CXACRU__ATTR_INIT(_name)\n--\ndrivers/usb/atm/cxacru.c-230-\ndrivers/usb/atm/cxacru.c:231:static ssize_t cxacru_sysfs_showattr_u32(u32 value, char *buf)\ndrivers/usb/atm/cxacru.c-232-{\n--\ndrivers/usb/atm/cxacru.c-235-\ndrivers/usb/atm/cxacru.c:236:static ssize_t cxacru_sysfs_showattr_s8(s8 value, char *buf)\ndrivers/usb/atm/cxacru.c-237-{\n--\ndrivers/usb/atm/cxacru.c-240-\ndrivers/usb/atm/cxacru.c:241:static ssize_t cxacru_sysfs_showattr_dB(s16 value, char *buf)\ndrivers/usb/atm/cxacru.c-242-{\n--\ndrivers/usb/atm/cxacru.c-252-\ndrivers/usb/atm/cxacru.c:253:static ssize_t cxacru_sysfs_showattr_bool(u32 value, char *buf)\ndrivers/usb/atm/cxacru.c-254-{\n--\ndrivers/usb/atm/cxacru.c-261-\ndrivers/usb/atm/cxacru.c:262:static ssize_t cxacru_sysfs_showattr_LINK(u32 value, char *buf)\ndrivers/usb/atm/cxacru.c-263-{\n--\ndrivers/usb/atm/cxacru.c-270-\ndrivers/usb/atm/cxacru.c:271:static ssize_t cxacru_sysfs_showattr_LINE(u32 value, char *buf)\ndrivers/usb/atm/cxacru.c-272-{\n--\ndrivers/usb/atm/cxacru.c-281-\ndrivers/usb/atm/cxacru.c:282:static ssize_t cxacru_sysfs_showattr_MODU(u32 value, char *buf)\ndrivers/usb/atm/cxacru.c-283-{\n--\ndrivers/usb/atm/cxacru.c=303=static ssize_t mac_address_show(struct device *dev,\n--\ndrivers/usb/atm/cxacru.c-305-{\ndrivers/usb/atm/cxacru.c:306:\tstruct cxacru_data *instance = to_usbatm_driver_data(\ndrivers/usb/atm/cxacru.c-307-\t\t\tto_usb_interface(dev));\n--\ndrivers/usb/atm/cxacru.c=315=static ssize_t adsl_state_show(struct device *dev,\n--\ndrivers/usb/atm/cxacru.c-318-\tstatic char *str[] = { \"running\", \"stopped\" };\ndrivers/usb/atm/cxacru.c:319:\tstruct cxacru_data *instance = to_usbatm_driver_data(\ndrivers/usb/atm/cxacru.c-320-\t\t\tto_usb_interface(dev));\n--\ndrivers/usb/atm/cxacru.c=332=static ssize_t adsl_state_store(struct device *dev,\n--\ndrivers/usb/atm/cxacru.c-334-{\ndrivers/usb/atm/cxacru.c:335:\tstruct cxacru_data *instance = to_usbatm_driver_data(\ndrivers/usb/atm/cxacru.c-336-\t\t\tto_usb_interface(dev));\n--\ndrivers/usb/atm/cxacru.c-356-\tif (!strcmp(str_cmd, \"stop\") || !strcmp(str_cmd, \"restart\")) {\ndrivers/usb/atm/cxacru.c:357:\t\tret = cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_STOP, NULL, 0, NULL, 0);\ndrivers/usb/atm/cxacru.c-358-\t\tif (ret \u003c 0) {\n--\ndrivers/usb/atm/cxacru.c-376-\tif (!strcmp(str_cmd, \"start\") || !strcmp(str_cmd, \"restart\")) {\ndrivers/usb/atm/cxacru.c:377:\t\tret = cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_START, NULL, 0, NULL, 0);\ndrivers/usb/atm/cxacru.c-378-\t\tif (ret \u003c 0) {\n--\ndrivers/usb/atm/cxacru.c-427-\tif (poll == CXPOLL_POLLING)\ndrivers/usb/atm/cxacru.c:428:\t\tcxacru_poll_status(\u0026instance-\u003epoll_work.work);\ndrivers/usb/atm/cxacru.c-429-\n--\ndrivers/usb/atm/cxacru.c=435=static ssize_t adsl_config_store(struct device *dev,\n--\ndrivers/usb/atm/cxacru.c-437-{\ndrivers/usb/atm/cxacru.c:438:\tstruct cxacru_data *instance = to_usbatm_driver_data(\ndrivers/usb/atm/cxacru.c-439-\t\t\tto_usb_interface(dev));\n--\ndrivers/usb/atm/cxacru.c-480-\t\t\tdata[0] = cpu_to_le32(num);\ndrivers/usb/atm/cxacru.c:481:\t\t\tret = cxacru_cm(instance, CM_REQUEST_CARD_DATA_SET,\ndrivers/usb/atm/cxacru.c-482-\t\t\t\t(u8 *) data, 4 + num * 8, NULL, 0);\n--\ndrivers/usb/atm/cxacru.c=539=CXACRU_ALL_FILES(INIT);\ndrivers/usb/atm/cxacru.c-540-\ndrivers/usb/atm/cxacru.c:541:static struct attribute *cxacru_attrs[] = {\ndrivers/usb/atm/cxacru.c-542-\t\u0026dev_attr_adsl_config.attr,\n--\ndrivers/usb/atm/cxacru.c-569-};\ndrivers/usb/atm/cxacru.c:570:ATTRIBUTE_GROUPS(cxacru);\ndrivers/usb/atm/cxacru.c-571-\ndrivers/usb/atm/cxacru.c-572-/* the following three functions are stolen from drivers/usb/core/message.c */\ndrivers/usb/atm/cxacru.c:573:static void cxacru_blocking_completion(struct urb *urb)\ndrivers/usb/atm/cxacru.c-574-{\n--\ndrivers/usb/atm/cxacru.c-577-\ndrivers/usb/atm/cxacru.c:578:struct cxacru_timer {\ndrivers/usb/atm/cxacru.c-579-\tstruct timer_list timer;\n--\ndrivers/usb/atm/cxacru.c-582-\ndrivers/usb/atm/cxacru.c:583:static void cxacru_timeout_kill(struct timer_list *t)\ndrivers/usb/atm/cxacru.c-584-{\ndrivers/usb/atm/cxacru.c:585:\tstruct cxacru_timer *timer = timer_container_of(timer, t, timer);\ndrivers/usb/atm/cxacru.c-586-\n--\ndrivers/usb/atm/cxacru.c-589-\ndrivers/usb/atm/cxacru.c:590:static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,\ndrivers/usb/atm/cxacru.c-591-\t\t\t\t int *actual_length)\ndrivers/usb/atm/cxacru.c-592-{\ndrivers/usb/atm/cxacru.c:593:\tstruct cxacru_timer timer = {\ndrivers/usb/atm/cxacru.c-594-\t\t.urb = urb,\n--\ndrivers/usb/atm/cxacru.c-596-\ndrivers/usb/atm/cxacru.c:597:\ttimer_setup_on_stack(\u0026timer.timer, cxacru_timeout_kill, 0);\ndrivers/usb/atm/cxacru.c-598-\tmod_timer(\u0026timer.timer, jiffies + msecs_to_jiffies(CMD_TIMEOUT));\n--\ndrivers/usb/atm/cxacru.c-607-\ndrivers/usb/atm/cxacru.c:608:static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,\ndrivers/usb/atm/cxacru.c-609-\t\t u8 *wdata, int wsize, u8 *rdata, int rsize)\n--\ndrivers/usb/atm/cxacru.c-656-\ndrivers/usb/atm/cxacru.c:657:\tret = cxacru_start_wait_urb(instance-\u003esnd_urb, \u0026instance-\u003esnd_done, NULL);\ndrivers/usb/atm/cxacru.c-658-\tif (ret \u003c 0) {\n--\ndrivers/usb/atm/cxacru.c-663-\ndrivers/usb/atm/cxacru.c:664:\tret = cxacru_start_wait_urb(instance-\u003ercv_urb, \u0026instance-\u003ercv_done, \u0026actlen);\ndrivers/usb/atm/cxacru.c-665-\tif (ret \u003c 0) {\n--\ndrivers/usb/atm/cxacru.c-709-\ndrivers/usb/atm/cxacru.c:710:static int cxacru_cm_get_array(struct cxacru_data *instance, enum cxacru_cm_request cm,\ndrivers/usb/atm/cxacru.c-711-\t\t\t u32 *data, int size)\n--\ndrivers/usb/atm/cxacru.c-723-\ndrivers/usb/atm/cxacru.c:724:\tret = cxacru_cm(instance, cm, NULL, 0, (u8 *) buf, buflen);\ndrivers/usb/atm/cxacru.c-725-\tif (ret \u003c 0)\n--\ndrivers/usb/atm/cxacru.c-727-\ndrivers/usb/atm/cxacru.c:728:\t/* len \u003e 0 \u0026\u0026 len % 4 == 0 guaranteed by cxacru_cm() */\ndrivers/usb/atm/cxacru.c-729-\tlen = ret / 4;\n--\ndrivers/usb/atm/cxacru.c-759-\ndrivers/usb/atm/cxacru.c:760:static int cxacru_card_status(struct cxacru_data *instance)\ndrivers/usb/atm/cxacru.c-761-{\ndrivers/usb/atm/cxacru.c:762:\tint ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);\ndrivers/usb/atm/cxacru.c-763-\ndrivers/usb/atm/cxacru.c-764-\tif (ret \u003c 0) {\t\t/* firmware not loaded */\ndrivers/usb/atm/cxacru.c:765:\t\tusb_dbg(instance-\u003eusbatm, \"cxacru_adsl_start: CARD_GET_STATUS returned %d\\n\", ret);\ndrivers/usb/atm/cxacru.c-766-\t\treturn ret;\n--\ndrivers/usb/atm/cxacru.c-770-\ndrivers/usb/atm/cxacru.c:771:static int cxacru_atm_start(struct usbatm_data *usbatm_instance,\ndrivers/usb/atm/cxacru.c-772-\t\tstruct atm_dev *atm_dev)\ndrivers/usb/atm/cxacru.c-773-{\ndrivers/usb/atm/cxacru.c:774:\tstruct cxacru_data *instance = usbatm_instance-\u003edriver_data;\ndrivers/usb/atm/cxacru.c-775-\tstruct usb_interface *intf = usbatm_instance-\u003eusb_intf;\n--\ndrivers/usb/atm/cxacru.c-781-\t/* Read MAC address */\ndrivers/usb/atm/cxacru.c:782:\tret = cxacru_cm(instance, CM_REQUEST_CARD_GET_MAC_ADDRESS, NULL, 0,\ndrivers/usb/atm/cxacru.c-783-\t\t\tatm_dev-\u003eesi, sizeof(atm_dev-\u003eesi));\ndrivers/usb/atm/cxacru.c-784-\tif (ret \u003c 0) {\ndrivers/usb/atm/cxacru.c:785:\t\tatm_err(usbatm_instance, \"cxacru_atm_start: CARD_GET_MAC_ADDRESS returned %d\\n\", ret);\ndrivers/usb/atm/cxacru.c-786-\t\treturn ret;\n--\ndrivers/usb/atm/cxacru.c-790-\tmutex_lock(\u0026instance-\u003eadsl_state_serialize);\ndrivers/usb/atm/cxacru.c:791:\tret = cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_START, NULL, 0, NULL, 0);\ndrivers/usb/atm/cxacru.c-792-\tif (ret \u003c 0)\ndrivers/usb/atm/cxacru.c:793:\t\tatm_err(usbatm_instance, \"cxacru_atm_start: CHIP_ADSL_LINE_START returned %d\\n\", ret);\ndrivers/usb/atm/cxacru.c-794-\n--\ndrivers/usb/atm/cxacru.c-815-\tif (start_polling)\ndrivers/usb/atm/cxacru.c:816:\t\tcxacru_poll_status(\u0026instance-\u003epoll_work.work);\ndrivers/usb/atm/cxacru.c-817-\treturn 0;\n--\ndrivers/usb/atm/cxacru.c-819-\ndrivers/usb/atm/cxacru.c:820:static void cxacru_poll_status(struct work_struct *work)\ndrivers/usb/atm/cxacru.c-821-{\ndrivers/usb/atm/cxacru.c:822:\tstruct cxacru_data *instance =\ndrivers/usb/atm/cxacru.c:823:\t\tcontainer_of(work, struct cxacru_data, poll_work.work);\ndrivers/usb/atm/cxacru.c-824-\tu32 buf[CXINF_MAX] = {};\n--\ndrivers/usb/atm/cxacru.c-829-\ndrivers/usb/atm/cxacru.c:830:\tret = cxacru_cm_get_array(instance, CM_REQUEST_CARD_INFO_GET, buf, CXINF_MAX);\ndrivers/usb/atm/cxacru.c-831-\tif (ret \u003c 0) {\n--\ndrivers/usb/atm/cxacru.c-936-\ndrivers/usb/atm/cxacru.c:937:static int cxacru_fw(struct usb_device *usb_dev, enum cxacru_fw_request fw,\ndrivers/usb/atm/cxacru.c-938-\t\t u8 code1, u8 code2, u32 addr, const u8 *data, int size)\n--\ndrivers/usb/atm/cxacru.c-985-\ndrivers/usb/atm/cxacru.c:986:static int cxacru_find_firmware(struct cxacru_data *instance,\ndrivers/usb/atm/cxacru.c-987-\t\t\t\tchar *phase, const struct firmware **fw_p)\n--\ndrivers/usb/atm/cxacru.c-992-\ndrivers/usb/atm/cxacru.c:993:\tsprintf(buf, \"cxacru-%s.bin\", phase);\ndrivers/usb/atm/cxacru.c:994:\tusb_dbg(usbatm, \"cxacru_find_firmware: looking for %s\\n\", buf);\ndrivers/usb/atm/cxacru.c-995-\n--\ndrivers/usb/atm/cxacru.c-1005-\ndrivers/usb/atm/cxacru.c:1006:static int cxacru_heavy_init(struct usbatm_data *usbatm_instance,\ndrivers/usb/atm/cxacru.c-1007-\t\t\t struct usb_interface *usb_intf)\n--\ndrivers/usb/atm/cxacru.c-1009-\tconst struct firmware *fw, *bp;\ndrivers/usb/atm/cxacru.c:1010:\tstruct cxacru_data *instance = usbatm_instance-\u003edriver_data;\ndrivers/usb/atm/cxacru.c-1011-\tstruct usbatm_data *usbatm = instance-\u003eusbatm;\n--\ndrivers/usb/atm/cxacru.c-1017-\ndrivers/usb/atm/cxacru.c:1018:\tret = cxacru_find_firmware(instance, \"fw\", \u0026fw);\ndrivers/usb/atm/cxacru.c-1019-\tif (ret) {\ndrivers/usb/atm/cxacru.c:1020:\t\tusb_warn(usbatm_instance, \"firmware (cxacru-fw.bin) unavailable (system misconfigured?)\\n\");\ndrivers/usb/atm/cxacru.c-1021-\t\treturn ret;\n--\ndrivers/usb/atm/cxacru.c-1024-\tif (instance-\u003emodem_type-\u003eboot_rom_patch) {\ndrivers/usb/atm/cxacru.c:1025:\t\tret = cxacru_find_firmware(instance, \"bp\", \u0026bp);\ndrivers/usb/atm/cxacru.c-1026-\t\tif (ret) {\ndrivers/usb/atm/cxacru.c:1027:\t\t\tusb_warn(usbatm_instance, \"boot ROM patch (cxacru-bp.bin) unavailable (system misconfigured?)\\n\");\ndrivers/usb/atm/cxacru.c-1028-\t\t\trelease_firmware(fw);\n--\ndrivers/usb/atm/cxacru.c-1034-\tval = cpu_to_le32(instance-\u003emodem_type-\u003epll_f_clk);\ndrivers/usb/atm/cxacru.c:1035:\tret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLFCLK_ADDR, (u8 *) \u0026val, 4);\ndrivers/usb/atm/cxacru.c-1036-\tif (ret) {\n--\ndrivers/usb/atm/cxacru.c-1042-\tval = cpu_to_le32(instance-\u003emodem_type-\u003epll_b_clk);\ndrivers/usb/atm/cxacru.c:1043:\tret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLBCLK_ADDR, (u8 *) \u0026val, 4);\ndrivers/usb/atm/cxacru.c-1044-\tif (ret) {\n--\ndrivers/usb/atm/cxacru.c-1050-\tval = cpu_to_le32(SDRAM_ENA);\ndrivers/usb/atm/cxacru.c:1051:\tret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SDRAMEN_ADDR, (u8 *) \u0026val, 4);\ndrivers/usb/atm/cxacru.c-1052-\tif (ret) {\n--\ndrivers/usb/atm/cxacru.c-1058-\tusb_info(usbatm, \"loading firmware\\n\");\ndrivers/usb/atm/cxacru.c:1059:\tret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, FW_ADDR, fw-\u003edata, fw-\u003esize);\ndrivers/usb/atm/cxacru.c-1060-\tif (ret) {\n--\ndrivers/usb/atm/cxacru.c-1067-\t\tusb_info(usbatm, \"loading boot ROM patch\\n\");\ndrivers/usb/atm/cxacru.c:1068:\t\tret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_ADDR, bp-\u003edata, bp-\u003esize);\ndrivers/usb/atm/cxacru.c-1069-\t\tif (ret) {\n--\ndrivers/usb/atm/cxacru.c-1075-\t/* Signature */\ndrivers/usb/atm/cxacru.c:1076:\tret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SIG_ADDR, (u8 *) signature, 4);\ndrivers/usb/atm/cxacru.c-1077-\tif (ret) {\n--\ndrivers/usb/atm/cxacru.c-1084-\t\tval = cpu_to_le32(BR_ADDR);\ndrivers/usb/atm/cxacru.c:1085:\t\tret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_STACK_ADDR, (u8 *) \u0026val, 4);\ndrivers/usb/atm/cxacru.c-1086-\t} else {\ndrivers/usb/atm/cxacru.c:1087:\t\tret = cxacru_fw(usb_dev, FW_GOTO_MEM, 0x0, 0x0, FW_ADDR, NULL, 0);\ndrivers/usb/atm/cxacru.c-1088-\t}\n--\ndrivers/usb/atm/cxacru.c-1101-\ndrivers/usb/atm/cxacru.c:1102:\tret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);\ndrivers/usb/atm/cxacru.c-1103-\tif (ret \u003c 0) {\n--\ndrivers/usb/atm/cxacru.c-1112-\ndrivers/usb/atm/cxacru.c:1113:\tret = cxacru_card_status(instance);\ndrivers/usb/atm/cxacru.c-1114-\tif (ret)\n--\ndrivers/usb/atm/cxacru.c-1121-\ndrivers/usb/atm/cxacru.c:1122:static int cxacru_bind(struct usbatm_data *usbatm_instance,\ndrivers/usb/atm/cxacru.c-1123-\t\t struct usb_interface *intf, const struct usb_device_id *id)\ndrivers/usb/atm/cxacru.c-1124-{\ndrivers/usb/atm/cxacru.c:1125:\tstruct cxacru_data *instance;\ndrivers/usb/atm/cxacru.c-1126-\tstruct usb_device *usb_dev = interface_to_usbdev(intf);\n--\ndrivers/usb/atm/cxacru.c-1139-\tinstance-\u003eusbatm = usbatm_instance;\ndrivers/usb/atm/cxacru.c:1140:\tinstance-\u003emodem_type = (struct cxacru_modem_type *) id-\u003edriver_info;\ndrivers/usb/atm/cxacru.c-1141-\n--\ndrivers/usb/atm/cxacru.c-1150-\tif (!instance-\u003ercv_buf) {\ndrivers/usb/atm/cxacru.c:1151:\t\tusb_dbg(usbatm_instance, \"cxacru_bind: no memory for rcv_buf\\n\");\ndrivers/usb/atm/cxacru.c-1152-\t\tret = -ENOMEM;\n--\ndrivers/usb/atm/cxacru.c-1156-\tif (!instance-\u003esnd_buf) {\ndrivers/usb/atm/cxacru.c:1157:\t\tusb_dbg(usbatm_instance, \"cxacru_bind: no memory for snd_buf\\n\");\ndrivers/usb/atm/cxacru.c-1158-\t\tret = -ENOMEM;\n--\ndrivers/usb/atm/cxacru.c-1172-\tif (!cmd_ep) {\ndrivers/usb/atm/cxacru.c:1173:\t\tusb_dbg(usbatm_instance, \"cxacru_bind: no command endpoint\\n\");\ndrivers/usb/atm/cxacru.c-1174-\t\tret = -ENODEV;\n--\ndrivers/usb/atm/cxacru.c-1183-\tif (!ret) {\ndrivers/usb/atm/cxacru.c:1184:\t\tusb_err(usbatm_instance, \"cxacru_bind: interface has incorrect endpoints\\n\");\ndrivers/usb/atm/cxacru.c-1185-\t\tret = -ENODEV;\n--\ndrivers/usb/atm/cxacru.c-1193-\t\t\tinstance-\u003ercv_buf, PAGE_SIZE,\ndrivers/usb/atm/cxacru.c:1194:\t\t\tcxacru_blocking_completion, \u0026instance-\u003ercv_done, 1);\ndrivers/usb/atm/cxacru.c-1195-\n--\ndrivers/usb/atm/cxacru.c-1198-\t\t\tinstance-\u003esnd_buf, PAGE_SIZE,\ndrivers/usb/atm/cxacru.c:1199:\t\t\tcxacru_blocking_completion, \u0026instance-\u003esnd_done, 4);\ndrivers/usb/atm/cxacru.c-1200-\t} else {\n--\ndrivers/usb/atm/cxacru.c-1203-\t\t\tinstance-\u003ercv_buf, PAGE_SIZE,\ndrivers/usb/atm/cxacru.c:1204:\t\t\tcxacru_blocking_completion, \u0026instance-\u003ercv_done);\ndrivers/usb/atm/cxacru.c-1205-\n--\ndrivers/usb/atm/cxacru.c-1208-\t\t\tinstance-\u003esnd_buf, PAGE_SIZE,\ndrivers/usb/atm/cxacru.c:1209:\t\t\tcxacru_blocking_completion, \u0026instance-\u003esnd_done);\ndrivers/usb/atm/cxacru.c-1210-\t}\n--\ndrivers/usb/atm/cxacru.c-1213-\ndrivers/usb/atm/cxacru.c:1214:\tINIT_DELAYED_WORK(\u0026instance-\u003epoll_work, cxacru_poll_status);\ndrivers/usb/atm/cxacru.c-1215-\n--\ndrivers/usb/atm/cxacru.c-1217-\ndrivers/usb/atm/cxacru.c:1218:\tusbatm_instance-\u003eflags = (cxacru_card_status(instance) ? 0 : UDSL_SKIP_HEAVY_INIT);\ndrivers/usb/atm/cxacru.c-1219-\n--\ndrivers/usb/atm/cxacru.c-1231-\ndrivers/usb/atm/cxacru.c:1232:static void cxacru_unbind(struct usbatm_data *usbatm_instance,\ndrivers/usb/atm/cxacru.c-1233-\t\tstruct usb_interface *intf)\ndrivers/usb/atm/cxacru.c-1234-{\ndrivers/usb/atm/cxacru.c:1235:\tstruct cxacru_data *instance = usbatm_instance-\u003edriver_data;\ndrivers/usb/atm/cxacru.c:1236:\tusb_dbg(usbatm_instance, \"cxacru_unbind entered\\n\");\ndrivers/usb/atm/cxacru.c-1237-\ndrivers/usb/atm/cxacru.c-1238-\tif (!instance) {\ndrivers/usb/atm/cxacru.c:1239:\t\tusb_dbg(usbatm_instance, \"cxacru_unbind: NULL instance!\\n\");\ndrivers/usb/atm/cxacru.c-1240-\t\treturn;\n--\ndrivers/usb/atm/cxacru.c-1264-\ndrivers/usb/atm/cxacru.c:1265:static const struct cxacru_modem_type cxacru_cafe = {\ndrivers/usb/atm/cxacru.c-1266-\t.pll_f_clk = 0x02d874df,\n--\ndrivers/usb/atm/cxacru.c-1270-\ndrivers/usb/atm/cxacru.c:1271:static const struct cxacru_modem_type cxacru_cb00 = {\ndrivers/usb/atm/cxacru.c-1272-\t.pll_f_clk = 0x5,\n--\ndrivers/usb/atm/cxacru.c-1276-\ndrivers/usb/atm/cxacru.c:1277:static const struct usb_device_id cxacru_usb_ids[] = {\ndrivers/usb/atm/cxacru.c-1278-\t{ /* V = Conexant\t\t\tP = ADSL modem (Euphrates project)\t*/\ndrivers/usb/atm/cxacru.c:1279:\t\tUSB_DEVICE(0x0572, 0xcafe),\t.driver_info = (unsigned long) \u0026cxacru_cafe\ndrivers/usb/atm/cxacru.c-1280-\t},\ndrivers/usb/atm/cxacru.c-1281-\t{ /* V = Conexant\t\t\tP = ADSL modem (Hasbani project)\t*/\ndrivers/usb/atm/cxacru.c:1282:\t\tUSB_DEVICE(0x0572, 0xcb00),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1283-\t},\ndrivers/usb/atm/cxacru.c-1284-\t{ /* V = Conexant\t\t\tP = ADSL modem\t\t\t\t*/\ndrivers/usb/atm/cxacru.c:1285:\t\tUSB_DEVICE(0x0572, 0xcb01),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1286-\t},\ndrivers/usb/atm/cxacru.c-1287-\t{ /* V = Conexant\t\t\tP = ADSL modem (Well PTI-800) */\ndrivers/usb/atm/cxacru.c:1288:\t\tUSB_DEVICE(0x0572, 0xcb02),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1289-\t},\ndrivers/usb/atm/cxacru.c-1290-\t{ /* V = Conexant\t\t\tP = ADSL modem\t\t\t\t*/\ndrivers/usb/atm/cxacru.c:1291:\t\tUSB_DEVICE(0x0572, 0xcb06),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1292-\t},\ndrivers/usb/atm/cxacru.c-1293-\t{ /* V = Conexant\t\t\tP = ADSL modem (ZTE ZXDSL 852)\t\t*/\ndrivers/usb/atm/cxacru.c:1294:\t\tUSB_DEVICE(0x0572, 0xcb07),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1295-\t},\ndrivers/usb/atm/cxacru.c-1296-\t{ /* V = Olitec\t\t\t\tP = ADSL modem version 2\t\t*/\ndrivers/usb/atm/cxacru.c:1297:\t\tUSB_DEVICE(0x08e3, 0x0100),\t.driver_info = (unsigned long) \u0026cxacru_cafe\ndrivers/usb/atm/cxacru.c-1298-\t},\ndrivers/usb/atm/cxacru.c-1299-\t{ /* V = Olitec\t\t\t\tP = ADSL modem version 3\t\t*/\ndrivers/usb/atm/cxacru.c:1300:\t\tUSB_DEVICE(0x08e3, 0x0102),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1301-\t},\ndrivers/usb/atm/cxacru.c-1302-\t{ /* V = Trust/Amigo Technology Co.\tP = AMX-CA86U\t\t\t\t*/\ndrivers/usb/atm/cxacru.c:1303:\t\tUSB_DEVICE(0x0eb0, 0x3457),\t.driver_info = (unsigned long) \u0026cxacru_cafe\ndrivers/usb/atm/cxacru.c-1304-\t},\ndrivers/usb/atm/cxacru.c-1305-\t{ /* V = Zoom\t\t\t\tP = 5510\t\t\t\t*/\ndrivers/usb/atm/cxacru.c:1306:\t\tUSB_DEVICE(0x1803, 0x5510),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1307-\t},\ndrivers/usb/atm/cxacru.c-1308-\t{ /* V = Draytek\t\t\tP = Vigor 318\t\t\t\t*/\ndrivers/usb/atm/cxacru.c:1309:\t\tUSB_DEVICE(0x0675, 0x0200),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1310-\t},\ndrivers/usb/atm/cxacru.c-1311-\t{ /* V = Zyxel\t\t\t\tP = 630-C1 aka OMNI ADSL USB (Annex A)\t*/\ndrivers/usb/atm/cxacru.c:1312:\t\tUSB_DEVICE(0x0586, 0x330a),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1313-\t},\ndrivers/usb/atm/cxacru.c-1314-\t{ /* V = Zyxel\t\t\t\tP = 630-C3 aka OMNI ADSL USB (Annex B)\t*/\ndrivers/usb/atm/cxacru.c:1315:\t\tUSB_DEVICE(0x0586, 0x330b),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1316-\t},\ndrivers/usb/atm/cxacru.c-1317-\t{ /* V = Aethra\t\t\t\tP = Starmodem UM1020\t\t\t*/\ndrivers/usb/atm/cxacru.c:1318:\t\tUSB_DEVICE(0x0659, 0x0020),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1319-\t},\ndrivers/usb/atm/cxacru.c-1320-\t{ /* V = Aztech Systems\t\t\tP = ? AKA Pirelli AUA-010\t\t*/\ndrivers/usb/atm/cxacru.c:1321:\t\tUSB_DEVICE(0x0509, 0x0812),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1322-\t},\ndrivers/usb/atm/cxacru.c-1323-\t{ /* V = Netopia\t\t\tP = Cayman 3341(Annex A)/3351(Annex B)\t*/\ndrivers/usb/atm/cxacru.c:1324:\t\tUSB_DEVICE(0x100d, 0xcb01),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1325-\t},\ndrivers/usb/atm/cxacru.c-1326-\t{ /* V = Netopia\t\t\tP = Cayman 3342(Annex A)/3352(Annex B)\t*/\ndrivers/usb/atm/cxacru.c:1327:\t\tUSB_DEVICE(0x100d, 0x3342),\t.driver_info = (unsigned long) \u0026cxacru_cb00\ndrivers/usb/atm/cxacru.c-1328-\t},\n--\ndrivers/usb/atm/cxacru.c-1331-\ndrivers/usb/atm/cxacru.c:1332:MODULE_DEVICE_TABLE(usb, cxacru_usb_ids);\ndrivers/usb/atm/cxacru.c-1333-\ndrivers/usb/atm/cxacru.c:1334:static struct usbatm_driver cxacru_driver = {\ndrivers/usb/atm/cxacru.c:1335:\t.driver_name\t= cxacru_driver_name,\ndrivers/usb/atm/cxacru.c:1336:\t.bind\t\t= cxacru_bind,\ndrivers/usb/atm/cxacru.c:1337:\t.heavy_init\t= cxacru_heavy_init,\ndrivers/usb/atm/cxacru.c:1338:\t.unbind\t\t= cxacru_unbind,\ndrivers/usb/atm/cxacru.c:1339:\t.atm_start\t= cxacru_atm_start,\ndrivers/usb/atm/cxacru.c-1340-\t.bulk_in\t= CXACRU_EP_DATA,\n--\ndrivers/usb/atm/cxacru.c-1345-\ndrivers/usb/atm/cxacru.c:1346:static int cxacru_usb_probe(struct usb_interface *intf,\ndrivers/usb/atm/cxacru.c-1347-\t\tconst struct usb_device_id *id)\n--\ndrivers/usb/atm/cxacru.c-1363-\ndrivers/usb/atm/cxacru.c:1364:\treturn usbatm_usb_probe(intf, id, \u0026cxacru_driver);\ndrivers/usb/atm/cxacru.c-1365-}\ndrivers/usb/atm/cxacru.c-1366-\ndrivers/usb/atm/cxacru.c:1367:static struct usb_driver cxacru_usb_driver = {\ndrivers/usb/atm/cxacru.c:1368:\t.name\t\t= cxacru_driver_name,\ndrivers/usb/atm/cxacru.c:1369:\t.probe\t\t= cxacru_usb_probe,\ndrivers/usb/atm/cxacru.c-1370-\t.disconnect\t= usbatm_usb_disconnect,\ndrivers/usb/atm/cxacru.c:1371:\t.id_table\t= cxacru_usb_ids,\ndrivers/usb/atm/cxacru.c:1372:\t.dev_groups\t= cxacru_groups,\ndrivers/usb/atm/cxacru.c-1373-};\ndrivers/usb/atm/cxacru.c-1374-\ndrivers/usb/atm/cxacru.c:1375:module_usb_driver(cxacru_usb_driver);\ndrivers/usb/atm/cxacru.c-1376-\n"
} |
| 5/2 | 2026/09/26 08:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16184 output: 27 thoughts: 10 Thoughts: Okay, here's my summary, presented as a stream of thought: **Checking Speed and Pitch Control** Right, let's circle back. I need to make absolutely sure everything's running smoothly, and that includes performance. It's not enough to *assume* all the pieces are working harmoniously. I need to verify. My gut tells me there might be an issue with something related to the real-time processing, or maybe some unexpected dependencies. So, before I continue, I think the next logical step here is to take a look at `speedtch.c`. I have a feeling there might be a few interesting things to note here. |
| 6/2 | 2026/09/26 08:11 | tool | grepper |
0mArgs:{
"Expression": "speedtch",
"PathPrefix": "drivers/usb/atm"
}Results: {
"Output": "drivers/usb/atm/Kconfig=20=config USB_SPEEDTOUCH\n--\ndrivers/usb/atm/Kconfig-29-\t To compile this driver as a module, choose M here: the\ndrivers/usb/atm/Kconfig:30:\t module will be called speedtch.\ndrivers/usb/atm/Kconfig-31-\n--\ndrivers/usb/atm/Makefile=5=obj-$(CONFIG_USB_CXACRU)\t+= cxacru.o\ndrivers/usb/atm/Makefile:6:obj-$(CONFIG_USB_SPEEDTOUCH)\t+= speedtch.o\ndrivers/usb/atm/Makefile-7-obj-$(CONFIG_USB_UEAGLEATM)\t+= ueagle-atm.o\n--\ndrivers/usb/atm/cxacru.c-12-/*\ndrivers/usb/atm/cxacru.c:13: * Credit is due for Josep Comas, who created the original patch to speedtch.c\ndrivers/usb/atm/cxacru.c-14- * to support the different padding used by the AccessRunner (now generalized\n--\ndrivers/usb/atm/speedtch.c-2-/******************************************************************************\ndrivers/usb/atm/speedtch.c:3: * speedtch.c - Alcatel SpeedTouch USB xDSL modem driver\ndrivers/usb/atm/speedtch.c-4- *\n--\ndrivers/usb/atm/speedtch.c-31-\ndrivers/usb/atm/speedtch.c:32:static const char speedtch_driver_name[] = \"speedtch\";\ndrivers/usb/atm/speedtch.c-33-\n--\ndrivers/usb/atm/speedtch.c=107=MODULE_PARM_DESC(ModemOption, \"default: 0x10,0x00,0x00,0x00,0x20\");\n--\ndrivers/usb/atm/speedtch.c-114-\ndrivers/usb/atm/speedtch.c:115:struct speedtch_params {\ndrivers/usb/atm/speedtch.c-116-\tunsigned int altsetting;\n--\ndrivers/usb/atm/speedtch.c-121-\ndrivers/usb/atm/speedtch.c:122:struct speedtch_instance_data {\ndrivers/usb/atm/speedtch.c-123-\tstruct usbatm_data *usbatm;\ndrivers/usb/atm/speedtch.c-124-\ndrivers/usb/atm/speedtch.c:125:\tstruct speedtch_params params; /* set in probe, constant afterwards */\ndrivers/usb/atm/speedtch.c-126-\n--\ndrivers/usb/atm/speedtch.c-144-\ndrivers/usb/atm/speedtch.c:145:static void speedtch_set_swbuff(struct speedtch_instance_data *instance, int state)\ndrivers/usb/atm/speedtch.c-146-{\n--\ndrivers/usb/atm/speedtch.c-157-\telse\ndrivers/usb/atm/speedtch.c:158:\t\tusb_dbg(usbatm, \"speedtch_set_swbuff: %sbled SW buffering\\n\", state ? \"En\" : \"Dis\");\ndrivers/usb/atm/speedtch.c-159-}\ndrivers/usb/atm/speedtch.c-160-\ndrivers/usb/atm/speedtch.c:161:static void speedtch_test_sequence(struct speedtch_instance_data *instance)\ndrivers/usb/atm/speedtch.c-162-{\n--\ndrivers/usb/atm/speedtch.c-230-\ndrivers/usb/atm/speedtch.c:231:static int speedtch_upload_firmware(struct speedtch_instance_data *instance,\ndrivers/usb/atm/speedtch.c-232-\t\t\t\t const struct firmware *fw1,\n--\ndrivers/usb/atm/speedtch.c-334-\tif (sw_buffering)\ndrivers/usb/atm/speedtch.c:335:\t\tspeedtch_set_swbuff(instance, 1);\ndrivers/usb/atm/speedtch.c-336-\ndrivers/usb/atm/speedtch.c-337-\t/* Magic spell; don't ask us what this does */\ndrivers/usb/atm/speedtch.c:338:\tspeedtch_test_sequence(instance);\ndrivers/usb/atm/speedtch.c-339-\n--\ndrivers/usb/atm/speedtch.c-347-\ndrivers/usb/atm/speedtch.c:348:static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf,\ndrivers/usb/atm/speedtch.c-349-\t\t\t\t int phase, const struct firmware **fw_p)\n--\ndrivers/usb/atm/speedtch.c-356-\ndrivers/usb/atm/speedtch.c:357:\tsprintf(buf, \"speedtch-%d.bin.%x.%02x\", phase, major_revision, minor_revision);\ndrivers/usb/atm/speedtch.c-358-\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n--\ndrivers/usb/atm/speedtch.c-360-\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c:361:\t\tsprintf(buf, \"speedtch-%d.bin.%x\", phase, major_revision);\ndrivers/usb/atm/speedtch.c-362-\t\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n--\ndrivers/usb/atm/speedtch.c-364-\t\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c:365:\t\t\tsprintf(buf, \"speedtch-%d.bin\", phase);\ndrivers/usb/atm/speedtch.c-366-\t\t\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n--\ndrivers/usb/atm/speedtch.c-379-\ndrivers/usb/atm/speedtch.c:380:static int speedtch_heavy_init(struct usbatm_data *usbatm, struct usb_interface *intf)\ndrivers/usb/atm/speedtch.c-381-{\ndrivers/usb/atm/speedtch.c-382-\tconst struct firmware *fw1, *fw2;\ndrivers/usb/atm/speedtch.c:383:\tstruct speedtch_instance_data *instance = usbatm-\u003edriver_data;\ndrivers/usb/atm/speedtch.c-384-\tint ret;\ndrivers/usb/atm/speedtch.c-385-\ndrivers/usb/atm/speedtch.c:386:\tif ((ret = speedtch_find_firmware(usbatm, intf, 1, \u0026fw1)) \u003c 0)\ndrivers/usb/atm/speedtch.c-387-\t\treturn ret;\ndrivers/usb/atm/speedtch.c-388-\ndrivers/usb/atm/speedtch.c:389:\tif ((ret = speedtch_find_firmware(usbatm, intf, 2, \u0026fw2)) \u003c 0) {\ndrivers/usb/atm/speedtch.c-390-\t\trelease_firmware(fw1);\n--\ndrivers/usb/atm/speedtch.c-393-\ndrivers/usb/atm/speedtch.c:394:\tif ((ret = speedtch_upload_firmware(instance, fw1, fw2)) \u003c 0)\ndrivers/usb/atm/speedtch.c-395-\t\tusb_err(usbatm, \"%s: firmware upload failed (%d)!\\n\", __func__, ret);\n--\ndrivers/usb/atm/speedtch.c-407-\ndrivers/usb/atm/speedtch.c:408:static int speedtch_read_status(struct speedtch_instance_data *instance)\ndrivers/usb/atm/speedtch.c-409-{\n--\ndrivers/usb/atm/speedtch.c-459-\ndrivers/usb/atm/speedtch.c:460:static int speedtch_start_synchro(struct speedtch_instance_data *instance)\ndrivers/usb/atm/speedtch.c-461-{\n--\ndrivers/usb/atm/speedtch.c-483-\ndrivers/usb/atm/speedtch.c:484:static void speedtch_check_status(struct work_struct *work)\ndrivers/usb/atm/speedtch.c-485-{\ndrivers/usb/atm/speedtch.c:486:\tstruct speedtch_instance_data *instance =\ndrivers/usb/atm/speedtch.c:487:\t\tcontainer_of(work, struct speedtch_instance_data,\ndrivers/usb/atm/speedtch.c-488-\t\t\t status_check_work);\n--\ndrivers/usb/atm/speedtch.c-498-\ndrivers/usb/atm/speedtch.c:499:\tret = speedtch_read_status(instance);\ndrivers/usb/atm/speedtch.c-500-\tif (ret \u003c 0) {\n--\ndrivers/usb/atm/speedtch.c-518-\t\t\t/* It may never resync again unless we ask it to... */\ndrivers/usb/atm/speedtch.c:519:\t\t\tret = speedtch_start_synchro(instance);\ndrivers/usb/atm/speedtch.c-520-\t\t\tbreak;\n--\ndrivers/usb/atm/speedtch.c-560-\ndrivers/usb/atm/speedtch.c:561:static void speedtch_status_poll(struct timer_list *t)\ndrivers/usb/atm/speedtch.c-562-{\ndrivers/usb/atm/speedtch.c:563:\tstruct speedtch_instance_data *instance = timer_container_of(instance,\ndrivers/usb/atm/speedtch.c-564-\t\t\t\t\t\t\t\t t,\n--\ndrivers/usb/atm/speedtch.c-575-\ndrivers/usb/atm/speedtch.c:576:static void speedtch_resubmit_int(struct timer_list *t)\ndrivers/usb/atm/speedtch.c-577-{\ndrivers/usb/atm/speedtch.c:578:\tstruct speedtch_instance_data *instance = timer_container_of(instance,\ndrivers/usb/atm/speedtch.c-579-\t\t\t\t\t\t\t\t t,\n--\ndrivers/usb/atm/speedtch.c-596-\ndrivers/usb/atm/speedtch.c:597:static void speedtch_handle_int(struct urb *int_urb)\ndrivers/usb/atm/speedtch.c-598-{\ndrivers/usb/atm/speedtch.c:599:\tstruct speedtch_instance_data *instance = int_urb-\u003econtext;\ndrivers/usb/atm/speedtch.c-600-\tstruct usbatm_data *usbatm = instance-\u003eusbatm;\n--\ndrivers/usb/atm/speedtch.c-649-\ndrivers/usb/atm/speedtch.c:650:static int speedtch_atm_start(struct usbatm_data *usbatm, struct atm_dev *atm_dev)\ndrivers/usb/atm/speedtch.c-651-{\ndrivers/usb/atm/speedtch.c-652-\tstruct usb_device *usb_dev = usbatm-\u003eusb_dev;\ndrivers/usb/atm/speedtch.c:653:\tstruct speedtch_instance_data *instance = usbatm-\u003edriver_data;\ndrivers/usb/atm/speedtch.c-654-\tint i, ret;\n--\ndrivers/usb/atm/speedtch.c-667-\t/* Start modem synchronisation */\ndrivers/usb/atm/speedtch.c:668:\tret = speedtch_start_synchro(instance);\ndrivers/usb/atm/speedtch.c-669-\n--\ndrivers/usb/atm/speedtch.c-686-\ndrivers/usb/atm/speedtch.c:687:static void speedtch_atm_stop(struct usbatm_data *usbatm, struct atm_dev *atm_dev)\ndrivers/usb/atm/speedtch.c-688-{\ndrivers/usb/atm/speedtch.c:689:\tstruct speedtch_instance_data *instance = usbatm-\u003edriver_data;\ndrivers/usb/atm/speedtch.c-690-\tstruct urb *int_urb = instance-\u003eint_urb;\n--\ndrivers/usb/atm/speedtch.c-704-\t/*\ndrivers/usb/atm/speedtch.c:705:\t * At this point, speedtch_handle_int and speedtch_resubmit_int\ndrivers/usb/atm/speedtch.c-706-\t * can run or be running, but instance-\u003eint_urb == NULL means that\n--\ndrivers/usb/atm/speedtch.c-715-\ndrivers/usb/atm/speedtch.c:716:static int speedtch_pre_reset(struct usb_interface *intf)\ndrivers/usb/atm/speedtch.c-717-{\n--\ndrivers/usb/atm/speedtch.c-720-\ndrivers/usb/atm/speedtch.c:721:static int speedtch_post_reset(struct usb_interface *intf)\ndrivers/usb/atm/speedtch.c-722-{\n--\ndrivers/usb/atm/speedtch.c-730-\ndrivers/usb/atm/speedtch.c:731:static const struct usb_device_id speedtch_usb_ids[] = {\ndrivers/usb/atm/speedtch.c-732-\t{USB_DEVICE(0x06b9, 0x4061)},\n--\ndrivers/usb/atm/speedtch.c-735-\ndrivers/usb/atm/speedtch.c:736:MODULE_DEVICE_TABLE(usb, speedtch_usb_ids);\ndrivers/usb/atm/speedtch.c-737-\ndrivers/usb/atm/speedtch.c:738:static int speedtch_usb_probe(struct usb_interface *, const struct usb_device_id *);\ndrivers/usb/atm/speedtch.c-739-\ndrivers/usb/atm/speedtch.c:740:static struct usb_driver speedtch_usb_driver = {\ndrivers/usb/atm/speedtch.c:741:\t.name\t\t= speedtch_driver_name,\ndrivers/usb/atm/speedtch.c:742:\t.probe\t\t= speedtch_usb_probe,\ndrivers/usb/atm/speedtch.c-743-\t.disconnect\t= usbatm_usb_disconnect,\ndrivers/usb/atm/speedtch.c:744:\t.pre_reset\t= speedtch_pre_reset,\ndrivers/usb/atm/speedtch.c:745:\t.post_reset\t= speedtch_post_reset,\ndrivers/usb/atm/speedtch.c:746:\t.id_table\t= speedtch_usb_ids\ndrivers/usb/atm/speedtch.c-747-};\ndrivers/usb/atm/speedtch.c-748-\ndrivers/usb/atm/speedtch.c:749:static void speedtch_release_interfaces(struct usb_device *usb_dev,\ndrivers/usb/atm/speedtch.c-750-\t\t\t\t\tint num_interfaces)\n--\ndrivers/usb/atm/speedtch.c-758-\t\t\tusb_set_intfdata(cur_intf, NULL);\ndrivers/usb/atm/speedtch.c:759:\t\t\tusb_driver_release_interface(\u0026speedtch_usb_driver, cur_intf);\ndrivers/usb/atm/speedtch.c-760-\t\t}\n--\ndrivers/usb/atm/speedtch.c-763-\ndrivers/usb/atm/speedtch.c:764:static int speedtch_bind(struct usbatm_data *usbatm,\ndrivers/usb/atm/speedtch.c-765-\t\t\t struct usb_interface *intf,\n--\ndrivers/usb/atm/speedtch.c-769-\tstruct usb_interface *cur_intf, *data_intf;\ndrivers/usb/atm/speedtch.c:770:\tstruct speedtch_instance_data *instance;\ndrivers/usb/atm/speedtch.c-771-\tint ifnum = intf-\u003ealtsetting-\u003edesc.bInterfaceNumber;\n--\ndrivers/usb/atm/speedtch.c-796-\t\tif ((i != ifnum) \u0026\u0026 cur_intf) {\ndrivers/usb/atm/speedtch.c:797:\t\t\tret = usb_driver_claim_interface(\u0026speedtch_usb_driver, cur_intf, usbatm);\ndrivers/usb/atm/speedtch.c-798-\n--\ndrivers/usb/atm/speedtch.c-800-\t\t\t\tusb_err(usbatm, \"%s: failed to claim interface %2d (%d)!\\n\", __func__, i, ret);\ndrivers/usb/atm/speedtch.c:801:\t\t\t\tspeedtch_release_interfaces(usb_dev, i);\ndrivers/usb/atm/speedtch.c-802-\t\t\t\treturn ret;\n--\ndrivers/usb/atm/speedtch.c-866-\ndrivers/usb/atm/speedtch.c:867:\tINIT_WORK(\u0026instance-\u003estatus_check_work, speedtch_check_status);\ndrivers/usb/atm/speedtch.c:868:\ttimer_setup(\u0026instance-\u003estatus_check_timer, speedtch_status_poll, 0);\ndrivers/usb/atm/speedtch.c-869-\tinstance-\u003elast_status = 0xff;\n--\ndrivers/usb/atm/speedtch.c-871-\ndrivers/usb/atm/speedtch.c:872:\ttimer_setup(\u0026instance-\u003eresubmit_timer, speedtch_resubmit_int, 0);\ndrivers/usb/atm/speedtch.c-873-\n--\ndrivers/usb/atm/speedtch.c-879-\t\t\t\t instance-\u003eint_data, sizeof(instance-\u003eint_data),\ndrivers/usb/atm/speedtch.c:880:\t\t\t\t speedtch_handle_int, instance, 16);\ndrivers/usb/atm/speedtch.c-881-\telse\n--\ndrivers/usb/atm/speedtch.c-906-fail_release:\ndrivers/usb/atm/speedtch.c:907:\tspeedtch_release_interfaces(usb_dev, num_interfaces);\ndrivers/usb/atm/speedtch.c-908-\treturn ret;\n--\ndrivers/usb/atm/speedtch.c-910-\ndrivers/usb/atm/speedtch.c:911:static void speedtch_unbind(struct usbatm_data *usbatm, struct usb_interface *intf)\ndrivers/usb/atm/speedtch.c-912-{\ndrivers/usb/atm/speedtch.c-913-\tstruct usb_device *usb_dev = interface_to_usbdev(intf);\ndrivers/usb/atm/speedtch.c:914:\tstruct speedtch_instance_data *instance = usbatm-\u003edriver_data;\ndrivers/usb/atm/speedtch.c-915-\n--\ndrivers/usb/atm/speedtch.c-917-\ndrivers/usb/atm/speedtch.c:918:\tspeedtch_release_interfaces(usb_dev, usb_dev-\u003eactconfig-\u003edesc.bNumInterfaces);\ndrivers/usb/atm/speedtch.c-919-\tusb_free_urb(instance-\u003eint_urb);\n--\ndrivers/usb/atm/speedtch.c-927-\ndrivers/usb/atm/speedtch.c:928:static struct usbatm_driver speedtch_usbatm_driver = {\ndrivers/usb/atm/speedtch.c:929:\t.driver_name\t= speedtch_driver_name,\ndrivers/usb/atm/speedtch.c:930:\t.bind\t\t= speedtch_bind,\ndrivers/usb/atm/speedtch.c:931:\t.heavy_init\t= speedtch_heavy_init,\ndrivers/usb/atm/speedtch.c:932:\t.unbind\t\t= speedtch_unbind,\ndrivers/usb/atm/speedtch.c:933:\t.atm_start\t= speedtch_atm_start,\ndrivers/usb/atm/speedtch.c:934:\t.atm_stop\t= speedtch_atm_stop,\ndrivers/usb/atm/speedtch.c-935-\t.bulk_in\t= ENDPOINT_BULK_DATA,\n--\ndrivers/usb/atm/speedtch.c-939-\ndrivers/usb/atm/speedtch.c:940:static int speedtch_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)\ndrivers/usb/atm/speedtch.c-941-{\ndrivers/usb/atm/speedtch.c:942:\treturn usbatm_usb_probe(intf, id, \u0026speedtch_usbatm_driver);\ndrivers/usb/atm/speedtch.c-943-}\ndrivers/usb/atm/speedtch.c-944-\ndrivers/usb/atm/speedtch.c:945:module_usb_driver(speedtch_usb_driver);\ndrivers/usb/atm/speedtch.c-946-\n"
} |
| 7/2 | 2026/09/26 08:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21736 output: 34 thoughts: 596 Thoughts: **Analyzing the Firmware Loading Changes** Okay, let's break down this patch. I need to understand *exactly* what's changing and the implications. It looks like we're switching from `request_firmware` to `request_firmware_direct` in `drivers/usb/atm/cxacru.c` and `drivers/usb/atm/speedtch.c`. Alright, so the code snippets clearly demonstrate the change: the standard `request_firmware` is being replaced with `request_firmware_direct` in the firmware loading functions. This seems straightforward enough. In `cxacru.c`, the change is isolated, replacing the original call. `speedtch.c` makes the same substitution, and the code follows the usual firmware lookup pattern of looking for specific variations of the filename. However, now I'm immediately curious about the *why*. What's the difference between these two functions? `request_firmware` is the standard, so what advantage does `request_firmware_direct` offer? Time to dig into the kernel source, specifically where `request_firmware_direct` is implemented. I'll need to look in `drivers/base/firmware_loader/main.c` or a related file to get a clear picture. I'm assuming there's some optimization, change in how the firmware is retrieved, or perhaps even a security-related aspect. Let's see what the implementation reveals. I need to understand the fundamental difference in the firmware loading process. |
| 8/2 | 2026/09/26 08:11 | tool | grepper |
0mArgs:{
"Expression": "request_firmware_direct",
"PathPrefix": "include/linux/firmware.h"
}Results: {
"Output": "include/linux/firmware.h=113=void request_firmware_nowait_cancel(struct device *device, void *context,\n--\ninclude/linux/firmware.h-115-\t\t\t\t\t\t void *context));\ninclude/linux/firmware.h:116:int request_firmware_direct(const struct firmware **fw, const char *name,\ninclude/linux/firmware.h-117-\t\t\t struct device *device);\n--\ninclude/linux/firmware.h=170=static inline void release_firmware(const struct firmware *fw)\n--\ninclude/linux/firmware.h-173-\ninclude/linux/firmware.h:174:static inline int request_firmware_direct(const struct firmware **fw,\ninclude/linux/firmware.h-175-\t\t\t\t\t const char *name,\n"
} |
| 9/2 | 2026/09/26 08:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 22907 output: 34 thoughts: 18 Thoughts: Okay, let's dive into this. Here's my take on those thoughts, as if they're my own: **Digging into the Firmware Loading Mechanism** Alright, so the task at hand is to understand how firmware loading is handled. Given my experience, the first place I'd instinctively go is the `drivers/base/firmware_loader/` directory. This is where the core logic usually resides, and my gut feeling is that it'll contain the central pieces of the firmware loading puzzle. I'm expecting to find the routines responsible for handling firmware images, interfacing with the device drivers that interact with the hardware, and coordinating the overall loading process. I'm keen to see the architecture, identify the key data structures, and figure out the sequence of calls involved in getting firmware onto the hardware. Hopefully, the code is well-structured and documented, allowing me to quickly grasp the core mechanisms. I'm particularly interested in seeing how error handling is implemented, because robustness in this area is critical. I'll be looking for any potential race conditions and checking if the logic handles cases of invalid firmware or device failures. Ultimately, I'm hoping to get a solid understanding of how this is implemented for the current kernel version and whether it has any impact on the driver in question. |
| 10/2 | 2026/09/26 08:11 | tool | grepper |
0mArgs:{
"Expression": "request_firmware_direct",
"PathPrefix": "drivers/base/firmware_loader"
}Results: {
"Output": "drivers/base/firmware_loader/Kconfig=167=config FW_LOADER_USER_HELPER_FALLBACK\n--\ndrivers/base/firmware_loader/Kconfig-173-\t a fallback mechanism. Firmware calls which do prohibit a fallback\ndrivers/base/firmware_loader/Kconfig:174:\t mechanism is request_firmware_direct(). This option is kept for\ndrivers/base/firmware_loader/Kconfig-175-\t backward compatibility purposes given this precise mechanism can also\n--\ndrivers/base/firmware_loader/main.c=980=EXPORT_SYMBOL_GPL(firmware_request_nowarn);\n--\ndrivers/base/firmware_loader/main.c-982-/**\ndrivers/base/firmware_loader/main.c:983: * request_firmware_direct() - load firmware directly without usermode helper\ndrivers/base/firmware_loader/main.c-984- * @firmware_p: pointer to firmware image\n--\ndrivers/base/firmware_loader/main.c-992- **/\ndrivers/base/firmware_loader/main.c:993:int request_firmware_direct(const struct firmware **firmware_p,\ndrivers/base/firmware_loader/main.c-994-\t\t\t const char *name, struct device *device)\n--\ndrivers/base/firmware_loader/main.c-1004-}\ndrivers/base/firmware_loader/main.c:1005:EXPORT_SYMBOL_GPL(request_firmware_direct);\ndrivers/base/firmware_loader/main.c-1006-\n"
} |
| 11/2 | 2026/09/26 08:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23642 output: 40 thoughts: 43 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **Direct Firmware Loading - Deep Dive Required** Alright, so the `request_firmware_direct` function is supposed to be loading firmware directly, bypassing the usual usermode helper dance. That's intriguing – a more efficient approach, potentially, or perhaps necessary for specific hardware or timing constraints. My immediate reaction is to dig into the implementation to understand the implications. Let's get into the nitty-gritty. I need to understand how this direct loading is achieved, so I'm focusing on the core logic. Specifically, I need to check how it deals with security, resource allocation and error handling when operating without the usermode intermediary. Line 983 in `drivers/base/firmware_loader/main.c` seems like a good starting point. I suspect that's where the critical parts of `request_firmware_direct` are implemented. I'm especially interested to see what checks are performed to ensure the firmware is valid, where the firmware is being copied from and if any integrity checks are done to prevent the loading of malicious firmware. |
| 12/2 | 2026/09/26 08:11 | tool | read-file |
0mArgs:{
"File": "drivers/base/firmware_loader/main.c",
"FirstLine": 980,
"LineCount": 35
}Results: {
"Contents": " 980:\tEXPORT_SYMBOL_GPL(firmware_request_nowarn);\n 981:\t\n 982:\t/**\n 983:\t * request_firmware_direct() - load firmware directly without usermode helper\n 984:\t * @firmware_p: pointer to firmware image\n 985:\t * @name: name of firmware file\n 986:\t * @device: device for which firmware is being loaded\n 987:\t *\n 988:\t * This function works pretty much like request_firmware(), but this doesn't\n 989:\t * fall back to usermode helper even if the firmware couldn't be loaded\n 990:\t * directly from fs. Hence it's useful for loading optional firmwares, which\n 991:\t * aren't always present, without extra long timeouts of udev.\n 992:\t **/\n 993:\tint request_firmware_direct(const struct firmware **firmware_p,\n 994:\t\t\t\t const char *name, struct device *device)\n 995:\t{\n 996:\t\tint ret;\n 997:\t\n 998:\t\t__module_get(THIS_MODULE);\n 999:\t\tret = _request_firmware(firmware_p, name, device, NULL, 0, 0,\n1000:\t\t\t\t\tFW_OPT_UEVENT | FW_OPT_NO_WARN |\n1001:\t\t\t\t\tFW_OPT_NOFALLBACK_SYSFS);\n1002:\t\tmodule_put(THIS_MODULE);\n1003:\t\treturn ret;\n1004:\t}\n1005:\tEXPORT_SYMBOL_GPL(request_firmware_direct);\n1006:\t\n1007:\t/**\n1008:\t * firmware_request_platform() - request firmware with platform-fw fallback\n1009:\t * @firmware: pointer to firmware image\n1010:\t * @name: name of firmware file\n1011:\t * @device: device for which firmware is being loaded\n1012:\t *\n1013:\t * This function is similar in behaviour to request_firmware, except that if\n1014:\t * direct filesystem lookup fails, it will fallback to looking for a copy of the\n"
} |
| 13/2 | 2026/09/26 08:11 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 24561 output: 28 thoughts: 100 Thoughts: **Analyzing Firmware Loading Strategies** Okay, let's break this down. The core concern here is direct firmware loading, specifically how `request_firmware_direct` sidesteps the potentially less efficient usermode helper route. I need to understand this better. My next move is to trace the calls to `cxacru_find_firmware` and `speedtch_find_firmware` to understand where they're invoked. I'm starting with `cxacru.c`. The code suggests `cxacru_heavy_init` is the key to focus on, as it's called from `usbatm`. That sounds like the initialization routine. Therefore, I'll need to dig into `usbatm.c` to see how that `heavy_init` function is utilized. That'll provide the context I need to figure out exactly how the firmware finding works. |
| 14/2 | 2026/09/26 08:12 | tool | grepper |
0mArgs:{
"Expression": "heavy_init",
"PathPrefix": "drivers/usb/atm"
}Results: {
"Output": "drivers/usb/atm/cxacru.c=986=static int cxacru_find_firmware(struct cxacru_data *instance,\n--\ndrivers/usb/atm/cxacru.c-1005-\ndrivers/usb/atm/cxacru.c:1006:static int cxacru_heavy_init(struct usbatm_data *usbatm_instance,\ndrivers/usb/atm/cxacru.c-1007-\t\t\t struct usb_interface *usb_intf)\n--\ndrivers/usb/atm/cxacru.c=1334=static struct usbatm_driver cxacru_driver = {\n--\ndrivers/usb/atm/cxacru.c-1336-\t.bind\t\t= cxacru_bind,\ndrivers/usb/atm/cxacru.c:1337:\t.heavy_init\t= cxacru_heavy_init,\ndrivers/usb/atm/cxacru.c-1338-\t.unbind\t\t= cxacru_unbind,\n--\ndrivers/usb/atm/speedtch.c=348=static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf,\n--\ndrivers/usb/atm/speedtch.c-379-\ndrivers/usb/atm/speedtch.c:380:static int speedtch_heavy_init(struct usbatm_data *usbatm, struct usb_interface *intf)\ndrivers/usb/atm/speedtch.c-381-{\n--\ndrivers/usb/atm/speedtch.c=928=static struct usbatm_driver speedtch_usbatm_driver = {\n--\ndrivers/usb/atm/speedtch.c-930-\t.bind\t\t= speedtch_bind,\ndrivers/usb/atm/speedtch.c:931:\t.heavy_init\t= speedtch_heavy_init,\ndrivers/usb/atm/speedtch.c-932-\t.unbind\t\t= speedtch_unbind,\n--\ndrivers/usb/atm/ueagle-atm.c=2539=static struct usbatm_driver uea_usbatm_driver = {\n--\ndrivers/usb/atm/ueagle-atm.c-2543-\t.unbind = uea_unbind,\ndrivers/usb/atm/ueagle-atm.c:2544:\t.heavy_init = uea_heavy,\ndrivers/usb/atm/ueagle-atm.c-2545-\t.bulk_in = UEA_BULK_DATA_PIPE,\n--\ndrivers/usb/atm/usbatm.c=901=static int usbatm_atm_init(struct usbatm_data *instance)\n--\ndrivers/usb/atm/usbatm.c-954-\ndrivers/usb/atm/usbatm.c:955:static int usbatm_do_heavy_init(void *arg)\ndrivers/usb/atm/usbatm.c-956-{\n--\ndrivers/usb/atm/usbatm.c-962-\ndrivers/usb/atm/usbatm.c:963:\tret = instance-\u003edriver-\u003eheavy_init(instance, instance-\u003eusb_intf);\ndrivers/usb/atm/usbatm.c-964-\n--\ndrivers/usb/atm/usbatm.c-974-\ndrivers/usb/atm/usbatm.c:975:static int usbatm_heavy_init(struct usbatm_data *instance)\ndrivers/usb/atm/usbatm.c-976-{\n--\ndrivers/usb/atm/usbatm.c-978-\ndrivers/usb/atm/usbatm.c:979:\tt = kthread_create(usbatm_do_heavy_init, instance, \"%s\",\ndrivers/usb/atm/usbatm.c-980-\t\t\tinstance-\u003edriver-\u003edriver_name);\n--\ndrivers/usb/atm/usbatm.c=1008=int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,\n--\ndrivers/usb/atm/usbatm.c-1173-\ndrivers/usb/atm/usbatm.c:1174:\tif (!(instance-\u003eflags \u0026 UDSL_SKIP_HEAVY_INIT) \u0026\u0026 driver-\u003eheavy_init) {\ndrivers/usb/atm/usbatm.c:1175:\t\terror = usbatm_heavy_init(instance);\ndrivers/usb/atm/usbatm.c-1176-\t} else {\ndrivers/usb/atm/usbatm.c:1177:\t\tcomplete(\u0026instance-\u003ethread_exited);\t/* pretend that heavy_init was run */\ndrivers/usb/atm/usbatm.c-1178-\t\terror = usbatm_atm_init(instance);\n--\ndrivers/usb/atm/usbatm.h=65=struct usbatm_data;\n--\ndrivers/usb/atm/usbatm.h-69-*\ndrivers/usb/atm/usbatm.h:70:*\tbind, heavy_init, atm_start, ..., atm_stop, unbind\ndrivers/usb/atm/usbatm.h-71-*/\n--\ndrivers/usb/atm/usbatm.h=73=struct usbatm_driver {\n--\ndrivers/usb/atm/usbatm.h-80-\t/* additional device initialization that is too slow to be done in probe() */\ndrivers/usb/atm/usbatm.h:81:\tint (*heavy_init) (struct usbatm_data *, struct usb_interface *);\ndrivers/usb/atm/usbatm.h-82-\n"
} |
| 15/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26295 output: 34 thoughts: 234 Thoughts: **Analyzing USB ATM Driver Initialization** Okay, here's what I'm seeing: when a USB ATM device is probed, `usbatm_usb_probe` gets the call. Now, if the `UDSL_SKIP_HEAVY_INIT` flag isn't set, and the driver has a `heavy_init` function, a kernel thread, `usbatm_do_heavy_init`, is created. This thread's job is to kick off the driver's `heavy_init` function. I see that `cxacru_heavy_init` and `speedtch_heavy_init` are two of these `heavy_init` functions. The `cxacru` one is going to use `cxacru_find_firmware`, while the `speedtch` driver uses `speedtch_find_firmware`. It looks like these "find" functions are responsible for, well, finding firmware. And, both of them are calling `request_firmware_direct`. Essentially, both are using the generic kernel function for directly requesting firmware. Makes sense, that's what I would expect. Now, I should take a look at the Kconfig file for this section: `drivers/usb/atm/Kconfig`, so I can understand the configuration options for these drivers. Let's see how those drivers are configured... |
| 16/2 | 2026/09/26 08:12 | tool | read-file |
0mArgs:{
"File": "drivers/usb/atm/Kconfig",
"FirstLine": 1,
"LineCount": 50
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0\n 2:\t#\n 3:\t# USB/ATM DSL configuration\n 4:\t#\n 5:\t\n 6:\tmenuconfig USB_ATM\n 7:\t\ttristate \"USB DSL modem support\"\n 8:\t\tdepends on ATM\n 9:\t\tselect CRC32\n 10:\t\thelp\n 11:\t\t Say Y here if you want to connect a USB Digital Subscriber Line (DSL)\n 12:\t\t modem to your computer's USB port. You will then need to choose your\n 13:\t\t modem from the list below.\n 14:\t\n 15:\t\t To compile this driver as a module, choose M here: the\n 16:\t\t module will be called usbatm.\n 17:\t\n 18:\tif USB_ATM\n 19:\t\n 20:\tconfig USB_SPEEDTOUCH\n 21:\t\ttristate \"Speedtouch USB support\"\n 22:\t\tselect FW_LOADER\n 23:\t\thelp\n 24:\t\t Say Y here if you have an SpeedTouch USB or SpeedTouch 330\n 25:\t\t modem. In order to use your modem you will need to install the \n 26:\t\t two parts of the firmware, extracted by the user space tools; see\n 27:\t\t \u003chttp://www.linux-usb.org/SpeedTouch/\u003e for details.\n 28:\t\n 29:\t\t To compile this driver as a module, choose M here: the\n 30:\t\t module will be called speedtch.\n 31:\t\n 32:\tconfig USB_CXACRU\n 33:\t\ttristate \"Conexant AccessRunner USB support\"\n 34:\t\tselect FW_LOADER\n 35:\t\thelp\n 36:\t\t Say Y here if you have an ADSL USB modem based on the Conexant\n 37:\t\t AccessRunner chipset. In order to use your modem you will need to\n 38:\t\t install the firmware, extracted by the user space tools; see\n 39:\t\t \u003chttp://accessrunner.sourceforge.net/\u003e for details.\n 40:\t\n 41:\t\t To compile this driver as a module, choose M here: the\n 42:\t\t module will be called cxacru.\n 43:\t\n 44:\tconfig USB_UEAGLEATM\n 45:\t\ttristate \"ADI 930 and eagle USB DSL modem\"\n 46:\t\tselect FW_LOADER\n 47:\t\thelp\n 48:\t\t Say Y here if you have an ADSL USB modem based on the ADI 930\n 49:\t\t or eagle chipset. In order to use your modem you will need to\n 50:\t\t install firmwares and CMV (Command Management Variables); see\n"
} |
| 17/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27563 output: 29 thoughts: 1262 Thoughts: **Reaching the Code and Understanding the Patch** Okay, let's break this down. First, I see that `USB_ATM` is a prerequisite for both `USB_SPEEDTOUCH` and `USB_CXACRU`. The question is, can we emulate these USB devices using raw-gadget or dummy_hcd? The good news is, syzkaller supports USB emulation via `/dev/raw-gadget`, which means USB fuzzing is definitely on the table. Now, hold on. The instructions clearly state that "reachability is the primary gate." If the code is unreachable in standard virtualized environments, forget it. The instructions point out virtual buses, like USB gadget, are good. And raw-gadget *can* emulate any USB device with any VID/PID and endpoints! Bingo. So, if we configure raw-gadget to present a VID/PID that matches `speedtch_usb_ids` or `cxacru_usb_ids`, the kernel's USB core should probe the driver. That leads to `speedtch_usb_probe` or `cxacru_usb_probe`, which calls `usbatm_usb_probe`. From there, we get `speedtch_bind` or `cxacru_bind`, which, if successful, spawn the heavy_init thread, calling `speedtch_heavy_init` or `cxacru_heavy_init`, which then calls `speedtch_find_firmware` or `cxacru_find_firmware`. And what do those do? They call `request_firmware_direct(...)`. Is this reachable code? That's the key question. Now, what changed in this patch? Let's check the commit message or look at the git log. The commit subject is "syz-cluster: applied patch under review". Looking at the diff, it looks like `request_firmware` got replaced by `request_firmware_direct` in both `cxacru_find_firmware` and `speedtch_find_firmware`. Why? I need to check if there are other drivers doing this, or look at commit history or similar patches in the tree for more context. |
| 18/2 | 2026/09/26 08:12 | tool | grepper |
0mArgs:{
"Expression": "request_firmware_direct",
"PathPrefix": "drivers/usb"
}Results: {
"Output": "drivers/usb/atm/cxacru.c=986=static int cxacru_find_firmware(struct cxacru_data *instance,\n--\ndrivers/usb/atm/cxacru.c-995-\ndrivers/usb/atm/cxacru.c:996:\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/cxacru.c-997-\t\tusb_dbg(usbatm, \"no stage %s firmware found\\n\", phase);\n--\ndrivers/usb/atm/speedtch.c=348=static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf,\n--\ndrivers/usb/atm/speedtch.c-359-\ndrivers/usb/atm/speedtch.c:360:\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c-361-\t\tsprintf(buf, \"speedtch-%d.bin.%x\", phase, major_revision);\n--\ndrivers/usb/atm/speedtch.c-363-\ndrivers/usb/atm/speedtch.c:364:\t\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c-365-\t\t\tsprintf(buf, \"speedtch-%d.bin\", phase);\n--\ndrivers/usb/atm/speedtch.c-367-\ndrivers/usb/atm/speedtch.c:368:\t\t\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c-369-\t\t\t\tusb_err(usbatm, \"%s: no stage %d firmware found!\\n\", __func__, phase);\n"
} |
| 19/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29779 output: 21 thoughts: 58 Thoughts: Here's my analysis of the situation: **Investigating the New `request_firmware_direct` Implementation** Okay, so this patch introduces `request_firmware_direct` into the USB driver code, but, it's not present there before, and as far as I can tell, no other USB driver utilized this function previously. That’s a potential red flag. My immediate thought is to check for wider implications. I need to understand if this function is entirely new within the kernel or if it's been introduced elsewhere. Therefore, I will perform a kernel-wide search to understand how widespread the implementation of `request_firmware_direct` is. This should help me assess the novelty, potential impact, and possible risks associated with this change. |
| 20/2 | 2026/09/26 08:12 | tool | grepper |
0mArgs:{
"Expression": "request_firmware_direct\\("
}Results: {
"Output": "Documentation/driver-api/firmware/fallback-mechanisms.rst=8=configuration options related to supporting the firmware fallback mechanism are:\n--\nDocumentation/driver-api/firmware/fallback-mechanisms.rst-15- enable the kobject uevent fallback mechanism on all firmware API calls\nDocumentation/driver-api/firmware/fallback-mechanisms.rst:16: except request_firmware_direct(). Most distributions disable this option\nDocumentation/driver-api/firmware/fallback-mechanisms.rst-17- today. The call request_firmware_nowait() allows for one alternative\n--\narch/x86/kernel/cpu/microcode/amd.c=1241=static enum ucode_state request_microcode_amd(int cpu, struct device *device)\n--\narch/x86/kernel/cpu/microcode/amd.c-1253-\narch/x86/kernel/cpu/microcode/amd.c:1254:\tif (request_firmware_direct(\u0026fw, (const char *)fw_name, device)) {\narch/x86/kernel/cpu/microcode/amd.c-1255-\t\tucode_dbg(\"failed to load file %s\\n\", fw_name);\n--\narch/x86/kernel/cpu/microcode/intel.c=956=static enum ucode_state request_microcode_fw(int cpu, struct device *device)\n--\narch/x86/kernel/cpu/microcode/intel.c-970-\narch/x86/kernel/cpu/microcode/intel.c:971:\tif (request_firmware_direct(\u0026firmware, name, device)) {\narch/x86/kernel/cpu/microcode/intel.c-972-\t\tpr_debug(\"data file %s load failed\\n\", name);\n--\ndrivers/base/firmware_loader/Kconfig=167=config FW_LOADER_USER_HELPER_FALLBACK\n--\ndrivers/base/firmware_loader/Kconfig-173-\t a fallback mechanism. Firmware calls which do prohibit a fallback\ndrivers/base/firmware_loader/Kconfig:174:\t mechanism is request_firmware_direct(). This option is kept for\ndrivers/base/firmware_loader/Kconfig-175-\t backward compatibility purposes given this precise mechanism can also\n--\ndrivers/base/firmware_loader/main.c=980=EXPORT_SYMBOL_GPL(firmware_request_nowarn);\n--\ndrivers/base/firmware_loader/main.c-982-/**\ndrivers/base/firmware_loader/main.c:983: * request_firmware_direct() - load firmware directly without usermode helper\ndrivers/base/firmware_loader/main.c-984- * @firmware_p: pointer to firmware image\n--\ndrivers/base/firmware_loader/main.c-992- **/\ndrivers/base/firmware_loader/main.c:993:int request_firmware_direct(const struct firmware **firmware_p,\ndrivers/base/firmware_loader/main.c-994-\t\t\t const char *name, struct device *device)\n--\ndrivers/bluetooth/btintel.c=390=int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name)\n--\ndrivers/bluetooth/btintel.c-396-\ndrivers/bluetooth/btintel.c:397:\terr = request_firmware_direct(\u0026fw, ddc_name, \u0026hdev-\u003edev);\ndrivers/bluetooth/btintel.c-398-\tif (err \u003c 0) {\n--\ndrivers/bluetooth/btnxpuart.c=903=static int nxp_request_firmware(struct hci_dev *hdev, const char *fw_name,\n--\ndrivers/bluetooth/btnxpuart.c-919-\t\tsnprintf(nxpdev-\u003efw_name, MAX_FW_FILE_NAME_LEN, \"nxp/%s\", fw_name);\ndrivers/bluetooth/btnxpuart.c:920:\t\terr = request_firmware_direct(\u0026nxpdev-\u003efw, nxpdev-\u003efw_name, \u0026hdev-\u003edev);\ndrivers/bluetooth/btnxpuart.c-921-\t\tif (err \u003c 0 \u0026\u0026 fw_name_old) {\ndrivers/bluetooth/btnxpuart.c-922-\t\t\tsnprintf(nxpdev-\u003efw_name, MAX_FW_FILE_NAME_LEN, \"nxp/%s\", fw_name_old);\ndrivers/bluetooth/btnxpuart.c:923:\t\t\terr = request_firmware_direct(\u0026nxpdev-\u003efw, nxpdev-\u003efw_name, \u0026hdev-\u003edev);\ndrivers/bluetooth/btnxpuart.c-924-\t\t}\n--\ndrivers/gpu/drm/display/drm_hdcp_helper.c=233=static int drm_hdcp_request_srm(struct drm_device *drm_dev,\n--\ndrivers/gpu/drm/display/drm_hdcp_helper.c-239-\ndrivers/gpu/drm/display/drm_hdcp_helper.c:240:\tret = request_firmware_direct(\u0026fw, (const char *)fw_name,\ndrivers/gpu/drm/display/drm_hdcp_helper.c-241-\t\t\t\t drm_dev-\u003edev);\n--\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c=31=static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname,\n--\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c-84-\t\tfwname = signed_fwname;\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c:85:\t\tret = request_firmware_direct(\u0026fw, fwname, gpu-\u003edev-\u003edev);\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c-86-\t\tif (ret)\n--\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c=536=adreno_request_fw(struct adreno_gpu *adreno_gpu, const char *fwname)\n--\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c-553-\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c:554:\t\tret = request_firmware_direct(\u0026fw, newname, drm-\u003edev);\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c-555-\t\tif (!ret) {\n--\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c-573-\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c:574:\t\tret = request_firmware_direct(\u0026fw, fwname, drm-\u003edev);\ndrivers/gpu/drm/msm/adreno/adreno_gpu.c-575-\t\tif (!ret) {\n--\ndrivers/gpu/drm/msm/adreno/adreno_gpu.h=203=struct adreno_gpu {\n--\ndrivers/gpu/drm/msm/adreno/adreno_gpu.h-222-\t * For backwards compatibility, we try first to load from\ndrivers/gpu/drm/msm/adreno/adreno_gpu.h:223:\t * the new path, using request_firmware_direct() to avoid\ndrivers/gpu/drm/msm/adreno/adreno_gpu.h-224-\t * any potential timeout waiting for usermode helper, then\n--\ndrivers/net/ethernet/airoha/airoha_npu.c=200=static int airoha_npu_load_firmware(struct device *dev, void __iomem *addr,\n--\ndrivers/net/ethernet/airoha/airoha_npu.c-205-\ndrivers/net/ethernet/airoha/airoha_npu.c:206:\tret = request_firmware_direct(\u0026fw, fw_name, dev);\ndrivers/net/ethernet/airoha/airoha_npu.c-207-\tif (ret)\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c=4375=static int adap_init0_phy(struct adapter *adap)\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c-4394-\t */\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:4395:\tret = request_firmware_direct(\u0026phyf, phy_info-\u003ephy_fw_file,\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c-4396-\t\t\t\t adap-\u003epdev_dev);\n--\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c=2235=static int npc_load_kpu_profile_from_fs(struct rvu *rvu)\n--\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c-2249-\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c:2250:\tif (request_firmware_direct(\u0026fw, path, rvu-\u003edev))\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c-2251-\t\treturn -ENOENT;\n--\ndrivers/net/ethernet/marvell/prestera/prestera_pci.c=720=static int prestera_fw_get(struct prestera_fw *fw)\n--\ndrivers/net/ethernet/marvell/prestera/prestera_pci.c-730-\ndrivers/net/ethernet/marvell/prestera/prestera_pci.c:731:\terr = request_firmware_direct(\u0026fw-\u003ebin, fw_path, fw-\u003edev.dev);\ndrivers/net/ethernet/marvell/prestera/prestera_pci.c-732-\tif (err) {\n--\ndrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c=2141=int mlx5e_ethtool_flash_device(struct mlx5e_priv *priv,\n--\ndrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c-2151-\ndrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:2152:\terr = request_firmware_direct(\u0026fw, flash-\u003edata, \u0026dev-\u003edev);\ndrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c-2153-\tif (err)\n--\ndrivers/net/ethernet/mellanox/mlxsw/core.c=1244=static int mlxsw_core_fw_rev_validate(struct mlxsw_core *mlxsw_core,\n--\ndrivers/net/ethernet/mellanox/mlxsw/core.c-1280-\ndrivers/net/ethernet/mellanox/mlxsw/core.c:1281:\terr = request_firmware_direct(\u0026firmware, filename, mlxsw_bus_info-\u003edev);\ndrivers/net/ethernet/mellanox/mlxsw/core.c-1282-\tif (err) {\n--\ndrivers/net/ethernet/mellanox/mlxsw/core_linecards.c=1427=static int mlxsw_linecard_types_init(struct mlxsw_core *mlxsw_core,\n--\ndrivers/net/ethernet/mellanox/mlxsw/core_linecards.c-1440-\ndrivers/net/ethernet/mellanox/mlxsw/core_linecards.c:1441:\terr = request_firmware_direct(\u0026firmware, filename,\ndrivers/net/ethernet/mellanox/mlxsw/core_linecards.c-1442-\t\t\t\t linecards-\u003ebus_info-\u003edev);\n--\ndrivers/net/ethernet/netronome/nfp/nfp_main.c=359=nfp_net_fw_request(struct pci_dev *pdev, struct nfp_pf *pf, const char *name)\n--\ndrivers/net/ethernet/netronome/nfp/nfp_main.c-363-\ndrivers/net/ethernet/netronome/nfp/nfp_main.c:364:\terr = request_firmware_direct(\u0026fw, name, \u0026pdev-\u003edev);\ndrivers/net/ethernet/netronome/nfp/nfp_main.c-365-\tnfp_info(pf-\u003ecpp, \" %s: %s\\n\",\n--\ndrivers/net/phy/air_en8811h.c=397=static int an8811hb_load_file(struct phy_device *phydev, const char *name,\n--\ndrivers/net/phy/air_en8811h.c-403-\ndrivers/net/phy/air_en8811h.c:404:\tret = request_firmware_direct(\u0026fw, name, dev);\ndrivers/net/phy/air_en8811h.c-405-\tif (ret \u003c 0)\n--\ndrivers/net/phy/air_en8811h.c=502=static int en8811h_load_firmware(struct phy_device *phydev)\n--\ndrivers/net/phy/air_en8811h.c-507-\ndrivers/net/phy/air_en8811h.c:508:\tret = request_firmware_direct(\u0026fw1, EN8811H_MD32_DM, dev);\ndrivers/net/phy/air_en8811h.c-509-\tif (ret \u003c 0)\n--\ndrivers/net/phy/air_en8811h.c-511-\ndrivers/net/phy/air_en8811h.c:512:\tret = request_firmware_direct(\u0026fw2, EN8811H_MD32_DSP, dev);\ndrivers/net/phy/air_en8811h.c-513-\tif (ret \u003c 0)\n--\ndrivers/net/phy/mediatek/mtk-2p5ge.c=48=static int mt798x_2p5ge_phy_load_fw(struct phy_device *phydev)\n--\ndrivers/net/phy/mediatek/mtk-2p5ge.c-65-\ndrivers/net/phy/mediatek/mtk-2p5ge.c:66:\tret = request_firmware_direct(\u0026fw, MT7988_2P5GE_PMB_FW, dev);\ndrivers/net/phy/mediatek/mtk-2p5ge.c-67-\tif (ret) {\n--\ndrivers/net/wireless/intersil/p54/p54spi.c=162=static int p54spi_request_eeprom(struct ieee80211_hw *dev)\n--\ndrivers/net/wireless/intersil/p54/p54spi.c-170-\ndrivers/net/wireless/intersil/p54/p54spi.c:171:\tret = request_firmware_direct(\u0026eeprom, \"3826.eeprom\", \u0026priv-\u003espi-\u003edev);\ndrivers/net/wireless/intersil/p54/p54spi.c-172-\tif (ret \u003c 0) {\n--\ndrivers/net/wireless/marvell/mwifiex/sta_ioctl.c=205=static int mwifiex_request_rgpower_table(struct mwifiex_private *priv)\n--\ndrivers/net/wireless/marvell/mwifiex/sta_ioctl.c-229-\ndrivers/net/wireless/marvell/mwifiex/sta_ioctl.c:230:\tret = request_firmware_direct(\u0026adapter-\u003ergpower_data, rgpower_table_name,\ndrivers/net/wireless/marvell/mwifiex/sta_ioctl.c-231-\t\t\t\t adapter-\u003edev);\n--\ndrivers/platform/x86/intel/ifs/load.c=394=int ifs_load_firmware(struct device *dev)\n--\ndrivers/platform/x86/intel/ifs/load.c-406-\ndrivers/platform/x86/intel/ifs/load.c:407:\tret = request_firmware_direct(\u0026fw, scan_path, dev);\ndrivers/platform/x86/intel/ifs/load.c-408-\tif (ret) {\n--\ndrivers/remoteproc/qcom_q6v5_mss.c=495=static void q6v5_debug_policy_load(struct q6v5 *qproc, void *mba_region)\n--\ndrivers/remoteproc/qcom_q6v5_mss.c-498-\ndrivers/remoteproc/qcom_q6v5_mss.c:499:\tif (request_firmware_direct(\u0026dp_fw, \"msadp\", qproc-\u003edev))\ndrivers/remoteproc/qcom_q6v5_mss.c-500-\t\treturn;\n--\ndrivers/soc/ti/knav_qmss_queue.c=1553=static int knav_queue_load_pdsp(struct knav_device *kdev,\n--\ndrivers/soc/ti/knav_qmss_queue.c-1562-\t\tif (knav_acc_firmwares[i]) {\ndrivers/soc/ti/knav_qmss_queue.c:1563:\t\t\tret = request_firmware_direct(\u0026fw,\ndrivers/soc/ti/knav_qmss_queue.c-1564-\t\t\t\t\t\t knav_acc_firmwares[i],\n--\ndrivers/usb/atm/cxacru.c=986=static int cxacru_find_firmware(struct cxacru_data *instance,\n--\ndrivers/usb/atm/cxacru.c-995-\ndrivers/usb/atm/cxacru.c:996:\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/cxacru.c-997-\t\tusb_dbg(usbatm, \"no stage %s firmware found\\n\", phase);\n--\ndrivers/usb/atm/speedtch.c=348=static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf,\n--\ndrivers/usb/atm/speedtch.c-359-\ndrivers/usb/atm/speedtch.c:360:\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c-361-\t\tsprintf(buf, \"speedtch-%d.bin.%x\", phase, major_revision);\n--\ndrivers/usb/atm/speedtch.c-363-\ndrivers/usb/atm/speedtch.c:364:\t\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c-365-\t\t\tsprintf(buf, \"speedtch-%d.bin\", phase);\n--\ndrivers/usb/atm/speedtch.c-367-\ndrivers/usb/atm/speedtch.c:368:\t\t\tif (request_firmware_direct(fw_p, buf, dev)) {\ndrivers/usb/atm/speedtch.c-369-\t\t\t\tusb_err(usbatm, \"%s: no stage %d firmware found!\\n\", __func__, phase);\n--\ninclude/linux/firmware.h=113=void request_firmware_nowait_cancel(struct device *device, void *context,\n--\ninclude/linux/firmware.h-115-\t\t\t\t\t\t void *context));\ninclude/linux/firmware.h:116:int request_firmware_direct(const struct firmware **fw, const char *name,\ninclude/linux/firmware.h-117-\t\t\t struct device *device);\n--\ninclude/linux/firmware.h=170=static inline void release_firmware(const struct firmware *fw)\n--\ninclude/linux/firmware.h-173-\ninclude/linux/firmware.h:174:static inline int request_firmware_direct(const struct firmware **fw,\ninclude/linux/firmware.h-175-\t\t\t\t\t const char *name,\n--\nlib/test_firmware.c=43=struct test_batched_req {\n--\nlib/test_firmware.c-64- * @sync_direct: when the sync trigger is used if this is true\nlib/test_firmware.c:65: *\trequest_firmware_direct() will be used instead.\nlib/test_firmware.c-66- * @send_uevent: whether or not to send a uevent for async requests\n--\nlib/test_firmware.c-98- * @req_firmware: if @sync_direct is true this is set to\nlib/test_firmware.c:99: *\trequest_firmware_direct(), otherwise request_firmware()\nlib/test_firmware.c-100- */\n--\nnet/ethtool/module.c=304=module_flash_fw_schedule(struct net_device *dev, const char *file_name,\n--\nnet/ethtool/module.c-317-\tfw_update-\u003eparams = *params;\nnet/ethtool/module.c:318:\terr = request_firmware_direct(\u0026fw_update-\u003efw,\nnet/ethtool/module.c-319-\t\t\t\t file_name, \u0026dev-\u003edev);\n--\ntools/testing/selftests/firmware/fw_filesystem.sh=312=test_batched_request_firmware_direct_nofile()\ntools/testing/selftests/firmware/fw_filesystem.sh-313-{\ntools/testing/selftests/firmware/fw_filesystem.sh:314:\techo -n \"Batched request_firmware_direct() nofile try #$1: \"\ntools/testing/selftests/firmware/fw_filesystem.sh-315-\tconfig_reset\n--\ntools/testing/selftests/firmware/fw_filesystem.sh=377=test_batched_request_firmware_into_buf()\n--\ntools/testing/selftests/firmware/fw_filesystem.sh-388-\ntools/testing/selftests/firmware/fw_filesystem.sh:389:test_batched_request_firmware_direct()\ntools/testing/selftests/firmware/fw_filesystem.sh-390-{\ntools/testing/selftests/firmware/fw_filesystem.sh:391:\techo -n \"Batched request_firmware_direct() $2 try #$1: \"\ntools/testing/selftests/firmware/fw_filesystem.sh-392-\tconfig_reset\n"
} |
| 21/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 35803 output: 40 thoughts: 1716 Thoughts: **Fuzzing Decision for Firmware Loading Changes** Okay, so I'm looking at these changes, specifically the shift from `request_firmware` to `request_firmware_direct` in `cxacru.c` and `speedtch.c`. My initial thought is, why the change? It seems like `request_firmware_direct` skips the usermode helper and doesn't wait, which could have some interesting implications. In `speedtch.c` it's trying multiple firmware files in sequence, and with the change, if one is missing, it returns immediately without usermode involvement. Now, the key question: Is this worth fuzzing? I need to apply the fuzzing guidelines. Let's see... the core goal is to uncover crashes, regressions, and latent bugs. First, is the code reachable? That's the primary gate. Looking at the code, it calls `cxacru_find_firmware` and `speedtch_find_firmware` and within them, `request_firmware_direct`. We need to verify that these functions are invoked under normal operation, not just in some edge case. Let me trace how `cxacru_find_firmware` and `speedtch_find_firmware` get executed. Looks like `cxacru_usb_probe` and `speedtch_usb_probe` are the entry points. These use `usbatm_usb_probe`. Alright, the devices are USB devices. USB devices are easily reachable through USB emulation. Now, let's go through the negative criteria in section 2 of the fuzzing guidelines: * **Non-kernel and non-executable changes:** Nope, we're dealing with kernel code here. * **Structurally unreachable hardware:** No, this is a USB driver, easily emulated. * **Unreachable execution paths:** No. The relevant functions are called during probe/initialization, not driver teardown. So, according to the negative criteria, it's not excluded. The driver is reachable. Then, on the positive side, section 3 states, "Reachable Drivers and Protocols: Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.)." We have a USB driver here! That seems pretty clear. And section 3 also mentions refactoring and code cleanup and runtime assertions and defensive checks which would trigger a fuzzing event. Therefore, applying the guidelines, `WorthFuzzing` has to be `true`. I need to ensure this is reached and fuzzing is required. I need to make sure that `cxacru_usb_probe` and `speedtch_usb_probe` are called when a USB device is attached. The `cxacru_heavy_init` and `speedtch_heavy_init` functions are called during initialization. |
| 22/2 | 2026/09/26 08:12 | tool | read-file |
0mArgs:{
"File": "drivers/usb/atm/usbatm.c",
"FirstLine": 1008,
"LineCount": 80
}Results: {
"Contents": "1008:\tint usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,\n1009:\t\t\t struct usbatm_driver *driver)\n1010:\t{\n1011:\t\tstruct device *dev = \u0026intf-\u003edev;\n1012:\t\tstruct usb_device *usb_dev = interface_to_usbdev(intf);\n1013:\t\tstruct usbatm_data *instance;\n1014:\t\tchar *buf;\n1015:\t\tint error = -ENOMEM;\n1016:\t\tint i, length;\n1017:\t\tunsigned int maxpacket, num_packets;\n1018:\t\tsize_t size;\n1019:\t\n1020:\t\t/* instance init */\n1021:\t\tsize = struct_size(instance, urbs,\n1022:\t\t\t\t size_add(num_rcv_urbs, num_snd_urbs));\n1023:\t\tinstance = kzalloc(size, GFP_KERNEL);\n1024:\t\tif (!instance)\n1025:\t\t\treturn -ENOMEM;\n1026:\t\n1027:\t\t/* public fields */\n1028:\t\n1029:\t\tinstance-\u003edriver = driver;\n1030:\t\tstrscpy(instance-\u003edriver_name, driver-\u003edriver_name,\n1031:\t\t\tsizeof(instance-\u003edriver_name));\n1032:\t\n1033:\t\tinstance-\u003eusb_dev = usb_dev;\n1034:\t\tinstance-\u003eusb_intf = intf;\n1035:\t\n1036:\t\tbuf = instance-\u003edescription;\n1037:\t\tlength = sizeof(instance-\u003edescription);\n1038:\t\n1039:\t\tif ((i = usb_string(usb_dev, usb_dev-\u003edescriptor.iProduct, buf, length)) \u003c 0)\n1040:\t\t\tgoto bind;\n1041:\t\n1042:\t\tbuf += i;\n1043:\t\tlength -= i;\n1044:\t\n1045:\t\ti = scnprintf(buf, length, \" (\");\n1046:\t\tbuf += i;\n1047:\t\tlength -= i;\n1048:\t\n1049:\t\tif (length \u003c= 0 || (i = usb_make_path(usb_dev, buf, length)) \u003c 0)\n1050:\t\t\tgoto bind;\n1051:\t\n1052:\t\tbuf += i;\n1053:\t\tlength -= i;\n1054:\t\n1055:\t\tsnprintf(buf, length, \")\");\n1056:\t\n1057:\t bind:\n1058:\t\tif (driver-\u003ebind \u0026\u0026 (error = driver-\u003ebind(instance, intf, id)) \u003c 0) {\n1059:\t\t\t\tdev_err(dev, \"%s: bind failed: %d!\\n\", __func__, error);\n1060:\t\t\t\tgoto fail_free;\n1061:\t\t}\n1062:\t\n1063:\t\t/* private fields */\n1064:\t\n1065:\t\tkref_init(\u0026instance-\u003erefcount);\t\t/* dropped in usbatm_usb_disconnect */\n1066:\t\tmutex_init(\u0026instance-\u003eserialize);\n1067:\t\n1068:\t\tinstance-\u003ethread = NULL;\n1069:\t\tinit_completion(\u0026instance-\u003ethread_started);\n1070:\t\tinit_completion(\u0026instance-\u003ethread_exited);\n1071:\t\n1072:\t\tINIT_LIST_HEAD(\u0026instance-\u003evcc_list);\n1073:\t\tskb_queue_head_init(\u0026instance-\u003esndqueue);\n1074:\t\n1075:\t\tusbatm_init_channel(\u0026instance-\u003erx_channel);\n1076:\t\tusbatm_init_channel(\u0026instance-\u003etx_channel);\n1077:\t\ttasklet_setup(\u0026instance-\u003erx_channel.tasklet, usbatm_rx_process);\n1078:\t\ttasklet_setup(\u0026instance-\u003etx_channel.tasklet, usbatm_tx_process);\n1079:\t\tinstance-\u003erx_channel.stride = ATM_CELL_SIZE + driver-\u003erx_padding;\n1080:\t\tinstance-\u003etx_channel.stride = ATM_CELL_SIZE + driver-\u003etx_padding;\n1081:\t\tinstance-\u003erx_channel.usbatm = instance-\u003etx_channel.usbatm = instance;\n1082:\t\n1083:\t\tif ((instance-\u003eflags \u0026 UDSL_USE_ISOC) \u0026\u0026 driver-\u003eisoc_in)\n1084:\t\t\tinstance-\u003erx_channel.endpoint = usb_rcvisocpipe(usb_dev, driver-\u003eisoc_in);\n1085:\t\telse\n1086:\t\t\tinstance-\u003erx_channel.endpoint = usb_rcvbulkpipe(usb_dev, driver-\u003ebulk_in);\n1087:\t\n"
} |
| 23/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 39434 output: 40 thoughts: 16 Thoughts: Okay, here's my attempt at summarizing the thought process, tailored for an expert audience, and written in the first person: **Diving Deeper into `usbatm_usb_probe`** Alright, so we're looking at the remaining part of `usbatm_usb_probe`, eh? The initial setup is typically straightforward, so I'm expecting this section to contain the crucial device-specific initializations, error handling, and resource allocation – the meat and potatoes of bringing up the ATM device. I'm immediately scanning for the pattern: how are they handling the USB descriptors? Are they leveraging libusb directly, or employing some higher-level abstraction the driver provides? I’m looking for the quirks, the workarounds for problematic devices, the subtle ways they're dealing with interrupt and bulk endpoints. Are they using control transfers extensively for configuration? How are they managing the DMA, and is it optimal? I want to see if they are doing everything as efficiently as possible. I'm also watching closely for any potential race conditions during the initialization phase, especially when multiple threads are involved in the process. Any potential for deadlocks here? Any hidden assumptions about the USB bus or device characteristics? These are the typical pain points, and I’m ready to dissect their solution. I’m also checking to see if they're correctly checking the return values from all function calls, and if they are gracefully cleaning up allocated resources when there's an error. The devil is always in the details, so I will analyze this section to verify it. |
| 24/2 | 2026/09/26 08:12 | tool | read-file |
0mArgs:{
"File": "drivers/usb/atm/usbatm.c",
"FirstLine": 1150,
"LineCount": 40
}Results: {
"Contents": "1150:\t\t\t\turb-\u003enumber_of_packets = iso_packets;\n1151:\t\t\t\tfor (j = 0; j \u003c iso_packets; j++) {\n1152:\t\t\t\t\turb-\u003eiso_frame_desc[j].offset = channel-\u003epacket_size * j;\n1153:\t\t\t\t\turb-\u003eiso_frame_desc[j].length = channel-\u003epacket_size;\n1154:\t\t\t\t}\n1155:\t\t\t}\n1156:\t\n1157:\t\t\t/* put all tx URBs on the list of spares */\n1158:\t\t\tif (i \u003e= num_rcv_urbs)\n1159:\t\t\t\tlist_add_tail(\u0026urb-\u003eurb_list, \u0026channel-\u003elist);\n1160:\t\n1161:\t\t\tvdbg(\u0026intf-\u003edev, \"%s: allocated buffer 0x%p buf size %u urb 0x%p\",\n1162:\t\t\t __func__, urb-\u003etransfer_buffer, urb-\u003etransfer_buffer_length, urb);\n1163:\t\t}\n1164:\t\n1165:\t\tinstance-\u003ecached_vpi = ATM_VPI_UNSPEC;\n1166:\t\tinstance-\u003ecached_vci = ATM_VCI_UNSPEC;\n1167:\t\tinstance-\u003ecell_buf = kmalloc(instance-\u003erx_channel.stride, GFP_KERNEL);\n1168:\t\n1169:\t\tif (!instance-\u003ecell_buf) {\n1170:\t\t\terror = -ENOMEM;\n1171:\t\t\tgoto fail_unbind;\n1172:\t\t}\n1173:\t\n1174:\t\tif (!(instance-\u003eflags \u0026 UDSL_SKIP_HEAVY_INIT) \u0026\u0026 driver-\u003eheavy_init) {\n1175:\t\t\terror = usbatm_heavy_init(instance);\n1176:\t\t} else {\n1177:\t\t\tcomplete(\u0026instance-\u003ethread_exited);\t/* pretend that heavy_init was run */\n1178:\t\t\terror = usbatm_atm_init(instance);\n1179:\t\t}\n1180:\t\n1181:\t\tif (error \u003c 0)\n1182:\t\t\tgoto fail_unbind;\n1183:\t\n1184:\t\tusb_get_dev(usb_dev);\n1185:\t\tusb_set_intfdata(intf, instance);\n1186:\t\n1187:\t\treturn 0;\n1188:\t\n1189:\t fail_unbind:\n"
} |
| 25/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 40451 output: 27 thoughts: 362 Thoughts: **Analyzing the USB DSL Modem Initialization** Okay, so I'm tracing the initialization path here, specifically focusing on the heavy initialization routines for USB DSL modems. It looks like `driver->heavy_init` gets triggered by `usbatm_heavy_init`, but only when the `UDSL_SKIP_HEAVY_INIT` flag isn't set for the instance. Interesting... I see in `cxacru.c` that the flag is determined by `cxacru_card_status(instance)`. If that function fails or returns a non-zero value, indicating, for example, that the firmware isn't loaded yet, the flag ends up being 0. That means the heavy initialization *won't* be skipped. Then, I'm checking the flag's behavior in `speedtch.c`, but it doesn't set `UDSL_SKIP_HEAVY_INIT`. This implies `usbatm_heavy_init` *will* be invoked, which spawns a kthread that, in turn, calls `cxacru_heavy_init` or `speedtch_heavy_init`. Those ultimately call `cxacru_find_firmware` or `speedtch_find_firmware`, and those guys are using `request_firmware_direct`. I need to review these firmware loading steps. Now, I'm going to quickly check the Kconfig for the necessary configurations to build and enable this code path. Let's see what `drivers/usb/atm/Kconfig` tells us: ```kconfig menuconfig USB_ATM tristate "USB DSL modem support" depends on ATM select CRC32 if USB_ATM config USB_SPEEDTOUCH tristate "Speedtouch USB support" select FW_LOADER config USB_CXACRU tristate "Conexant AccessRunner USB support" select FW_LOADER ``` So, `USB_ATM` requires `ATM` and selects `CRC32`. `USB_SPEEDTOUCH` and `USB_CXACRU` both depend on `FW_LOADER`. I should now check what `ATM` depends on, to see the full set of dependencies. |
| 26/2 | 2026/09/26 08:12 | tool | grepper |
0mArgs:{
"Expression": "config ATM\\b",
"PathPrefix": "net/atm"
}Results: {
"Output": "net/atm/Kconfig-5-\nnet/atm/Kconfig:6:config ATM\nnet/atm/Kconfig-7-\ttristate \"Asynchronous Transfer Mode (ATM)\"\n"
} |
| 27/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 41377 output: 28 thoughts: 69 Thoughts: Here's my summary, as though I'm thinking through this process: **Kconfig Dependency Deep Dive** Okay, so I'm digging into these Kconfig dependencies, as usual. First up, `ATM` is defined in `net/atm/Kconfig`. That's pretty straightforward; it depends on `NET`, which is almost always enabled, so no surprises there. Now, let's look at `USB_ATM`. Aha, it's dependent on `ATM`, which makes sense. But... and this is where I need to double-check my assumptions... it *also* depends on `USB`. Now, I need to confirm: does `drivers/usb/atm/Kconfig` *also* enforce that `USB` is enabled? I'd better go verify that `drivers/usb/Kconfig` to be absolutely certain there isn't a recursive loop or some unexpected behavior. It's always best to be precise with these dependencies to avoid headaches down the line. |
| 28/2 | 2026/09/26 08:12 | tool | grepper |
0mArgs:{
"Expression": "drivers/usb/atm",
"PathPrefix": "drivers/usb"
}Results: {
"Output": "drivers/usb/Kconfig=148=source \"drivers/usb/misc/Kconfig\"\ndrivers/usb/Kconfig-149-\ndrivers/usb/Kconfig:150:source \"drivers/usb/atm/Kconfig\"\ndrivers/usb/Kconfig-151-\n"
} |
| 29/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 41767 output: 32 thoughts: 1704 Thoughts: **Focus Symbol Identification for USB ATM Firmware Loading** Okay, let's break this down. We're looking at USB ATM drivers, specifically the firmware loading aspects, so I need to identify the core functions and relevant configurations. First, the `Kconfig` files link `drivers/usb/atm/Kconfig` to `drivers/usb/Kconfig` via `USB_SUPPORT` or `USB`. This sets the stage for our configurations: `USB_CXACRU`, `USB_SPEEDTOUCH`, `USB_ATM`, `ATM`, and `USB` (or `USB_SUPPORT`). The `FW_LOADER` config is automatically selected by `USB_SPEEDTOUCH` and `USB_CXACRU`, so it's handled. Based on the code, it looks like `USB_CXACRU`, `USB_SPEEDTOUCH`, `USB_ATM`, and `ATM` are the key configs here. I will want to be sure to test those. Now for the *real* question: what are our FocusSymbols? I have to target the specific functions that are being changed. The code indicates that `cxacru_find_firmware` and `speedtch_find_firmware` are being changed, and are called by `cxacru_heavy_init` and `speedtch_heavy_init` respectively. Let's dig in. `cxacru_find_firmware` is called by `cxacru_heavy_init`, and I see from the code that `cxacru_heavy_init`'s address is taken, so it will not be inlined. `cxacru_find_firmware` is called twice from `cxacru_heavy_init`. This is good: we can likely include both `cxacru_find_firmware` and `cxacru_heavy_init` in our focus. The same goes for `speedtch_find_firmware` and `speedtch_heavy_init`. But... I need to be careful. `request_firmware_direct` is in `cxacru_find_firmware` and `speedtch_find_firmware`, and that is likely a generic function. We need to avoid that. It *is* called elsewhere, but seems specific to these drivers. However, based on the principle of avoiding ubiquitous functions that would dilute fuzzing efforts, let's keep it limited to the driver-specific functions. So, the clear choices are: `cxacru_find_firmware`, `cxacru_heavy_init`, `speedtch_find_firmware`, and `speedtch_heavy_init`. Focusing on these four functions directly ensures we're targeting code that specifically implements the firmware loading logic within these USB ATM drivers. Finally, I'll quickly verify the EnableConfigs: - `USB_CXACRU` enables `drivers/usb/atm/cxacru.c`. - `USB_SPEEDTOUCH` enables `drivers/usb/atm/speedtch.c`. - `USB_ATM` is a parent config in `drivers/usb/atm/Kconfig`. - `ATM` is required by `USB_ATM` ( `depends on ATM` ). - `USB` is required for the USB subsystem. That looks good, it's all making sense now. We have a solid starting point for targeting the right code with our fuzzing efforts. |
| 30/2 | 2026/09/26 08:12 | tool | read-file |
0mArgs:{
"File": "net/atm/Kconfig",
"FirstLine": 1,
"LineCount": 30
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# Asynchronous Transfer Mode (ATM)\n 4:\t#\n 5:\t\n 6:\tconfig ATM\n 7:\t\ttristate \"Asynchronous Transfer Mode (ATM)\"\n 8:\t\thelp\n 9:\t\t ATM is a high-speed networking technology for Local Area Networks\n 10:\t\t and Wide Area Networks. It uses a fixed packet size and is\n 11:\t\t connection oriented, allowing for the negotiation of minimum\n 12:\t\t bandwidth requirements.\n 13:\t\n 14:\t\t In order to participate in an ATM network, your Linux box needs an\n 15:\t\t ATM networking card. If you have that, say Y here and to the driver\n 16:\t\t of your ATM card below.\n 17:\t\n 18:\t\t Note that you need a set of user-space programs to actually make use\n 19:\t\t of ATM. See the file \u003cfile:Documentation/networking/atm.rst\u003e for\n 20:\t\t further details.\n 21:\t\n 22:\tconfig ATM_BR2684\n 23:\t\ttristate \"RFC1483/2684 Bridged protocols\"\n 24:\t\tdepends on ATM \u0026\u0026 INET\n 25:\t\thelp\n 26:\t\t ATM PVCs can carry ethernet PDUs according to RFC2684 (formerly 1483)\n 27:\t\t This device will act like an ethernet from the kernels point of view,\n 28:\t\t with the traffic being carried by ATM PVCs (currently 1 PVC/device).\n 29:\t\t This is sometimes used over DSL lines. If in doubt, say N.\n 30:\t\n"
} |
| 31/2 | 2026/09/26 08:12 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 44686 output: 221 thoughts: 480 Thoughts: **Fuzzing Target Identification: USB ATM Drivers** Okay, so I've been looking at this patch and its potential impact. My initial analysis shows a few key modules: `ATM` is a tristate config with no dependencies, while `USB_ATM` depends on `ATM` and selects `CRC32`. We also have `USB_SPEEDTOUCH` and `USB_CXACRU`, both tristate options that select `FW_LOADER`. I need to ensure I haven't missed any dependencies in the `drivers/usb/Kconfig` file. A quick check confirms `USB_SUPPORT`, `USB`, `ATM`, `USB_ATM`, `USB_SPEEDTOUCH`, and `USB_CXACRU` are the relevant configurations when considering the USB ATM drivers, because the Kconfig includes `drivers/usb/atm/Kconfig` when `USB_SUPPORT` is enabled. Now, let's get into the specifics of *why* this warrants fuzzing. The patch is changing how firmware is loaded in `cxacru_find_firmware` and `speedtch_find_firmware`, using `request_firmware_direct()` instead of `request_firmware()`. These are USB drivers that are accessible in virtualized environments, specifically via USB device emulation like Raw Gadget or dummy_hcd. When the emulated device connects, `usbatm_usb_probe()` triggers a heavy initialization thread (`usbatm_do_heavy_init()`). This, in turn, calls `cxacru_heavy_init()` and `speedtch_heavy_init()`, which directly exercises the *modified* `cxacru_find_firmware()` and `speedtch_find_firmware()` code paths. So, the modified kernel code is definitely reachable and testable. Before I push the "go" button, let's just run a sanity check. My assessment is that this is worth fuzzing, and I want to focus on: `cxacru_find_firmware`, `cxacru_heavy_init`, `speedtch_find_firmware`, and `speedtch_heavy_init`. I'll need to enable the following configurations to make the fuzzing effective: `USB_CXACRU`, `USB_SPEEDTOUCH`, `USB_ATM`, `ATM`, and `USB`. All checks are good to go, and I'm confident in my assessment. I'm ready to mark this as a viable fuzzing target. |
| 32/2 | 2026/09/26 08:12 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"USB_CXACRU",
"USB_SPEEDTOUCH",
"USB_ATM",
"ATM",
"USB"
],
"FocusSymbols": [
"cxacru_find_firmware",
"cxacru_heavy_init",
"speedtch_find_firmware",
"speedtch_heavy_init"
],
"Reasoning": "The patch modifies firmware loading behavior in the Conexant AccessRunner (cxacru) and Alcatel SpeedTouch (speedtch) USB ATM modem drivers by replacing request_firmware() with request_firmware_direct(). These USB device drivers are reachable in standard virtualized environments via USB emulation frameworks such as Raw Gadget or dummy_hcd. During device probing and initialization (heavy_init), the drivers execute cxacru_find_firmware() and speedtch_find_firmware() to locate required firmware files. Because reachable executable driver code is altered, this patch warrants fuzzing.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"USB_CXACRU",
"USB_SPEEDTOUCH",
"USB_ATM",
"ATM",
"USB"
],
"FocusSymbols": [
"cxacru_find_firmware",
"cxacru_heavy_init",
"speedtch_find_firmware",
"speedtch_heavy_init"
],
"Reasoning": "The patch modifies firmware loading behavior in the Conexant AccessRunner (cxacru) and Alcatel SpeedTouch (speedtch) USB ATM modem drivers by replacing request_firmware() with request_firmware_direct(). These USB device drivers are reachable in standard virtualized environments via USB emulation frameworks such as Raw Gadget or dummy_hcd. During device probing and initialization (heavy_init), the drivers execute cxacru_find_firmware() and speedtch_find_firmware() to locate required firmware files. Because reachable executable driver code is altered, this patch warrants fuzzing.",
"WorthFuzzing": true
} |
| 33/1 | 2026/09/26 08:12 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 34/2 | 2026/09/26 08:12 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch modifies firmware loading calls in `cxacru.c` and `speedtch.c` from `request_firmware()` to `request_firmware_direct()`. This change avoids user-helper/sysfs fallback timeouts when searching for optional firmware files. It does not alter any buffer allocations, bounds, data initialization, or kernel-to-user memory transfers. No uninitialized memory usage or info-leak risks are introduced or affected; therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 3da3978988df028da79eaededad891f87a5ddbdb
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 26 08:11:26 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 636f7886fc260..7d1944487fd8d 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -993,7 +993,7 @@ static int cxacru_find_firmware(struct cxacru_data *instance,
sprintf(buf, "cxacru-%s.bin", phase);
usb_dbg(usbatm, "cxacru_find_firmware: looking for %s\n", buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
usb_dbg(usbatm, "no stage %s firmware found\n", phase);
return -ENOENT;
}
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
index 9d28c652bcd80..c82db2f7a699a 100644
--- a/drivers/usb/atm/speedtch.c
+++ b/drivers/usb/atm/speedtch.c
@@ -357,15 +357,15 @@ static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interfa
sprintf(buf, "speedtch-%d.bin.%x.%02x", phase, major_revision, minor_revision);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
sprintf(buf, "speedtch-%d.bin.%x", phase, major_revision);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
sprintf(buf, "speedtch-%d.bin", phase);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
- if (request_firmware(fw_p, buf, dev)) {
+ if (request_firmware_direct(fw_p, buf, dev)) {
usb_err(usbatm, "%s: no stage %d firmware found!\n", __func__, phase);
return -ENOENT;
}
|
| 35/3 | 2026/09/26 08:12 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 2570 output: 77 thoughts: 800 Thoughts: **Analyzing the Firmware Loading Logic** Okay, let's dive into this patch. My initial thought is to understand the core change and its implications. It looks like we're altering how firmware is loaded for the `cxacru` and `speedtch` USB ATM drivers. Specifically, the `request_firmware` function is being replaced with `request_firmware_direct`. Now, I'm already thinking about why this change was made. `request_firmware_direct` likely offers some performance benefit or more fine-grained control over the firmware loading process. I need to refresh my memory on the specifics of these functions. What are the subtle differences? Are there any security considerations at play here? My first action is to recall the call sites and context. I'm going to quickly refresh the surrounding code, especially in the `cxacru_find_firmware` and `speedtch_find_firmware` functions. I'll mentally step through the control flow. What different firmware file naming conventions are used? What are the implications of the change on the error handling? The original code probably included more than what is diffed, and I need to review it. The code now needs to perform a number of different looks for different firmware files, and I'll need to remember why each file is needed, and in what order. I'm expecting this is all driven by the phase, major and minor revision numbers in the filenames. I need to understand that logic. I'm also curious about the potential impact on other parts of the driver code. Are there any dependencies on the old behavior that might break? I should keep an eye out for any interactions with the device probe or removal functions, or the ATM layer. |
| 36/3 | 2026/09/26 08:13 | tool | read-file |
0mArgs:{
"File": "drivers/usb/atm/cxacru.c",
"FirstLine": 980,
"LineCount": 40
}Results: {
"Contents": " 980:\tcleanup:\n 981:\t\tfree_page((unsigned long) buf);\n 982:\t\treturn ret;\n 983:\t}\n 984:\t\n 985:\t\n 986:\tstatic int cxacru_find_firmware(struct cxacru_data *instance,\n 987:\t\t\t\t\tchar *phase, const struct firmware **fw_p)\n 988:\t{\n 989:\t\tstruct usbatm_data *usbatm = instance-\u003eusbatm;\n 990:\t\tstruct device *dev = \u0026usbatm-\u003eusb_intf-\u003edev;\n 991:\t\tchar buf[16];\n 992:\t\n 993:\t\tsprintf(buf, \"cxacru-%s.bin\", phase);\n 994:\t\tusb_dbg(usbatm, \"cxacru_find_firmware: looking for %s\\n\", buf);\n 995:\t\n 996:\t\tif (request_firmware_direct(fw_p, buf, dev)) {\n 997:\t\t\tusb_dbg(usbatm, \"no stage %s firmware found\\n\", phase);\n 998:\t\t\treturn -ENOENT;\n 999:\t\t}\n1000:\t\n1001:\t\tusb_info(usbatm, \"found firmware %s\\n\", buf);\n1002:\t\n1003:\t\treturn 0;\n1004:\t}\n1005:\t\n1006:\tstatic int cxacru_heavy_init(struct usbatm_data *usbatm_instance,\n1007:\t\t\t\t struct usb_interface *usb_intf)\n1008:\t{\n1009:\t\tconst struct firmware *fw, *bp;\n1010:\t\tstruct cxacru_data *instance = usbatm_instance-\u003edriver_data;\n1011:\t\tstruct usbatm_data *usbatm = instance-\u003eusbatm;\n1012:\t\tstruct usb_device *usb_dev = usbatm-\u003eusb_dev;\n1013:\t\t__le16 signature[] = { usb_dev-\u003edescriptor.idVendor,\n1014:\t\t\t\t usb_dev-\u003edescriptor.idProduct };\n1015:\t\t__le32 val;\n1016:\t\tint ret;\n1017:\t\n1018:\t\tret = cxacru_find_firmware(instance, \"fw\", \u0026fw);\n1019:\t\tif (ret) {\n"
} |
| 37/3 | 2026/09/26 08:13 | tool | read-file |
0mArgs:{
"File": "drivers/usb/atm/speedtch.c",
"FirstLine": 345,
"LineCount": 45
}Results: {
"Contents": " 345:\t\treturn ret;\n 346:\t}\n 347:\t\n 348:\tstatic int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf,\n 349:\t\t\t\t\t int phase, const struct firmware **fw_p)\n 350:\t{\n 351:\t\tstruct device *dev = \u0026intf-\u003edev;\n 352:\t\tconst u16 bcdDevice = le16_to_cpu(interface_to_usbdev(intf)-\u003edescriptor.bcdDevice);\n 353:\t\tconst u8 major_revision = bcdDevice \u003e\u003e 8;\n 354:\t\tconst u8 minor_revision = bcdDevice \u0026 0xff;\n 355:\t\tchar buf[24];\n 356:\t\n 357:\t\tsprintf(buf, \"speedtch-%d.bin.%x.%02x\", phase, major_revision, minor_revision);\n 358:\t\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n 359:\t\n 360:\t\tif (request_firmware_direct(fw_p, buf, dev)) {\n 361:\t\t\tsprintf(buf, \"speedtch-%d.bin.%x\", phase, major_revision);\n 362:\t\t\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n 363:\t\n 364:\t\t\tif (request_firmware_direct(fw_p, buf, dev)) {\n 365:\t\t\t\tsprintf(buf, \"speedtch-%d.bin\", phase);\n 366:\t\t\t\tusb_dbg(usbatm, \"%s: looking for %s\\n\", __func__, buf);\n 367:\t\n 368:\t\t\t\tif (request_firmware_direct(fw_p, buf, dev)) {\n 369:\t\t\t\t\tusb_err(usbatm, \"%s: no stage %d firmware found!\\n\", __func__, phase);\n 370:\t\t\t\t\treturn -ENOENT;\n 371:\t\t\t\t}\n 372:\t\t\t}\n 373:\t\t}\n 374:\t\n 375:\t\tusb_info(usbatm, \"found stage %d firmware %s\\n\", phase, buf);\n 376:\t\n 377:\t\treturn 0;\n 378:\t}\n 379:\t\n 380:\tstatic int speedtch_heavy_init(struct usbatm_data *usbatm, struct usb_interface *intf)\n 381:\t{\n 382:\t\tconst struct firmware *fw1, *fw2;\n 383:\t\tstruct speedtch_instance_data *instance = usbatm-\u003edriver_data;\n 384:\t\tint ret;\n 385:\t\n 386:\t\tif ((ret = speedtch_find_firmware(usbatm, intf, 1, \u0026fw1)) \u003c 0)\n 387:\t\t\treturn ret;\n 388:\t\n 389:\t\tif ((ret = speedtch_find_firmware(usbatm, intf, 2, \u0026fw2)) \u003c 0) {\n"
} |
| 38/3 | 2026/09/26 08:13 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5276 output: 22 thoughts: 193 Thoughts: **Analyzing the Firmware Request Change** Okay, so I'm digging into this code change: the switch from `request_firmware(...)` to `request_firmware_direct(...)`. I need to understand the implications of this. It's clear that there's a fundamental difference. `request_firmware` is the standard approach, with that potentially problematic fallback mechanism, the usermode helper and sysfs interaction, if CONFIG_FW_LOADER_USER_HELPER is enabled. `request_firmware_direct` seems more... direct, as the name implies. It bypasses this user space helper altogether. Right, so `request_firmware_direct` directly accesses the filesystem for the firmware. The implication is that this avoids the blocking behavior of waiting for the user space helper, which can introduce those frustrating 60-second delays if the firmware isn't found, particularly in scenarios where drivers probe synchronously or try multiple firmware names. That makes sense. This is probably a performance optimization. My hunch is that this is related to drivers that probe firmware synchronously or try multiple names. The classic case is when a device uses the driver but fails to find the firmware. Then it's forced to wait for that 60 seconds (or more), which is really disruptive. This likely resolves the issues flagged by syzkaller or fuzzing tools, which are very sensitive to these kinds of timeouts when probing USB devices. I see the potential for a significant improvement in these cases. Time to confirm this by inspecting the actual implementation of `request_firmware_direct` with `grepper`, to see precisely how it works. |
| 39/3 | 2026/09/26 08:13 | tool | grepper |
0mArgs:{
"Expression": "int request_firmware_direct\\("
}Results: {
"Output": "drivers/base/firmware_loader/main.c=980=EXPORT_SYMBOL_GPL(firmware_request_nowarn);\n--\ndrivers/base/firmware_loader/main.c-992- **/\ndrivers/base/firmware_loader/main.c:993:int request_firmware_direct(const struct firmware **firmware_p,\ndrivers/base/firmware_loader/main.c-994-\t\t\t const char *name, struct device *device)\n--\ninclude/linux/firmware.h=113=void request_firmware_nowait_cancel(struct device *device, void *context,\n--\ninclude/linux/firmware.h-115-\t\t\t\t\t\t void *context));\ninclude/linux/firmware.h:116:int request_firmware_direct(const struct firmware **fw, const char *name,\ninclude/linux/firmware.h-117-\t\t\t struct device *device);\n--\ninclude/linux/firmware.h=170=static inline void release_firmware(const struct firmware *fw)\n--\ninclude/linux/firmware.h-173-\ninclude/linux/firmware.h:174:static inline int request_firmware_direct(const struct firmware **fw,\ninclude/linux/firmware.h-175-\t\t\t\t\t const char *name,\n"
} |
| 40/3 | 2026/09/26 08:13 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6172 output: 40 thoughts: 27 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Diving into the Firmware Loading Mechanism** Right, let's zero in on `drivers/base/firmware_loader/main.c` and specifically `request_firmware_direct`. I need to understand this function. I'm guessing it's the core of how we bypass the normal firmware loading process, likely for direct DMA access or something similar. I need to quickly recall the typical firmware loading path – the interaction with the firmware class, the handling of the firmware request structure, potential security checks... Is this function just a raw wrapper around device-specific loading, bypassing all that? Or does it integrate with the standard framework at some level, perhaps for resource allocation? What are the implications for error handling in this direct route? Does it introduce any new race conditions I should be aware of, or specific locking mechanisms? I should probably also trace its callers to see what use-cases it's designed to solve. Are these all performance-critical situations or something else? Understanding this will be key for any analysis I have to do. |
| 41/3 | 2026/09/26 08:13 | tool | read-file |
0mArgs:{
"File": "drivers/base/firmware_loader/main.c",
"FirstLine": 990,
"LineCount": 20
}Results: {
"Contents": " 990:\t * directly from fs. Hence it's useful for loading optional firmwares, which\n 991:\t * aren't always present, without extra long timeouts of udev.\n 992:\t **/\n 993:\tint request_firmware_direct(const struct firmware **firmware_p,\n 994:\t\t\t\t const char *name, struct device *device)\n 995:\t{\n 996:\t\tint ret;\n 997:\t\n 998:\t\t__module_get(THIS_MODULE);\n 999:\t\tret = _request_firmware(firmware_p, name, device, NULL, 0, 0,\n1000:\t\t\t\t\tFW_OPT_UEVENT | FW_OPT_NO_WARN |\n1001:\t\t\t\t\tFW_OPT_NOFALLBACK_SYSFS);\n1002:\t\tmodule_put(THIS_MODULE);\n1003:\t\treturn ret;\n1004:\t}\n1005:\tEXPORT_SYMBOL_GPL(request_firmware_direct);\n1006:\t\n1007:\t/**\n1008:\t * firmware_request_platform() - request firmware with platform-fw fallback\n1009:\t * @firmware: pointer to firmware image\n"
} |
| 42/3 | 2026/09/26 08:13 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6803 output: 132 thoughts: 1022 Thoughts: **Analysis of `request_firmware_direct` Impact on Uninitialized Memory** Okay, so I've been tasked with determining if this patch, which primarily swaps out `request_firmware` with `request_firmware_direct`, introduces any risks related to uninitialized memory. My initial impression is that it shouldn't, but let's be thorough. First, I see that `request_firmware_direct` essentially just sets `FW_OPT_NOFALLBACK_SYSFS` and `FW_OPT_NO_WARN` flags before calling `_request_firmware`. The critical question is whether this change alters memory management or introduces opportunities for uninitialized memory to be accessed. I need to make sure this replacement doesn't cause problems in `cxacru.c` and `speedtch.c`. I've examined the code in those two files. In `cxacru.c`, `cxacru_find_firmware` constructs a filename using `sprintf` and then calls `request_firmware_direct`. Similarly, in `speedtch.c`, `sprintf` constructs a filename based on the device's BCD device version and also calls `request_firmware_direct`. I'm paying close attention here. Specifically, I am checking for: * **Data sent to user space**: I'm not seeing any kernel structures being passed to user space. * **Conditional logic**: There are no control flows that depend on uninitialized variables. * **Memory allocation**: There are no allocation or initialization of complex data structures which might not be fully initialized. * **Buffer access**: No bounds checks or logic that could lead to uninitialized memory access. Critically, `request_firmware_direct` has the same signature and behavior as `request_firmware` with respect to how `*fw_p` is initialized. If the call fails, `*fw_p` remains NULL, or unchanged. On success, `*fw_p` points to a `struct firmware`. I am confident that there are no uninitialized memory risks, therefore, `NeedsKMSAN` should be set to false. I have double-checked the explicit criteria: * There are no structures sent to userspace. * There's no conditional logic that uses uninitialized variables. * No allocation of data structures happens. * There's no way to access uninitialized bytes of existing buffers. This is a replacement that prevents a fallback path for firmware loading, which has no risk of memory leak or uninitialized memory use. I'm now ready to call `set-results`. |
| 43/3 | 2026/09/26 08:13 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch modifies firmware loading calls in `cxacru.c` and `speedtch.c` from `request_firmware()` to `request_firmware_direct()`. This change avoids user-helper/sysfs fallback timeouts when searching for optional firmware files. It does not alter any buffer allocations, bounds, data initialization, or kernel-to-user memory transfers. No uninitialized memory usage or info-leak risks are introduced or affected; therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch modifies firmware loading calls in `cxacru.c` and `speedtch.c` from `request_firmware()` to `request_firmware_direct()`. This change avoids user-helper/sysfs fallback timeouts when searching for optional firmware files. It does not alter any buffer allocations, bounds, data initialization, or kernel-to-user memory transfers. No uninitialized memory usage or info-leak risks are introduced or affected; therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|