AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/19 06:09 flow patch-triage
1m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "KMSANReasoning": "",
  "NeedsKMSAN": false,
  "Reasoning": "The patch modifies error handling in the probe function and device teardown in the remove function of the Vitesse VSC73xx SPI Ethernet switch driver (drivers/net/dsa/vitesse-vsc73xx-spi.c) to fix spi_device reference leaks. This driver interacts with specific physical switch hardware (Vitesse VSC7385/7388/7395/7398) connected via SPI, which is structurally unreachable in standard virtualized environments (QEMU/GCE).",
  "WorthFuzzing": false
}

1/1 2026/09/19 06:09 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 37b99c04f4817a9c84fee9df3297d647cc31f02d\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sat Sep 19 06:09:21 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/dsa/vitesse-vsc73xx-spi.c b/drivers/net/dsa/vitesse-vsc73xx-spi.c\nindex 85b9a0f51dd89..7b784320c41e7 100644\n--- a/drivers/net/dsa/vitesse-vsc73xx-spi.c\n+++ b/drivers/net/dsa/vitesse-vsc73xx-spi.c\n@@ -153,10 +153,15 @@ static int vsc73xx_spi_probe(struct spi_device *spi)\n \tret = spi_setup(spi);\n \tif (ret \u003c 0) {\n \t\tdev_err(dev, \"spi setup failed.\\n\");\n+\t\tspi_dev_put(vsc_spi-\u003espi);\n \t\treturn ret;\n \t}\n \n-\treturn vsc73xx_probe(\u0026vsc_spi-\u003evsc);\n+\tret = vsc73xx_probe(\u0026vsc_spi-\u003evsc);\n+\tif (ret)\n+\t\tspi_dev_put(vsc_spi-\u003espi);\n+\n+\treturn ret;\n }\n \n static void vsc73xx_spi_remove(struct spi_device *spi)\n@@ -167,6 +172,8 @@ static void vsc73xx_spi_remove(struct spi_device *spi)\n \t\treturn;\n \n \tvsc73xx_remove(\u0026vsc_spi-\u003evsc);\n+\n+\tspi_dev_put(vsc_spi-\u003espi);\n }\n \n static void vsc73xx_spi_shutdown(struct spi_device *spi)\n"
}

2/1 2026/09/19 06:09 agent patch-evaluator
1m Model:
core

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies error handling in the probe function and device teardown in the remove function of the Vitesse VSC73xx SPI Ethernet switch driver (drivers/net/dsa/vitesse-vsc73xx-spi.c) to fix spi_device reference leaks. This driver interacts with specific physical switch hardware (Vitesse VSC7385/7388/7395/7398) connected via SPI, which is structurally unreachable in standard virtualized environments (QEMU/GCE).",
  "WorthFuzzing": false
}

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 37b99c04f4817a9c84fee9df3297d647cc31f02d
Author: syz-cluster <triage@syzkaller.com>
Date:   Sat Sep 19 06:09:21 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/dsa/vitesse-vsc73xx-spi.c b/drivers/net/dsa/vitesse-vsc73xx-spi.c
index 85b9a0f51dd89..7b784320c41e7 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-spi.c
+++ b/drivers/net/dsa/vitesse-vsc73xx-spi.c
@@ -153,10 +153,15 @@ static int vsc73xx_spi_probe(struct spi_device *spi)
 	ret = spi_setup(spi);
 	if (ret < 0) {
 		dev_err(dev, "spi setup failed.\n");
+		spi_dev_put(vsc_spi->spi);
 		return ret;
 	}
 
-	return vsc73xx_probe(&vsc_spi->vsc);
+	ret = vsc73xx_probe(&vsc_spi->vsc);
+	if (ret)
+		spi_dev_put(vsc_spi->spi);
+
+	return ret;
 }
 
 static void vsc73xx_spi_remove(struct spi_device *spi)
@@ -167,6 +172,8 @@ static void vsc73xx_spi_remove(struct spi_device *spi)
 		return;
 
 	vsc73xx_remove(&vsc_spi->vsc);
+
+	spi_dev_put(vsc_spi->spi);
 }
 
 static void vsc73xx_spi_shutdown(struct spi_device *spi)

3/2 2026/09/19 06:09 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 3090
							output: 47
							thoughts: 484
						

Thoughts:
**Analyzing the VSC73xx SPI Driver Patch**

Okay, let's take a look at this patch for the VSC73xx SPI driver, specifically targeting the amd64 architecture. The diff looks relatively straightforward, but let's make sure we understand the implications.

It appears the changes are concentrated around error handling in the probe and remove functions. I see an addition of `spi_dev_put(vsc_spi->spi);` in the `vsc73xx_spi_probe` function when `spi_setup` fails *or* when `vsc73xx_probe` fails. This is good; we need to make sure we release resources properly in case of an error during initialization. The same pattern is repeated in the `vsc73xx_spi_remove` function after calling `vsc73xx_remove`, which makes sense for proper cleanup during device removal. The `vsc73xx_spi_shutdown` function also calls the `spi_dev_put()` function.

So, this patch seems to be addressing a potential resource leak in the driver. If `spi_setup` or `vsc73xx_probe` fail, the SPI device was not being released, but now it is. And similarly the driver is making sure resources are always cleaned up on removal. This is a solid, albeit small, improvement. I'll need to double check the calling context of these functions, but on the face of it, this is a sensible and correct fix. I'm satisfied that these changes are not introducing any regressions and indeed improve the robustness of the driver. Let's approve it, it's a good change.



4/2 2026/09/19 06:09 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/vitesse-vsc73xx-spi.c",
  "FirstLine": 120,
  "LineCount": 70
}

Results:
{
  "Contents": " 120:\t\tcmd[1] = reg;\n 121:\t\n 122:\t\tbuf[0] = (val \u003e\u003e 24) \u0026 0xff;\n 123:\t\tbuf[1] = (val \u003e\u003e 16) \u0026 0xff;\n 124:\t\tbuf[2] = (val \u003e\u003e 8) \u0026 0xff;\n 125:\t\tbuf[3] = val \u0026 0xff;\n 126:\t\n 127:\t\tmutex_lock(\u0026vsc_spi-\u003elock);\n 128:\t\tret = spi_sync(vsc_spi-\u003espi, \u0026m);\n 129:\t\tmutex_unlock(\u0026vsc_spi-\u003elock);\n 130:\t\n 131:\t\treturn ret;\n 132:\t}\n 133:\t\n 134:\tstatic int vsc73xx_spi_probe(struct spi_device *spi)\n 135:\t{\n 136:\t\tstruct device *dev = \u0026spi-\u003edev;\n 137:\t\tstruct vsc73xx_spi *vsc_spi;\n 138:\t\tint ret;\n 139:\t\n 140:\t\tvsc_spi = devm_kzalloc(dev, sizeof(*vsc_spi), GFP_KERNEL);\n 141:\t\tif (!vsc_spi)\n 142:\t\t\treturn -ENOMEM;\n 143:\t\n 144:\t\tspi_set_drvdata(spi, vsc_spi);\n 145:\t\tvsc_spi-\u003espi = spi_dev_get(spi);\n 146:\t\tvsc_spi-\u003evsc.dev = dev;\n 147:\t\tvsc_spi-\u003evsc.priv = vsc_spi;\n 148:\t\tvsc_spi-\u003evsc.ops = \u0026vsc73xx_spi_ops;\n 149:\t\tmutex_init(\u0026vsc_spi-\u003elock);\n 150:\t\n 151:\t\tspi-\u003emode = SPI_MODE_0;\n 152:\t\tspi-\u003ebits_per_word = 8;\n 153:\t\tret = spi_setup(spi);\n 154:\t\tif (ret \u003c 0) {\n 155:\t\t\tdev_err(dev, \"spi setup failed.\\n\");\n 156:\t\t\tspi_dev_put(vsc_spi-\u003espi);\n 157:\t\t\treturn ret;\n 158:\t\t}\n 159:\t\n 160:\t\tret = vsc73xx_probe(\u0026vsc_spi-\u003evsc);\n 161:\t\tif (ret)\n 162:\t\t\tspi_dev_put(vsc_spi-\u003espi);\n 163:\t\n 164:\t\treturn ret;\n 165:\t}\n 166:\t\n 167:\tstatic void vsc73xx_spi_remove(struct spi_device *spi)\n 168:\t{\n 169:\t\tstruct vsc73xx_spi *vsc_spi = spi_get_drvdata(spi);\n 170:\t\n 171:\t\tif (!vsc_spi)\n 172:\t\t\treturn;\n 173:\t\n 174:\t\tvsc73xx_remove(\u0026vsc_spi-\u003evsc);\n 175:\t\n 176:\t\tspi_dev_put(vsc_spi-\u003espi);\n 177:\t}\n 178:\t\n 179:\tstatic void vsc73xx_spi_shutdown(struct spi_device *spi)\n 180:\t{\n 181:\t\tstruct vsc73xx_spi *vsc_spi = spi_get_drvdata(spi);\n 182:\t\n 183:\t\tif (!vsc_spi)\n 184:\t\t\treturn;\n 185:\t\n 186:\t\tvsc73xx_shutdown(\u0026vsc_spi-\u003evsc);\n 187:\t\n 188:\t\tspi_set_drvdata(spi, NULL);\n 189:\t}\n"
}

5/2 2026/09/19 06:09 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 5029
							output: 31
							thoughts: 62
						

Thoughts:
**Analyzing the Driver Code**

Okay, let's dive in. First, I need to identify which driver we're dealing with here. Ah, it looks like this is `drivers/net/dsa/vitesse-vsc73xx-spi.c`. So, what exactly is `vitesse-vsc73xx-spi`? Time to dig a bit deeper. I need to understand its role. Let's start with the Kconfig file to get a clearer picture of this driver and what features it enables. That's the best way to get a quick overview.



6/2 2026/09/19 06:09 tool grepper
0m Args:
{
  "Expression": "VSC73XX",
  "PathPrefix": "drivers/net/dsa"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1186 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/Kconfig=139=config NET_DSA_SMSC_LAN9303_MDIO\n--\ndrivers/net/dsa/Kconfig-146-\ndrivers/net/dsa/Kconfig:147:config NET_DSA_VITESSE_VSC73XX\ndrivers/net/dsa/Kconfig-148-\ttristate\ndrivers/net/dsa/Kconfig:149:\tselect NET_DSA_TAG_VSC73XX_8021Q\ndrivers/net/dsa/Kconfig-150-\tselect FIXED_PHY\n--\ndrivers/net/dsa/Kconfig-156-\ndrivers/net/dsa/Kconfig:157:config NET_DSA_VITESSE_VSC73XX_SPI\ndrivers/net/dsa/Kconfig-158-\ttristate \"Vitesse VSC7385/7388/7395/7398 SPI mode support\"\ndrivers/net/dsa/Kconfig-159-\tdepends on SPI\ndrivers/net/dsa/Kconfig:160:\tselect NET_DSA_VITESSE_VSC73XX\ndrivers/net/dsa/Kconfig-161-\thelp\n--\ndrivers/net/dsa/Kconfig-164-\ndrivers/net/dsa/Kconfig:165:config NET_DSA_VITESSE_VSC73XX_PLATFORM\ndrivers/net/dsa/Kconfig-166-\ttristate \"Vitesse VSC7385/7388/7395/7398 Platform mode support\"\ndrivers/net/dsa/Kconfig-167-\tdepends on HAS_IOMEM\ndrivers/net/dsa/Kconfig:168:\tselect NET_DSA_VITESSE_VSC73XX\ndrivers/net/dsa/Kconfig-169-\thelp\n--\ndrivers/net/dsa/Makefile=14=obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o\ndrivers/net/dsa/Makefile:15:obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX) += vitesse-vsc73xx-core.o\ndrivers/net/dsa/Makefile:16:obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM) += vitesse-vsc73xx-platform.o\ndrivers/net/dsa/Makefile:17:obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o\ndrivers/net/dsa/Makefile-18-obj-y\t\t\t\t+= b53/\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-35-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:36:#define VSC73XX_BLOCK_MAC\t0x1 /* Subblocks 0-4, 6 (CPU port) */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:37:#define VSC73XX_BLOCK_ANALYZER\t0x2 /* Only subblock 0 */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:38:#define VSC73XX_BLOCK_MII\t0x3 /* Subblocks 0 and 1 */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:39:#define VSC73XX_BLOCK_MEMINIT\t0x3 /* Only subblock 2 */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:40:#define VSC73XX_BLOCK_CAPTURE\t0x4 /* Subblocks 0-4, 6, 7 */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:41:#define VSC73XX_BLOCK_ARBITER\t0x5 /* Only subblock 0 */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:42:#define VSC73XX_BLOCK_SYSTEM\t0x7 /* Only subblock 0 */\ndrivers/net/dsa/vitesse-vsc73xx-core.c-43-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-44-/* MII Block subblock */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:45:#define VSC73XX_BLOCK_MII_INTERNAL\t0x0 /* Internal MDIO subblock */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:46:#define VSC73XX_BLOCK_MII_EXTERNAL\t0x1 /* External MDIO subblock */\ndrivers/net/dsa/vitesse-vsc73xx-core.c-47-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-48-#define CPU_PORT\t6 /* CPU port */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:49:#define VSC73XX_NUM_FDB_ROWS\t2048\ndrivers/net/dsa/vitesse-vsc73xx-core.c:50:#define VSC73XX_NUM_BUCKETS\t4\ndrivers/net/dsa/vitesse-vsc73xx-core.c-51-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-52-/* MAC Block registers */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:53:#define VSC73XX_MAC_CFG\t\t0x00\ndrivers/net/dsa/vitesse-vsc73xx-core.c:54:#define VSC73XX_MACHDXGAP\t0x02\ndrivers/net/dsa/vitesse-vsc73xx-core.c:55:#define VSC73XX_FCCONF\t\t0x04\ndrivers/net/dsa/vitesse-vsc73xx-core.c:56:#define VSC73XX_FCMACHI\t\t0x08\ndrivers/net/dsa/vitesse-vsc73xx-core.c:57:#define VSC73XX_FCMACLO\t\t0x0c\ndrivers/net/dsa/vitesse-vsc73xx-core.c:58:#define VSC73XX_MAXLEN\t\t0x10\ndrivers/net/dsa/vitesse-vsc73xx-core.c:59:#define VSC73XX_ADVPORTM\t0x19\ndrivers/net/dsa/vitesse-vsc73xx-core.c:60:#define VSC73XX_TXUPDCFG\t0x24\ndrivers/net/dsa/vitesse-vsc73xx-core.c:61:#define VSC73XX_TXQ_SELECT_CFG\t0x28\ndrivers/net/dsa/vitesse-vsc73xx-core.c:62:#define VSC73XX_RXOCT\t\t0x50\ndrivers/net/dsa/vitesse-vsc73xx-core.c:63:#define VSC73XX_TXOCT\t\t0x51\ndrivers/net/dsa/vitesse-vsc73xx-core.c:64:#define VSC73XX_C_RX0\t\t0x52\ndrivers/net/dsa/vitesse-vsc73xx-core.c:65:#define VSC73XX_C_RX1\t\t0x53\ndrivers/net/dsa/vitesse-vsc73xx-core.c:66:#define VSC73XX_C_RX2\t\t0x54\ndrivers/net/dsa/vitesse-vsc73xx-core.c:67:#define VSC73XX_C_TX0\t\t0x55\ndrivers/net/dsa/vitesse-vsc73xx-core.c:68:#define VSC73XX_C_TX1\t\t0x56\ndrivers/net/dsa/vitesse-vsc73xx-core.c:69:#define VSC73XX_C_TX2\t\t0x57\ndrivers/net/dsa/vitesse-vsc73xx-core.c:70:#define VSC73XX_C_CFG\t\t0x58\ndrivers/net/dsa/vitesse-vsc73xx-core.c:71:#define VSC73XX_CAT_DROP\t0x6e\ndrivers/net/dsa/vitesse-vsc73xx-core.c:72:#define VSC73XX_CAT_PR_MISC_L2\t0x6f\ndrivers/net/dsa/vitesse-vsc73xx-core.c:73:#define VSC73XX_CAT_PR_USR_PRIO\t0x75\ndrivers/net/dsa/vitesse-vsc73xx-core.c:74:#define VSC73XX_CAT_VLAN_MISC\t0x79\ndrivers/net/dsa/vitesse-vsc73xx-core.c:75:#define VSC73XX_CAT_PORT_VLAN\t0x7a\ndrivers/net/dsa/vitesse-vsc73xx-core.c:76:#define VSC73XX_Q_MISC_CONF\t0xdf\ndrivers/net/dsa/vitesse-vsc73xx-core.c-77-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-78-/* MAC_CFG register bits */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:79:#define VSC73XX_MAC_CFG_WEXC_DIS\tBIT(31)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:80:#define VSC73XX_MAC_CFG_PORT_RST\tBIT(29)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:81:#define VSC73XX_MAC_CFG_TX_EN\t\tBIT(28)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:82:#define VSC73XX_MAC_CFG_SEED_LOAD\tBIT(27)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:83:#define VSC73XX_MAC_CFG_SEED_MASK\tGENMASK(26, 19)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:84:#define VSC73XX_MAC_CFG_SEED_OFFSET\t19\ndrivers/net/dsa/vitesse-vsc73xx-core.c:85:#define VSC73XX_MAC_CFG_FDX\t\tBIT(18)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:86:#define VSC73XX_MAC_CFG_GIGA_MODE\tBIT(17)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:87:#define VSC73XX_MAC_CFG_RX_EN\t\tBIT(16)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:88:#define VSC73XX_MAC_CFG_VLAN_DBLAWR\tBIT(15)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:89:#define VSC73XX_MAC_CFG_VLAN_AWR\tBIT(14)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:90:#define VSC73XX_MAC_CFG_100_BASE_T\tBIT(13) /* Not in manual */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:91:#define VSC73XX_MAC_CFG_TX_IPG_MASK\tGENMASK(10, 6)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:92:#define VSC73XX_MAC_CFG_TX_IPG_OFFSET\t6\ndrivers/net/dsa/vitesse-vsc73xx-core.c:93:#define VSC73XX_MAC_CFG_TX_IPG_1000M\t(6 \u003c\u003c VSC73XX_MAC_CFG_TX_IPG_OFFSET)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:94:#define VSC73XX_MAC_CFG_TX_IPG_100_10M\t(17 \u003c\u003c VSC73XX_MAC_CFG_TX_IPG_OFFSET)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:95:#define VSC73XX_MAC_CFG_MAC_RX_RST\tBIT(5)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:96:#define VSC73XX_MAC_CFG_MAC_TX_RST\tBIT(4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:97:#define VSC73XX_MAC_CFG_CLK_SEL_MASK\tGENMASK(2, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:98:#define VSC73XX_MAC_CFG_CLK_SEL_OFFSET\t0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:99:#define VSC73XX_MAC_CFG_CLK_SEL_1000M\t1\ndrivers/net/dsa/vitesse-vsc73xx-core.c:100:#define VSC73XX_MAC_CFG_CLK_SEL_100M\t2\ndrivers/net/dsa/vitesse-vsc73xx-core.c:101:#define VSC73XX_MAC_CFG_CLK_SEL_10M\t3\ndrivers/net/dsa/vitesse-vsc73xx-core.c:102:#define VSC73XX_MAC_CFG_CLK_SEL_EXT\t4\ndrivers/net/dsa/vitesse-vsc73xx-core.c-103-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:104:#define VSC73XX_MAC_CFG_1000M_F_PHY\t(VSC73XX_MAC_CFG_FDX | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:105:\t\t\t\t\t VSC73XX_MAC_CFG_GIGA_MODE | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:106:\t\t\t\t\t VSC73XX_MAC_CFG_TX_IPG_1000M | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:107:\t\t\t\t\t VSC73XX_MAC_CFG_CLK_SEL_EXT)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:108:#define VSC73XX_MAC_CFG_100_10M_F_PHY\t(VSC73XX_MAC_CFG_FDX | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:109:\t\t\t\t\t VSC73XX_MAC_CFG_TX_IPG_100_10M | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:110:\t\t\t\t\t VSC73XX_MAC_CFG_CLK_SEL_EXT)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:111:#define VSC73XX_MAC_CFG_100_10M_H_PHY\t(VSC73XX_MAC_CFG_TX_IPG_100_10M | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:112:\t\t\t\t\t VSC73XX_MAC_CFG_CLK_SEL_EXT)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:113:#define VSC73XX_MAC_CFG_1000M_F_RGMII\t(VSC73XX_MAC_CFG_FDX | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:114:\t\t\t\t\t VSC73XX_MAC_CFG_GIGA_MODE | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:115:\t\t\t\t\t VSC73XX_MAC_CFG_TX_IPG_1000M | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:116:\t\t\t\t\t VSC73XX_MAC_CFG_CLK_SEL_1000M)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:117:#define VSC73XX_MAC_CFG_RESET\t\t(VSC73XX_MAC_CFG_PORT_RST | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:118:\t\t\t\t\t VSC73XX_MAC_CFG_MAC_RX_RST | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:119:\t\t\t\t\t VSC73XX_MAC_CFG_MAC_TX_RST)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-120-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-121-/* Flow control register bits */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:122:#define VSC73XX_FCCONF_ZERO_PAUSE_EN\tBIT(17)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:123:#define VSC73XX_FCCONF_FLOW_CTRL_OBEY\tBIT(16)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:124:#define VSC73XX_FCCONF_PAUSE_VAL_MASK\tGENMASK(15, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-125-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-126-/* ADVPORTM advanced port setup register bits */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:127:#define VSC73XX_ADVPORTM_IFG_PPM\tBIT(7)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:128:#define VSC73XX_ADVPORTM_EXC_COL_CONT\tBIT(6)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:129:#define VSC73XX_ADVPORTM_EXT_PORT\tBIT(5)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:130:#define VSC73XX_ADVPORTM_INV_GTX\tBIT(4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:131:#define VSC73XX_ADVPORTM_ENA_GTX\tBIT(3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:132:#define VSC73XX_ADVPORTM_DDR_MODE\tBIT(2)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:133:#define VSC73XX_ADVPORTM_IO_LOOPBACK\tBIT(1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:134:#define VSC73XX_ADVPORTM_HOST_LOOPBACK\tBIT(0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-135-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-136-/*  TXUPDCFG transmit modify setup bits */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:137:#define VSC73XX_TXUPDCFG_DSCP_REWR_MODE\tGENMASK(20, 19)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:138:#define VSC73XX_TXUPDCFG_DSCP_REWR_ENA\tBIT(18)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:139:#define VSC73XX_TXUPDCFG_TX_INT_TO_USRPRIO_ENA\tBIT(17)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:140:#define VSC73XX_TXUPDCFG_TX_UNTAGGED_VID\tGENMASK(15, 4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:141:#define VSC73XX_TXUPDCFG_TX_UNTAGGED_VID_ENA\tBIT(3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:142:#define VSC73XX_TXUPDCFG_TX_UPDATE_CRC_CPU_ENA\tBIT(1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:143:#define VSC73XX_TXUPDCFG_TX_INSERT_TAG\tBIT(0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-144-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:145:#define VSC73XX_TXUPDCFG_TX_UNTAGGED_VID_SHIFT\t4\ndrivers/net/dsa/vitesse-vsc73xx-core.c-146-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-147-/* CAT_DROP categorizer frame dropping register bits */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:148:#define VSC73XX_CAT_DROP_DROP_MC_SMAC_ENA\tBIT(6)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:149:#define VSC73XX_CAT_DROP_FWD_CTRL_ENA\t\tBIT(4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:150:#define VSC73XX_CAT_DROP_FWD_PAUSE_ENA\t\tBIT(3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:151:#define VSC73XX_CAT_DROP_UNTAGGED_ENA\t\tBIT(2)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:152:#define VSC73XX_CAT_DROP_TAGGED_ENA\t\tBIT(1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:153:#define VSC73XX_CAT_DROP_NULL_MAC_ENA\t\tBIT(0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-154-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:155:#define VSC73XX_Q_MISC_CONF_EXTENT_MEM\t\tBIT(31)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:156:#define VSC73XX_Q_MISC_CONF_EARLY_TX_MASK\tGENMASK(4, 1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:157:#define VSC73XX_Q_MISC_CONF_EARLY_TX_512\t(1 \u003c\u003c 1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:158:#define VSC73XX_Q_MISC_CONF_MAC_PAUSE_MODE\tBIT(0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-159-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-160-/* CAT_VLAN_MISC categorizer VLAN miscellaneous bits */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:161:#define VSC73XX_CAT_VLAN_MISC_VLAN_TCI_IGNORE_ENA BIT(8)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:162:#define VSC73XX_CAT_VLAN_MISC_VLAN_KEEP_TAG_ENA BIT(7)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-163-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-164-/* CAT_PORT_VLAN categorizer port VLAN */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:165:#define VSC73XX_CAT_PORT_VLAN_VLAN_CFI BIT(15)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:166:#define VSC73XX_CAT_PORT_VLAN_VLAN_USR_PRIO GENMASK(14, 12)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:167:#define VSC73XX_CAT_PORT_VLAN_VLAN_VID GENMASK(11, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-168-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-169-/* Frame analyzer block 2 registers */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:170:#define VSC73XX_STORMLIMIT\t0x02\ndrivers/net/dsa/vitesse-vsc73xx-core.c:171:#define VSC73XX_ADVLEARN\t0x03\ndrivers/net/dsa/vitesse-vsc73xx-core.c:172:#define VSC73XX_IFLODMSK\t0x04\ndrivers/net/dsa/vitesse-vsc73xx-core.c:173:#define VSC73XX_VLANMASK\t0x05\ndrivers/net/dsa/vitesse-vsc73xx-core.c:174:#define VSC73XX_MACHDATA\t0x06\ndrivers/net/dsa/vitesse-vsc73xx-core.c:175:#define VSC73XX_MACLDATA\t0x07\ndrivers/net/dsa/vitesse-vsc73xx-core.c:176:#define VSC73XX_ANMOVED\t\t0x08\ndrivers/net/dsa/vitesse-vsc73xx-core.c:177:#define VSC73XX_ANAGEFIL\t0x09\ndrivers/net/dsa/vitesse-vsc73xx-core.c:178:#define VSC73XX_ANEVENTS\t0x0a\ndrivers/net/dsa/vitesse-vsc73xx-core.c:179:#define VSC73XX_ANCNTMASK\t0x0b\ndrivers/net/dsa/vitesse-vsc73xx-core.c:180:#define VSC73XX_ANCNTVAL\t0x0c\ndrivers/net/dsa/vitesse-vsc73xx-core.c:181:#define VSC73XX_LEARNMASK\t0x0d\ndrivers/net/dsa/vitesse-vsc73xx-core.c:182:#define VSC73XX_UFLODMASK\t0x0e\ndrivers/net/dsa/vitesse-vsc73xx-core.c:183:#define VSC73XX_MFLODMASK\t0x0f\ndrivers/net/dsa/vitesse-vsc73xx-core.c:184:#define VSC73XX_RECVMASK\t0x10\ndrivers/net/dsa/vitesse-vsc73xx-core.c:185:#define VSC73XX_AGGRCTRL\t0x20\ndrivers/net/dsa/vitesse-vsc73xx-core.c:186:#define VSC73XX_AGGRMSKS\t0x30 /* Until 0x3f */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:187:#define VSC73XX_DSTMASKS\t0x40 /* Until 0x7f */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:188:#define VSC73XX_SRCMASKS\t0x80 /* Until 0x87 */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:189:#define VSC73XX_CAPENAB\t\t0xa0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:190:#define VSC73XX_MACACCESS\t0xb0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:191:#define VSC73XX_IPMCACCESS\t0xb1\ndrivers/net/dsa/vitesse-vsc73xx-core.c:192:#define VSC73XX_MACTINDX\t0xc0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:193:#define VSC73XX_VLANACCESS\t0xd0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:194:#define VSC73XX_VLANTIDX\t0xe0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:195:#define VSC73XX_AGENCTRL\t0xf0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:196:#define VSC73XX_CAPRST\t\t0xff\ndrivers/net/dsa/vitesse-vsc73xx-core.c-197-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:198:#define VSC73XX_SRCMASKS_CPU_COPY\t\tBIT(27)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:199:#define VSC73XX_SRCMASKS_MIRROR\t\t\tBIT(26)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:200:#define VSC73XX_SRCMASKS_PORTS_MASK\t\tGENMASK(7, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-201-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:202:#define VSC73XX_MACHDATA_VID\t\t\tGENMASK(27, 16)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:203:#define VSC73XX_MACHDATA_MAC0\t\t\tGENMASK(15, 8)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:204:#define VSC73XX_MACHDATA_MAC1\t\t\tGENMASK(7, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:205:#define VSC73XX_MACLDATA_MAC2\t\t\tGENMASK(31, 24)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:206:#define VSC73XX_MACLDATA_MAC3\t\t\tGENMASK(23, 16)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:207:#define VSC73XX_MACLDATA_MAC4\t\t\tGENMASK(15, 8)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:208:#define VSC73XX_MACLDATA_MAC5\t\t\tGENMASK(7, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-209-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:210:#define VSC73XX_HASH0_VID_FROM_MASK\t\tGENMASK(5, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:211:#define VSC73XX_HASH0_MAC0_FROM_MASK\t\tGENMASK(7, 4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:212:#define VSC73XX_HASH1_MAC0_FROM_MASK\t\tGENMASK(3, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:213:#define VSC73XX_HASH1_MAC1_FROM_MASK\t\tGENMASK(7, 1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:214:#define VSC73XX_HASH2_MAC1_FROM_MASK\t\tBIT(0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:215:#define VSC73XX_HASH2_MAC2_FROM_MASK\t\tGENMASK(7, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:216:#define VSC73XX_HASH2_MAC3_FROM_MASK\t\tGENMASK(7, 6)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:217:#define VSC73XX_HASH3_MAC3_FROM_MASK\t\tGENMASK(5, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:218:#define VSC73XX_HASH3_MAC4_FROM_MASK\t\tGENMASK(7, 3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:219:#define VSC73XX_HASH4_MAC4_FROM_MASK\t\tGENMASK(2, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-220-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:221:#define VSC73XX_HASH0_VID_TO_MASK\t\tGENMASK(9, 4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:222:#define VSC73XX_HASH0_MAC0_TO_MASK\t\tGENMASK(3, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:223:#define VSC73XX_HASH1_MAC0_TO_MASK\t\tGENMASK(10, 7)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:224:#define VSC73XX_HASH1_MAC1_TO_MASK\t\tGENMASK(6, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:225:#define VSC73XX_HASH2_MAC1_TO_MASK\t\tBIT(10)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:226:#define VSC73XX_HASH2_MAC2_TO_MASK\t\tGENMASK(9, 2)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:227:#define VSC73XX_HASH2_MAC3_TO_MASK\t\tGENMASK(1, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:228:#define VSC73XX_HASH3_MAC3_TO_MASK\t\tGENMASK(10, 5)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:229:#define VSC73XX_HASH3_MAC4_TO_MASK\t\tGENMASK(4, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:230:#define VSC73XX_HASH4_MAC4_TO_MASK\t\tGENMASK(10, 8)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-231-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:232:#define VSC73XX_MACTINDX_SHADOW\t\t\tBIT(13)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:233:#define VSC73XX_MACTINDX_BUCKET_MSK\t\tGENMASK(12, 11)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:234:#define VSC73XX_MACTINDX_INDEX_MSK\t\tGENMASK(10, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-235-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:236:#define VSC73XX_MACACCESS_CPU_COPY\t\tBIT(14)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:237:#define VSC73XX_MACACCESS_FWD_KILL\t\tBIT(13)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:238:#define VSC73XX_MACACCESS_IGNORE_VLAN\t\tBIT(12)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:239:#define VSC73XX_MACACCESS_AGED_FLAG\t\tBIT(11)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:240:#define VSC73XX_MACACCESS_VALID\t\t\tBIT(10)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:241:#define VSC73XX_MACACCESS_LOCKED\t\tBIT(9)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:242:#define VSC73XX_MACACCESS_DEST_IDX_MASK\t\tGENMASK(8, 3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:243:#define VSC73XX_MACACCESS_CMD_MASK\t\tGENMASK(2, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:244:#define VSC73XX_MACACCESS_CMD_IDLE\t\t0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:245:#define VSC73XX_MACACCESS_CMD_LEARN\t\t1\ndrivers/net/dsa/vitesse-vsc73xx-core.c:246:#define VSC73XX_MACACCESS_CMD_FORGET\t\t2\ndrivers/net/dsa/vitesse-vsc73xx-core.c:247:#define VSC73XX_MACACCESS_CMD_AGE_TABLE\t\t3\ndrivers/net/dsa/vitesse-vsc73xx-core.c:248:#define VSC73XX_MACACCESS_CMD_FLUSH_TABLE\t4\ndrivers/net/dsa/vitesse-vsc73xx-core.c:249:#define VSC73XX_MACACCESS_CMD_CLEAR_TABLE\t5\ndrivers/net/dsa/vitesse-vsc73xx-core.c:250:#define VSC73XX_MACACCESS_CMD_READ_ENTRY\t6\ndrivers/net/dsa/vitesse-vsc73xx-core.c:251:#define VSC73XX_MACACCESS_CMD_WRITE_ENTRY\t7\ndrivers/net/dsa/vitesse-vsc73xx-core.c-252-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:253:#define VSC73XX_VLANACCESS_LEARN_DISABLED\tBIT(30)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:254:#define VSC73XX_VLANACCESS_VLAN_MIRROR\t\tBIT(29)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:255:#define VSC73XX_VLANACCESS_VLAN_SRC_CHECK\tBIT(28)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:256:#define VSC73XX_VLANACCESS_VLAN_PORT_MASK\tGENMASK(9, 2)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:257:#define VSC73XX_VLANACCESS_VLAN_PORT_MASK_SHIFT\t2\ndrivers/net/dsa/vitesse-vsc73xx-core.c:258:#define VSC73XX_VLANACCESS_VLAN_TBL_CMD_MASK\tGENMASK(1, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:259:#define VSC73XX_VLANACCESS_VLAN_TBL_CMD_IDLE\t0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:260:#define VSC73XX_VLANACCESS_VLAN_TBL_CMD_READ_ENTRY\t1\ndrivers/net/dsa/vitesse-vsc73xx-core.c:261:#define VSC73XX_VLANACCESS_VLAN_TBL_CMD_WRITE_ENTRY\t2\ndrivers/net/dsa/vitesse-vsc73xx-core.c:262:#define VSC73XX_VLANACCESS_VLAN_TBL_CMD_CLEAR_TABLE\t3\ndrivers/net/dsa/vitesse-vsc73xx-core.c-263-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-264-/* MII block 3 registers */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:265:#define VSC73XX_MII_STAT\t\t0x0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:266:#define VSC73XX_MII_CMD\t\t\t0x1\ndrivers/net/dsa/vitesse-vsc73xx-core.c:267:#define VSC73XX_MII_DATA\t\t0x2\ndrivers/net/dsa/vitesse-vsc73xx-core.c:268:#define VSC73XX_MII_MPRES\t\t0x3\ndrivers/net/dsa/vitesse-vsc73xx-core.c-269-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:270:#define VSC73XX_MII_STAT_BUSY\t\tBIT(3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:271:#define VSC73XX_MII_STAT_READ\t\tBIT(2)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:272:#define VSC73XX_MII_STAT_WRITE\t\tBIT(1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-273-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:274:#define VSC73XX_MII_CMD_SCAN\t\tBIT(27)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:275:#define VSC73XX_MII_CMD_OPERATION\tBIT(26)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:276:#define VSC73XX_MII_CMD_PHY_ADDR\tGENMASK(25, 21)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:277:#define VSC73XX_MII_CMD_PHY_REG\t\tGENMASK(20, 16)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:278:#define VSC73XX_MII_CMD_WRITE_DATA\tGENMASK(15, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-279-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:280:#define VSC73XX_MII_DATA_FAILURE\tBIT(16)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:281:#define VSC73XX_MII_DATA_READ_DATA\tGENMASK(15, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-282-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:283:#define VSC73XX_MII_MPRES_NOPREAMBLE\tBIT(6)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:284:#define VSC73XX_MII_MPRES_PRESCALEVAL\tGENMASK(5, 0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:285:#define VSC73XX_MII_PRESCALEVAL_MIN\t3 /* min allowed mdio clock prescaler */\ndrivers/net/dsa/vitesse-vsc73xx-core.c-286-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:287:#define VSC73XX_MII_STAT_BUSY\tBIT(3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-288-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-289-/* Arbiter block 5 registers */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:290:#define VSC73XX_ARBEMPTY\t\t0x0c\ndrivers/net/dsa/vitesse-vsc73xx-core.c:291:#define VSC73XX_ARBDISC\t\t\t0x0e\ndrivers/net/dsa/vitesse-vsc73xx-core.c:292:#define VSC73XX_SBACKWDROP\t\t0x12\ndrivers/net/dsa/vitesse-vsc73xx-core.c:293:#define VSC73XX_DBACKWDROP\t\t0x13\ndrivers/net/dsa/vitesse-vsc73xx-core.c:294:#define VSC73XX_ARBBURSTPROB\t\t0x15\ndrivers/net/dsa/vitesse-vsc73xx-core.c-295-\ndrivers/net/dsa/vitesse-vsc73xx-core.c-296-/* System block 7 registers */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:297:#define VSC73XX_ICPU_SIPAD\t\t0x01\ndrivers/net/dsa/vitesse-vsc73xx-core.c:298:#define VSC73XX_GMIIDELAY\t\t0x05\ndrivers/net/dsa/vitesse-vsc73xx-core.c:299:#define VSC73XX_ICPU_CTRL\t\t0x10\ndrivers/net/dsa/vitesse-vsc73xx-core.c:300:#define VSC73XX_ICPU_ADDR\t\t0x11\ndrivers/net/dsa/vitesse-vsc73xx-core.c:301:#define VSC73XX_ICPU_SRAM\t\t0x12\ndrivers/net/dsa/vitesse-vsc73xx-core.c:302:#define VSC73XX_HWSEM\t\t\t0x13\ndrivers/net/dsa/vitesse-vsc73xx-core.c:303:#define VSC73XX_GLORESET\t\t0x14\ndrivers/net/dsa/vitesse-vsc73xx-core.c:304:#define VSC73XX_ICPU_MBOX_VAL\t\t0x15\ndrivers/net/dsa/vitesse-vsc73xx-core.c:305:#define VSC73XX_ICPU_MBOX_SET\t\t0x16\ndrivers/net/dsa/vitesse-vsc73xx-core.c:306:#define VSC73XX_ICPU_MBOX_CLR\t\t0x17\ndrivers/net/dsa/vitesse-vsc73xx-core.c:307:#define VSC73XX_CHIPID\t\t\t0x18\ndrivers/net/dsa/vitesse-vsc73xx-core.c:308:#define VSC73XX_GPIO\t\t\t0x34\ndrivers/net/dsa/vitesse-vsc73xx-core.c-309-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:310:#define VSC73XX_GMIIDELAY_GMII0_GTXDELAY_NONE\t0\ndrivers/net/dsa/vitesse-vsc73xx-core.c:311:#define VSC73XX_GMIIDELAY_GMII0_GTXDELAY_1_4_NS\t1\ndrivers/net/dsa/vitesse-vsc73xx-core.c:312:#define VSC73XX_GMIIDELAY_GMII0_GTXDELAY_1_7_NS\t2\ndrivers/net/dsa/vitesse-vsc73xx-core.c:313:#define VSC73XX_GMIIDELAY_GMII0_GTXDELAY_2_0_NS\t3\ndrivers/net/dsa/vitesse-vsc73xx-core.c-314-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:315:#define VSC73XX_GMIIDELAY_GMII0_RXDELAY_NONE\t(0 \u003c\u003c 4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:316:#define VSC73XX_GMIIDELAY_GMII0_RXDELAY_1_4_NS\t(1 \u003c\u003c 4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:317:#define VSC73XX_GMIIDELAY_GMII0_RXDELAY_1_7_NS\t(2 \u003c\u003c 4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:318:#define VSC73XX_GMIIDELAY_GMII0_RXDELAY_2_0_NS\t(3 \u003c\u003c 4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-319-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:320:#define VSC73XX_ICPU_CTRL_WATCHDOG_RST\tBIT(31)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:321:#define VSC73XX_ICPU_CTRL_CLK_DIV_MASK\tGENMASK(12, 8)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:322:#define VSC73XX_ICPU_CTRL_SRST_HOLD\tBIT(7)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:323:#define VSC73XX_ICPU_CTRL_ICPU_PI_EN\tBIT(6)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:324:#define VSC73XX_ICPU_CTRL_BOOT_EN\tBIT(3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:325:#define VSC73XX_ICPU_CTRL_EXT_ACC_EN\tBIT(2)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:326:#define VSC73XX_ICPU_CTRL_CLK_EN\tBIT(1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:327:#define VSC73XX_ICPU_CTRL_SRST\t\tBIT(0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-328-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:329:#define VSC73XX_CHIPID_ID_SHIFT\t\t12\ndrivers/net/dsa/vitesse-vsc73xx-core.c:330:#define VSC73XX_CHIPID_ID_MASK\t\t0xffff\ndrivers/net/dsa/vitesse-vsc73xx-core.c:331:#define VSC73XX_CHIPID_REV_SHIFT\t28\ndrivers/net/dsa/vitesse-vsc73xx-core.c:332:#define VSC73XX_CHIPID_REV_MASK\t\t0xf\ndrivers/net/dsa/vitesse-vsc73xx-core.c:333:#define VSC73XX_CHIPID_ID_7385\t\t0x7385\ndrivers/net/dsa/vitesse-vsc73xx-core.c:334:#define VSC73XX_CHIPID_ID_7388\t\t0x7388\ndrivers/net/dsa/vitesse-vsc73xx-core.c:335:#define VSC73XX_CHIPID_ID_7395\t\t0x7395\ndrivers/net/dsa/vitesse-vsc73xx-core.c:336:#define VSC73XX_CHIPID_ID_7398\t\t0x7398\ndrivers/net/dsa/vitesse-vsc73xx-core.c-337-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:338:#define VSC73XX_GLORESET_STROBE\t\tBIT(4)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:339:#define VSC73XX_GLORESET_ICPU_LOCK\tBIT(3)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:340:#define VSC73XX_GLORESET_MEM_LOCK\tBIT(2)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:341:#define VSC73XX_GLORESET_PHY_RESET\tBIT(1)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:342:#define VSC73XX_GLORESET_MASTER_RESET\tBIT(0)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-343-\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-346-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:347:#define VSC73XX_ICPU_CTRL_STOP\t(VSC73XX_ICPU_CTRL_SRST_HOLD | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:348:\t\t\t\t VSC73XX_ICPU_CTRL_BOOT_EN | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:349:\t\t\t\t VSC73XX_ICPU_CTRL_EXT_ACC_EN)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-350-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:351:#define VSC73XX_ICPU_CTRL_START\t(VSC73XX_ICPU_CTRL_CLK_DIV | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:352:\t\t\t\t VSC73XX_ICPU_CTRL_BOOT_EN | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:353:\t\t\t\t VSC73XX_ICPU_CTRL_CLK_EN | \\\ndrivers/net/dsa/vitesse-vsc73xx-core.c:354:\t\t\t\t VSC73XX_ICPU_CTRL_SRST)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-355-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:356:#define IS_7385(a) ((a)-\u003echipid == VSC73XX_CHIPID_ID_7385)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:357:#define IS_7388(a) ((a)-\u003echipid == VSC73XX_CHIPID_ID_7388)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:358:#define IS_7395(a) ((a)-\u003echipid == VSC73XX_CHIPID_ID_7395)\ndrivers/net/dsa/vitesse-vsc73xx-core.c:359:#define IS_7398(a) ((a)-\u003echipid == VSC73XX_CHIPID_ID_7398)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-360-#define IS_739X(a) (IS_7395(a) || IS_7398(a))\ndrivers/net/dsa/vitesse-vsc73xx-core.c-361-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:362:#define VSC73XX_POLL_SLEEP_US\t\t1000\ndrivers/net/dsa/vitesse-vsc73xx-core.c:363:#define VSC73XX_MDIO_POLL_SLEEP_US\t5\ndrivers/net/dsa/vitesse-vsc73xx-core.c:364:#define VSC73XX_POLL_TIMEOUT_US\t\t10000\ndrivers/net/dsa/vitesse-vsc73xx-core.c-365-\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=449=enum vsc73xx_port_vlan_conf {\ndrivers/net/dsa/vitesse-vsc73xx-core.c:450:\tVSC73XX_VLAN_FILTER,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:451:\tVSC73XX_VLAN_FILTER_UNTAG_ALL,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:452:\tVSC73XX_VLAN_IGNORE,\ndrivers/net/dsa/vitesse-vsc73xx-core.c-453-};\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=455=int vsc73xx_is_addr_valid(u8 block, u8 subblock)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-457-\tswitch (block) {\ndrivers/net/dsa/vitesse-vsc73xx-core.c:458:\tcase VSC73XX_BLOCK_MAC:\ndrivers/net/dsa/vitesse-vsc73xx-core.c-459-\t\tswitch (subblock) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-465-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:466:\tcase VSC73XX_BLOCK_ANALYZER:\ndrivers/net/dsa/vitesse-vsc73xx-core.c:467:\tcase VSC73XX_BLOCK_SYSTEM:\ndrivers/net/dsa/vitesse-vsc73xx-core.c-468-\t\tswitch (subblock) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-473-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:474:\tcase VSC73XX_BLOCK_MII:\ndrivers/net/dsa/vitesse-vsc73xx-core.c:475:\tcase VSC73XX_BLOCK_ARBITER:\ndrivers/net/dsa/vitesse-vsc73xx-core.c-476-\t\tswitch (subblock) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-480-\t\tbreak;\ndrivers/net/dsa/vitesse-vsc73xx-core.c:481:\tcase VSC73XX_BLOCK_CAPTURE:\ndrivers/net/dsa/vitesse-vsc73xx-core.c-482-\t\tswitch (subblock) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=521=static int vsc73xx_detect(struct vsc73xx *vsc)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-529-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:530:\tret = vsc73xx_read(vsc, VSC73XX_BLOCK_SYSTEM, 0,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:531:\t\t\t   VSC73XX_ICPU_MBOX_VAL, \u0026val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-532-\tif (ret) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-541-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:542:\tret = vsc73xx_read(vsc, VSC73XX_BLOCK_SYSTEM, 0,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:543:\t\t\t   VSC73XX_CHIPID, \u0026val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-544-\tif (ret) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-548-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:549:\tid = (val \u003e\u003e VSC73XX_CHIPID_ID_SHIFT) \u0026\ndrivers/net/dsa/vitesse-vsc73xx-core.c:550:\t\tVSC73XX_CHIPID_ID_MASK;\ndrivers/net/dsa/vitesse-vsc73xx-core.c-551-\tswitch (id) {\ndrivers/net/dsa/vitesse-vsc73xx-core.c:552:\tcase VSC73XX_CHIPID_ID_7385:\ndrivers/net/dsa/vitesse-vsc73xx-core.c:553:\tcase VSC73XX_CHIPID_ID_7388:\ndrivers/net/dsa/vitesse-vsc73xx-core.c:554:\tcase VSC73XX_CHIPID_ID_7395:\ndrivers/net/dsa/vitesse-vsc73xx-core.c:555:\tcase VSC73XX_CHIPID_ID_7398:\ndrivers/net/dsa/vitesse-vsc73xx-core.c-556-\t\tbreak;\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-562-\tvsc-\u003echipid = id;\ndrivers/net/dsa/vitesse-vsc73xx-core.c:563:\trev = (val \u003e\u003e VSC73XX_CHIPID_REV_SHIFT) \u0026\ndrivers/net/dsa/vitesse-vsc73xx-core.c:564:\t\tVSC73XX_CHIPID_REV_MASK;\ndrivers/net/dsa/vitesse-vsc73xx-core.c-565-\tdev_info(vsc-\u003edev, \"VSC%04X (rev: %d) switch found\\n\", id, rev);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-566-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:567:\tret = vsc73xx_read(vsc, VSC73XX_BLOCK_SYSTEM, 0,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:568:\t\t\t   VSC73XX_ICPU_CTRL, \u0026val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-569-\tif (ret) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-579-\t */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:580:\ticpu_pi_en = !!(val \u0026 VSC73XX_ICPU_CTRL_ICPU_PI_EN);\ndrivers/net/dsa/vitesse-vsc73xx-core.c:581:\ticpu_si_boot_en = !!(val \u0026 VSC73XX_ICPU_CTRL_BOOT_EN);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-582-\tif (icpu_si_boot_en \u0026\u0026 icpu_pi_en) {\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=605=static int vsc73xx_mdio_busy_check(struct vsc73xx *vsc)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-610-\tret = read_poll_timeout(vsc73xx_read, err,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:611:\t\t\t\terr \u003c 0 || !(val \u0026 VSC73XX_MII_STAT_BUSY),\ndrivers/net/dsa/vitesse-vsc73xx-core.c:612:\t\t\t\tVSC73XX_MDIO_POLL_SLEEP_US,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:613:\t\t\t\tVSC73XX_POLL_TIMEOUT_US, false, vsc,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:614:\t\t\t\tVSC73XX_BLOCK_MII, VSC73XX_BLOCK_MII_INTERNAL,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:615:\t\t\t\tVSC73XX_MII_STAT, \u0026val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-616-\tif (ret)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=621=static int vsc73xx_phy_read(struct dsa_switch *ds, int phy, int regnum)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-632-\t/* Setting bit 26 means \"read\" */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:633:\tcmd = VSC73XX_MII_CMD_OPERATION |\ndrivers/net/dsa/vitesse-vsc73xx-core.c:634:\t      FIELD_PREP(VSC73XX_MII_CMD_PHY_ADDR, phy) |\ndrivers/net/dsa/vitesse-vsc73xx-core.c:635:\t      FIELD_PREP(VSC73XX_MII_CMD_PHY_REG, regnum);\ndrivers/net/dsa/vitesse-vsc73xx-core.c:636:\tret = vsc73xx_write(vsc, VSC73XX_BLOCK_MII, VSC73XX_BLOCK_MII_INTERNAL,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:637:\t\t\t    VSC73XX_MII_CMD, cmd);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-638-\tif (ret)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-644-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:645:\tret = vsc73xx_read(vsc, VSC73XX_BLOCK_MII, VSC73XX_BLOCK_MII_INTERNAL,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:646:\t\t\t   VSC73XX_MII_DATA, \u0026val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-647-\tif (ret)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-648-\t\treturn ret;\ndrivers/net/dsa/vitesse-vsc73xx-core.c:649:\tif (val \u0026 VSC73XX_MII_DATA_FAILURE) {\ndrivers/net/dsa/vitesse-vsc73xx-core.c-650-\t\tdev_err(vsc-\u003edev, \"reading reg %02x from phy%d failed\\n\",\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-653-\t}\ndrivers/net/dsa/vitesse-vsc73xx-core.c:654:\tval \u0026= VSC73XX_MII_DATA_READ_DATA;\ndrivers/net/dsa/vitesse-vsc73xx-core.c-655-\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=662=static int vsc73xx_phy_write(struct dsa_switch *ds, int phy, int regnum,\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-672-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:673:\tcmd = FIELD_PREP(VSC73XX_MII_CMD_PHY_ADDR, phy) |\ndrivers/net/dsa/vitesse-vsc73xx-core.c:674:\t      FIELD_PREP(VSC73XX_MII_CMD_PHY_REG, regnum) |\ndrivers/net/dsa/vitesse-vsc73xx-core.c:675:\t      FIELD_PREP(VSC73XX_MII_CMD_WRITE_DATA, val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c:676:\tret = vsc73xx_write(vsc, VSC73XX_BLOCK_MII, VSC73XX_BLOCK_MII_INTERNAL,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:677:\t\t\t    VSC73XX_MII_CMD, cmd);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-678-\tif (ret)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=686=static enum dsa_tag_protocol vsc73xx_get_tag_protocol(struct dsa_switch *ds,\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-698-\t */\ndrivers/net/dsa/vitesse-vsc73xx-core.c:699:\treturn DSA_TAG_PROTO_VSC73XX_8021Q;\ndrivers/net/dsa/vitesse-vsc73xx-core.c-700-}\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=702=static int vsc73xx_wait_for_vlan_table_cmd(struct vsc73xx *vsc)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-708-\t\t\t\terr \u003c 0 ||\ndrivers/net/dsa/vitesse-vsc73xx-core.c:709:\t\t\t\t((val \u0026 VSC73XX_VLANACCESS_VLAN_TBL_CMD_MASK) ==\ndrivers/net/dsa/vitesse-vsc73xx-core.c:710:\t\t\t\tVSC73XX_VLANACCESS_VLAN_TBL_CMD_IDLE),\ndrivers/net/dsa/vitesse-vsc73xx-core.c:711:\t\t\t\tVSC73XX_POLL_SLEEP_US, VSC73XX_POLL_TIMEOUT_US,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:712:\t\t\t\tfalse, vsc, VSC73XX_BLOCK_ANALYZER,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:713:\t\t\t\t0, VSC73XX_VLANACCESS, \u0026val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-714-\tif (ret)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=720=vsc73xx_read_vlan_table_entry(struct vsc73xx *vsc, u16 vid, u8 *portmap)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-724-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:725:\tvsc73xx_write(vsc, VSC73XX_BLOCK_ANALYZER, 0, VSC73XX_VLANTIDX, vid);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-726-\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-730-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:731:\tvsc73xx_update_bits(vsc, VSC73XX_BLOCK_ANALYZER, 0, VSC73XX_VLANACCESS,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:732:\t\t\t    VSC73XX_VLANACCESS_VLAN_TBL_CMD_MASK,\ndrivers/net/dsa/vitesse-vsc73xx-core.c:733:\t\t\t    VSC73XX_VLANACCESS_VLAN_TBL_CMD_READ_ENTRY);\ndrivers/net/dsa/vitesse-vsc73xx-core.c-734-\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-738-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:739:\tvsc73xx_read(vsc, VSC73XX_BLOCK_ANALYZER, 0, VSC73XX_VLANACCESS, \u0026val);\ndrivers/net/dsa/vitesse-vsc73xx-core.c:740:\t*portmap = (val \u0026 VSC73XX_VLANACCESS_VLAN_PORT_MASK) \u003e\u003e\ndrivers/net/dsa/vitesse-vsc73xx-core.c:741:\t\t   VSC73XX_VLANACCESS_VLAN_PORT_MASK_SHIFT;\ndrivers/net/dsa/vitesse-vsc73xx-core.c-742-\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c=747=vsc73xx_write_vlan_table_entry(struct vsc73xx *vsc, u16 vid, u8 portmap)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-750-\n\n"
}

7/2 2026/09/19 06:09 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 24725
							output: 47
							thoughts: 47
						

Thoughts:
**Analyzing the Vitesse VSC73xx SPI Driver**

Okay, let's dive into this `vitesse-vsc73xx-spi.c` file. My immediate question is always, how does this driver get identified and initialized? I need to understand the probe/match process. Time to skip right to the end of the file, see how the driver is registered, and how the device matching is handled. Knowing the registration process is key to understanding the initial handshake. Let's see what's what.



8/2 2026/09/19 06:09 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/vitesse-vsc73xx-spi.c",
  "FirstLine": 180,
  "LineCount": 40
}

Results:
{
  "Contents": " 180:\t{\n 181:\t\tstruct vsc73xx_spi *vsc_spi = spi_get_drvdata(spi);\n 182:\t\n 183:\t\tif (!vsc_spi)\n 184:\t\t\treturn;\n 185:\t\n 186:\t\tvsc73xx_shutdown(\u0026vsc_spi-\u003evsc);\n 187:\t\n 188:\t\tspi_set_drvdata(spi, NULL);\n 189:\t}\n 190:\t\n 191:\tstatic const struct vsc73xx_ops vsc73xx_spi_ops = {\n 192:\t\t.read = vsc73xx_spi_read,\n 193:\t\t.write = vsc73xx_spi_write,\n 194:\t};\n 195:\t\n 196:\tstatic const struct of_device_id vsc73xx_of_match[] = {\n 197:\t\t{\n 198:\t\t\t.compatible = \"vitesse,vsc7385\",\n 199:\t\t},\n 200:\t\t{\n 201:\t\t\t.compatible = \"vitesse,vsc7388\",\n 202:\t\t},\n 203:\t\t{\n 204:\t\t\t.compatible = \"vitesse,vsc7395\",\n 205:\t\t},\n 206:\t\t{\n 207:\t\t\t.compatible = \"vitesse,vsc7398\",\n 208:\t\t},\n 209:\t\t{ },\n 210:\t};\n 211:\tMODULE_DEVICE_TABLE(of, vsc73xx_of_match);\n 212:\t\n 213:\tstatic const struct spi_device_id vsc73xx_spi_ids[] = {\n 214:\t\t{ \"vsc7385\" },\n 215:\t\t{ \"vsc7388\" },\n 216:\t\t{ \"vsc7395\" },\n 217:\t\t{ \"vsc7398\" },\n 218:\t\t{ },\n 219:\t};\n"
}

9/2 2026/09/19 06:09 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 25500
							output: 47
							thoughts: 28
						

Thoughts:
Okay, here's my interpretation of that thought process, as if I'm the one thinking it, targeted towards a fellow expert:

**Diving into the Vitesse VSC73xx SPI Driver**

Alright, time to dig deeper. I've been looking at the broader architecture, but now it's time to get my hands dirty and focus on the implementation. Let's get into the specifics of the Vitesse VSC73xx SPI driver: `drivers/net/dsa/vitesse-vsc73xx-spi.c`. I need to understand how this interface is translating high-level network operations into the SPI commands that the VSC73xx switch understands. I'm going to look for the key functions, data structures, and the overall flow of how the driver handles reads, writes, and interrupt events. I'm expecting to see interesting details on how they've handled the SPI transactions – are they using DMA? What kind of error handling and retry mechanisms are in place? And most importantly, how do they manage the mapping between the DSA layer and this low-level SPI communication? Let's get cracking.



10/2 2026/09/19 06:09 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/vitesse-vsc73xx-spi.c",
  "FirstLine": 215,
  "LineCount": 25
}

Results:
{
  "Contents": " 215:\t\t{ \"vsc7388\" },\n 216:\t\t{ \"vsc7395\" },\n 217:\t\t{ \"vsc7398\" },\n 218:\t\t{ },\n 219:\t};\n 220:\tMODULE_DEVICE_TABLE(spi, vsc73xx_spi_ids);\n 221:\t\n 222:\tstatic struct spi_driver vsc73xx_spi_driver = {\n 223:\t\t.probe = vsc73xx_spi_probe,\n 224:\t\t.remove = vsc73xx_spi_remove,\n 225:\t\t.shutdown = vsc73xx_spi_shutdown,\n 226:\t\t.id_table = vsc73xx_spi_ids,\n 227:\t\t.driver = {\n 228:\t\t\t.name = \"vsc73xx-spi\",\n 229:\t\t\t.of_match_table = vsc73xx_of_match,\n 230:\t\t},\n 231:\t};\n 232:\tmodule_spi_driver(vsc73xx_spi_driver);\n 233:\t\n 234:\tMODULE_AUTHOR(\"Linus Walleij \u003clinus.walleij@linaro.org\u003e\");\n 235:\tMODULE_DESCRIPTION(\"Vitesse VSC7385/7388/7395/7398 SPI driver\");\n 236:\tMODULE_LICENSE(\"GPL v2\");\n"
}

11/2 2026/09/19 06:09 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 26216
							output: 44
							thoughts: 21
						

Thoughts:
Here's my summary, as if I were thinking these thoughts:

**Analyzing the Git History**

Okay, so I've got this patch in front of me, and my first step is always to understand its genesis. Time to jump into the Git history. I need to get a clear picture of its context. Let's start with `git log`. I need to pinpoint the exact commit this patch came from. Knowing that will give me the "what," but more importantly, the "why" behind its introduction. The log messages, the author, the associated issues, the entire commit context – that's the gold I'm digging for. This isn't just about identifying the commit; it's about understanding the problem this patch solves, the design decisions that led to it, and any potential side effects or related work. Grasping this history is crucial before I can even begin to fully assess the patch's current impact and relevance.



12/2 2026/09/19 06:09 tool grepper
0m Args:
{
  "Expression": "spi_dev_put",
  "PathPrefix": "drivers/net/dsa/vitesse-vsc73xx-spi.c"
}

Results:
{
  "Output": "drivers/net/dsa/vitesse-vsc73xx-spi.c=134=static int vsc73xx_spi_probe(struct spi_device *spi)\n--\ndrivers/net/dsa/vitesse-vsc73xx-spi.c-155-\t\tdev_err(dev, \"spi setup failed.\\n\");\ndrivers/net/dsa/vitesse-vsc73xx-spi.c:156:\t\tspi_dev_put(vsc_spi-\u003espi);\ndrivers/net/dsa/vitesse-vsc73xx-spi.c-157-\t\treturn ret;\n--\ndrivers/net/dsa/vitesse-vsc73xx-spi.c-161-\tif (ret)\ndrivers/net/dsa/vitesse-vsc73xx-spi.c:162:\t\tspi_dev_put(vsc_spi-\u003espi);\ndrivers/net/dsa/vitesse-vsc73xx-spi.c-163-\n--\ndrivers/net/dsa/vitesse-vsc73xx-spi.c=167=static void vsc73xx_spi_remove(struct spi_device *spi)\n--\ndrivers/net/dsa/vitesse-vsc73xx-spi.c-175-\ndrivers/net/dsa/vitesse-vsc73xx-spi.c:176:\tspi_dev_put(vsc_spi-\u003espi);\ndrivers/net/dsa/vitesse-vsc73xx-spi.c-177-}\n"
}

13/2 2026/09/19 06:09 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 26877
							output: 26
							thoughts: 192
						

Thoughts:
**My Initial Thoughts on Integrating `vsc73xx-spi` with Syzkaller**

Okay, so I'm looking at `vsc73xx-spi`, the SPI driver for those Vitesse Ethernet switch chips: VSC7385, 7388, 7395, and 7398. The big question is, can I even *reach* these kinds of SPI devices within Syzkaller's typical virtualized environment? Is this something that's even *possible*? I need to know if Syzkaller has the underlying capability to probe or interact with SPI devices like this one.

First things first, do I even *know* what Syzkaller can do with SPI? I need to check Syzkaller's capabilities and see if it can interact with SPI drivers at all.

Then, there's another angle: can these SPI devices even be created or interacted with from userspace, or am I going to be limited to kernel module integration? Can I emulate an SPI device, or instantiate them in userspace, something like how `spi-tle62x0` or `spidev` are handled? Or does the driver rely on a `spi_board_info` or something similar? Are there any similar mechanisms or examples?

Wait, maybe I can use sysfs to instantiate the SPI device. Can I create a new SPI device through sysfs? Let me investigate if `spi_master` or `spi_controller` has a `new_device` sysfs attribute, or any comparable mechanism. That might be the key.



14/2 2026/09/19 06:09 tool grepper
0m Args:
{
  "Expression": "new_device",
  "PathPrefix": "drivers/spi"
}

Results:
{
  "Output": "drivers/spi/spi-altera-dfl.c=124=static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)\n--\ndrivers/spi/spi-altera-dfl.c-174-\ndrivers/spi/spi-altera-dfl.c:175:\tif (!spi_new_device(host, \u0026board_info)) {\ndrivers/spi/spi-altera-dfl.c-176-\t\tdev_err(dev, \"%s failed to create SPI device: %s\\n\",\n--\ndrivers/spi/spi-altera-platform.c=35=static int altera_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-altera-platform.c-116-\t\tfor (i = 0; i \u003c pdata-\u003enum_devices; i++) {\ndrivers/spi/spi-altera-platform.c:117:\t\t\tif (!spi_new_device(host, pdata-\u003edevices + i))\ndrivers/spi/spi-altera-platform.c-118-\t\t\t\tdev_warn(\u0026pdev-\u003edev,\n--\ndrivers/spi/spi-butterfly.c=176=static void butterfly_attach(struct parport *p)\n--\ndrivers/spi/spi-butterfly.c-265-\tpp-\u003einfo[0].controller_data = pp;\ndrivers/spi/spi-butterfly.c:266:\tpp-\u003edataflash = spi_new_device(pp-\u003ebitbang.ctlr, \u0026pp-\u003einfo[0]);\ndrivers/spi/spi-butterfly.c-267-\tif (pp-\u003edataflash)\n--\ndrivers/spi/spi-ch341.c=141=static int ch341_probe(struct usb_interface *intf,\n--\ndrivers/spi/spi-ch341.c-206-\ndrivers/spi/spi-ch341.c:207:\tch341-\u003espidev = spi_new_device(ctrl, \u0026chip);\ndrivers/spi/spi-ch341.c-208-\tif (!ch341-\u003espidev) {\n--\ndrivers/spi/spi-cs42l43.c=312=static int cs42l43_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cs42l43.c-426-\ndrivers/spi/spi-cs42l43.c:427:\t\tif (!spi_new_device(priv-\u003ectlr, ampl_info))\ndrivers/spi/spi-cs42l43.c-428-\t\t\treturn dev_err_probe(priv-\u003edev, -ENODEV,\n--\ndrivers/spi/spi-cs42l43.c-430-\ndrivers/spi/spi-cs42l43.c:431:\t\tif (!spi_new_device(priv-\u003ectlr, ampr_info))\ndrivers/spi/spi-cs42l43.c-432-\t\t\treturn dev_err_probe(priv-\u003edev, -ENODEV,\n--\ndrivers/spi/spi-intel.c=1375=static int intel_spi_populate_chip(struct intel_spi *ispi)\n--\ndrivers/spi/spi-intel.c-1401-\ndrivers/spi/spi-intel.c:1402:\tif (!spi_new_device(ispi-\u003ehost, \u0026chip))\ndrivers/spi/spi-intel.c-1403-\t\treturn -ENODEV;\n--\ndrivers/spi/spi-intel.c-1430-\ndrivers/spi/spi-intel.c:1431:\tif (!spi_new_device(ispi-\u003ehost, \u0026chip))\ndrivers/spi/spi-intel.c-1432-\t\treturn -ENODEV;\n--\ndrivers/spi/spi-kspi2.c=310=static int kspi2_register_devices(struct kspi2 *kspi)\n--\ndrivers/spi/spi-kspi2.c-316-\tfor (i = 0; i \u003c kspi-\u003eauxdev-\u003einfo_size; i++) {\ndrivers/spi/spi-kspi2.c:317:\t\tstruct spi_device *device = spi_new_device(kspi-\u003ehost, \u0026info[i]);\ndrivers/spi/spi-kspi2.c-318-\n--\ndrivers/spi/spi-lm70llp.c=188=static void spi_lm70llp_attach(struct parport *p)\n--\ndrivers/spi/spi-lm70llp.c-266-\tpp-\u003einfo.controller_data = pp;\ndrivers/spi/spi-lm70llp.c:267:\tpp-\u003espidev_lm70 = spi_new_device(pp-\u003ebitbang.ctlr, \u0026pp-\u003einfo);\ndrivers/spi/spi-lm70llp.c-268-\tif (pp-\u003espidev_lm70)\n--\ndrivers/spi/spi-lm70llp.c-271-\telse {\ndrivers/spi/spi-lm70llp.c:272:\t\tdev_warn(\u0026pd-\u003edev, \"spi_new_device failed\\n\");\ndrivers/spi/spi-lm70llp.c-273-\t\tstatus = -ENODEV;\n--\ndrivers/spi/spi-xilinx.c=402=static int xilinx_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-xilinx.c-509-\t\tfor (i = 0; i \u003c pdata-\u003enum_devices; i++)\ndrivers/spi/spi-xilinx.c:510:\t\t\tspi_new_device(host, pdata-\u003edevices + i);\ndrivers/spi/spi-xilinx.c-511-\t}\n--\ndrivers/spi/spi.c=297=static const struct attribute_group spi_controller_statistics_group = {\n--\ndrivers/spi/spi.c-304-/*\ndrivers/spi/spi.c:305: * new_device_store - instantiate a new SPI device from userspace\ndrivers/spi/spi.c-306- *\n--\ndrivers/spi/spi.c-309- * Examples:\ndrivers/spi/spi.c:310: *   echo spidev 0 \u003e new_device\ndrivers/spi/spi.c:311: *   echo spidev 0 10000000 \u003e new_device\ndrivers/spi/spi.c:312: *   echo spidev 0 10000000 3 \u003e new_device\ndrivers/spi/spi.c-313- */\ndrivers/spi/spi.c=314=static ssize_t\ndrivers/spi/spi.c:315:new_device_store(struct device *dev, struct device_attribute *attr,\ndrivers/spi/spi.c-316-\t\t const char *buf, size_t count)\n--\ndrivers/spi/spi.c-329-\tif (!blank) {\ndrivers/spi/spi.c:330:\t\tdev_err(dev, \"new_device: Missing parameters\\n\");\ndrivers/spi/spi.c-331-\t\treturn -EINVAL;\n--\ndrivers/spi/spi.c-334-\tif (blank == buf || blank - buf \u003e SPI_NAME_SIZE - 1) {\ndrivers/spi/spi.c:335:\t\tdev_err(dev, \"new_device: Invalid device name\\n\");\ndrivers/spi/spi.c-336-\t\treturn -EINVAL;\n--\ndrivers/spi/spi.c-348-\tif (sscanf(++blank, \"%u %u %u\", \u0026chip_select, \u0026max_speed_hz, \u0026mode) \u003c 1) {\ndrivers/spi/spi.c:349:\t\tdev_err(dev, \"new_device: Can't parse chip select\\n\");\ndrivers/spi/spi.c-350-\t\treturn -EINVAL;\n--\ndrivers/spi/spi.c-359-\tif (chip_select \u003e U8_MAX || chip_select \u003e= ctlr-\u003enum_chipselect) {\ndrivers/spi/spi.c:360:\t\tdev_err(dev, \"new_device: Chip select %u out of range (num_chipselect=%u)\\n\",\ndrivers/spi/spi.c-361-\t\t\tchip_select, ctlr-\u003enum_chipselect);\n--\ndrivers/spi/spi.c-372-\tif (mode \u0026 ~(u32)SPI_MODE_USER_MASK) {\ndrivers/spi/spi.c:373:\t\tdev_err(dev, \"new_device: Invalid mode bits 0x%x\\n\",\ndrivers/spi/spi.c-374-\t\t\tmode \u0026 ~(u32)SPI_MODE_USER_MASK);\n--\ndrivers/spi/spi.c-401-\t/*\ndrivers/spi/spi.c:402:\t * spi_unregister_controller() removes the new_device/delete_device\ndrivers/spi/spi.c-403-\t * sysfs group before taking add_lock, so kernfs_drain() has already\n--\ndrivers/spi/spi.c-421-\ndrivers/spi/spi.c:422:\tdev_info(dev, \"new_device: Instantiated device %s at CS%u\\n\",\ndrivers/spi/spi.c-423-\t\t modalias, chip_select);\n--\ndrivers/spi/spi.c-425-}\ndrivers/spi/spi.c:426:static DEVICE_ATTR_IGNORE_LOCKDEP(new_device, 0200, NULL, new_device_store);\ndrivers/spi/spi.c-427-\n--\ndrivers/spi/spi.c=471=static struct attribute *spi_controller_userspace_attrs[] = {\ndrivers/spi/spi.c:472:\t\u0026dev_attr_new_device.attr,\ndrivers/spi/spi.c-473-\t\u0026dev_attr_delete_device.attr,\n--\ndrivers/spi/spi.c=477=static const struct attribute_group spi_controller_userspace_group = {\n--\ndrivers/spi/spi.c-484- * spi_controller_userspace_group is registered manually for host controllers\ndrivers/spi/spi.c:485: * at the end of spi_register_controller() so new_device/delete_device only\ndrivers/spi/spi.c-486- * appear after DT/ACPI children and the queue are set up.\n--\ndrivers/spi/spi.c=979=EXPORT_SYMBOL_GPL(spi_add_device);\n--\ndrivers/spi/spi.c-981-/**\ndrivers/spi/spi.c:982: * spi_new_device - instantiate one new SPI device\ndrivers/spi/spi.c-983- * @ctlr: Controller to which device is connected\n--\ndrivers/spi/spi.c-994- */\ndrivers/spi/spi.c:995:struct spi_device *spi_new_device(struct spi_controller *ctlr,\ndrivers/spi/spi.c-996-\t\t\t\t  struct spi_board_info *chip)\n--\ndrivers/spi/spi.c-1050-}\ndrivers/spi/spi.c:1051:EXPORT_SYMBOL_GPL(spi_new_device);\ndrivers/spi/spi.c-1052-\n--\ndrivers/spi/spi.c=1081=static void spi_match_controller_to_boardinfo(struct spi_controller *ctlr,\n--\ndrivers/spi/spi.c-1088-\ndrivers/spi/spi.c:1089:\tdev = spi_new_device(ctlr, bi);\ndrivers/spi/spi.c-1090-\tif (!dev)\n--\ndrivers/spi/spi.c=3652=int spi_register_controller(struct spi_controller *ctlr)\n--\ndrivers/spi/spi.c-3757-\t/*\ndrivers/spi/spi.c:3758:\t * Register the new_device/delete_device sysfs interface as the\ndrivers/spi/spi.c-3759-\t * final step of host controller bringup, only after the queue,\n--\ndrivers/spi/spi.c=3838=void spi_unregister_controller(struct spi_controller *ctlr)\n--\ndrivers/spi/spi.c-3843-\t/*\ndrivers/spi/spi.c:3844:\t * Drain in-flight new_device/delete_device sysfs stores and\ndrivers/spi/spi.c-3845-\t * prevent new ones from starting.  Must happen before we take\n"
}

15/2 2026/09/19 06:09 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 30610
							output: 48
							thoughts: 1484
						

Thoughts:
**Reflecting on the Vulnerability and Reachability**

Okay, first things first, let me clarify my thought process. I'm looking at this patch and immediately, my mind jumps to the practicalities of exploitation, as any good security expert would.

Initially, I see `new_device_store` for SPI devices, which immediately sparks questions. Can user space manipulate this `new_device` entry to trigger SPI interactions? But then I hit a wall, do SPI controllers even exist in the standard QEMU environment I'm using? Or any virtualized environment? Is it emulated? Could I possibly use USB to emulate it? USB raw gadget? No, that's getting ahead of myself, let's start with syzkaller and the kernel!

I'm quickly scanning for SPI-related pseudo-syscalls or descriptions within syzkaller, or if QEMU itself provides SPI support. That leads me to a critical point: I need to remember the limitations of the tooling. I *can't* use `syz-grepper` or `read-syz-spec` for this as those tools aren't declared, based on the tooling declarations.

Focusing on the patch, it seems like a refcount leak fix. A quick look at the code reveals a `spi_dev_get` call in `vsc73xx_spi_probe` and `vsc73xx_spi_remove`. Without this patch, if either `spi_setup` or `vsc73xx_probe` fails, the corresponding `spi_dev_put` call is missed, leading to a refcount leak. The same is true if the driver is removed. This patch fixes that, ensuring proper balancing. Now, I need to know if this is even a viable target, can it be reached?

Now, I'm thinking about the criteria. Can this vulnerability actually be reached within a standard, virtualized QEMU environment? I need to apply the "REACHABILITY IS THE PRIMARY GATE" principle.

The code's vulnerability is in `vsc73xx_spi_probe` and `vsc73xx_spi_remove`, but can the functions be reached? That's what I have to check.

The guidelines are pretty clear: structurally unreachable hardware isn't worth fuzzing. I need to know what `vsc73xx` *is*. I'm going to quickly check in `drivers/net/dsa/vitesse-vsc73xx-core.c`. Ah, a Vitesse VSC7385/VSC7388/VSC7395/VSC7398 Ethernet switch chip. Does QEMU emulate these switches? I doubt it. Even if I could somehow get an SPI controller in place, will the underlying probe functions even work? No. Therefore, given what I know, there is no chance that any QEMU environment can emulate the necessary hardware. This patch, while fixing a refcount leak, falls into the "structurally unreachable hardware" category and is not worth fuzzing.



16/2 2026/09/19 06:10 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/vitesse-vsc73xx-core.c",
  "FirstLine": 1150,
  "LineCount": 80
}

Results:
{
  "Contents": "1150:\t\n1151:\t\tvsc73xx_write(vsc, VSC73XX_BLOCK_MAC, port, VSC73XX_MAC_CFG, val);\n1152:\t\n1153:\t\t/* Flow control for the PHY facing ports:\n1154:\t\t * Use a zero delay pause frame when pause condition is left\n1155:\t\t * Obey pause control frames\n1156:\t\t * When generating pause frames, use 0xff as pause value\n1157:\t\t */\n1158:\t\tvsc73xx_write(vsc, VSC73XX_BLOCK_MAC, port, VSC73XX_FCCONF,\n1159:\t\t\t      VSC73XX_FCCONF_ZERO_PAUSE_EN |\n1160:\t\t\t      VSC73XX_FCCONF_FLOW_CTRL_OBEY |\n1161:\t\t\t      0xff);\n1162:\t\n1163:\t\t/* Accept packets again */\n1164:\t\tvsc73xx_update_bits(vsc, VSC73XX_BLOCK_ARBITER, 0,\n1165:\t\t\t\t    VSC73XX_ARBDISC, BIT(port), 0);\n1166:\t\n1167:\t\t/* Disallow backward dropping of frames from this port */\n1168:\t\tvsc73xx_update_bits(vsc, VSC73XX_BLOCK_ARBITER, 0,\n1169:\t\t\t\t    VSC73XX_SBACKWDROP, BIT(port), 0);\n1170:\t\n1171:\t\t/* Enable TX, RX, deassert reset, stop loading seed */\n1172:\t\tvsc73xx_update_bits(vsc, VSC73XX_BLOCK_MAC, port,\n1173:\t\t\t\t    VSC73XX_MAC_CFG,\n1174:\t\t\t\t    VSC73XX_MAC_CFG_RESET | VSC73XX_MAC_CFG_SEED_LOAD |\n1175:\t\t\t\t    VSC73XX_MAC_CFG_TX_EN | VSC73XX_MAC_CFG_RX_EN,\n1176:\t\t\t\t    VSC73XX_MAC_CFG_TX_EN | VSC73XX_MAC_CFG_RX_EN);\n1177:\t}\n1178:\t\n1179:\tstatic bool vsc73xx_tag_8021q_active(struct dsa_port *dp)\n1180:\t{\n1181:\t\treturn !dsa_port_is_vlan_filtering(dp);\n1182:\t}\n1183:\t\n1184:\tstatic struct vsc73xx_bridge_vlan *\n1185:\tvsc73xx_bridge_vlan_find(struct vsc73xx *vsc, u16 vid)\n1186:\t{\n1187:\t\tstruct vsc73xx_bridge_vlan *vlan;\n1188:\t\n1189:\t\tlist_for_each_entry(vlan, \u0026vsc-\u003evlans, list)\n1190:\t\t\tif (vlan-\u003evid == vid)\n1191:\t\t\t\treturn vlan;\n1192:\t\n1193:\t\treturn NULL;\n1194:\t}\n1195:\t\n1196:\tstatic void\n1197:\tvsc73xx_bridge_vlan_remove_port(struct vsc73xx_bridge_vlan *vsc73xx_vlan,\n1198:\t\t\t\t\tint port)\n1199:\t{\n1200:\t\tvsc73xx_vlan-\u003eportmask \u0026= ~BIT(port);\n1201:\t\n1202:\t\tif (vsc73xx_vlan-\u003eportmask)\n1203:\t\t\treturn;\n1204:\t\n1205:\t\tlist_del(\u0026vsc73xx_vlan-\u003elist);\n1206:\t\tkfree(vsc73xx_vlan);\n1207:\t}\n1208:\t\n1209:\tstatic void vsc73xx_bridge_vlan_summary(struct vsc73xx *vsc, int port,\n1210:\t\t\t\t\t\tstruct vsc73xx_vlan_summary *summary,\n1211:\t\t\t\t\t\tu16 ignored_vid)\n1212:\t{\n1213:\t\tsize_t num_tagged = 0, num_untagged = 0;\n1214:\t\tstruct vsc73xx_bridge_vlan *vlan;\n1215:\t\n1216:\t\tlist_for_each_entry(vlan, \u0026vsc-\u003evlans, list) {\n1217:\t\t\tif (!(vlan-\u003eportmask \u0026 BIT(port)) || vlan-\u003evid == ignored_vid)\n1218:\t\t\t\tcontinue;\n1219:\t\n1220:\t\t\tif (vlan-\u003euntagged \u0026 BIT(port))\n1221:\t\t\t\tnum_untagged++;\n1222:\t\t\telse\n1223:\t\t\t\tnum_tagged++;\n1224:\t\t}\n1225:\t\n1226:\t\tsummary-\u003enum_untagged = num_untagged;\n1227:\t\tsummary-\u003enum_tagged = num_tagged;\n1228:\t}\n1229:\t\n"
}

17/2 2026/09/19 06:10 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 34194
							output: 47
							thoughts: 35
						

Thoughts:
Okay, let's dive into this. Here's how I'd approach that task, rendered as a first-person summary of my thought process:

**Hunting Down `vsc73xx_probe`**

Alright, so the task at hand is to locate the `vsc73xx_probe` function. Thinking like a seasoned embedded systems engineer, the first thing I'd do is consider the likely location. Based on my experience, and given the function name, it's highly probable that this resides within the kernel source. And from the naming conventions and context clues provided, it's almost certainly related to a network driver for a Vitesse VSC73xx device.

Knowing that, I'd instinctively zero in on the `drivers/net` directory. Within that, because it's a Digital Switch Architecture (DSA) driver for a network switch, the `dsa` subdirectory is the most logical place to look.  The  `vitesse-vsc73xx-core.c` file feels like the best bet. Considering typical kernel driver structure, `_probe` functions are usually entry points, so the core file is exactly where I'd look first. This file should be where the driver is registered with the kernel. I expect to find the `vsc73xx_probe` function definition there, likely along with other related functions and data structures that handle initialization and device detection.



18/2 2026/09/19 06:10 tool grepper
0m Args:
{
  "Expression": "int vsc73xx_probe",
  "PathPrefix": "drivers/net/dsa/vitesse-vsc73xx-core.c"
}

Results:
{
  "Output": "drivers/net/dsa/vitesse-vsc73xx-core.c=2307=static int vsc73xx_gpio_probe(struct vsc73xx *vsc)\n--\ndrivers/net/dsa/vitesse-vsc73xx-core.c-2332-\ndrivers/net/dsa/vitesse-vsc73xx-core.c:2333:int vsc73xx_probe(struct vsc73xx *vsc)\ndrivers/net/dsa/vitesse-vsc73xx-core.c-2334-{\n"
}

19/2 2026/09/19 06:10 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 34734
							output: 48
							thoughts: 13
						

Thoughts:
Okay, here's my interpretation of that thought process, assuming I'm deep in my domain expertise:

**Diving into `vsc73xx_probe`**

Alright, time to crack open `vsc73xx_probe`. Let's get right to it. I'm going to start reading that driver code and get a handle on what's going on with this device. No need for pleasantries, let's get down to brass tacks. I'm ready to figure out its inner workings, piece by piece. Time to put on my problem solving hat.



20/2 2026/09/19 06:10 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/vitesse-vsc73xx-core.c",
  "FirstLine": 2333,
  "LineCount": 55
}

Results:
{
  "Contents": "2333:\tint vsc73xx_probe(struct vsc73xx *vsc)\n2334:\t{\n2335:\t\tstruct device *dev = vsc-\u003edev;\n2336:\t\tint ret;\n2337:\t\n2338:\t\t/* Release reset, if any */\n2339:\t\tvsc-\u003ereset = devm_gpiod_get_optional(dev, \"reset\", GPIOD_OUT_LOW);\n2340:\t\tif (IS_ERR(vsc-\u003ereset)) {\n2341:\t\t\tdev_err(dev, \"failed to get RESET GPIO\\n\");\n2342:\t\t\treturn PTR_ERR(vsc-\u003ereset);\n2343:\t\t}\n2344:\t\tif (vsc-\u003ereset)\n2345:\t\t\t/* Wait 20ms according to datasheet table 245 */\n2346:\t\t\tmsleep(20);\n2347:\t\n2348:\t\tret = vsc73xx_detect(vsc);\n2349:\t\tif (ret == -EAGAIN) {\n2350:\t\t\tdev_err(vsc-\u003edev,\n2351:\t\t\t\t\"Chip seems to be out of control. Assert reset and try again.\\n\");\n2352:\t\t\tgpiod_set_value_cansleep(vsc-\u003ereset, 1);\n2353:\t\t\t/* Reset pulse should be 20ns minimum, according to datasheet\n2354:\t\t\t * table 245, so 10us should be fine\n2355:\t\t\t */\n2356:\t\t\tusleep_range(10, 100);\n2357:\t\t\tgpiod_set_value_cansleep(vsc-\u003ereset, 0);\n2358:\t\t\t/* Wait 20ms according to datasheet table 245 */\n2359:\t\t\tmsleep(20);\n2360:\t\t\tret = vsc73xx_detect(vsc);\n2361:\t\t}\n2362:\t\tif (ret) {\n2363:\t\t\tdev_err(dev, \"no chip found (%d)\\n\", ret);\n2364:\t\t\treturn -ENODEV;\n2365:\t\t}\n2366:\t\n2367:\t\tmutex_init(\u0026vsc-\u003efdb_lock);\n2368:\t\n2369:\t\teth_random_addr(vsc-\u003eaddr);\n2370:\t\tdev_info(vsc-\u003edev,\n2371:\t\t\t \"MAC for control frames: %02X:%02X:%02X:%02X:%02X:%02X\\n\",\n2372:\t\t\t vsc-\u003eaddr[0], vsc-\u003eaddr[1], vsc-\u003eaddr[2],\n2373:\t\t\t vsc-\u003eaddr[3], vsc-\u003eaddr[4], vsc-\u003eaddr[5]);\n2374:\t\n2375:\t\tvsc-\u003eds = devm_kzalloc(dev, sizeof(*vsc-\u003eds), GFP_KERNEL);\n2376:\t\tif (!vsc-\u003eds)\n2377:\t\t\treturn -ENOMEM;\n2378:\t\n2379:\t\tvsc-\u003eds-\u003edev = dev;\n2380:\t\tvsc-\u003eds-\u003enum_ports = VSC73XX_MAX_NUM_PORTS;\n2381:\t\tvsc-\u003eds-\u003epriv = vsc;\n2382:\t\n2383:\t\tvsc-\u003eds-\u003eops = \u0026vsc73xx_ds_ops;\n2384:\t\tvsc-\u003eds-\u003ephylink_mac_ops = \u0026vsc73xx_phylink_mac_ops;\n2385:\t\tret = dsa_register_switch(vsc-\u003eds);\n2386:\t\tif (ret) {\n2387:\t\t\tdev_err(dev, \"unable to register switch (%d)\\n\", ret);\n"
}

21/2 2026/09/19 06:10 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 35912
							output: 46
							thoughts: 362
						

Thoughts:
**Analyzing the VSC73XX Probe Function**

Okay, let's dive into this `vsc73xx_probe()` function. My immediate focus is on how it identifies the device. It looks like the core of the detection lies within the call to `vsc73xx_detect(vsc)`. I see a series of `vsc73xx_read()` calls.  Specifically, it's reading from the `VSC73XX_BLOCK_SYSTEM` block, first retrieving a mailbox value, presumably for some sort of initial check. Then, crucially, it's reading the `VSC73XX_CHIPID` register. The code then extracts the `id` field using bit shifts and masks.  This is standard practice for hardware register access.

The `switch` statement that follows is what I'm interested in; it checks the `id` against a set of expected values like `VSC73XX_CHIPID_ID_7385`, `7388`, `7395`, and `7398`. If the `id` doesn't match these, the probe fails with `-ENODEV`, indicating an unsupported chip.  This suggests that the driver is designed to work with a specific family of Vitesse chips. Now I need to know how these reads are being handled.

The next thing I'll check is the SPI read implementation, so I'll go to `vsc73xx_spi_read` in the `drivers/net/dsa/vitesse-vsc73xx-spi.c` to see how that's done. I'm keen to understand how the low-level SPI communication is managed, especially the register addressing and data transfer.



22/2 2026/09/19 06:10 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/vitesse-vsc73xx-spi.c",
  "FirstLine": 40,
  "LineCount": 60
}

Results:
{
  "Contents": "  40:\tstatic u8 vsc73xx_make_addr(u8 mode, u8 block, u8 subblock)\n  41:\t{\n  42:\t\tu8 ret;\n  43:\t\n  44:\t\tret =\n  45:\t\t    (block \u0026 VSC73XX_CMD_SPI_BLOCK_MASK) \u003c\u003c VSC73XX_CMD_SPI_BLOCK_SHIFT;\n  46:\t\tret |= (mode \u0026 1) \u003c\u003c VSC73XX_CMD_SPI_MODE_SHIFT;\n  47:\t\tret |= subblock \u0026 VSC73XX_CMD_SPI_SUBBLOCK_MASK;\n  48:\t\n  49:\t\treturn ret;\n  50:\t}\n  51:\t\n  52:\tstatic int vsc73xx_spi_read(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,\n  53:\t\t\t\t    u32 *val)\n  54:\t{\n  55:\t\tstruct vsc73xx_spi *vsc_spi = vsc-\u003epriv;\n  56:\t\tstruct spi_transfer t[2];\n  57:\t\tstruct spi_message m;\n  58:\t\tu8 cmd[4];\n  59:\t\tu8 buf[4];\n  60:\t\tint ret;\n  61:\t\n  62:\t\tif (!vsc73xx_is_addr_valid(block, subblock))\n  63:\t\t\treturn -EINVAL;\n  64:\t\n  65:\t\tspi_message_init(\u0026m);\n  66:\t\n  67:\t\tmemset(\u0026t, 0, sizeof(t));\n  68:\t\n  69:\t\tt[0].tx_buf = cmd;\n  70:\t\tt[0].len = sizeof(cmd);\n  71:\t\tspi_message_add_tail(\u0026t[0], \u0026m);\n  72:\t\n  73:\t\tt[1].rx_buf = buf;\n  74:\t\tt[1].len = sizeof(buf);\n  75:\t\tspi_message_add_tail(\u0026t[1], \u0026m);\n  76:\t\n  77:\t\tcmd[0] = vsc73xx_make_addr(VSC73XX_CMD_SPI_MODE_READ, block, subblock);\n  78:\t\tcmd[1] = reg;\n  79:\t\tcmd[2] = 0;\n  80:\t\tcmd[3] = 0;\n  81:\t\n  82:\t\tmutex_lock(\u0026vsc_spi-\u003elock);\n  83:\t\tret = spi_sync(vsc_spi-\u003espi, \u0026m);\n  84:\t\tmutex_unlock(\u0026vsc_spi-\u003elock);\n  85:\t\n  86:\t\tif (ret)\n  87:\t\t\treturn ret;\n  88:\t\n  89:\t\t*val = (buf[0] \u003c\u003c 24) | (buf[1] \u003c\u003c 16) | (buf[2] \u003c\u003c 8) | buf[3];\n  90:\t\n  91:\t\treturn 0;\n  92:\t}\n  93:\t\n  94:\tstatic int vsc73xx_spi_write(struct vsc73xx *vsc, u8 block, u8 subblock, u8 reg,\n  95:\t\t\t\t     u32 val)\n  96:\t{\n  97:\t\tstruct vsc73xx_spi *vsc_spi = vsc-\u003epriv;\n  98:\t\tstruct spi_transfer t[2];\n  99:\t\tstruct spi_message m;\n"
}

23/2 2026/09/19 06:10 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 37607
							output: 26
							thoughts: 548
						

Thoughts:
**Analyzing the VSC73xx SPI Driver Patch**

Okay, let's break down this patch. My immediate focus is on the changes to `vsc73xx_spi_probe` and `vsc73xx_spi_remove`. It looks like error handling has been beefed up – specifically, `spi_dev_put` is now called in both probe and remove functions upon failure or completion. This is good; it's proper resource management, ensuring the SPI device is cleaned up.

Now, I'm already thinking about the execution environment. Can this driver even *run* in a standard QEMU setup? My first thought: does a standard QEMU x86_64 image include an SPI controller? That's the real question. Even if a user could create an SPI device via sysfs, the hardware has to be present.

Let me check. What SPI controller options are even available in the Linux kernel for x86 architectures using ACPI or PCI? I'll need to do some digging to see if any are emulated in QEMU. From past experience, I doubt a standard QEMU configuration like i440fx or q35 will have an SPI master controller. QEMU *does* support SPI, but it's typically for ARM and RISC-V boards.

So, for x86_64, is there a virtual SPI controller driver in Linux? Perhaps something that could be used for testing or simulation? Time to fire up the grep and search the kernel source for any virtual SPI controller drivers. That might be the key to getting this driver running in a simulated environment.



24/2 2026/09/19 06:10 tool grepper
0m Args:
{
  "Expression": "spi_controller",
  "PathPrefix": "drivers/spi"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 10067 lines.\nUse more precise expression if possible.\n\ndrivers/spi/atmel-quadspi.c=483=static bool atmel_qspi_supports_op(struct spi_mem *mem,\n--\ndrivers/spi/atmel-quadspi.c-485-{\ndrivers/spi/atmel-quadspi.c:486:\tstruct atmel_qspi *aq = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/atmel-quadspi.c-487-\tif (!spi_mem_default_supports_op(mem, op))\n--\ndrivers/spi/atmel-quadspi.c=657=static int atmel_qspi_transfer(struct spi_mem *mem,\n--\ndrivers/spi/atmel-quadspi.c-659-{\ndrivers/spi/atmel-quadspi.c:660:\tstruct atmel_qspi *aq = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/atmel-quadspi.c-661-\n--\ndrivers/spi/atmel-quadspi.c=814=static int atmel_qspi_dma_rx_xfer(struct spi_mem *mem,\n--\ndrivers/spi/atmel-quadspi.c-818-\tstruct atmel_qspi *aq =\ndrivers/spi/atmel-quadspi.c:819:\t\tspi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/atmel-quadspi.c-820-\tstruct scatterlist *sg;\n--\ndrivers/spi/atmel-quadspi.c=839=static int atmel_qspi_dma_tx_xfer(struct spi_mem *mem,\n--\ndrivers/spi/atmel-quadspi.c-843-\tstruct atmel_qspi *aq =\ndrivers/spi/atmel-quadspi.c:844:\t\tspi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/atmel-quadspi.c-845-\tstruct scatterlist *sg;\n--\ndrivers/spi/atmel-quadspi.c=864=static int atmel_qspi_dma_transfer(struct spi_mem *mem,\n--\ndrivers/spi/atmel-quadspi.c-869-\ndrivers/spi/atmel-quadspi.c:870:\tret = spi_controller_dma_map_mem_op_data(mem-\u003espi-\u003econtroller, op,\ndrivers/spi/atmel-quadspi.c-871-\t\t\t\t\t\t \u0026sgt);\n--\ndrivers/spi/atmel-quadspi.c-879-\ndrivers/spi/atmel-quadspi.c:880:\tspi_controller_dma_unmap_mem_op_data(mem-\u003espi-\u003econtroller, op, \u0026sgt);\ndrivers/spi/atmel-quadspi.c-881-\n--\ndrivers/spi/atmel-quadspi.c=885=static int atmel_qspi_sama7g5_transfer(struct spi_mem *mem,\n--\ndrivers/spi/atmel-quadspi.c-888-\tstruct atmel_qspi *aq =\ndrivers/spi/atmel-quadspi.c:889:\t\tspi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/atmel-quadspi.c-890-\tu32 val;\n--\ndrivers/spi/atmel-quadspi.c=947=static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)\ndrivers/spi/atmel-quadspi.c-948-{\ndrivers/spi/atmel-quadspi.c:949:\tstruct atmel_qspi *aq = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/atmel-quadspi.c-950-\tu32 offset;\n--\ndrivers/spi/atmel-quadspi.c=979=static const char *atmel_qspi_get_name(struct spi_mem *spimem)\n--\ndrivers/spi/atmel-quadspi.c-983-\ndrivers/spi/atmel-quadspi.c:984:static const struct spi_controller_mem_ops atmel_qspi_mem_ops = {\ndrivers/spi/atmel-quadspi.c-985-\t.supports_op = atmel_qspi_supports_op,\n--\ndrivers/spi/atmel-quadspi.c=1207=static int atmel_qspi_sama7g5_setup(struct spi_device *spi)\ndrivers/spi/atmel-quadspi.c-1208-{\ndrivers/spi/atmel-quadspi.c:1209:\tstruct atmel_qspi *aq = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/atmel-quadspi.c-1210-\n--\ndrivers/spi/atmel-quadspi.c=1217=static int atmel_qspi_setup(struct spi_device *spi)\ndrivers/spi/atmel-quadspi.c-1218-{\ndrivers/spi/atmel-quadspi.c:1219:\tstruct spi_controller *ctrl = spi-\u003econtroller;\ndrivers/spi/atmel-quadspi.c:1220:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1221-\tunsigned long src_rate;\n--\ndrivers/spi/atmel-quadspi.c=1256=static int atmel_qspi_set_cs_timing(struct spi_device *spi)\ndrivers/spi/atmel-quadspi.c-1257-{\ndrivers/spi/atmel-quadspi.c:1258:\tstruct spi_controller *ctrl = spi-\u003econtroller;\ndrivers/spi/atmel-quadspi.c:1259:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1260-\tunsigned long clk_rate;\n--\ndrivers/spi/atmel-quadspi.c=1342=static irqreturn_t atmel_qspi_interrupt(int irq, void *dev_id)\n--\ndrivers/spi/atmel-quadspi.c-1360-\ndrivers/spi/atmel-quadspi.c:1361:static int atmel_qspi_dma_init(struct spi_controller *ctrl)\ndrivers/spi/atmel-quadspi.c-1362-{\ndrivers/spi/atmel-quadspi.c:1363:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1364-\tint ret;\n--\ndrivers/spi/atmel-quadspi.c=1403=static int atmel_qspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/atmel-quadspi.c-1405-\tstruct device *dev = \u0026pdev-\u003edev;\ndrivers/spi/atmel-quadspi.c:1406:\tstruct spi_controller *ctrl;\ndrivers/spi/atmel-quadspi.c-1407-\tstruct atmel_qspi *aq;\n--\ndrivers/spi/atmel-quadspi.c-1414-\ndrivers/spi/atmel-quadspi.c:1415:\taq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1416-\n--\ndrivers/spi/atmel-quadspi.c=1553=static void atmel_qspi_remove(struct platform_device *pdev)\ndrivers/spi/atmel-quadspi.c-1554-{\ndrivers/spi/atmel-quadspi.c:1555:\tstruct spi_controller *ctrl = platform_get_drvdata(pdev);\ndrivers/spi/atmel-quadspi.c:1556:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1557-\tint ret;\n--\ndrivers/spi/atmel-quadspi.c=1581=static int atmel_qspi_suspend(struct device *dev)\ndrivers/spi/atmel-quadspi.c-1582-{\ndrivers/spi/atmel-quadspi.c:1583:\tstruct spi_controller *ctrl = dev_get_drvdata(dev);\ndrivers/spi/atmel-quadspi.c:1584:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1585-\tint ret;\n--\ndrivers/spi/atmel-quadspi.c=1608=static int atmel_qspi_resume(struct device *dev)\ndrivers/spi/atmel-quadspi.c-1609-{\ndrivers/spi/atmel-quadspi.c:1610:\tstruct spi_controller *ctrl = dev_get_drvdata(dev);\ndrivers/spi/atmel-quadspi.c:1611:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1612-\tint ret;\n--\ndrivers/spi/atmel-quadspi.c=1640=static int atmel_qspi_runtime_suspend(struct device *dev)\ndrivers/spi/atmel-quadspi.c-1641-{\ndrivers/spi/atmel-quadspi.c:1642:\tstruct spi_controller *ctrl = dev_get_drvdata(dev);\ndrivers/spi/atmel-quadspi.c:1643:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1644-\n--\ndrivers/spi/atmel-quadspi.c=1651=static int atmel_qspi_runtime_resume(struct device *dev)\ndrivers/spi/atmel-quadspi.c-1652-{\ndrivers/spi/atmel-quadspi.c:1653:\tstruct spi_controller *ctrl = dev_get_drvdata(dev);\ndrivers/spi/atmel-quadspi.c:1654:\tstruct atmel_qspi *aq = spi_controller_get_devdata(ctrl);\ndrivers/spi/atmel-quadspi.c-1655-\tint ret;\n--\ndrivers/spi/internals.h-19-\ndrivers/spi/internals.h:20:void spi_flush_queue(struct spi_controller *ctrl);\ndrivers/spi/internals.h-21-\n--\ndrivers/spi/internals.h-23-#if IS_ENABLED(CONFIG_KUNIT)\ndrivers/spi/internals.h:24:int __spi_map_msg(struct spi_controller *ctlr, struct spi_message *msg);\ndrivers/spi/internals.h:25:int __spi_unmap_msg(struct spi_controller *ctlr, struct spi_message *msg);\ndrivers/spi/internals.h-26-#endif\ndrivers/spi/internals.h-27-\ndrivers/spi/internals.h:28:int spi_map_buf(struct spi_controller *ctlr, struct device *dev,\ndrivers/spi/internals.h-29-\t\tstruct sg_table *sgt, void *buf, size_t len,\ndrivers/spi/internals.h-30-\t\tenum dma_data_direction dir);\ndrivers/spi/internals.h:31:void spi_unmap_buf(struct spi_controller *ctlr, struct device *dev,\ndrivers/spi/internals.h-32-\t\t   struct sg_table *sgt, enum dma_data_direction dir);\ndrivers/spi/internals.h-33-#else /* !CONFIG_HAS_DMA */\ndrivers/spi/internals.h:34:static inline int spi_map_buf(struct spi_controller *ctlr, struct device *dev,\ndrivers/spi/internals.h-35-\t\t\t      struct sg_table *sgt, void *buf, size_t len,\n--\ndrivers/spi/internals.h-40-\ndrivers/spi/internals.h:41:static inline void spi_unmap_buf(struct spi_controller *ctlr,\ndrivers/spi/internals.h-42-\t\t\t\t struct device *dev, struct sg_table *sgt,\n--\ndrivers/spi/internals.h-47-\ndrivers/spi/internals.h:48:static inline bool spi_xfer_is_dma_mapped(struct spi_controller *ctlr,\ndrivers/spi/internals.h-49-\t\t\t\t\t  struct spi_device *spi,\n--\ndrivers/spi/spi-airoha-snfi.c=555=static ssize_t airoha_snand_dirmap_read(struct spi_mem_dirmap_desc *desc,\n--\ndrivers/spi/spi-airoha-snfi.c-565-\ndrivers/spi/spi-airoha-snfi.c:566:\tas_ctrl = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/spi-airoha-snfi.c-567-\n--\ndrivers/spi/spi-airoha-snfi.c=748=static ssize_t airoha_snand_dirmap_write(struct spi_mem_dirmap_desc *desc,\n--\ndrivers/spi/spi-airoha-snfi.c-758-\ndrivers/spi/spi-airoha-snfi.c:759:\tas_ctrl = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/spi-airoha-snfi.c-760-\n--\ndrivers/spi/spi-airoha-snfi.c=932=static int airoha_snand_exec_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-airoha-snfi.c-939-\ndrivers/spi/spi-airoha-snfi.c:940:\tas_ctrl = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/spi-airoha-snfi.c-941-\n--\ndrivers/spi/spi-airoha-snfi.c-1007-\ndrivers/spi/spi-airoha-snfi.c:1008:static const struct spi_controller_mem_ops airoha_snand_mem_ops = {\ndrivers/spi/spi-airoha-snfi.c-1009-\t.supports_op = airoha_snand_supports_op,\n--\ndrivers/spi/spi-airoha-snfi.c-1015-\ndrivers/spi/spi-airoha-snfi.c:1016:static const struct spi_controller_mem_ops airoha_snand_nodma_mem_ops = {\ndrivers/spi/spi-airoha-snfi.c-1017-\t.supports_op = airoha_snand_supports_op,\n--\ndrivers/spi/spi-airoha-snfi.c=1021=static int airoha_snand_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-airoha-snfi.c-1026-\t/* prepare device buffer */\ndrivers/spi/spi-airoha-snfi.c:1027:\tas_ctrl = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/spi-airoha-snfi.c-1028-\ttxrx_buf = devm_kzalloc(as_ctrl-\u003edev, SPI_NAND_CACHE_SIZE,\n--\ndrivers/spi/spi-airoha-snfi.c=1060=static int airoha_snand_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-airoha-snfi.c-1063-\tstruct device *dev = \u0026pdev-\u003edev;\ndrivers/spi/spi-airoha-snfi.c:1064:\tstruct spi_controller *ctrl;\ndrivers/spi/spi-airoha-snfi.c-1065-\tbool dma_enable = true;\n--\ndrivers/spi/spi-airoha-snfi.c-1073-\ndrivers/spi/spi-airoha-snfi.c:1074:\tas_ctrl = spi_controller_get_devdata(ctrl);\ndrivers/spi/spi-airoha-snfi.c-1075-\tas_ctrl-\u003edev = dev;\n--\ndrivers/spi/spi-altera-core.c=68=static inline struct altera_spi *altera_spi_to_hw(struct spi_device *sdev)\ndrivers/spi/spi-altera-core.c-69-{\ndrivers/spi/spi-altera-core.c:70:\treturn spi_controller_get_devdata(sdev-\u003econtroller);\ndrivers/spi/spi-altera-core.c-71-}\n--\ndrivers/spi/spi-altera-core.c=115=static void altera_spi_rx_word(struct altera_spi *hw)\n--\ndrivers/spi/spi-altera-core.c-141-\ndrivers/spi/spi-altera-core.c:142:static int altera_spi_txrx(struct spi_controller *host,\ndrivers/spi/spi-altera-core.c-143-\tstruct spi_device *spi, struct spi_transfer *t)\ndrivers/spi/spi-altera-core.c-144-{\ndrivers/spi/spi-altera-core.c:145:\tstruct altera_spi *hw = spi_controller_get_devdata(host);\ndrivers/spi/spi-altera-core.c-146-\tu32 val;\n--\ndrivers/spi/spi-altera-core.c=183=irqreturn_t altera_spi_irq(int irq, void *dev)\ndrivers/spi/spi-altera-core.c-184-{\ndrivers/spi/spi-altera-core.c:185:\tstruct spi_controller *host = dev;\ndrivers/spi/spi-altera-core.c:186:\tstruct altera_spi *hw = spi_controller_get_devdata(host);\ndrivers/spi/spi-altera-core.c-187-\n--\ndrivers/spi/spi-altera-core.c=202=EXPORT_SYMBOL_GPL(altera_spi_irq);\ndrivers/spi/spi-altera-core.c-203-\ndrivers/spi/spi-altera-core.c:204:void altera_spi_init_host(struct spi_controller *host)\ndrivers/spi/spi-altera-core.c-205-{\ndrivers/spi/spi-altera-core.c:206:\tstruct altera_spi *hw = spi_controller_get_devdata(host);\ndrivers/spi/spi-altera-core.c-207-\tu32 val;\n--\ndrivers/spi/spi-altera-dfl.c=96=static const struct regmap_config indirect_regbus_cfg = {\n--\ndrivers/spi/spi-altera-dfl.c-106-\ndrivers/spi/spi-altera-dfl.c:107:static void config_spi_host(void __iomem *base, struct spi_controller *host)\ndrivers/spi/spi-altera-dfl.c-108-{\n--\ndrivers/spi/spi-altera-dfl.c=124=static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)\n--\ndrivers/spi/spi-altera-dfl.c-127-\tstruct device *dev = \u0026dfl_dev-\u003edev;\ndrivers/spi/spi-altera-dfl.c:128:\tstruct spi_controller *host;\ndrivers/spi/spi-altera-dfl.c-129-\tstruct altera_spi *hw;\n--\ndrivers/spi/spi-altera-dfl.c-138-\ndrivers/spi/spi-altera-dfl.c:139:\thw = spi_controller_get_devdata(host);\ndrivers/spi/spi-altera-dfl.c-140-\n--\ndrivers/spi/spi-altera-platform.c=35=static int altera_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-altera-platform.c-40-\tstruct altera_spi *hw;\ndrivers/spi/spi-altera-platform.c:41:\tstruct spi_controller *host;\ndrivers/spi/spi-altera-platform.c-42-\tint err;\n--\ndrivers/spi/spi-altera-platform.c-68-\ndrivers/spi/spi-altera-platform.c:69:\thw = spi_controller_get_devdata(host);\ndrivers/spi/spi-altera-platform.c-70-\thw-\u003edev = \u0026pdev-\u003edev;\n--\ndrivers/spi/spi-amd-pci.c=30=static int amd_spi_pci_probe(struct pci_dev *pdev,\n--\ndrivers/spi/spi-amd-pci.c-33-\tstruct device *dev = \u0026pdev-\u003edev;\ndrivers/spi/spi-amd-pci.c:34:\tstruct spi_controller *host;\ndrivers/spi/spi-amd-pci.c-35-\tstruct amd_spi *amd_spi;\n--\ndrivers/spi/spi-amd-pci.c-42-\ndrivers/spi/spi-amd-pci.c:43:\tamd_spi = spi_controller_get_devdata(host);\ndrivers/spi/spi-amd-pci.c-44-\n--\ndrivers/spi/spi-amd.c=261=static int amd_spi_host_setup(struct spi_device *spi)\ndrivers/spi/spi-amd.c-262-{\ndrivers/spi/spi-amd.c:263:\tstruct amd_spi *amd_spi = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/spi-amd.c-264-\n--\ndrivers/spi/spi-amd.c=312=static inline int amd_spi_fifo_xfer(struct amd_spi *amd_spi,\ndrivers/spi/spi-amd.c:313:\t\t\t\t    struct spi_controller *host,\ndrivers/spi/spi-amd.c-314-\t\t\t\t    struct spi_message *message)\n--\ndrivers/spi/spi-amd.c=440=static bool amd_spi_supports_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-amd.c-442-{\ndrivers/spi/spi-amd.c:443:\tstruct amd_spi *amd_spi = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/spi-amd.c-444-\n--\ndrivers/spi/spi-amd.c=476=static int amd_spi_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)\ndrivers/spi/spi-amd.c-477-{\ndrivers/spi/spi-amd.c:478:\tstruct amd_spi *amd_spi = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/spi-amd.c-479-\n--\ndrivers/spi/spi-amd.c=733=static int amd_spi_exec_mem_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-amd.c-737-\ndrivers/spi/spi-amd.c:738:\tamd_spi = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/spi-amd.c-739-\n--\ndrivers/spi/spi-amd.c-760-\ndrivers/spi/spi-amd.c:761:static const struct spi_controller_mem_ops amd_spi_mem_ops = {\ndrivers/spi/spi-amd.c-762-\t.exec_op = amd_spi_exec_mem_op,\n--\ndrivers/spi/spi-amd.c-766-\ndrivers/spi/spi-amd.c:767:static const struct spi_controller_mem_caps amd_spi_mem_caps = {\ndrivers/spi/spi-amd.c-768-\t.per_op_freq = true,\n--\ndrivers/spi/spi-amd.c-770-\ndrivers/spi/spi-amd.c:771:static int amd_spi_host_transfer(struct spi_controller *host,\ndrivers/spi/spi-amd.c-772-\t\t\t\t   struct spi_message *msg)\ndrivers/spi/spi-amd.c-773-{\ndrivers/spi/spi-amd.c:774:\tstruct amd_spi *amd_spi = spi_controller_get_devdata(host);\ndrivers/spi/spi-amd.c-775-\tstruct spi_device *spi = msg-\u003espi;\n--\ndrivers/spi/spi-amd.c=791=static int amd_spi_setup_hiddma(struct amd_spi *amd_spi, struct device *dev)\n--\ndrivers/spi/spi-amd.c-820-\ndrivers/spi/spi-amd.c:821:int amd_spi_probe_common(struct device *dev, struct spi_controller *host)\ndrivers/spi/spi-amd.c-822-{\ndrivers/spi/spi-amd.c:823:\tstruct amd_spi *amd_spi = spi_controller_get_devdata(host);\ndrivers/spi/spi-amd.c-824-\tint err;\ndrivers/spi/spi-amd.c-825-\ndrivers/spi/spi-amd.c:826:\t/* Initialize the spi_controller fields */\ndrivers/spi/spi-amd.c-827-\thost-\u003enum_chipselect = 4;\n--\ndrivers/spi/spi-amd.c=851=static int amd_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amd.c-853-\tstruct device *dev = \u0026pdev-\u003edev;\ndrivers/spi/spi-amd.c:854:\tstruct spi_controller *host;\ndrivers/spi/spi-amd.c-855-\tstruct amd_spi *amd_spi;\n--\ndrivers/spi/spi-amd.c-861-\ndrivers/spi/spi-amd.c:862:\tamd_spi = spi_controller_get_devdata(host);\ndrivers/spi/spi-amd.c-863-\tamd_spi-\u003eio_remap_addr = devm_platform_ioremap_resource(pdev, 0);\n--\ndrivers/spi/spi-amd.h=34=struct amd_spi {\n--\ndrivers/spi/spi-amd.h-41-\ndrivers/spi/spi-amd.h:42:int amd_spi_probe_common(struct device *dev, struct spi_controller *host);\ndrivers/spi/spi-amd.h-43-\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=105=struct amlogic_spifc_a1 {\ndrivers/spi/spi-amlogic-spifc-a1.c:106:\tstruct spi_controller *ctrl;\ndrivers/spi/spi-amlogic-spifc-a1.c-107-\tstruct clk *clk;\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=253=static int amlogic_spifc_a1_exec_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-256-\tstruct amlogic_spifc_a1 *spifc =\ndrivers/spi/spi-amlogic-spifc-a1.c:257:\t\tspi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/spi-amlogic-spifc-a1.c-258-\tsize_t data_size = op-\u003edata.nbytes;\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=300=static void amlogic_spifc_a1_hw_init(struct amlogic_spifc_a1 *spifc)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-316-\ndrivers/spi/spi-amlogic-spifc-a1.c:317:static const struct spi_controller_mem_ops amlogic_spifc_a1_mem_ops = {\ndrivers/spi/spi-amlogic-spifc-a1.c-318-\t.exec_op = amlogic_spifc_a1_exec_op,\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-321-\ndrivers/spi/spi-amlogic-spifc-a1.c:322:static const struct spi_controller_mem_caps amlogic_spifc_a1_mem_caps = {\ndrivers/spi/spi-amlogic-spifc-a1.c-323-\t.per_op_freq = true,\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=326=static int amlogic_spifc_a1_probe(struct platform_device *pdev)\ndrivers/spi/spi-amlogic-spifc-a1.c-327-{\ndrivers/spi/spi-amlogic-spifc-a1.c:328:\tstruct spi_controller *ctrl;\ndrivers/spi/spi-amlogic-spifc-a1.c-329-\tstruct amlogic_spifc_a1 *spifc;\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-335-\ndrivers/spi/spi-amlogic-spifc-a1.c:336:\tspifc = spi_controller_get_devdata(ctrl);\ndrivers/spi/spi-amlogic-spifc-a1.c-337-\tplatform_set_drvdata(pdev, spifc);\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=377=static int amlogic_spifc_a1_suspend(struct device *dev)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-381-\ndrivers/spi/spi-amlogic-spifc-a1.c:382:\tret = spi_controller_suspend(spifc-\u003ectrl);\ndrivers/spi/spi-amlogic-spifc-a1.c-383-\tif (ret)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=392=static int amlogic_spifc_a1_resume(struct device *dev)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-404-\ndrivers/spi/spi-amlogic-spifc-a1.c:405:\tret = spi_controller_resume(spifc-\u003ectrl);\ndrivers/spi/spi-amlogic-spifc-a1.c-406-\tif (ret)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=185=struct aml_sfc {\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-188-\tstruct clk *core_clk;\ndrivers/spi/spi-amlogic-spifc-a4.c:189:\tstruct spi_controller *ctrl;\ndrivers/spi/spi-amlogic-spifc-a4.c-190-\tstruct regmap *regmap_base;\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=792=static int aml_sfc_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-798-\ndrivers/spi/spi-amlogic-spifc-a4.c:799:\tsfc = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/spi-amlogic-spifc-a4.c-800-\tecc_cfg = aml_sfc_to_ecc_ctx(sfc);\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=831=static int aml_sfc_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-835-\ndrivers/spi/spi-amlogic-spifc-a4.c:836:\tsfc = spi_controller_get_devdata(mem-\u003espi-\u003econtroller);\ndrivers/spi/spi-amlogic-spifc-a4.c-837-\tecc_cfg = aml_sfc_to_ecc_ctx(sfc);\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-848-\ndrivers/spi/spi-amlogic-spifc-a4.c:849:static const struct spi_controller_mem_ops aml_sfc_mem_ops = {\ndrivers/spi/spi-amlogic-spifc-a4.c-850-\t.adjust_op_size = aml_sfc_adjust_op_size,\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=928=static int aml_sfc_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-932-\ndrivers/spi/spi-amlogic-spifc-a4.c:933:\tsfc = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/spi-amlogic-spifc-a4.c-934-\tret = aml_spi_settings(sfc, spi);\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=1041=static int aml_sfc_ecc_finish_io_req(struct nand_device *nand,\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-1057-\ndrivers/spi/spi-amlogic-spifc-a4.c:1058:static const struct spi_controller_mem_caps aml_sfc_mem_caps = {\ndrivers/spi/spi-amlogic-spifc-a4.c-1059-\t.ecc = true,\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=1093=static int aml_sfc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-1096-\tstruct device *dev = \u0026pdev-\u003edev;\ndrivers/spi/spi-amlogic-spifc-a4.c:1097:\tstruct spi_controller *ctrl;\ndrivers/spi/spi-amlogic-spifc-a4.c-1098-\tstruct aml_sfc *sfc;\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-1114-\ndrivers/spi/spi-amlogic-spifc-a4.c:1115:\tsfc = spi_controller_get_devdata(ctrl);\ndrivers/spi/spi-amlogic-spifc-a4.c-1116-\tsfc-\u003edev = dev;\n--\ndrivers/spi/spi-amlogic-spisg.c=146=struct spisg_device {\ndrivers/spi/spi-amlogic-spisg.c:147:\tstruct spi_controller\t\t*controller;\ndrivers/spi/spi-amlogic-spisg.c-148-\tstruct platform_device\t\t*pdev;\n--\ndrivers/spi/spi-amlogic-spisg.c=197=static int aml_spisg_set_speed(struct spisg_device *spisg, uint speed_hz)\n--\ndrivers/spi/spi-amlogic-spisg.c-217-\ndrivers/spi/spi-amlogic-spisg.c:218:static bool aml_spisg_can_dma(struct spi_controller *ctlr,\ndrivers/spi/spi-amlogic-spisg.c-219-\t\t\t      struct spi_device *spi,\n--\ndrivers/spi/spi-amlogic-spisg.c=455=static irqreturn_t aml_spisg_irq(int irq, void *data)\n--\ndrivers/spi/spi-amlogic-spisg.c-480-\ndrivers/spi/spi-amlogic-spisg.c:481:static int aml_spisg_transfer_one_message(struct spi_controller *ctlr,\ndrivers/spi/spi-amlogic-spisg.c-482-\t\t\t\t\t  struct spi_message *msg)\ndrivers/spi/spi-amlogic-spisg.c-483-{\ndrivers/spi/spi-amlogic-spisg.c:484:\tstruct spisg_device *spisg = spi_controller_get_devdata(ctlr);\ndrivers/spi/spi-amlogic-spisg.c-485-\tstruct device *dev = \u0026spisg-\u003epdev-\u003edev;\n--\ndrivers/spi/spi-amlogic-spisg.c-566-\tif (wait_for_completion_timeout(\u0026spisg-\u003ecompletion,\ndrivers/spi/spi-amlogic-spisg.c:567:\t\t\t\t\tspi_controller_is_target(spisg-\u003econtroller) ?\ndrivers/spi/spi-amlogic-spisg.c-568-\t\t\t\t\tMAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(ms)))\n--\ndrivers/spi/spi-amlogic-spisg.c-589-\ndrivers/spi/spi-amlogic-spisg.c:590:static int aml_spisg_prepare_message(struct spi_controller *ctlr,\ndrivers/spi/spi-amlogic-spisg.c-591-\t\t\t\t     struct spi_message *message)\ndrivers/spi/spi-amlogic-spisg.c-592-{\ndrivers/spi/spi-amlogic-spisg.c:593:\tstruct spisg_device *spisg = spi_controller_get_devdata(ctlr);\ndrivers/spi/spi-amlogic-spisg.c-594-\tstruct spi_device *spi = message-\u003espi;\n--\ndrivers/spi/spi-amlogic-spisg.c=612=static int aml_spisg_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-amlogic-spisg.c-614-\tif (!spi-\u003econtroller_state)\ndrivers/spi/spi-amlogic-spisg.c:615:\t\tspi-\u003econtroller_state = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/spi-amlogic-spisg.c-616-\n--\ndrivers/spi/spi-amlogic-spisg.c=620=static void aml_spisg_cleanup(struct spi_device *spi)\n--\ndrivers/spi/spi-amlogic-spisg.c-624-\ndrivers/spi/spi-amlogic-spisg.c:625:static int aml_spisg_target_abort(struct spi_controller *ctlr)\ndrivers/spi/spi-amlogic-spisg.c-626-{\ndrivers/spi/spi-amlogic-spisg.c:627:\tstruct spisg_device *spisg = spi_controller_get_devdata(ctlr);\ndrivers/spi/spi-amlogic-spisg.c-628-\n--\ndrivers/spi/spi-amlogic-spisg.c=712=static int aml_spisg_probe(struct platform_device *pdev)\ndrivers/spi/spi-amlogic-spisg.c-713-{\ndrivers/spi/spi-amlogic-spisg.c:714:\tstruct spi_controller *ctlr;\ndrivers/spi/spi-amlogic-spisg.c-715-\tstruct spisg_device *spisg;\n--\ndrivers/spi/spi-amlogic-spisg.c-733-\ndrivers/spi/spi-amlogic-spisg.c:734:\tspisg = spi_controller_get_devdata(ctlr);\ndrivers/spi/spi-amlogic-spisg.c-735-\tspisg-\u003econtroller = ctlr;\n--\ndrivers/spi/spi-amlogic-spisg.c-765-\t\t\t FIELD_PREP(CFG_SFLASH_HD, 1);\ndrivers/spi/spi-amlogic-spisg.c:766:\tif (spi_controller_is_target(ctlr)) {\ndrivers/spi/spi-amlogic-spisg.c-767-\t\tspisg-\u003ecfg_spi |= FIELD_PREP(CFG_SLAVE_EN, 1);\n--\ndrivers/spi/spi-apple.c=148=static void apple_spi_init(struct apple_spi *spi)\n--\ndrivers/spi/spi-apple.c-172-\ndrivers/spi/spi-apple.c:173:static int apple_spi_prepare_message(struct spi_controller *ctlr, struct spi_message *msg)\ndrivers/spi/spi-apple.c-174-{\ndrivers/spi/spi-apple.c:175:\tstruct apple_spi *spi = spi_controller_get_devdata(ctlr);\ndrivers/spi/spi-apple.c-176-\tstruct spi_device *device = msg-\u003espi;\n--\ndrivers/spi/spi-apple.c=189=static void apple_spi_set_cs(struct spi_device *device, bool is_high)\ndrivers/spi/spi-apple.c-190-{\ndrivers/spi/spi-apple.c:191:\tstruct apple_spi *spi = spi_controller_get_devdata(device-\u003econtroller);\ndrivers/spi/spi-apple.c-192-\n--\ndrivers/spi/spi-apple.c=312=static void apple_spi_rx(struct apple_spi *spi, void **rx_ptr, u32 *left,\n--\ndrivers/spi/spi-apple.c-356-\ndrivers/spi/spi-apple.c:357:static int apple_spi_transfer_one(struct spi_controller *ctlr, struct spi_device *device,\ndrivers/spi/spi-apple.c-358-\t\t\t\t  struct spi_transfer *t)\ndrivers/spi/spi-apple.c-359-{\ndrivers/spi/spi-apple.c:360:\tstruct apple_spi *spi = spi_controller_get_devdata(ctlr);\ndrivers/spi/spi-apple.c-361-\tbool poll = apple_spi_prep_transfer(spi, t);\n--\ndrivers/spi/spi-apple.c=457=static int apple_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-apple.c-460-\tint ret, irq;\ndrivers/spi/spi-apple.c:461:\tstruct spi_controller *ctlr;\ndrivers/spi/spi-apple.c-462-\n--\ndrivers/spi/spi-apple.c-466-\ndrivers/spi/spi-apple.c:467:\tspi = spi_controller_get_devdata(ctlr);\ndrivers/spi/spi-apple.c-468-\tinit_completion(\u0026spi-\u003edone);\n--\ndrivers/spi/spi-ar934x.c=44=struct ar934x_spi {\ndrivers/spi/spi-ar934x.c:45:\tstruct spi_controller *ctlr;\ndrivers/spi/spi-ar934x.c-46-\tvoid __iomem *base;\n--\ndrivers/spi/spi-ar934x.c=63=static int ar934x_spi_setup(struct spi_device *spi)\ndrivers/spi/spi-ar934x.c-64-{\ndrivers/spi/spi-ar934x.c:65:\tstruct ar934x_spi *sp = spi_controller_get_devdata(spi-\u003econtroller);\ndrivers/spi/spi-ar934x.c-66-\n--\ndrivers/spi/spi-ar934x.c-77-\ndrivers/spi/spi-ar934x.c:78:static int ar934x_spi_transfer_one_message(struct spi_controller *ctlr,\n\n"
}

25/2 2026/09/19 06:10 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 49886
							output: 26
							thoughts: 54
						

Thoughts:
**Considering USB-to-SPI Options**

Okay, hold on a second. Before I dive too deep into this, I need to consider all the angles. Let me step back and think about how USB-to-SPI adapters are typically implemented. Are there existing solutions or common approaches for creating SPI devices that leverage USB? Hmm, can USB itself actually *emulate* a SPI controller? That’s the question.

Alright, time to get practical. Let's see what the kernel documentation has to offer. I'm going to do a quick grep search for `spi_register_controller`. Specifically, I will look within the `drivers/usb` and `drivers/spi` directories. That should give me a good overview of how the Linux kernel handles SPI interactions over USB, if at all. This should either confirm the feasibility, or start me in the right direction.



26/2 2026/09/19 06:10 tool grepper
0m Args:
{
  "Expression": "spi_register_controller",
  "PathPrefix": "drivers"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 917 lines.\nUse more precise expression if possible.\n\ndrivers/media/pci/netup_unidvb/netup_unidvb_spi.c=173=int netup_spi_init(struct netup_unidvb_dev *ndev)\n--\ndrivers/media/pci/netup_unidvb/netup_unidvb_spi.c-197-\tndev-\u003espi = nspi;\ndrivers/media/pci/netup_unidvb/netup_unidvb_spi.c:198:\tif (spi_register_controller(ctlr)) {\ndrivers/media/pci/netup_unidvb/netup_unidvb_spi.c-199-\t\tndev-\u003espi = NULL;\n--\ndrivers/media/usb/msi2500/msi2500.c=1176=static int msi2500_probe(struct usb_interface *intf,\n--\ndrivers/media/usb/msi2500/msi2500.c-1248-\tspi_controller_set_devdata(ctlr, dev);\ndrivers/media/usb/msi2500/msi2500.c:1249:\tret = spi_register_controller(ctlr);\ndrivers/media/usb/msi2500/msi2500.c-1250-\tif (ret)\n--\ndrivers/spi/atmel-quadspi.c=1403=static int atmel_qspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/atmel-quadspi.c-1506-\ndrivers/spi/atmel-quadspi.c:1507:\terr = spi_register_controller(ctrl);\ndrivers/spi/atmel-quadspi.c-1508-\tif (err)\n--\ndrivers/spi/spi-airoha-snfi.c=1060=static int airoha_snand_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-airoha-snfi.c-1131-\ndrivers/spi/spi-airoha-snfi.c:1132:\treturn devm_spi_register_controller(dev, ctrl);\ndrivers/spi/spi-airoha-snfi.c-1133-}\n--\ndrivers/spi/spi-altera-dfl.c=124=static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)\n--\ndrivers/spi/spi-altera-dfl.c-160-\ndrivers/spi/spi-altera-dfl.c:161:\terr = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-altera-dfl.c-162-\tif (err)\n--\ndrivers/spi/spi-altera-platform.c=35=static int altera_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-altera-platform.c-110-\ndrivers/spi/spi-altera-platform.c:111:\terr = devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-altera-platform.c-112-\tif (err)\n--\ndrivers/spi/spi-amd.c=821=int amd_spi_probe_common(struct device *dev, struct spi_controller *host)\n--\ndrivers/spi/spi-amd.c-839-\t/* Register the controller with SPI framework */\ndrivers/spi/spi-amd.c:840:\terr = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-amd.c-841-\tif (err)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=326=static int amlogic_spifc_a1_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-368-\ndrivers/spi/spi-amlogic-spifc-a1.c:369:\tret = devm_spi_register_controller(spifc-\u003edev, ctrl);\ndrivers/spi/spi-amlogic-spifc-a1.c-370-\tif (ret)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=1093=static int aml_sfc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-1177-\ndrivers/spi/spi-amlogic-spifc-a4.c:1178:\treturn devm_spi_register_controller(dev, ctrl);\ndrivers/spi/spi-amlogic-spifc-a4.c-1179-}\n--\ndrivers/spi/spi-amlogic-spisg.c=712=static int aml_spisg_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amlogic-spisg.c-799-\ndrivers/spi/spi-amlogic-spisg.c:800:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-amlogic-spisg.c-801-\tif (ret) {\n--\ndrivers/spi/spi-apple.c=457=static int apple_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-apple.c-504-\ndrivers/spi/spi-apple.c:505:\tret = devm_spi_register_controller(\u0026pdev-\u003edev, ctlr);\ndrivers/spi/spi-apple.c-506-\tif (ret \u003c 0)\ndrivers/spi/spi-apple.c:507:\t\treturn dev_err_probe(\u0026pdev-\u003edev, ret, \"devm_spi_register_controller failed\\n\");\ndrivers/spi/spi-apple.c-508-\n--\ndrivers/spi/spi-ar934x.c=165=static int ar934x_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-ar934x.c-207-\ndrivers/spi/spi-ar934x.c:208:\treturn spi_register_controller(ctlr);\ndrivers/spi/spi-ar934x.c-209-}\n--\ndrivers/spi/spi-armada-3700.c=813=static int a3700_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-armada-3700.c-874-\ndrivers/spi/spi-armada-3700.c:875:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-armada-3700.c-876-\tif (ret) {\n--\ndrivers/spi/spi-aspeed-smc.c=957=static int aspeed_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-aspeed-smc.c-1023-\ndrivers/spi/spi-aspeed-smc.c:1024:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-aspeed-smc.c-1025-\tif (ret)\ndrivers/spi/spi-aspeed-smc.c:1026:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-aspeed-smc.c-1027-\n--\ndrivers/spi/spi-at91-usart.c=476=static int at91_usart_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-at91-usart.c-554-\ndrivers/spi/spi-at91-usart.c:555:\tret = spi_register_controller(controller);\ndrivers/spi/spi-at91-usart.c-556-\tif (ret)\n--\ndrivers/spi/spi-atcspi200.c=545=static int atcspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-atcspi200.c-588-\ndrivers/spi/spi-atcspi200.c:589:\tret = devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-atcspi200.c-590-\tif (ret)\n--\ndrivers/spi/spi-atmel.c=1287=static int atmel_spi_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-atmel.c-1303-\ndrivers/spi/spi-atmel.c:1304:\t/* Setup() is called during spi_register_controller(aka\ndrivers/spi/spi-atmel.c-1305-\t * spi_register_master) but after all membmers of the cs_gpiod\n--\ndrivers/spi/spi-atmel.c=1550=static int atmel_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-atmel.c-1668-\ndrivers/spi/spi-atmel.c:1669:\tret = spi_register_controller(host);\ndrivers/spi/spi-atmel.c-1670-\tif (ret)\n--\ndrivers/spi/spi-axi-spi-engine.c=1104=static int spi_engine_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-axi-spi-engine.c-1239-\ndrivers/spi/spi-axi-spi-engine.c:1240:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-axi-spi-engine.c-1241-}\n--\ndrivers/spi/spi-axiado.c=752=static int ax_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-axiado.c-846-\ndrivers/spi/spi-axiado.c:847:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-axiado.c-848-\tif (ret) {\ndrivers/spi/spi-axiado.c:849:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-axiado.c-850-\t\tgoto err_disable_rpm;\n--\ndrivers/spi/spi-bcm-qspi.c=1482=int bcm_qspi_probe(struct platform_device *pdev,\n--\ndrivers/spi/spi-bcm-qspi.c-1659-\ndrivers/spi/spi-bcm-qspi.c:1660:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcm-qspi.c-1661-\tif (ret \u003c 0) {\n--\ndrivers/spi/spi-bcm2835.c=1349=static int bcm2835_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm2835.c-1406-\ndrivers/spi/spi-bcm2835.c:1407:\terr = spi_register_controller(ctlr);\ndrivers/spi/spi-bcm2835.c-1408-\tif (err) {\n--\ndrivers/spi/spi-bcm2835aux.c=474=static int bcm2835aux_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm2835aux.c-543-\ndrivers/spi/spi-bcm2835aux.c:544:\terr = spi_register_controller(host);\ndrivers/spi/spi-bcm2835aux.c-545-\tif (err) {\n--\ndrivers/spi/spi-bcm63xx-hsspi.c=742=static int bcm63xx_hsspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-857-\t/* register and we are done */\ndrivers/spi/spi-bcm63xx-hsspi.c:858:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcm63xx-hsspi.c-859-\tif (ret)\n--\ndrivers/spi/spi-bcm63xx.c=491=static int bcm63xx_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm63xx.c-599-\t/* register and we are done */\ndrivers/spi/spi-bcm63xx.c:600:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcm63xx.c-601-\tif (ret) {\n--\ndrivers/spi/spi-bcmbca-hsspi.c=432=static int bcmbca_hsspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcmbca-hsspi.c-540-\t/* register and we are done */\ndrivers/spi/spi-bcmbca-hsspi.c:541:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcmbca-hsspi.c-542-\tif (ret)\n--\ndrivers/spi/spi-bitbang.c=424=int spi_bitbang_start(struct spi_bitbang *bitbang)\n--\ndrivers/spi/spi-bitbang.c-435-\t */\ndrivers/spi/spi-bitbang.c:436:\treturn spi_register_controller(ctlr);\ndrivers/spi/spi-bitbang.c-437-}\n--\ndrivers/spi/spi-cadence-quadspi.c=1785=static int cqspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cadence-quadspi.c-1978-\ndrivers/spi/spi-cadence-quadspi.c:1979:\tret = spi_register_controller(host);\ndrivers/spi/spi-cadence-quadspi.c-1980-\tif (ret) {\n--\ndrivers/spi/spi-cadence-xspi.c=1180=static int cdns_xspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cadence-xspi.c-1298-\ndrivers/spi/spi-cadence-xspi.c:1299:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-cadence-xspi.c-1300-\tif (ret) {\n--\ndrivers/spi/spi-cadence.c=642=static int cdns_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cadence.c-748-\t}\ndrivers/spi/spi-cadence.c:749:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-cadence.c-750-\tif (ret) {\ndrivers/spi/spi-cadence.c:751:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-cadence.c-752-\t\tgoto err_disable_rpm;\n--\ndrivers/spi/spi-cavium-octeon.c=19=static int octeon_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cavium-octeon.c-54-\ndrivers/spi/spi-cavium-octeon.c:55:\terr = spi_register_controller(host);\ndrivers/spi/spi-cavium-octeon.c-56-\tif (err) {\n--\ndrivers/spi/spi-cavium-thunderx.c=19=static int thunderx_spi_probe(struct pci_dev *pdev,\n--\ndrivers/spi/spi-cavium-thunderx.c-68-\ndrivers/spi/spi-cavium-thunderx.c:69:\treturn spi_register_controller(host);\ndrivers/spi/spi-cavium-thunderx.c-70-}\n--\ndrivers/spi/spi-ch341.c=141=static int ch341_probe(struct usb_interface *intf,\n--\ndrivers/spi/spi-ch341.c-202-\ndrivers/spi/spi-ch341.c:203:\tret = spi_register_controller(ctrl);\ndrivers/spi/spi-ch341.c-204-\tif (ret)\n--\ndrivers/spi/spi-clps711x.c=91=static int spi_clps711x_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-clps711x.c-137-\ndrivers/spi/spi-clps711x.c:138:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-clps711x.c-139-}\n--\ndrivers/spi/spi-coldfire-qspi.c=338=static int mcfqspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-coldfire-qspi.c-406-\ndrivers/spi/spi-coldfire-qspi.c:407:\tstatus = spi_register_controller(host);\ndrivers/spi/spi-coldfire-qspi.c-408-\tif (status) {\n--\ndrivers/spi/spi-cs42l43.c=312=static int cs42l43_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cs42l43.c-409-\ndrivers/spi/spi-cs42l43.c:410:\tret = devm_spi_register_controller(priv-\u003edev, priv-\u003ectlr);\ndrivers/spi/spi-cs42l43.c-411-\tif (ret)\n--\ndrivers/spi/spi-dln2.c=680=static int dln2_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-dln2.c-758-\ndrivers/spi/spi-dln2.c:759:\tret = spi_register_controller(host);\ndrivers/spi/spi-dln2.c-760-\tif (ret \u003c 0) {\n--\ndrivers/spi/spi-dw-core.c=1289=int dw_spi_add_controller(struct device *dev, struct dw_spi *dws)\n--\ndrivers/spi/spi-dw-core.c-1368-\ndrivers/spi/spi-dw-core.c:1369:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-dw-core.c-1370-\tif (ret) {\n--\ndrivers/spi/spi-ep93xx.c=623=static int ep93xx_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-ep93xx.c-692-\ndrivers/spi/spi-ep93xx.c:693:\terror = spi_register_controller(host);\ndrivers/spi/spi-ep93xx.c-694-\tif (error) {\n--\ndrivers/spi/spi-falcon.c=391=static int falcon_sflash_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-falcon.c-407-\ndrivers/spi/spi-falcon.c:408:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-falcon.c-409-}\n--\ndrivers/spi/spi-fsi.c=531=static int fsi_spi_probe(struct fsi_device *fsi)\n--\ndrivers/spi/spi-fsi.c-571-\ndrivers/spi/spi-fsi.c:572:\t\trc = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-fsi.c-573-\t\tif (rc)\n--\ndrivers/spi/spi-fsl-dspi.c=1541=static int dspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-fsl-dspi.c-1693-\ndrivers/spi/spi-fsl-dspi.c:1694:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-fsl-dspi.c-1695-\tif (ret != 0) {\n--\ndrivers/spi/spi-fsl-espi.c=661=static int fsl_espi_probe(struct device *dev, struct resource *mem,\n--\ndrivers/spi/spi-fsl-espi.c-715-\ndrivers/spi/spi-fsl-espi.c:716:\tret = spi_register_controller(host);\ndrivers/spi/spi-fsl-espi.c-717-\tif (ret \u003c 0)\n--\ndrivers/spi/spi-fsl-lpspi.c=890=static int fsl_lpspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-fsl-lpspi.c-1001-\ndrivers/spi/spi-fsl-lpspi.c:1002:\tret = spi_register_controller(controller);\ndrivers/spi/spi-fsl-lpspi.c-1003-\tif (ret \u003c 0) {\ndrivers/spi/spi-fsl-lpspi.c:1004:\t\tdev_err_probe(\u0026pdev-\u003edev, ret, \"spi_register_controller error\\n\");\ndrivers/spi/spi-fsl-lpspi.c-1005-\t\tgoto free_dma;\n--\ndrivers/spi/spi-fsl-qspi.c=894=static int fsl_qspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-fsl-qspi.c-988-\ndrivers/spi/spi-fsl-qspi.c:989:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-fsl-qspi.c-990-\tif (ret)\n--\ndrivers/spi/spi-fsl-spi.c=528=static struct spi_controller *fsl_spi_probe(struct device *dev,\n--\ndrivers/spi/spi-fsl-spi.c-616-\ndrivers/spi/spi-fsl-spi.c:617:\tret = spi_register_controller(host);\ndrivers/spi/spi-fsl-spi.c-618-\tif (ret \u003c 0)\n--\ndrivers/spi/spi-geni-qcom.c=1069=static int spi_geni_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-geni-qcom.c-1156-\ndrivers/spi/spi-geni-qcom.c:1157:\treturn devm_spi_register_controller(dev, spi);\ndrivers/spi/spi-geni-qcom.c-1158-}\n--\ndrivers/spi/spi-gpio.c=339=static int spi_gpio_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-gpio.c-412-\ndrivers/spi/spi-gpio.c:413:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-gpio.c-414-}\n--\ndrivers/spi/spi-gxp.c=250=static int gxp_spifi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-gxp.c-287-\ndrivers/spi/spi-gxp.c:288:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-gxp.c-289-\tif (ret) {\n--\ndrivers/spi/spi-hisi-kunpeng.c=461=static int hisi_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-hisi-kunpeng.c-523-\ndrivers/spi/spi-hisi-kunpeng.c:524:\tret = spi_register_controller(host);\ndrivers/spi/spi-hisi-kunpeng.c-525-\tif (ret)\n--\ndrivers/spi/spi-hisi-sfc-v3xx.c=430=static int hisi_sfc_v3xx_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-hisi-sfc-v3xx.c-496-\ndrivers/spi/spi-hisi-sfc-v3xx.c:497:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-hisi-sfc-v3xx.c-498-\tif (ret)\n--\ndrivers/spi/spi-img-spfi.c=525=static int img_spfi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-img-spfi.c-641-\ndrivers/spi/spi-img-spfi.c:642:\tret = spi_register_controller(host);\ndrivers/spi/spi-img-spfi.c-643-\tif (ret)\n--\ndrivers/spi/spi-imx.c=2219=static int spi_imx_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-imx.c-2359-\ndrivers/spi/spi-imx.c:2360:\tret = spi_register_controller(controller);\ndrivers/spi/spi-imx.c-2361-\tif (ret) {\n--\ndrivers/spi/spi-ingenic.c=383=static int spi_ingenic_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-ingenic.c-454-\ndrivers/spi/spi-ingenic.c:455:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-ingenic.c-456-\tif (ret)\n--\ndrivers/spi/spi-intel.c=1489=int intel_spi_probe(struct device *dev, void __iomem *base,\n--\ndrivers/spi/spi-intel.c-1512-\ndrivers/spi/spi-intel.c:1513:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-intel.c-1514-\tif (ret)\n--\ndrivers/spi/spi-jcore.c=141=static int jcore_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-jcore.c-201-\t/* Register our spi controller */\ndrivers/spi/spi-jcore.c:202:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-jcore.c-203-}\n--\ndrivers/spi/spi-kspi2.c=338=static int kspi2_probe(struct auxiliary_device *auxdev,\n--\ndrivers/spi/spi-kspi2.c-392-\thost-\u003etransfer_one = kspi2_transfer_one;\ndrivers/spi/spi-kspi2.c:393:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-kspi2.c-394-\tif (ret) {\n--\ndrivers/spi/spi-lantiq-ssc.c=904=static int lantiq_ssc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-lantiq-ssc.c-990-\ndrivers/spi/spi-lantiq-ssc.c:991:\terr = spi_register_controller(host);\ndrivers/spi/spi-lantiq-ssc.c-992-\tif (err) {\n--\ndrivers/spi/spi-ljca.c=218=static int ljca_spi_probe(struct auxiliary_device *auxdev,\n--\ndrivers/spi/spi-ljca.c-242-\ndrivers/spi/spi-ljca.c:243:\tret = spi_register_controller(controller);\ndrivers/spi/spi-ljca.c-244-\tif (ret)\n--\ndrivers/spi/spi-loongson-core.c=196=int loongson_spi_init_controller(struct device *dev, void __iomem *regs)\n--\ndrivers/spi/spi-loongson-core.c-227-\ndrivers/spi/spi-loongson-core.c:228:\treturn devm_spi_register_controller(dev, controller);\ndrivers/spi/spi-loongson-core.c-229-}\n--\ndrivers/spi/spi-lp8841-rtc.c=182=spi_lp8841_rtc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-lp8841-rtc.c-212-\t/* register with the SPI framework */\ndrivers/spi/spi-lp8841-rtc.c:213:\tret = devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-lp8841-rtc.c-214-\tif (ret) {\n--\ndrivers/spi/spi-ma35d1-qspi.c=592=static int nuvoton_qspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-ma35d1-qspi.c-659-\ndrivers/spi/spi-ma35d1-qspi.c:660:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-ma35d1-qspi.c-661-\tif (ret)\n--\ndrivers/spi/spi-meson-spicc.c=978=static int meson_spicc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-meson-spicc.c-1074-\ndrivers/spi/spi-meson-spicc.c:1075:\tret = spi_register_controller(host);\ndrivers/spi/spi-meson-spicc.c-1076-\tif (ret) {\n--\ndrivers/spi/spi-meson-spifc.c=285=static int meson_spifc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-meson-spifc.c-331-\ndrivers/spi/spi-meson-spifc.c:332:\tret = devm_spi_register_controller(spifc-\u003edev, host);\ndrivers/spi/spi-meson-spifc.c-333-\tif (ret)\n--\ndrivers/spi/spi-microchip-core-qspi.c=719=static int mchp_coreqspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-microchip-core-qspi.c-792-\ndrivers/spi/spi-microchip-core-qspi.c:793:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-microchip-core-qspi.c-794-\tif (ret)\ndrivers/spi/spi-microchip-core-qspi.c-795-\t\treturn dev_err_probe(\u0026pdev-\u003edev, ret,\ndrivers/spi/spi-microchip-core-qspi.c:796:\t\t\t\t     \"spi_register_controller failed\\n\");\ndrivers/spi/spi-microchip-core-qspi.c-797-\n--\ndrivers/spi/spi-microchip-core-spi.c=287=static int mchp_corespi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-microchip-core-spi.c-386-\ndrivers/spi/spi-microchip-core-spi.c:387:\tret = spi_register_controller(host);\ndrivers/spi/spi-microchip-core-spi.c-388-\tif (ret) {\n--\ndrivers/spi/spi-mpc512x-psc.c=458=static int mpc512x_psc_spi_of_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mpc512x-psc.c-513-\ndrivers/spi/spi-mpc512x-psc.c:514:\treturn devm_spi_register_controller(dev, host);\ndrivers/spi/spi-mpc512x-psc.c-515-}\n--\ndrivers/spi/spi-mpc52xx-psc.c=294=static int mpc52xx_psc_spi_of_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mpc52xx-psc.c-343-\ndrivers/spi/spi-mpc52xx-psc.c:344:\treturn devm_spi_register_controller(dev, host);\ndrivers/spi/spi-mpc52xx-psc.c-345-}\n--\ndrivers/spi/spi-mpc52xx.c=387=static int mpc52xx_spi_probe(struct platform_device *op)\n--\ndrivers/spi/spi-mpc52xx.c-504-\tdev_dbg(\u0026op-\u003edev, \"registering spi_controller struct\\n\");\ndrivers/spi/spi-mpc52xx.c:505:\trc = spi_register_controller(host);\ndrivers/spi/spi-mpc52xx.c-506-\tif (rc)\n--\ndrivers/spi/spi-mpfs.c=527=static int mpfs_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mpfs.c-576-\ndrivers/spi/spi-mpfs.c:577:\tret = spi_register_controller(host);\ndrivers/spi/spi-mpfs.c-578-\tif (ret) {\n--\ndrivers/spi/spi-mt65xx.c=1175=static int mtk_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mt65xx.c-1327-\ndrivers/spi/spi-mt65xx.c:1328:\tret = spi_register_controller(host);\ndrivers/spi/spi-mt65xx.c-1329-\tif (ret) {\n--\ndrivers/spi/spi-mt7621.c=316=static int mt7621_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mt7621.c-369-\ndrivers/spi/spi-mt7621.c:370:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-mt7621.c-371-}\n--\ndrivers/spi/spi-mtk-nor.c=810=static int mtk_nor_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mtk-nor.c-920-\ndrivers/spi/spi-mtk-nor.c:921:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-mtk-nor.c-922-\tif (ret \u003c 0)\n--\ndrivers/spi/spi-mtk-snfi.c=1338=static int mtk_snand_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mtk-snfi.c-1464-\tctlr-\u003emode_bits = SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_DUAL | SPI_TX_QUAD;\ndrivers/spi/spi-mtk-snfi.c:1465:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-mtk-snfi.c-1466-\tif (ret) {\ndrivers/spi/spi-mtk-snfi.c:1467:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed.\\n\");\ndrivers/spi/spi-mtk-snfi.c-1468-\t\tgoto free_buf;\n--\ndrivers/spi/spi-mux.c=126=static int spi_mux_probe(struct spi_device *spi)\n--\ndrivers/spi/spi-mux.c-164-\ndrivers/spi/spi-mux.c:165:\treturn devm_spi_register_controller(\u0026spi-\u003edev, ctlr);\ndrivers/spi/spi-mux.c-166-}\n--\ndrivers/spi/spi-mxic.c=754=static int mxic_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mxic.c-818-\ndrivers/spi/spi-mxic.c:819:\tret = spi_register_controller(host);\ndrivers/spi/spi-mxic.c-820-\tif (ret) {\ndrivers/spi/spi-mxic.c:821:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-mxic.c-822-\t\tpm_runtime_disable(\u0026pdev-\u003edev);\n--\ndrivers/spi/spi-mxs.c=528=static int mxs_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mxs.c-620-\ndrivers/spi/spi-mxs.c:621:\tret = spi_register_controller(host);\ndrivers/spi/spi-mxs.c-622-\tif (ret) {\n--\ndrivers/spi/spi-npcm-fiu.c=690=static int npcm_fiu_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-npcm-fiu.c-747-\ndrivers/spi/spi-npcm-fiu.c:748:\treturn devm_spi_register_controller(dev, ctrl);\ndrivers/spi/spi-npcm-fiu.c-749-}\n--\ndrivers/spi/spi-npcm-pspi.c=340=static int npcm_pspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-npcm-pspi.c-412-\ndrivers/spi/spi-npcm-pspi.c:413:\tret = spi_register_controller(host);\ndrivers/spi/spi-npcm-pspi.c-414-\tif (ret)\n--\ndrivers/spi/spi-nxp-fspi.c=1394=static int nxp_fspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-nxp-fspi.c-1506-\ndrivers/spi/spi-nxp-fspi.c:1507:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, ctlr);\ndrivers/spi/spi-nxp-fspi.c-1508-\n--\ndrivers/spi/spi-nxp-xspi.c=1340=static int nxp_xspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-nxp-xspi.c-1427-\n\n"
}

27/2 2026/09/19 06:10 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 60288
							output: 24
							thoughts: 2117
						

Thoughts:
**Analysis of VSC73xx SPI Driver Reachability in Standard QEMU/GCE Environments**

Okay, let's break this down. My initial thought process revolves around a few key points: First, I'm examining a patch that modifies the `vsc73xx` SPI driver, specifically looking at error handling in the probe and remove functions.  I immediately start considering how this driver is *reachable* within standard fuzzing environments (QEMU, GCE).  I'm familiar with the `spi-ch341.c` and `msi2500.c` drivers and remember USB devices can register as SPI controllers, which sparks some ideas around using raw gadgets to possibly instantiate SPI devices.  But I need to determine if this is a viable path for the VSC73xx driver, specifically if sysfs or Syzkaller has descriptions for `new_device` under `/sys/class/spi_master/...`

I quickly zero in on the core principle of patch fuzzing, which prioritizes *reachability*. The code I'm looking at, `vsc73xx_spi_probe`, appears to relate to a Vitesse VSC73xx Ethernet switch IC.  I'm thinking, "Is this a typical device that is going to be used in a standard QEMU environment?" I know these are specialized physical Ethernet switch chips (ASICs) connected to a SPI bus, which leads me to the negative criteria for fuzzing. I have to see if this driver is considered "structurally unreachable hardware" according to the instructions.

I'm thinking about DSA, the Distributed Switch Architecture. I know that DSA drivers manage external physical Ethernet switch chips.  I know that these chips *aren't* emulated in standard QEMU (or GCE, for that matter). In fact, I'm pretty certain that a VSC73xx chip would be completely absent from any standard QEMU setup. If `vsc73xx_spi_probe` is called, it would read the chip ID via SPI, and if the probe is successful, this tells me that the probe reads a register over the SPI bus, and verifies that the chip ID is expected. However, the `vsc73xx_read` will return garbage, meaning it is expected to fail with an `-ENODEV` error.  Even before this point, can `vsc73xx_spi_probe` be called? I know I can check for any device tree, ACPI, or SPI devices for the VSC73xx in standard QEMU x86_64, but I doubt I'll find any.

Then it hits me: this is likely a *textbook* case of "structurally unreachable hardware".  VSC73xx is a vendor-specific Ethernet switch chip, and therefore, it is hardware that's not emulated in standard QEMU or GCE. Further, it's not likely to be instantiated on SPI because there is no SPI controller in standard x86_64 QEMU.  Even if USB-to-SPI drivers exist, they don't emulate the communications between the CH341 USB-to-SPI bridge communicating with a Vitesse switch chip. This is an unreachable execution path.

The patch modifies the probe and remove functions (error paths, and the teardown), but these paths are *unreachable* in the test environments. I'm reasonably certain this should be flagged as `WorthFuzzing=false`.



28/2 2026/09/19 06:10 tool codesearch-dir-index
0m Args:
{
  "Dir": "drivers/net/dsa"
}

Results:
{
  "Files": [
    "bcm_sf2.c",
    "bcm_sf2.h",
    "bcm_sf2_cfp.c",
    "bcm_sf2_regs.h",
    "dsa_loop.c",
    "ks8995.c",
    "lan9303-core.c",
    "lan9303.h",
    "lan9303_i2c.c",
    "lan9303_mdio.c",
    "mt7530-mdio.c",
    "mt7530-mmio.c",
    "mt7530.c",
    "mt7530.h",
    "mt7628.c",
    "mv88e6060.c",
    "mv88e6060.h",
    "rzn1_a5psw.c",
    "rzn1_a5psw.h",
    "vitesse-vsc73xx-core.c",
    "vitesse-vsc73xx-platform.c",
    "vitesse-vsc73xx-spi.c",
    "vitesse-vsc73xx.h"
  ],
  "Subdirs": [
    "b53",
    "hirschmann",
    "lantiq",
    "microchip",
    "motorcomm",
    "mv88e6xxx",
    "mxl862xx",
    "netc",
    "ocelot",
    "qca",
    "realtek",
    "sja1105",
    "xrs700x"
  ]
}

29/2 2026/09/19 06:10 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 63555
							output: 144
							thoughts: 561
						

Thoughts:
**Triage Decision: Code is Structurally Unreachable for Fuzzing**

Okay, let's break this down. I've been looking at the `drivers/net/dsa/` directory, and it's clear that `dsa_loop.c` is a software loopback driver, a test fixture. The other drivers, like `vitesse-vsc73xx-spi.c`, are *hardware* Ethernet switch drivers. Specifically, `vitesse-vsc73xx-spi.c` deals with the SPI bus interaction for Vitesse's VSC7385/7388/7395/7398 switch ASICs.

Now, the patch in question modifies `vsc73xx_spi_probe` and `vsc73xx_spi_remove`. The question is, can this code actually be reached during fuzzing? The answer is a definitive *no*. Standard QEMU and Google Compute Engine (GCE) do *not* emulate a VSC73xx SPI device. This driver requires a physical Vitesse switch connected via SPI. Since that's not available in those virtual environments, the code is structurally unreachable.

Let's be clear:

1.  This is a *hardware-specific* driver.
2.  The code changes are in error paths within the probe function and the driver remove callback.
3.  The driver remove path is *also* unreachable in a standard fuzzing setup, only executed during device teardown or manual unbinding.

Therefore, since the modified code is structurally unreachable, there's no point in fuzzing it. I'm going to set `WorthFuzzing` to `false`. The reasoning is straightforward: hardware-specific, not emulated in the fuzzing environments, and structurally unreachable within standard QEMU/GCE setups. I'll include that clear explanation in the `Reasoning` field. And, of course, `FocusSymbols` and `EnableConfigs` will be empty arrays because we're not fuzzing this. I've double-checked, `NET_DSA_VITESSE_VSC73XX_SPI` is definitely not reachable in any way. I am confident in my decision.



30/2 2026/09/19 06:10 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies error handling in the probe function and device teardown in the remove function of the Vitesse VSC73xx SPI Ethernet switch driver (drivers/net/dsa/vitesse-vsc73xx-spi.c) to fix spi_device reference leaks. This driver interacts with specific physical switch hardware (Vitesse VSC7385/7388/7395/7398) connected via SPI, which is structurally unreachable in standard virtualized environments (QEMU/GCE).",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies error handling in the probe function and device teardown in the remove function of the Vitesse VSC73xx SPI Ethernet switch driver (drivers/net/dsa/vitesse-vsc73xx-spi.c) to fix spi_device reference leaks. This driver interacts with specific physical switch hardware (Vitesse VSC7385/7388/7395/7398) connected via SPI, which is structurally unreachable in standard virtualized environments (QEMU/GCE).",
  "WorthFuzzing": false
}

31/1 2026/09/19 06:10 action If
0m Args:
{
  "WorthFuzzing": false
}

Results:
null

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)