| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/20 22:48 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies drivers/net/phy/mediatek/mtk-ge.c by adding a custom match function mt753x_gphy_match() for MediaTek MT7530 Gigabit Ethernet PHYs. This code can only be reached when an MDIO bus registers a PHY device matching MTK_GPHY_ID_MT7530, which requires physical MediaTek switch hardware (or specific MediaTek SoC Device Tree bindings on ARM/MIPS platforms). Because this hardware is not emulated in standard QEMU/GCE virtualization environments, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/20 22:48 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 813ea3ec32fc07b835f00c1df8e43799ef29cd67\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sun Sep 20 22:48:45 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c\nindex 96d8ac5154e5e..f801966bb4ee6 100644\n--- a/drivers/net/phy/mediatek/mtk-ge.c\n+++ b/drivers/net/phy/mediatek/mtk-ge.c\n@@ -101,6 +101,18 @@ static int mt7530_phy_config_init(struct phy_device *phydev)\n \treturn 0;\n }\n \n+/*\n+ * MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY\n+ * does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY\n+ * advertizes gigabit capability.\n+ */\n+static int mt753x_gphy_match(struct phy_device *phydev,\n+\t\t\t const struct phy_driver *phydrv)\n+{\n+\treturn genphy_match_phy_device(phydev, phydrv) \u0026\u0026\n+\t (phy_read(phydev, MII_ESTATUS) \u0026 ESTATUS_1000_TFULL) != 0;\n+}\n+\n static int mt7531_phy_config_init(struct phy_device *phydev)\n {\n \tmtk_gephy_config_init(phydev);\n@@ -135,6 +147,7 @@ static struct phy_driver mtk_gephy_driver[] = {\n \t\t */\n \t\t.config_intr\t= genphy_no_config_intr,\n \t\t.handle_interrupt = genphy_handle_interrupt_no_ack,\n+\t\t.match_phy_device = mt753x_gphy_match,\n \t\t.suspend\t= genphy_suspend,\n \t\t.resume\t\t= genphy_resume,\n \t\t.read_page\t= mtk_phy_read_page,\n"
} |
| 2/1 | 2026/09/20 22:48 | agent | patch-evaluator |
2mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies drivers/net/phy/mediatek/mtk-ge.c by adding a custom match function mt753x_gphy_match() for MediaTek MT7530 Gigabit Ethernet PHYs. This code can only be reached when an MDIO bus registers a PHY device matching MTK_GPHY_ID_MT7530, which requires physical MediaTek switch hardware (or specific MediaTek SoC Device Tree bindings on ARM/MIPS platforms). Because this hardware is not emulated in standard QEMU/GCE virtualization environments, the modified code is structurally unreachable for fuzzing.",
"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 813ea3ec32fc07b835f00c1df8e43799ef29cd67
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Sep 20 22:48:45 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c
index 96d8ac5154e5e..f801966bb4ee6 100644
--- a/drivers/net/phy/mediatek/mtk-ge.c
+++ b/drivers/net/phy/mediatek/mtk-ge.c
@@ -101,6 +101,18 @@ static int mt7530_phy_config_init(struct phy_device *phydev)
return 0;
}
+/*
+ * MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY
+ * does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY
+ * advertizes gigabit capability.
+ */
+static int mt753x_gphy_match(struct phy_device *phydev,
+ const struct phy_driver *phydrv)
+{
+ return genphy_match_phy_device(phydev, phydrv) &&
+ (phy_read(phydev, MII_ESTATUS) & ESTATUS_1000_TFULL) != 0;
+}
+
static int mt7531_phy_config_init(struct phy_device *phydev)
{
mtk_gephy_config_init(phydev);
@@ -135,6 +147,7 @@ static struct phy_driver mtk_gephy_driver[] = {
*/
.config_intr = genphy_no_config_intr,
.handle_interrupt = genphy_handle_interrupt_no_ack,
+ .match_phy_device = mt753x_gphy_match,
.suspend = genphy_suspend,
.resume = genphy_resume,
.read_page = mtk_phy_read_page,
|
| 3/2 | 2026/09/20 22:48 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3164 output: 43 thoughts: 658 Thoughts: **Analyzing a Network PHY Driver Patch** Okay, let's dive into this patch. It looks like we're dealing with a fix or enhancement to the MediaTek Gigabit Ethernet PHY driver, specifically `mtk-ge.c`. The commit message is pretty generic, mentioning "syz-cluster" and a "patch under review," so it's probably an automated fuzzing report. Let's see what's changed. Looking at the diff, the primary addition seems to be a new `mt753x_gphy_match` function and its inclusion within the `mtk_gephy_driver` struct. This is interesting. The comments highlight a potential issue: the `MTK_GPHY_ID_MT7530` ID is apparently also used for an EcoNet SoC FE phy, which doesn't advertise `ESTATUS_1000_TFULL`. So, the fix makes the driver more specific in how it matches the target PHY. We need to confirm that this change is correct. The new `mt753x_gphy_match` function uses a combination of `genphy_match_phy_device` (which likely performs the standard PHY ID matching) and then adds a check for the `ESTATUS_1000_TFULL` bit in the MII Extended Status register. This makes sense; it adds a Gigabit capability check to distinguish the MT7530 from the FE PHY. This should prevent the driver from accidentally attaching to the wrong PHY. It's a targeted and efficient fix, good. The rest of the patch appears to be straightforward; it's just adding the new matching function to the driver definition. So, no new functionality is being introduced, only an update to existing functionality. Let's do a quick scan of the surrounding code in `mtk-ge.c` to see if there is any other related code or if anything looks like it might interact with this. Then, we can confirm the logic around `ESTATUS_1000_TFULL` is correct for the MT7530 family. |
| 4/2 | 2026/09/20 22:48 | tool | read-file |
0mArgs:{
"File": "drivers/net/phy/mediatek/mtk-ge.c",
"FirstLine": 100,
"LineCount": 70
}Results: {
"Contents": " 100:\t\n 101:\t\treturn 0;\n 102:\t}\n 103:\t\n 104:\t/*\n 105:\t * MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY\n 106:\t * does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY\n 107:\t * advertizes gigabit capability.\n 108:\t */\n 109:\tstatic int mt753x_gphy_match(struct phy_device *phydev,\n 110:\t\t\t\t const struct phy_driver *phydrv)\n 111:\t{\n 112:\t\treturn genphy_match_phy_device(phydev, phydrv) \u0026\u0026\n 113:\t\t (phy_read(phydev, MII_ESTATUS) \u0026 ESTATUS_1000_TFULL) != 0;\n 114:\t}\n 115:\t\n 116:\tstatic int mt7531_phy_config_init(struct phy_device *phydev)\n 117:\t{\n 118:\t\tmtk_gephy_config_init(phydev);\n 119:\t\n 120:\t\t/* PHY link down power saving enable */\n 121:\t\tphy_set_bits(phydev, 0x17, BIT(4));\n 122:\t\tphy_modify_mmd(phydev, MDIO_MMD_VEND1, MTK_PHY_RXADC_CTRL_RG7,\n 123:\t\t\t MTK_PHY_DA_AD_BUF_BIAS_LP_MASK,\n 124:\t\t\t FIELD_PREP(MTK_PHY_DA_AD_BUF_BIAS_LP_MASK, 0x3));\n 125:\t\n 126:\t\t/* Set TX Pair delay selection */\n 127:\t\tphy_modify_mmd(phydev, MDIO_MMD_VEND1, MTK_PHY_GBE_MODE_TX_DELAY_SEL,\n 128:\t\t\t MTK_TX_DELAY_PAIR_B_MASK | MTK_TX_DELAY_PAIR_D_MASK,\n 129:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_B_MASK, 0x4) |\n 130:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_D_MASK, 0x4));\n 131:\t\tphy_modify_mmd(phydev, MDIO_MMD_VEND1, MTK_PHY_TEST_MODE_TX_DELAY_SEL,\n 132:\t\t\t MTK_TX_DELAY_PAIR_B_MASK | MTK_TX_DELAY_PAIR_D_MASK,\n 133:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_B_MASK, 0x4) |\n 134:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_D_MASK, 0x4));\n 135:\t\n 136:\t\treturn 0;\n 137:\t}\n 138:\t\n 139:\tstatic struct phy_driver mtk_gephy_driver[] = {\n 140:\t\t{\n 141:\t\t\tPHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),\n 142:\t\t\t.name\t\t= \"MediaTek MT7530 PHY\",\n 143:\t\t\t.probe\t\t= mt7530_phy_probe,\n 144:\t\t\t.config_init\t= mt7530_phy_config_init,\n 145:\t\t\t/* Interrupts are handled by the switch, not the PHY\n 146:\t\t\t * itself.\n 147:\t\t\t */\n 148:\t\t\t.config_intr\t= genphy_no_config_intr,\n 149:\t\t\t.handle_interrupt = genphy_handle_interrupt_no_ack,\n 150:\t\t\t.match_phy_device = mt753x_gphy_match,\n 151:\t\t\t.suspend\t= genphy_suspend,\n 152:\t\t\t.resume\t\t= genphy_resume,\n 153:\t\t\t.read_page\t= mtk_phy_read_page,\n 154:\t\t\t.write_page\t= mtk_phy_write_page,\n 155:\t\t},\n 156:\t\t{\n 157:\t\t\tPHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531),\n 158:\t\t\t.name\t\t= \"MediaTek MT7531 PHY\",\n 159:\t\t\t.config_init\t= mt7531_phy_config_init,\n 160:\t\t\t/* Interrupts are handled by the switch, not the PHY\n 161:\t\t\t * itself.\n 162:\t\t\t */\n 163:\t\t\t.config_intr\t= genphy_no_config_intr,\n 164:\t\t\t.handle_interrupt = genphy_handle_interrupt_no_ack,\n 165:\t\t\t.suspend\t= genphy_suspend,\n 166:\t\t\t.resume\t\t= genphy_resume,\n 167:\t\t\t.read_page\t= mtk_phy_read_page,\n 168:\t\t\t.write_page\t= mtk_phy_write_page,\n 169:\t\t},\n"
} |
| 5/2 | 2026/09/20 22:48 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5696 output: 29 thoughts: 78 Thoughts: Okay, let's break this down. **Diving into the `mtk-ge.c` Driver** Alright, so `mtk-ge.c`... right, that's a PHY driver. Specifically, it's for those MediaTek Gigabit Ethernet PHYs – the MT7530 and MT7531, if memory serves. I need to refresh my memory on the specific configuration options, so I'll check the usual suspects. I'll need to look into the relevant `Makefile` and `Kconfig` files within the `drivers/net/phy/mediatek/` directory. That's where the conditional compilation magic happens. Time to hunt down that Kconfig symbol and confirm my assumptions! |
| 6/2 | 2026/09/20 22:48 | tool | grepper |
0mArgs:{
"Expression": "mtk-ge",
"PathPrefix": "drivers/net/phy"
}Results: {
"Output": "drivers/net/phy/mediatek/Makefile=3=obj-$(CONFIG_MEDIATEK_FE_SOC_PHY)\t+= mtk-fe-soc.o\ndrivers/net/phy/mediatek/Makefile:4:obj-$(CONFIG_MEDIATEK_GE_PHY)\t\t+= mtk-ge.o\ndrivers/net/phy/mediatek/Makefile:5:obj-$(CONFIG_MEDIATEK_GE_SOC_PHY)\t+= mtk-ge-soc.o\ndrivers/net/phy/mediatek/Makefile-6-obj-$(CONFIG_MTK_NET_PHYLIB)\t\t+= mtk-phy-lib.o\n"
} |
| 7/2 | 2026/09/20 22:48 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6121 output: 32 thoughts: 28 Thoughts: Here's my thought process, as if I were considering those Kconfig files: **Investigating PHY Configuration Options** Okay, so I need to figure out how these PHY drivers are being configured. I'm pretty sure the key is going to be in the Kconfig files. They define the build-time configuration options, dependencies, and help text. Given this, I'm thinking I should start with the more general location, `/drivers/net/phy/Kconfig`. That should give me the top-level options related to PHY support overall, right? From there, I can drill down. However, since I know Mediatek is a common PHY vendor, I also think I should check the Mediatek-specific Kconfig file directly, which would be in `/drivers/net/phy/mediatek/Kconfig`. It's possible the top-level Kconfig file defers to the vendor-specific one or includes it. Or, perhaps Mediatek has some unique options I need to be aware of. I'll need to look at both locations to get a full picture of the configuration options available and how they interact. Let's see what each file reveals. |
| 8/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "MEDIATEK_GE_PHY",
"PathPrefix": "drivers/net/phy"
}Results: {
"Output": "drivers/net/phy/mediatek/Kconfig=2=config MEDIATEK_2P5GE_PHY\n--\ndrivers/net/phy/mediatek/Kconfig-12-\ndrivers/net/phy/mediatek/Kconfig:13:config MEDIATEK_GE_PHY\ndrivers/net/phy/mediatek/Kconfig-14-\ttristate \"MediaTek Gigabit Ethernet PHYs\"\n--\ndrivers/net/phy/mediatek/Makefile=3=obj-$(CONFIG_MEDIATEK_FE_SOC_PHY)\t+= mtk-fe-soc.o\ndrivers/net/phy/mediatek/Makefile:4:obj-$(CONFIG_MEDIATEK_GE_PHY)\t\t+= mtk-ge.o\ndrivers/net/phy/mediatek/Makefile-5-obj-$(CONFIG_MEDIATEK_GE_SOC_PHY)\t+= mtk-ge-soc.o\n"
} |
| 9/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6654 output: 37 thoughts: 17 Thoughts: Here's a summary of my thought process, as if I were analyzing that Kconfig file: **Diving into the Mediatek PHY Configuration** Okay, let's get into the heart of this Mediatek PHY configuration. The starting point, as always with these things, is the `drivers/net/phy/mediatek/Kconfig` file. I'm immediately interested in seeing what options are being exposed to the user, and how they relate to the underlying hardware. I'll be looking for any clues about the specific Mediatek SoCs supported, the PHY variants, and any configurable features like power management or debugging options. My expertise tells me to quickly scan for dependencies – are there specific hardware revisions, clock configurations, or other drivers that must be enabled before these PHY options become available? Are there any obvious areas for potential conflicts with other network drivers or configurations? I'll be particularly interested in anything related to MT7530, MT7621, or newer PHYs. I want to know which PHYs are actually well-supported, and if there are clear areas where the configuration could be optimized, or if there is a glaring deficiency. |
| 10/2 | 2026/09/20 22:49 | tool | read-file |
0mArgs:{
"File": "drivers/net/phy/mediatek/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tconfig MEDIATEK_2P5GE_PHY\n 3:\t\ttristate \"MediaTek 2.5Gb Ethernet PHYs\"\n 4:\t\tdepends on (ARM64 \u0026\u0026 ARCH_MEDIATEK) || COMPILE_TEST\n 5:\t\tselect MTK_NET_PHYLIB\n 6:\t\thelp\n 7:\t\t Supports MediaTek SoC built-in 2.5Gb Ethernet PHYs.\n 8:\t\n 9:\t\t This will load necessary firmware and add appropriate time delay.\n 10:\t\t Accelerate this procedure through internal pbus instead of MDIO\n 11:\t\t bus. Certain link-up issues will also be fixed here.\n 12:\t\n 13:\tconfig MEDIATEK_GE_PHY\n 14:\t\ttristate \"MediaTek Gigabit Ethernet PHYs\"\n 15:\t\tselect MTK_NET_PHYLIB\n 16:\t\thelp\n 17:\t\t Supports the MediaTek non-built-in Gigabit Ethernet PHYs.\n 18:\t\n 19:\t\t Non-built-in Gigabit Ethernet PHYs include mt7530/mt7531.\n 20:\t\t You may find mt7530 inside mt7621. This driver shares some\n 21:\t\t common operations with MediaTek SoC built-in Gigabit\n 22:\t\t Ethernet PHYs.\n 23:\t\n 24:\tconfig MEDIATEK_FE_SOC_PHY\n 25:\t\ttristate \"MediaTek SoC Fast Ethernet PHYs\"\n 26:\t\tdepends on SOC_MT7620 || COMPILE_TEST\n 27:\t\thelp\n 28:\t\t Support for MediaTek MT7628 built-in Fast Ethernet PHYs.\n 29:\t\t This driver only sets an initialization bit required for the PHY\n 30:\t\t to establish 100 Mbps links. All other PHY operations are handled\n 31:\t\t by the kernel's generic PHY code.\n 32:\t\n 33:\tconfig MEDIATEK_GE_SOC_PHY\n 34:\t\ttristate \"MediaTek SoC Gigabit Ethernet PHYs\"\n 35:\t\tdepends on ARM64 || ECONET || COMPILE_TEST\n 36:\t\tdepends on ARCH_AIROHA || (ARCH_MEDIATEK \u0026\u0026 NVMEM_MTK_EFUSE) || \\\n 37:\t\t\t ECONET || COMPILE_TEST\n 38:\t\tselect MTK_NET_PHYLIB\n 39:\t\tselect PHY_PACKAGE\n 40:\t\thelp\n"
} |
| 11/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7603 output: 36 thoughts: 385 Thoughts: **My Assessment of PHY Driver Instantiation in Virtualized Environments** Okay, let's break this down. My primary question is this: can I realistically instantiate, probe, or even fuzz a MediaTek MT7530/MT7531 Gigabit Ethernet PHY driver within a standard virtualized environment like QEMU or Google Compute Engine on an amd64 architecture? First, I need to understand if the hardware's structural nature makes it immediately unreachable. The document mentions *structurally unreachable hardware* – specifically vendor-specific PCIe switches, SmartNICs, GPU drivers – things that typically demand physical ASIC/PCIe cards that QEMU doesn't emulate. This is a crucial distinction. I also need to consider *unreachable execution paths* which would involve scenarios like driver teardown callbacks that only trigger during physical PCI hot-unplug events or manual driver unbinding through sysfs. Those paths are unlikely to be reproducible. Now, the core of the issue: what's the typical probing mechanism for PHY drivers in Linux, specifically related to MDIO? Can PHY devices be created or simulated independently? Do they inherently require a specific MDIO bus or physical hardware? This is the crux. I need to quickly assess if an *mdio-gpio* type interface could potentially exist as an alternative. Can I create MDIO devices using something like netlink or sysfs? Or is the creation of an MDIO device inextricably linked to the presence of an MDIO bus controller? I need to check if QEMU emulates any MDIO buses that could be relevant, especially for a MediaTek device. It's safe to assume, at this point, that QEMU does *not* emulate a MediaTek MT7530 switch/PHY chip directly. Finally, I need to delve into the realm of *mdio-netlink* or mock MDIO approaches. Does Syzkaller, my go-to fuzzer, have any built-in mechanisms for creating PHY devices? Let's conduct a targeted search within Syzkaller and the kernel source itself. I need to understand how the system is designed to handle MDIO/PHY device creation. That knowledge is key. |
| 12/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "phy_device_create|phy_device_register",
"PathPrefix": "drivers/net/phy"
}Results: {
"Output": "drivers/net/phy/fixed_phy.c=131=struct phy_device *fixed_phy_register(const struct fixed_phy_status *status,\n--\ndrivers/net/phy/fixed_phy.c-162-\ndrivers/net/phy/fixed_phy.c:163:\tret = phy_device_register(phy);\ndrivers/net/phy/fixed_phy.c-164-\tif (ret) {\n--\ndrivers/net/phy/mdio_bus_provider.c=408=static struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr, bool c45)\n--\ndrivers/net/phy/mdio_bus_provider.c-437-\ndrivers/net/phy/mdio_bus_provider.c:438:\terr = phy_device_register(phydev);\ndrivers/net/phy/mdio_bus_provider.c-439-\tif (err) {\n--\ndrivers/net/phy/nxp-tja11xx.c=551=static void tja1102_p1_register(struct work_struct *work)\n--\ndrivers/net/phy/nxp-tja11xx.c-585-\t\t/* Real PHY ID of Port 1 is 0 */\ndrivers/net/phy/nxp-tja11xx.c:586:\t\tphy = phy_device_create(bus, addr, PHY_ID_TJA1102, false, NULL);\ndrivers/net/phy/nxp-tja11xx.c-587-\t\tif (IS_ERR(phy)) {\n--\ndrivers/net/phy/nxp-tja11xx.c-592-\ndrivers/net/phy/nxp-tja11xx.c:593:\t\t/* Overwrite parent device. phy_device_create() set parent to\ndrivers/net/phy/nxp-tja11xx.c-594-\t\t * the mii_bus-\u003edev, which is not correct in case.\n--\ndrivers/net/phy/nxp-tja11xx.c-597-\ndrivers/net/phy/nxp-tja11xx.c:598:\t\tret = of_mdiobus_phy_device_register(bus, phy, child, addr);\ndrivers/net/phy/nxp-tja11xx.c-599-\t\tif (ret) {\n--\ndrivers/net/phy/phy_device.c=638=static int phy_request_driver_module(struct phy_device *dev, u32 phy_id)\n--\ndrivers/net/phy/phy_device.c-657-\ndrivers/net/phy/phy_device.c:658:struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,\ndrivers/net/phy/phy_device.c-659-\t\t\t\t bool is_c45,\n--\ndrivers/net/phy/phy_device.c-749-}\ndrivers/net/phy/phy_device.c:750:EXPORT_SYMBOL(phy_device_create);\ndrivers/net/phy/phy_device.c-751-\n--\ndrivers/net/phy/phy_device.c=981=struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)\n--\ndrivers/net/phy/phy_device.c-1006-\t\tif (!r)\ndrivers/net/phy/phy_device.c:1007:\t\t\treturn phy_device_create(bus, addr, phy_id,\ndrivers/net/phy/phy_device.c-1008-\t\t\t\t\t\t true, \u0026c45_ids);\n--\ndrivers/net/phy/phy_device.c-1010-\ndrivers/net/phy/phy_device.c:1011:\treturn phy_device_create(bus, addr, phy_id, is_c45, \u0026c45_ids);\ndrivers/net/phy/phy_device.c-1012-}\ndrivers/net/phy/phy_device.c=1013=EXPORT_SYMBOL(get_phy_device);\n--\ndrivers/net/phy/phy_device.c-1015-/**\ndrivers/net/phy/phy_device.c:1016: * phy_device_register - Register the phy device on the MDIO bus\ndrivers/net/phy/phy_device.c-1017- * @phydev: phy_device structure to be added to the MDIO bus\ndrivers/net/phy/phy_device.c-1018- */\ndrivers/net/phy/phy_device.c:1019:int phy_device_register(struct phy_device *phydev)\ndrivers/net/phy/phy_device.c-1020-{\n--\ndrivers/net/phy/phy_device.c-1051-}\ndrivers/net/phy/phy_device.c:1052:EXPORT_SYMBOL(phy_device_register);\ndrivers/net/phy/phy_device.c-1053-\n--\ndrivers/net/phy/phy_device.c-1058- * This doesn't free the phy_device itself, it merely reverses the effects\ndrivers/net/phy/phy_device.c:1059: * of phy_device_register(). Use phy_device_free() to free the device\ndrivers/net/phy/phy_device.c-1060- * after calling this function.\n--\ndrivers/net/phy/sfp.c=2105=static int sfp_sm_probe_phy(struct sfp *sfp, int addr, bool is_c45)\n--\ndrivers/net/phy/sfp.c-2120-\ndrivers/net/phy/sfp.c:2121:\terr = phy_device_register(phy);\ndrivers/net/phy/sfp.c-2122-\tif (err) {\ndrivers/net/phy/sfp.c-2123-\t\tphy_device_free(phy);\ndrivers/net/phy/sfp.c:2124:\t\tdev_err(sfp-\u003edev, \"phy_device_register failed: %pe\\n\",\ndrivers/net/phy/sfp.c-2125-\t\t\tERR_PTR(err));\n"
} |
| 13/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10069 output: 30 thoughts: 48 Thoughts: Okay, let's break this down. My initial question is how PHY devices, specifically those physical layer transceivers, get matched and probed within the system. My first instinct is to dive into the code and see how this is handled, and I'll start with `phy_bus_match`. I need to find this function. I'll need to go to the source. Specifically, I know that PHY devices are networking related, so I'm heading to `drivers/net/phy/phy_device.c` to see how it's implemented there. |
| 14/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "phy_bus_match",
"PathPrefix": "drivers/net/phy"
}Results: {
"Output": "drivers/net/phy/phy_device.c=454=EXPORT_SYMBOL_GPL(genphy_match_phy_device);\ndrivers/net/phy/phy_device.c-455-\ndrivers/net/phy/phy_device.c:456:static int phy_bus_match(struct device *dev, const struct device_driver *drv)\ndrivers/net/phy/phy_device.c-457-{\n--\ndrivers/net/phy/phy_device.c=658=struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,\n--\ndrivers/net/phy/phy_device.c-675-\tmdiodev-\u003ebus = bus;\ndrivers/net/phy/phy_device.c:676:\tmdiodev-\u003ebus_match = phy_bus_match;\ndrivers/net/phy/phy_device.c-677-\tmdiodev-\u003eaddr = addr;\n"
} |
| 15/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10518 output: 39 thoughts: 25 Thoughts: Here's my take on the `phy_bus_match` function, seen through the lens of a seasoned network expert like myself: **Diving into PHY Bus Matching** Alright, let's get down to brass tacks and dissect this `phy_bus_match` function. Seems like we're navigating `drivers/net/phy/phy_device.c` to see how PHYs get hooked up to the right buses. This is critical infrastructure, the bedrock of how our devices talk to the physical layer. I need to understand this logic to troubleshoot, optimize, or maybe even extend PHY driver functionality. I'm hoping to see a solid, efficient matching mechanism that prioritizes device identification and bus compatibility. Let's see how they've handled the intricate details of PCI, SPI, MDIO, and whatever else might be in play. I want to see how it handles different speed and configuration requirements of various PHYs and buses. I'm expecting some sort of robust probing strategy, potentially using device IDs, vendor information, or maybe even some clever hardware detection. The real question is, how does this fit into the broader system, and does it play nicely with the other power management features? I have high standards, I'm hoping to see a well-commented, elegant approach that addresses all the edge cases. |
| 16/2 | 2026/09/20 22:49 | tool | read-file |
0mArgs:{
"File": "drivers/net/phy/phy_device.c",
"FirstLine": 450,
"LineCount": 40
}Results: {
"Contents": " 450:\t\n 451:\t\treturn phy_id_compare(phydev-\u003ephy_id, phydrv-\u003ephy_id,\n 452:\t\t\t\t phydrv-\u003ephy_id_mask);\n 453:\t}\n 454:\tEXPORT_SYMBOL_GPL(genphy_match_phy_device);\n 455:\t\n 456:\tstatic int phy_bus_match(struct device *dev, const struct device_driver *drv)\n 457:\t{\n 458:\t\tstruct phy_device *phydev = to_phy_device(dev);\n 459:\t\tconst struct phy_driver *phydrv = to_phy_driver(drv);\n 460:\t\n 461:\t\tif (!(phydrv-\u003emdiodrv.flags \u0026 MDIO_DEVICE_IS_PHY))\n 462:\t\t\treturn 0;\n 463:\t\n 464:\t\tif (phydrv-\u003ematch_phy_device)\n 465:\t\t\treturn phydrv-\u003ematch_phy_device(phydev, phydrv);\n 466:\t\n 467:\t\treturn genphy_match_phy_device(phydev, phydrv);\n 468:\t}\n 469:\t\n 470:\tstatic ssize_t\n 471:\tphy_id_show(struct device *dev, struct device_attribute *attr, char *buf)\n 472:\t{\n 473:\t\tstruct phy_device *phydev = to_phy_device(dev);\n 474:\t\n 475:\t\treturn sysfs_emit(buf, \"0x%.8lx\\n\", (unsigned long)phydev-\u003ephy_id);\n 476:\t}\n 477:\tstatic DEVICE_ATTR_RO(phy_id);\n 478:\t\n 479:\tstatic ssize_t\n 480:\tphy_interface_show(struct device *dev, struct device_attribute *attr, char *buf)\n 481:\t{\n 482:\t\tstruct phy_device *phydev = to_phy_device(dev);\n 483:\t\tconst char *mode = NULL;\n 484:\t\n 485:\t\tif (phydev-\u003eis_internal)\n 486:\t\t\tmode = \"internal\";\n 487:\t\telse\n 488:\t\t\tmode = phy_modes(phydev-\u003einterface);\n 489:\t\n"
} |
| 17/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11490 output: 36 thoughts: 130 Thoughts: **My Analysis of the `phy_bus_match` Function** Okay, so `phy_bus_match` is calling `phydrv->match_phy_device` with the `phydev` and `phydrv` arguments. My immediate thought is, "Can the `mtk-ge.c` driver even *be* matched or probed in a standard virtualized environment like QEMU or Google Compute Engine, running on amd64 architecture?" That's the real question here. We're talking about hardware interactions, and those are often a pain in virtualization. Now, hold on. What is `mtk-ge.c` actually *for*? I need to refresh my memory on the hardware side of things. Let me quickly examine `mtk-ge.c` itself. Specifically, I'll need to see where `MTK_GPHY_ID_MT7530` and `MTK_GPHY_ID_MT7531` are defined and used. That should give me a good indication of the type of PHY devices and network interface controllers we're dealing with and whether they might be relevant in a virtualized setting. Getting a clear picture of this hardware will help me assess the likelihood of these drivers being employed in these contexts. |
| 18/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "MTK_GPHY_ID_MT7530",
"PathPrefix": "drivers/net"
}Results: {
"Output": "drivers/net/phy/mediatek/mtk-ge.c-7-\ndrivers/net/phy/mediatek/mtk-ge.c:8:#define MTK_GPHY_ID_MT7530\t\t0x03a29412\ndrivers/net/phy/mediatek/mtk-ge.c-9-#define MTK_GPHY_ID_MT7531\t\t0x03a29441\n--\ndrivers/net/phy/mediatek/mtk-ge.c=77=static int mt7530_phy_config_init(struct phy_device *phydev)\n--\ndrivers/net/phy/mediatek/mtk-ge.c-104-/*\ndrivers/net/phy/mediatek/mtk-ge.c:105: * MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY\ndrivers/net/phy/mediatek/mtk-ge.c-106- * does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY\n--\ndrivers/net/phy/mediatek/mtk-ge.c=139=static struct phy_driver mtk_gephy_driver[] = {\ndrivers/net/phy/mediatek/mtk-ge.c-140-\t{\ndrivers/net/phy/mediatek/mtk-ge.c:141:\t\tPHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),\ndrivers/net/phy/mediatek/mtk-ge.c-142-\t\t.name\t\t= \"MediaTek MT7530 PHY\",\n--\ndrivers/net/phy/mediatek/mtk-ge.c=174=static const struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {\ndrivers/net/phy/mediatek/mtk-ge.c:175:\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },\ndrivers/net/phy/mediatek/mtk-ge.c-176-\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },\n"
} |
| 19/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12491 output: 19 thoughts: 19 Thoughts: Okay, here's my summary, taking on the persona you've described: **Hunting Down `mt7530` in the Kernel Source** Right, let's dive in. My immediate thought is, "Okay, where is this `mt7530` actually *used* within the vast expanse of the kernel source code?" I need to see the dependencies, the relationships, how this thing fits into the bigger picture. I'm thinking I'll need to do a thorough search, probably across the entire tree, to pinpoint every instance of that string. Gotta make sure I'm not missing any header files, any indirect references, anything that might be buried deep within a macro or an include chain. This is the kind of task that's second nature, a systematic, methodical search to understand the scope of influence of this particular identifier. Let's get to it. |
| 20/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "mt7530"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1396 lines.\nUse more precise expression if possible.\n\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-3----\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:4:$id: http://devicetree.org/schemas/net/dsa/mediatek,mt7530.yaml#\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-5-$schema: http://devicetree.org/meta-schemas/core.yaml#\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml=76=properties:\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-80- Standalone MT7530 and multi-chip module MT7530 in MT7623AI SoC\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:81: const: mediatek,mt7530\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-82-\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml=206=$defs:\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-218-\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:219: mt7530-dsa-port:\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-220- patternProperties:\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml=273=allOf:\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-291- compatible:\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:292: const: mediatek,mt7530\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-293- then:\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:294: $ref: \"#/$defs/mt7530-dsa-port\"\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-295- required:\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-313- then:\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:314: $ref: \"#/$defs/mt7530-dsa-port\"\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-315- required:\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml=335=examples:\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-344- switch@1f {\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:345: compatible = \"mediatek,mt7530\";\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-346- reg = \u003c0x1f\u003e;\n--\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-405- switch@1f {\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml:406: compatible = \"mediatek,mt7530\";\nDocumentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml-407- reg = \u003c0x1f\u003e;\n--\nMAINTAINERS=16823=S:\tMaintained\nMAINTAINERS:16824:F:\tdrivers/net/dsa/mt7530-mdio.c\nMAINTAINERS:16825:F:\tdrivers/net/dsa/mt7530-mmio.c\nMAINTAINERS:16826:F:\tdrivers/net/dsa/mt7530.*\nMAINTAINERS-16827-F:\tnet/dsa/tag_mtk.c\n--\narch/arm/boot/dts/mediatek/mt7623a.dtsi=50=\t\tswitch0: switch@1f {\narch/arm/boot/dts/mediatek/mt7623a.dtsi:51:\t\t\tcompatible = \"mediatek,mt7530\";\narch/arm/boot/dts/mediatek/mt7623a.dtsi-52-\t\t\treg = \u003c0x1f\u003e;\n--\narch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts=203=\t\tswitch@1f {\narch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts:204:\t\t\tcompatible = \"mediatek,mt7530\";\narch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts-205-\t\t\treg = \u003c0x1f\u003e;\n--\narch/arm/boot/dts/mediatek/mt7623n-rfb-emmc.dts=188=\t\tswitch@1f {\narch/arm/boot/dts/mediatek/mt7623n-rfb-emmc.dts:189:\t\t\tcompatible = \"mediatek,mt7530\";\narch/arm/boot/dts/mediatek/mt7623n-rfb-emmc.dts-190-\t\t\treg = \u003c0x1f\u003e;\n--\ndrivers/net/dsa/Makefile=4=obj-$(CONFIG_NET_DSA_LOOP)\t+= dsa_loop.o\ndrivers/net/dsa/Makefile:5:obj-$(CONFIG_NET_DSA_MT7530)\t+= mt7530.o\ndrivers/net/dsa/Makefile:6:obj-$(CONFIG_NET_DSA_MT7530_MDIO) += mt7530-mdio.o\ndrivers/net/dsa/Makefile:7:obj-$(CONFIG_NET_DSA_MT7530_MMIO) += mt7530-mmio.o\ndrivers/net/dsa/Makefile-8-obj-$(CONFIG_NET_DSA_MT7628) += mt7628.o\n--\ndrivers/net/dsa/mt7530-mdio.c-15-\ndrivers/net/dsa/mt7530-mdio.c:16:#include \"mt7530.h\"\ndrivers/net/dsa/mt7530-mdio.c-17-\ndrivers/net/dsa/mt7530-mdio.c=18=static int\ndrivers/net/dsa/mt7530-mdio.c:19:mt7530_regmap_write(void *context, unsigned int reg, unsigned int val)\ndrivers/net/dsa/mt7530-mdio.c-20-{\ndrivers/net/dsa/mt7530-mdio.c:21:\tstruct mt7530_priv *priv = context;\ndrivers/net/dsa/mt7530-mdio.c-22-\tstruct mii_bus *bus = priv-\u003ebus;\n--\ndrivers/net/dsa/mt7530-mdio.c=43=static int\ndrivers/net/dsa/mt7530-mdio.c:44:mt7530_regmap_read(void *context, unsigned int reg, unsigned int *val)\ndrivers/net/dsa/mt7530-mdio.c-45-{\ndrivers/net/dsa/mt7530-mdio.c:46:\tstruct mt7530_priv *priv = context;\ndrivers/net/dsa/mt7530-mdio.c-47-\tstruct mii_bus *bus = priv-\u003ebus;\n--\ndrivers/net/dsa/mt7530-mdio.c=76=static void\ndrivers/net/dsa/mt7530-mdio.c:77:mt7530_mdio_regmap_lock(void *mdio_lock)\ndrivers/net/dsa/mt7530-mdio.c-78-{\n--\ndrivers/net/dsa/mt7530-mdio.c=82=static void\ndrivers/net/dsa/mt7530-mdio.c:83:mt7530_mdio_regmap_unlock(void *mdio_lock)\ndrivers/net/dsa/mt7530-mdio.c-84-{\n--\ndrivers/net/dsa/mt7530-mdio.c-87-\ndrivers/net/dsa/mt7530-mdio.c:88:static const struct regmap_bus mt7530_regmap_bus = {\ndrivers/net/dsa/mt7530-mdio.c:89:\t.reg_write = mt7530_regmap_write,\ndrivers/net/dsa/mt7530-mdio.c:90:\t.reg_read = mt7530_regmap_read,\ndrivers/net/dsa/mt7530-mdio.c-91-};\n--\ndrivers/net/dsa/mt7530-mdio.c=93=static int\ndrivers/net/dsa/mt7530-mdio.c:94:mt7531_create_sgmii(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530-mdio.c-95-{\n--\ndrivers/net/dsa/mt7530-mdio.c-115-\t\tmt7531_pcs_config[i]-\u003emax_register = 0x17c;\ndrivers/net/dsa/mt7530-mdio.c:116:\t\tmt7531_pcs_config[i]-\u003elock = mt7530_mdio_regmap_lock;\ndrivers/net/dsa/mt7530-mdio.c:117:\t\tmt7531_pcs_config[i]-\u003eunlock = mt7530_mdio_regmap_unlock;\ndrivers/net/dsa/mt7530-mdio.c-118-\t\tmt7531_pcs_config[i]-\u003elock_arg = \u0026priv-\u003ebus-\u003emdio_lock;\ndrivers/net/dsa/mt7530-mdio.c-119-\ndrivers/net/dsa/mt7530-mdio.c:120:\t\tregmap = devm_regmap_init(priv-\u003edev, \u0026mt7530_regmap_bus, priv,\ndrivers/net/dsa/mt7530-mdio.c-121-\t\t\t\t\t mt7531_pcs_config[i]);\n--\ndrivers/net/dsa/mt7530-mdio.c-140-\ndrivers/net/dsa/mt7530-mdio.c:141:static const struct of_device_id mt7530_of_match[] = {\ndrivers/net/dsa/mt7530-mdio.c-142-\t{ .compatible = \"mediatek,mt7621\", .data = \u0026mt753x_table[ID_MT7621], },\ndrivers/net/dsa/mt7530-mdio.c:143:\t{ .compatible = \"mediatek,mt7530\", .data = \u0026mt753x_table[ID_MT7530], },\ndrivers/net/dsa/mt7530-mdio.c-144-\t{ .compatible = \"mediatek,mt7531\", .data = \u0026mt753x_table[ID_MT7531], },\n--\ndrivers/net/dsa/mt7530-mdio.c-146-};\ndrivers/net/dsa/mt7530-mdio.c:147:MODULE_DEVICE_TABLE(of, mt7530_of_match);\ndrivers/net/dsa/mt7530-mdio.c-148-\ndrivers/net/dsa/mt7530-mdio.c=149=static const struct regmap_config regmap_config = {\n--\ndrivers/net/dsa/mt7530-mdio.c-153-\t.max_register = MT7530_CREV,\ndrivers/net/dsa/mt7530-mdio.c:154:\t.lock = mt7530_mdio_regmap_lock,\ndrivers/net/dsa/mt7530-mdio.c:155:\t.unlock = mt7530_mdio_regmap_unlock,\ndrivers/net/dsa/mt7530-mdio.c-156-};\n--\ndrivers/net/dsa/mt7530-mdio.c=158=static int\ndrivers/net/dsa/mt7530-mdio.c:159:mt7530_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/mt7530-mdio.c-160-{\ndrivers/net/dsa/mt7530-mdio.c-161-\tstruct regmap_config rc = regmap_config;\ndrivers/net/dsa/mt7530-mdio.c:162:\tstruct mt7530_priv *priv;\ndrivers/net/dsa/mt7530-mdio.c-163-\tstruct device_node *dn;\n--\ndrivers/net/dsa/mt7530-mdio.c-175-\ndrivers/net/dsa/mt7530-mdio.c:176:\tret = mt7530_probe_common(priv);\ndrivers/net/dsa/mt7530-mdio.c-177-\tif (ret)\n--\ndrivers/net/dsa/mt7530-mdio.c-215-\trc.lock_arg = \u0026priv-\u003ebus-\u003emdio_lock;\ndrivers/net/dsa/mt7530-mdio.c:216:\tpriv-\u003eregmap = devm_regmap_init(priv-\u003edev, \u0026mt7530_regmap_bus,\ndrivers/net/dsa/mt7530-mdio.c-217-\t\t\t\t\tpriv, \u0026rc);\n--\ndrivers/net/dsa/mt7530-mdio.c=227=static void\ndrivers/net/dsa/mt7530-mdio.c:228:mt7530_remove(struct mdio_device *mdiodev)\ndrivers/net/dsa/mt7530-mdio.c-229-{\ndrivers/net/dsa/mt7530-mdio.c:230:\tstruct mt7530_priv *priv = dev_get_drvdata(\u0026mdiodev-\u003edev);\ndrivers/net/dsa/mt7530-mdio.c-231-\tint ret = 0, i;\n--\ndrivers/net/dsa/mt7530-mdio.c-245-\ndrivers/net/dsa/mt7530-mdio.c:246:\tmt7530_remove_common(priv);\ndrivers/net/dsa/mt7530-mdio.c-247-\n--\ndrivers/net/dsa/mt7530-mdio.c-251-\ndrivers/net/dsa/mt7530-mdio.c:252:static void mt7530_shutdown(struct mdio_device *mdiodev)\ndrivers/net/dsa/mt7530-mdio.c-253-{\ndrivers/net/dsa/mt7530-mdio.c:254:\tstruct mt7530_priv *priv = dev_get_drvdata(\u0026mdiodev-\u003edev);\ndrivers/net/dsa/mt7530-mdio.c-255-\n--\ndrivers/net/dsa/mt7530-mdio.c-263-\ndrivers/net/dsa/mt7530-mdio.c:264:static struct mdio_driver mt7530_mdio_driver = {\ndrivers/net/dsa/mt7530-mdio.c:265:\t.probe = mt7530_probe,\ndrivers/net/dsa/mt7530-mdio.c:266:\t.remove = mt7530_remove,\ndrivers/net/dsa/mt7530-mdio.c:267:\t.shutdown = mt7530_shutdown,\ndrivers/net/dsa/mt7530-mdio.c-268-\t.mdiodrv.driver = {\ndrivers/net/dsa/mt7530-mdio.c:269:\t\t.name = \"mt7530-mdio\",\ndrivers/net/dsa/mt7530-mdio.c:270:\t\t.of_match_table = mt7530_of_match,\ndrivers/net/dsa/mt7530-mdio.c-271-\t},\n--\ndrivers/net/dsa/mt7530-mdio.c-273-\ndrivers/net/dsa/mt7530-mdio.c:274:mdio_module_driver(mt7530_mdio_driver);\ndrivers/net/dsa/mt7530-mdio.c-275-\n--\ndrivers/net/dsa/mt7530-mmio.c-9-\ndrivers/net/dsa/mt7530-mmio.c:10:#include \"mt7530.h\"\ndrivers/net/dsa/mt7530-mmio.c-11-\n--\ndrivers/net/dsa/mt7530-mmio.c=30=mt7988_probe(struct platform_device *pdev)\ndrivers/net/dsa/mt7530-mmio.c-31-{\ndrivers/net/dsa/mt7530-mmio.c:32:\tstruct mt7530_priv *priv;\ndrivers/net/dsa/mt7530-mmio.c-33-\tvoid __iomem *base_addr;\n--\ndrivers/net/dsa/mt7530-mmio.c-42-\ndrivers/net/dsa/mt7530-mmio.c:43:\tret = mt7530_probe_common(priv);\ndrivers/net/dsa/mt7530-mmio.c-44-\tif (ret)\n--\ndrivers/net/dsa/mt7530-mmio.c=67=static void mt7988_remove(struct platform_device *pdev)\ndrivers/net/dsa/mt7530-mmio.c-68-{\ndrivers/net/dsa/mt7530-mmio.c:69:\tstruct mt7530_priv *priv = platform_get_drvdata(pdev);\ndrivers/net/dsa/mt7530-mmio.c-70-\ndrivers/net/dsa/mt7530-mmio.c-71-\tif (priv)\ndrivers/net/dsa/mt7530-mmio.c:72:\t\tmt7530_remove_common(priv);\ndrivers/net/dsa/mt7530-mmio.c-73-}\n--\ndrivers/net/dsa/mt7530-mmio.c=75=static void mt7988_shutdown(struct platform_device *pdev)\ndrivers/net/dsa/mt7530-mmio.c-76-{\ndrivers/net/dsa/mt7530-mmio.c:77:\tstruct mt7530_priv *priv = platform_get_drvdata(pdev);\ndrivers/net/dsa/mt7530-mmio.c-78-\n--\ndrivers/net/dsa/mt7530-mmio.c=87=static struct platform_driver mt7988_platform_driver = {\n--\ndrivers/net/dsa/mt7530-mmio.c-91-\t.driver = {\ndrivers/net/dsa/mt7530-mmio.c:92:\t\t.name = \"mt7530-mmio\",\ndrivers/net/dsa/mt7530-mmio.c-93-\t\t.of_match_table = mt7988_of_match,\n--\ndrivers/net/dsa/mt7530.c-25-\ndrivers/net/dsa/mt7530.c:26:#include \"mt7530.h\"\ndrivers/net/dsa/mt7530.c-27-\n--\ndrivers/net/dsa/mt7530.c=31=static struct mt753x_pcs *pcs_to_mt753x_pcs(struct phylink_pcs *pcs)\n--\ndrivers/net/dsa/mt7530.c-36-/* String, offset, and register size in bytes if different from 4 bytes */\ndrivers/net/dsa/mt7530.c:37:static const struct mt7530_mib_desc mt7530_mib[] = {\ndrivers/net/dsa/mt7530.c-38-\tMIB_DESC(1, MT7530_PORT_MIB_TX_DROP, \"TxDrop\"),\n--\ndrivers/net/dsa/mt7530.c=49=static void\ndrivers/net/dsa/mt7530.c:50:mt7530_mutex_lock(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-51-{\n--\ndrivers/net/dsa/mt7530.c=56=static void\ndrivers/net/dsa/mt7530.c:57:mt7530_mutex_unlock(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-58-{\n--\ndrivers/net/dsa/mt7530.c=63=static void\ndrivers/net/dsa/mt7530.c:64:core_write(struct mt7530_priv *priv, u32 reg, u32 val)\ndrivers/net/dsa/mt7530.c-65-{\n--\ndrivers/net/dsa/mt7530.c-68-\ndrivers/net/dsa/mt7530.c:69:\tmt7530_mutex_lock(priv);\ndrivers/net/dsa/mt7530.c-70-\n--\ndrivers/net/dsa/mt7530.c-95-\ndrivers/net/dsa/mt7530.c:96:\tmt7530_mutex_unlock(priv);\ndrivers/net/dsa/mt7530.c-97-}\n--\ndrivers/net/dsa/mt7530.c=99=static void\ndrivers/net/dsa/mt7530.c:100:core_rmw(struct mt7530_priv *priv, u32 reg, u32 mask, u32 set)\ndrivers/net/dsa/mt7530.c-101-{\n--\ndrivers/net/dsa/mt7530.c-105-\ndrivers/net/dsa/mt7530.c:106:\tmt7530_mutex_lock(priv);\ndrivers/net/dsa/mt7530.c-107-\n--\ndrivers/net/dsa/mt7530.c-141-\ndrivers/net/dsa/mt7530.c:142:\tmt7530_mutex_unlock(priv);\ndrivers/net/dsa/mt7530.c-143-}\n--\ndrivers/net/dsa/mt7530.c=145=static void\ndrivers/net/dsa/mt7530.c:146:core_set(struct mt7530_priv *priv, u32 reg, u32 val)\ndrivers/net/dsa/mt7530.c-147-{\n--\ndrivers/net/dsa/mt7530.c=151=static void\ndrivers/net/dsa/mt7530.c:152:core_clear(struct mt7530_priv *priv, u32 reg, u32 val)\ndrivers/net/dsa/mt7530.c-153-{\n--\ndrivers/net/dsa/mt7530.c=157=static int\ndrivers/net/dsa/mt7530.c:158:mt7530_fdb_cmd(struct mt7530_priv *priv, enum mt7530_fdb_cmd cmd, u32 *rsp)\ndrivers/net/dsa/mt7530.c-159-{\n--\ndrivers/net/dsa/mt7530.c-190-\ndrivers/net/dsa/mt7530.c:191:static void mt7530_port_fast_age(struct dsa_switch *ds, int port)\ndrivers/net/dsa/mt7530.c-192-{\ndrivers/net/dsa/mt7530.c:193:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-194-\tu32 val;\n--\ndrivers/net/dsa/mt7530.c=211=static void\ndrivers/net/dsa/mt7530.c:212:mt7530_fdb_read(struct mt7530_priv *priv, struct mt7530_fdb *fdb)\ndrivers/net/dsa/mt7530.c-213-{\n--\ndrivers/net/dsa/mt7530.c=238=static void\ndrivers/net/dsa/mt7530.c:239:mt7530_fdb_write(struct mt7530_priv *priv, u16 vid,\ndrivers/net/dsa/mt7530.c-240-\t\t u8 port_mask, const u8 *mac,\n--\ndrivers/net/dsa/mt7530.c-268-/* Set up switch core clock for MT7530 */\ndrivers/net/dsa/mt7530.c:269:static void mt7530_pll_setup(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-270-{\n--\ndrivers/net/dsa/mt7530.c=309=static void\ndrivers/net/dsa/mt7530.c:310:mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface)\ndrivers/net/dsa/mt7530.c-311-{\ndrivers/net/dsa/mt7530.c:312:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-313-\tu32 ncpo1, ssc_delta, xtal;\n--\ndrivers/net/dsa/mt7530.c=364=static void\ndrivers/net/dsa/mt7530.c:365:mt7531_pll_setup(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-366-{\n--\ndrivers/net/dsa/mt7530.c=452=static void\ndrivers/net/dsa/mt7530.c:453:mt7530_mib_reset(struct dsa_switch *ds)\ndrivers/net/dsa/mt7530.c-454-{\ndrivers/net/dsa/mt7530.c:455:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-456-\n--\ndrivers/net/dsa/mt7530.c-460-\ndrivers/net/dsa/mt7530.c:461:static int mt7530_phy_read_c22(struct mt7530_priv *priv, int port, int regnum)\ndrivers/net/dsa/mt7530.c-462-{\n--\ndrivers/net/dsa/mt7530.c-465-\ndrivers/net/dsa/mt7530.c:466:static int mt7530_phy_write_c22(struct mt7530_priv *priv, int port, int regnum,\ndrivers/net/dsa/mt7530.c-467-\t\t\t\tu16 val)\n--\ndrivers/net/dsa/mt7530.c-471-\ndrivers/net/dsa/mt7530.c:472:static int mt7530_phy_read_c45(struct mt7530_priv *priv, int port,\ndrivers/net/dsa/mt7530.c-473-\t\t\t int devad, int regnum)\n--\ndrivers/net/dsa/mt7530.c-477-\ndrivers/net/dsa/mt7530.c:478:static int mt7530_phy_write_c45(struct mt7530_priv *priv, int port, int devad,\ndrivers/net/dsa/mt7530.c-479-\t\t\t\tint regnum, u16 val)\n--\ndrivers/net/dsa/mt7530.c=484=static int\ndrivers/net/dsa/mt7530.c:485:mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad,\ndrivers/net/dsa/mt7530.c-486-\t\t\tint regnum)\n--\ndrivers/net/dsa/mt7530.c=535=static int\ndrivers/net/dsa/mt7530.c:536:mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad,\ndrivers/net/dsa/mt7530.c-537-\t\t\t int regnum, u16 data)\n--\ndrivers/net/dsa/mt7530.c=585=static int\ndrivers/net/dsa/mt7530.c:586:mt7531_ind_c22_phy_read(struct mt7530_priv *priv, int port, int regnum)\ndrivers/net/dsa/mt7530.c-587-{\n--\ndrivers/net/dsa/mt7530.c=622=static int\ndrivers/net/dsa/mt7530.c:623:mt7531_ind_c22_phy_write(struct mt7530_priv *priv, int port, int regnum,\ndrivers/net/dsa/mt7530.c-624-\t\t\t u16 data)\n--\ndrivers/net/dsa/mt7530.c=660=mt753x_phy_read_c22(struct mii_bus *bus, int port, int regnum)\ndrivers/net/dsa/mt7530.c-661-{\ndrivers/net/dsa/mt7530.c:662:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-663-\n--\ndrivers/net/dsa/mt7530.c=668=mt753x_phy_read_c45(struct mii_bus *bus, int port, int devad, int regnum)\ndrivers/net/dsa/mt7530.c-669-{\ndrivers/net/dsa/mt7530.c:670:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-671-\n--\ndrivers/net/dsa/mt7530.c=676=mt753x_phy_write_c22(struct mii_bus *bus, int port, int regnum, u16 val)\ndrivers/net/dsa/mt7530.c-677-{\ndrivers/net/dsa/mt7530.c:678:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-679-\n--\ndrivers/net/dsa/mt7530.c=684=mt753x_phy_write_c45(struct mii_bus *bus, int port, int devad, int regnum,\n--\ndrivers/net/dsa/mt7530.c-686-{\ndrivers/net/dsa/mt7530.c:687:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-688-\n--\ndrivers/net/dsa/mt7530.c=692=static void\ndrivers/net/dsa/mt7530.c:693:mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset,\ndrivers/net/dsa/mt7530.c-694-\t\t uint8_t *data)\n--\ndrivers/net/dsa/mt7530.c-700-\ndrivers/net/dsa/mt7530.c:701:\tfor (i = 0; i \u003c ARRAY_SIZE(mt7530_mib); i++)\ndrivers/net/dsa/mt7530.c:702:\t\tethtool_puts(\u0026data, mt7530_mib[i].name);\ndrivers/net/dsa/mt7530.c-703-}\n--\ndrivers/net/dsa/mt7530.c=705=static void\ndrivers/net/dsa/mt7530.c:706:mt7530_read_port_stats(struct mt7530_priv *priv, int port,\ndrivers/net/dsa/mt7530.c-707-\t\t u32 offset, u8 size, uint64_t *data)\n--\ndrivers/net/dsa/mt7530.c=720=static void\ndrivers/net/dsa/mt7530.c:721:mt7530_get_ethtool_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-722-\t\t\t uint64_t *data)\ndrivers/net/dsa/mt7530.c-723-{\ndrivers/net/dsa/mt7530.c:724:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c:725:\tconst struct mt7530_mib_desc *mib;\ndrivers/net/dsa/mt7530.c-726-\tint i;\ndrivers/net/dsa/mt7530.c-727-\ndrivers/net/dsa/mt7530.c:728:\tfor (i = 0; i \u003c ARRAY_SIZE(mt7530_mib); i++) {\ndrivers/net/dsa/mt7530.c:729:\t\tmib = \u0026mt7530_mib[i];\ndrivers/net/dsa/mt7530.c-730-\ndrivers/net/dsa/mt7530.c:731:\t\tmt7530_read_port_stats(priv, port, mib-\u003eoffset, mib-\u003esize,\ndrivers/net/dsa/mt7530.c-732-\t\t\t\t data + i);\n--\ndrivers/net/dsa/mt7530.c=736=static int\ndrivers/net/dsa/mt7530.c:737:mt7530_get_sset_count(struct dsa_switch *ds, int port, int sset)\ndrivers/net/dsa/mt7530.c-738-{\n--\ndrivers/net/dsa/mt7530.c-741-\ndrivers/net/dsa/mt7530.c:742:\treturn ARRAY_SIZE(mt7530_mib);\ndrivers/net/dsa/mt7530.c-743-}\ndrivers/net/dsa/mt7530.c-744-\ndrivers/net/dsa/mt7530.c:745:static void mt7530_get_eth_mac_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-746-\t\t\t\t struct ethtool_eth_mac_stats *mac_stats)\ndrivers/net/dsa/mt7530.c-747-{\ndrivers/net/dsa/mt7530.c:748:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-749-\n--\ndrivers/net/dsa/mt7530.c-754-\t */\ndrivers/net/dsa/mt7530.c:755:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-756-\t\t\t \u0026mac_stats-\u003eFramesTransmittedOK);\ndrivers/net/dsa/mt7530.c-757-\ndrivers/net/dsa/mt7530.c:758:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_SINGLE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-759-\t\t\t \u0026mac_stats-\u003eSingleCollisionFrames);\ndrivers/net/dsa/mt7530.c-760-\ndrivers/net/dsa/mt7530.c:761:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_MULTIPLE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-762-\t\t\t \u0026mac_stats-\u003eMultipleCollisionFrames);\ndrivers/net/dsa/mt7530.c-763-\ndrivers/net/dsa/mt7530.c:764:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-765-\t\t\t \u0026mac_stats-\u003eFramesReceivedOK);\ndrivers/net/dsa/mt7530.c-766-\ndrivers/net/dsa/mt7530.c:767:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-768-\t\t\t \u0026mac_stats-\u003eOctetsTransmittedOK);\ndrivers/net/dsa/mt7530.c-769-\ndrivers/net/dsa/mt7530.c:770:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_ALIGN_ERR, 1,\ndrivers/net/dsa/mt7530.c-771-\t\t\t \u0026mac_stats-\u003eAlignmentErrors);\ndrivers/net/dsa/mt7530.c-772-\ndrivers/net/dsa/mt7530.c:773:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_DEFERRED, 1,\ndrivers/net/dsa/mt7530.c-774-\t\t\t \u0026mac_stats-\u003eFramesWithDeferredXmissions);\ndrivers/net/dsa/mt7530.c-775-\ndrivers/net/dsa/mt7530.c:776:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_LATE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-777-\t\t\t \u0026mac_stats-\u003eLateCollisions);\ndrivers/net/dsa/mt7530.c-778-\ndrivers/net/dsa/mt7530.c:779:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_EXCESSIVE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-780-\t\t\t \u0026mac_stats-\u003eFramesAbortedDueToXSColls);\ndrivers/net/dsa/mt7530.c-781-\ndrivers/net/dsa/mt7530.c:782:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-783-\t\t\t \u0026mac_stats-\u003eOctetsReceivedOK);\ndrivers/net/dsa/mt7530.c-784-\ndrivers/net/dsa/mt7530.c:785:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-786-\t\t\t \u0026mac_stats-\u003eMulticastFramesXmittedOK);\ndrivers/net/dsa/mt7530.c-787-\tmac_stats-\u003eFramesTransmittedOK += mac_stats-\u003eMulticastFramesXmittedOK;\ndrivers/net/dsa/mt7530.c:788:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-789-\t\t\t \u0026mac_stats-\u003eBroadcastFramesXmittedOK);\n--\ndrivers/net/dsa/mt7530.c-791-\ndrivers/net/dsa/mt7530.c:792:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-793-\t\t\t \u0026mac_stats-\u003eMulticastFramesReceivedOK);\ndrivers/net/dsa/mt7530.c-794-\tmac_stats-\u003eFramesReceivedOK += mac_stats-\u003eMulticastFramesReceivedOK;\ndrivers/net/dsa/mt7530.c:795:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-796-\t\t\t \u0026mac_stats-\u003eBroadcastFramesReceivedOK);\n--\ndrivers/net/dsa/mt7530.c-799-\ndrivers/net/dsa/mt7530.c:800:static const struct ethtool_rmon_hist_range mt7530_rmon_ranges[] = {\ndrivers/net/dsa/mt7530.c-801-\t{ 0, 64 },\n--\ndrivers/net/dsa/mt7530.c-809-\ndrivers/net/dsa/mt7530.c:810:static void mt7530_get_rmon_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-811-\t\t\t\t struct ethtool_rmon_stats *rmon_stats,\n--\ndrivers/net/dsa/mt7530.c-813-{\ndrivers/net/dsa/mt7530.c:814:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-815-\ndrivers/net/dsa/mt7530.c:816:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_UNDER_SIZE_ERR, 1,\ndrivers/net/dsa/mt7530.c-817-\t\t\t \u0026rmon_stats-\u003eundersize_pkts);\ndrivers/net/dsa/mt7530.c:818:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_OVER_SZ_ERR, 1,\ndrivers/net/dsa/mt7530.c-819-\t\t\t \u0026rmon_stats-\u003eoversize_pkts);\ndrivers/net/dsa/mt7530.c:820:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_FRAG_ERR, 1,\ndrivers/net/dsa/mt7530.c-821-\t\t\t \u0026rmon_stats-\u003efragments);\ndrivers/net/dsa/mt7530.c:822:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_JABBER_ERR, 1,\ndrivers/net/dsa/mt7530.c-823-\t\t\t \u0026rmon_stats-\u003ejabbers);\ndrivers/net/dsa/mt7530.c-824-\ndrivers/net/dsa/mt7530.c:825:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_64, 1,\ndrivers/net/dsa/mt7530.c-826-\t\t\t \u0026rmon_stats-\u003ehist[0]);\ndrivers/net/dsa/mt7530.c:827:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_65_TO_127, 1,\ndrivers/net/dsa/mt7530.c-828-\t\t\t \u0026rmon_stats-\u003ehist[1]);\ndrivers/net/dsa/mt7530.c:829:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_128_TO_255, 1,\ndrivers/net/dsa/mt7530.c-830-\t\t\t \u0026rmon_stats-\u003ehist[2]);\ndrivers/net/dsa/mt7530.c:831:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_256_TO_511, 1,\ndrivers/net/dsa/mt7530.c-832-\t\t\t \u0026rmon_stats-\u003ehist[3]);\ndrivers/net/dsa/mt7530.c:833:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_512_TO_1023, 1,\ndrivers/net/dsa/mt7530.c-834-\t\t\t \u0026rmon_stats-\u003ehist[4]);\ndrivers/net/dsa/mt7530.c:835:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_1024_TO_MAX, 1,\ndrivers/net/dsa/mt7530.c-836-\t\t\t \u0026rmon_stats-\u003ehist[5]);\ndrivers/net/dsa/mt7530.c-837-\ndrivers/net/dsa/mt7530.c:838:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_64, 1,\ndrivers/net/dsa/mt7530.c-839-\t\t\t \u0026rmon_stats-\u003ehist_tx[0]);\ndrivers/net/dsa/mt7530.c:840:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_65_TO_127, 1,\ndrivers/net/dsa/mt7530.c-841-\t\t\t \u0026rmon_stats-\u003ehist_tx[1]);\ndrivers/net/dsa/mt7530.c:842:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_128_TO_255, 1,\ndrivers/net/dsa/mt7530.c-843-\t\t\t \u0026rmon_stats-\u003ehist_tx[2]);\ndrivers/net/dsa/mt7530.c:844:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_256_TO_511, 1,\ndrivers/net/dsa/mt7530.c-845-\t\t\t \u0026rmon_stats-\u003ehist_tx[3]);\ndrivers/net/dsa/mt7530.c:846:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_512_TO_1023, 1,\ndrivers/net/dsa/mt7530.c-847-\t\t\t \u0026rmon_stats-\u003ehist_tx[4]);\ndrivers/net/dsa/mt7530.c:848:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_1024_TO_MAX, 1,\ndrivers/net/dsa/mt7530.c-849-\t\t\t \u0026rmon_stats-\u003ehist_tx[5]);\ndrivers/net/dsa/mt7530.c-850-\ndrivers/net/dsa/mt7530.c:851:\t*ranges = mt7530_rmon_ranges;\ndrivers/net/dsa/mt7530.c-852-}\ndrivers/net/dsa/mt7530.c-853-\ndrivers/net/dsa/mt7530.c:854:static void mt7530_read_port_stats64(struct mt7530_priv *priv, int port,\ndrivers/net/dsa/mt7530.c-855-\t\t\t\t struct rtnl_link_stats64 *storage)\n--\ndrivers/net/dsa/mt7530.c-863-\t */\ndrivers/net/dsa/mt7530.c:864:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-865-\t\t\t \u0026storage-\u003erx_packets);\ndrivers/net/dsa/mt7530.c:866:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-867-\t\t\t \u0026storage-\u003emulticast);\ndrivers/net/dsa/mt7530.c-868-\tstorage-\u003erx_packets += storage-\u003emulticast;\ndrivers/net/dsa/mt7530.c:869:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-870-\t\t\t \u0026data);\n--\ndrivers/net/dsa/mt7530.c-872-\ndrivers/net/dsa/mt7530.c:873:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-874-\t\t\t \u0026storage-\u003etx_packets);\ndrivers/net/dsa/mt7530.c:875:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-876-\t\t\t \u0026data);\ndrivers/net/dsa/mt7530.c-877-\tstorage-\u003etx_packets += data;\ndrivers/net/dsa/mt7530.c:878:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-879-\t\t\t \u0026data);\n--\ndrivers/net/dsa/mt7530.c-881-\ndrivers/net/dsa/mt7530.c:882:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-883-\t\t\t \u0026storage-\u003erx_bytes);\ndrivers/net/dsa/mt7530.c-884-\ndrivers/net/dsa/mt7530.c:885:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-886-\t\t\t \u0026storage-\u003etx_bytes);\ndrivers/net/dsa/mt7530.c-887-\ndrivers/net/dsa/mt7530.c:888:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_DROP, 1,\n\n"
} |
| 21/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27108 output: 30 thoughts: 251 Thoughts: **My Initial Thoughts on the MT7530 and its Driver** Okay, so I'm looking at this MT7530, and it's a MediaTek Ethernet switch chip, right? And the MT7531 is another one, apparently with integrated PHYs. Now, this `drivers/net/phy/mediatek/mtk-ge.c` file... that's the driver for the built-in PHYs on the MT7530 and MT7531 switches. Interesting. But how does this all *actually* work? What's the context here? Right, MT7530 is used on MediaTek boards – things like the MT7621, MT7623, and that Banana Pi BPI-R2 board. These are MIPS/ARM SoC routers and development boards, usually. Hmm... the question then is, can I even *reach* the `mtk-ge` driver on an amd64 system, running in QEMU or even Google Compute Engine? That seems like a hurdle. I need to figure out if there's a way to dynamically create an MDIO bus or PHY device without physical hardware involvement in QEMU. I wonder, what about `dsa_loop` or fixed PHYs or `net_failover`? Does `dsa_loop` simulate real PHYs, or are they more like fixed PHYs? Let me take a look at `drivers/net/dsa/dsa_loop.c` and figure this out. |
| 22/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "dsa_loop",
"PathPrefix": "drivers/net/dsa"
}Results: {
"Output": "drivers/net/dsa/Makefile=3=bcm-sf2-objs\t\t\t:= bcm_sf2.o bcm_sf2_cfp.o\ndrivers/net/dsa/Makefile:4:obj-$(CONFIG_NET_DSA_LOOP)\t+= dsa_loop.o\ndrivers/net/dsa/Makefile-5-obj-$(CONFIG_NET_DSA_MT7530)\t+= mt7530.o\n--\ndrivers/net/dsa/dsa_loop.c-24-\ndrivers/net/dsa/dsa_loop.c:25:struct dsa_loop_vlan {\ndrivers/net/dsa/dsa_loop.c-26-\tu16 members;\n--\ndrivers/net/dsa/dsa_loop.c-29-\ndrivers/net/dsa/dsa_loop.c:30:struct dsa_loop_mib_entry {\ndrivers/net/dsa/dsa_loop.c-31-\tchar name[ETH_GSTRING_LEN];\n--\ndrivers/net/dsa/dsa_loop.c-34-\ndrivers/net/dsa/dsa_loop.c:35:enum dsa_loop_mib_counters {\ndrivers/net/dsa/dsa_loop.c-36-\tDSA_LOOP_PHY_READ_OK,\n--\ndrivers/net/dsa/dsa_loop.c-42-\ndrivers/net/dsa/dsa_loop.c:43:struct dsa_loop_port {\ndrivers/net/dsa/dsa_loop.c:44:\tstruct dsa_loop_mib_entry mib[__DSA_LOOP_CNT_MAX];\ndrivers/net/dsa/dsa_loop.c-45-\tu16 pvid;\n--\ndrivers/net/dsa/dsa_loop.c-48-\ndrivers/net/dsa/dsa_loop.c:49:struct dsa_loop_priv {\ndrivers/net/dsa/dsa_loop.c-50-\tstruct mii_bus\t*bus;\ndrivers/net/dsa/dsa_loop.c-51-\tunsigned int\tport_base;\ndrivers/net/dsa/dsa_loop.c:52:\tstruct dsa_loop_vlan vlans[VLAN_N_VID];\ndrivers/net/dsa/dsa_loop.c-53-\tstruct net_device *netdev;\ndrivers/net/dsa/dsa_loop.c:54:\tstruct dsa_loop_port ports[DSA_MAX_PORTS];\ndrivers/net/dsa/dsa_loop.c-55-};\ndrivers/net/dsa/dsa_loop.c-56-\ndrivers/net/dsa/dsa_loop.c:57:struct dsa_loop_pdata {\ndrivers/net/dsa/dsa_loop.c-58-\t/* Must be first, such that dsa_register_switch() can access this\n--\ndrivers/net/dsa/dsa_loop.c-66-\ndrivers/net/dsa/dsa_loop.c:67:static struct dsa_loop_mib_entry dsa_loop_mibs[] = {\ndrivers/net/dsa/dsa_loop.c-68-\t[DSA_LOOP_PHY_READ_OK]\t= { \"phy_read_ok\", },\n--\ndrivers/net/dsa/dsa_loop.c=75=static struct mdio_device *switch_mdiodev;\ndrivers/net/dsa/dsa_loop.c-76-\ndrivers/net/dsa/dsa_loop.c:77:enum dsa_loop_devlink_resource_id {\ndrivers/net/dsa/dsa_loop.c-78-\tDSA_LOOP_DEVLINK_PARAM_ID_NONE, /* DEVLINK_RESOURCE_ID_PARENT_TOP */\n--\ndrivers/net/dsa/dsa_loop.c-81-\ndrivers/net/dsa/dsa_loop.c:82:static u64 dsa_loop_devlink_vtu_get(void *priv)\ndrivers/net/dsa/dsa_loop.c-83-{\ndrivers/net/dsa/dsa_loop.c:84:\tstruct dsa_loop_priv *ps = priv;\ndrivers/net/dsa/dsa_loop.c-85-\tunsigned int i, count = 0;\ndrivers/net/dsa/dsa_loop.c:86:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-87-\n--\ndrivers/net/dsa/dsa_loop.c-96-\ndrivers/net/dsa/dsa_loop.c:97:static int dsa_loop_setup_devlink_resources(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-98-{\ndrivers/net/dsa/dsa_loop.c-99-\tstruct devlink_resource_size_params size_params;\ndrivers/net/dsa/dsa_loop.c:100:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-101-\tint err;\n--\ndrivers/net/dsa/dsa_loop.c-115-\t\t\t\t\t DSA_LOOP_DEVLINK_PARAM_ID_VTU,\ndrivers/net/dsa/dsa_loop.c:116:\t\t\t\t\t dsa_loop_devlink_vtu_get, ps);\ndrivers/net/dsa/dsa_loop.c-117-\n--\ndrivers/net/dsa/dsa_loop.c-124-\ndrivers/net/dsa/dsa_loop.c:125:static enum dsa_tag_protocol dsa_loop_get_protocol(struct dsa_switch *ds,\ndrivers/net/dsa/dsa_loop.c-126-\t\t\t\t\t\t int port,\n--\ndrivers/net/dsa/dsa_loop.c-133-\ndrivers/net/dsa/dsa_loop.c:134:static int dsa_loop_setup(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-135-{\ndrivers/net/dsa/dsa_loop.c:136:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-137-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-139-\tfor (i = 0; i \u003c ds-\u003enum_ports; i++)\ndrivers/net/dsa/dsa_loop.c:140:\t\tmemcpy(ps-\u003eports[i].mib, dsa_loop_mibs,\ndrivers/net/dsa/dsa_loop.c:141:\t\t sizeof(dsa_loop_mibs));\ndrivers/net/dsa/dsa_loop.c-142-\n--\ndrivers/net/dsa/dsa_loop.c-144-\ndrivers/net/dsa/dsa_loop.c:145:\treturn dsa_loop_setup_devlink_resources(ds);\ndrivers/net/dsa/dsa_loop.c-146-}\ndrivers/net/dsa/dsa_loop.c-147-\ndrivers/net/dsa/dsa_loop.c:148:static void dsa_loop_teardown(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-149-{\n--\ndrivers/net/dsa/dsa_loop.c-152-\ndrivers/net/dsa/dsa_loop.c:153:static int dsa_loop_get_sset_count(struct dsa_switch *ds, int port, int sset)\ndrivers/net/dsa/dsa_loop.c-154-{\n--\ndrivers/net/dsa/dsa_loop.c-160-\ndrivers/net/dsa/dsa_loop.c:161:static void dsa_loop_get_strings(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-162-\t\t\t\t u32 stringset, uint8_t *data)\ndrivers/net/dsa/dsa_loop.c-163-{\ndrivers/net/dsa/dsa_loop.c:164:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-165-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-173-\ndrivers/net/dsa/dsa_loop.c:174:static void dsa_loop_get_ethtool_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-175-\t\t\t\t uint64_t *data)\ndrivers/net/dsa/dsa_loop.c-176-{\ndrivers/net/dsa/dsa_loop.c:177:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-178-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-183-\ndrivers/net/dsa/dsa_loop.c:184:static int dsa_loop_phy_read(struct dsa_switch *ds, int port, int regnum)\ndrivers/net/dsa/dsa_loop.c-185-{\ndrivers/net/dsa/dsa_loop.c:186:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-187-\tstruct mii_bus *bus = ps-\u003ebus;\n--\ndrivers/net/dsa/dsa_loop.c-198-\ndrivers/net/dsa/dsa_loop.c:199:static int dsa_loop_phy_write(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-200-\t\t\t int regnum, u16 value)\ndrivers/net/dsa/dsa_loop.c-201-{\ndrivers/net/dsa/dsa_loop.c:202:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-203-\tstruct mii_bus *bus = ps-\u003ebus;\n--\ndrivers/net/dsa/dsa_loop.c-214-\ndrivers/net/dsa/dsa_loop.c:215:static int dsa_loop_port_bridge_join(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-216-\t\t\t\t struct dsa_bridge bridge,\n--\ndrivers/net/dsa/dsa_loop.c-225-\ndrivers/net/dsa/dsa_loop.c:226:static void dsa_loop_port_bridge_leave(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-227-\t\t\t\t struct dsa_bridge bridge)\n--\ndrivers/net/dsa/dsa_loop.c-232-\ndrivers/net/dsa/dsa_loop.c:233:static void dsa_loop_port_stp_state_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-234-\t\t\t\t\tu8 state)\n--\ndrivers/net/dsa/dsa_loop.c-239-\ndrivers/net/dsa/dsa_loop.c:240:static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-241-\t\t\t\t\tbool vlan_filtering,\n--\ndrivers/net/dsa/dsa_loop.c-249-\ndrivers/net/dsa/dsa_loop.c:250:static int dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-251-\t\t\t\t const struct switchdev_obj_port_vlan *vlan,\n--\ndrivers/net/dsa/dsa_loop.c-255-\tbool pvid = vlan-\u003eflags \u0026 BRIDGE_VLAN_INFO_PVID;\ndrivers/net/dsa/dsa_loop.c:256:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-257-\tstruct mii_bus *bus = ps-\u003ebus;\ndrivers/net/dsa/dsa_loop.c:258:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-259-\n--\ndrivers/net/dsa/dsa_loop.c-282-\ndrivers/net/dsa/dsa_loop.c:283:static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-284-\t\t\t\t const struct switchdev_obj_port_vlan *vlan)\n--\ndrivers/net/dsa/dsa_loop.c-286-\tbool untagged = vlan-\u003eflags \u0026 BRIDGE_VLAN_INFO_UNTAGGED;\ndrivers/net/dsa/dsa_loop.c:287:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-288-\tu16 pvid = ps-\u003eports[port].pvid;\ndrivers/net/dsa/dsa_loop.c-289-\tstruct mii_bus *bus = ps-\u003ebus;\ndrivers/net/dsa/dsa_loop.c:290:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-291-\n--\ndrivers/net/dsa/dsa_loop.c-310-\ndrivers/net/dsa/dsa_loop.c:311:static int dsa_loop_port_change_mtu(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-312-\t\t\t\t int new_mtu)\ndrivers/net/dsa/dsa_loop.c-313-{\ndrivers/net/dsa/dsa_loop.c:314:\tstruct dsa_loop_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-315-\n--\ndrivers/net/dsa/dsa_loop.c-320-\ndrivers/net/dsa/dsa_loop.c:321:static int dsa_loop_port_max_mtu(struct dsa_switch *ds, int port)\ndrivers/net/dsa/dsa_loop.c-322-{\n--\ndrivers/net/dsa/dsa_loop.c-325-\ndrivers/net/dsa/dsa_loop.c:326:static void dsa_loop_phylink_get_caps(struct dsa_switch *dsa, int port,\ndrivers/net/dsa/dsa_loop.c-327-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/dsa_loop.c-333-\ndrivers/net/dsa/dsa_loop.c:334:static const struct dsa_switch_ops dsa_loop_driver = {\ndrivers/net/dsa/dsa_loop.c:335:\t.get_tag_protocol\t= dsa_loop_get_protocol,\ndrivers/net/dsa/dsa_loop.c:336:\t.setup\t\t\t= dsa_loop_setup,\ndrivers/net/dsa/dsa_loop.c:337:\t.teardown\t\t= dsa_loop_teardown,\ndrivers/net/dsa/dsa_loop.c:338:\t.get_strings\t\t= dsa_loop_get_strings,\ndrivers/net/dsa/dsa_loop.c:339:\t.get_ethtool_stats\t= dsa_loop_get_ethtool_stats,\ndrivers/net/dsa/dsa_loop.c:340:\t.get_sset_count\t\t= dsa_loop_get_sset_count,\ndrivers/net/dsa/dsa_loop.c:341:\t.get_ethtool_phy_stats\t= dsa_loop_get_ethtool_stats,\ndrivers/net/dsa/dsa_loop.c:342:\t.phy_read\t\t= dsa_loop_phy_read,\ndrivers/net/dsa/dsa_loop.c:343:\t.phy_write\t\t= dsa_loop_phy_write,\ndrivers/net/dsa/dsa_loop.c:344:\t.port_bridge_join\t= dsa_loop_port_bridge_join,\ndrivers/net/dsa/dsa_loop.c:345:\t.port_bridge_leave\t= dsa_loop_port_bridge_leave,\ndrivers/net/dsa/dsa_loop.c:346:\t.port_stp_state_set\t= dsa_loop_port_stp_state_set,\ndrivers/net/dsa/dsa_loop.c:347:\t.port_vlan_filtering\t= dsa_loop_port_vlan_filtering,\ndrivers/net/dsa/dsa_loop.c:348:\t.port_vlan_add\t\t= dsa_loop_port_vlan_add,\ndrivers/net/dsa/dsa_loop.c:349:\t.port_vlan_del\t\t= dsa_loop_port_vlan_del,\ndrivers/net/dsa/dsa_loop.c:350:\t.port_change_mtu\t= dsa_loop_port_change_mtu,\ndrivers/net/dsa/dsa_loop.c:351:\t.port_max_mtu\t\t= dsa_loop_port_max_mtu,\ndrivers/net/dsa/dsa_loop.c:352:\t.phylink_get_caps\t= dsa_loop_phylink_get_caps,\ndrivers/net/dsa/dsa_loop.c-353-};\ndrivers/net/dsa/dsa_loop.c-354-\ndrivers/net/dsa/dsa_loop.c:355:static int dsa_loop_drv_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-356-{\ndrivers/net/dsa/dsa_loop.c:357:\tstruct dsa_loop_pdata *pdata = mdiodev-\u003edev.platform_data;\ndrivers/net/dsa/dsa_loop.c:358:\tstruct dsa_loop_priv *ps;\ndrivers/net/dsa/dsa_loop.c-359-\tstruct dsa_switch *ds;\n--\ndrivers/net/dsa/dsa_loop.c-382-\tds-\u003edev = \u0026mdiodev-\u003edev;\ndrivers/net/dsa/dsa_loop.c:383:\tds-\u003eops = \u0026dsa_loop_driver;\ndrivers/net/dsa/dsa_loop.c-384-\tds-\u003epriv = ps;\n--\ndrivers/net/dsa/dsa_loop.c-396-\ndrivers/net/dsa/dsa_loop.c:397:static void dsa_loop_drv_remove(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-398-{\ndrivers/net/dsa/dsa_loop.c-399-\tstruct dsa_switch *ds = dev_get_drvdata(\u0026mdiodev-\u003edev);\ndrivers/net/dsa/dsa_loop.c:400:\tstruct dsa_loop_priv *ps;\ndrivers/net/dsa/dsa_loop.c-401-\n--\ndrivers/net/dsa/dsa_loop.c-410-\ndrivers/net/dsa/dsa_loop.c:411:static void dsa_loop_drv_shutdown(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-412-{\n--\ndrivers/net/dsa/dsa_loop.c-422-\ndrivers/net/dsa/dsa_loop.c:423:static struct mdio_driver dsa_loop_drv = {\ndrivers/net/dsa/dsa_loop.c-424-\t.mdiodrv.driver\t= {\n--\ndrivers/net/dsa/dsa_loop.c-426-\t},\ndrivers/net/dsa/dsa_loop.c:427:\t.probe\t= dsa_loop_drv_probe,\ndrivers/net/dsa/dsa_loop.c:428:\t.remove\t= dsa_loop_drv_remove,\ndrivers/net/dsa/dsa_loop.c:429:\t.shutdown = dsa_loop_drv_shutdown,\ndrivers/net/dsa/dsa_loop.c-430-};\ndrivers/net/dsa/dsa_loop.c-431-\ndrivers/net/dsa/dsa_loop.c:432:static int dsa_loop_bus_match(struct device *dev,\ndrivers/net/dsa/dsa_loop.c-433-\t\t\t const struct device_driver *drv)\ndrivers/net/dsa/dsa_loop.c-434-{\ndrivers/net/dsa/dsa_loop.c:435:\treturn drv == \u0026dsa_loop_drv.mdiodrv.driver;\ndrivers/net/dsa/dsa_loop.c-436-}\ndrivers/net/dsa/dsa_loop.c-437-\ndrivers/net/dsa/dsa_loop.c:438:static void dsa_loop_phydevs_unregister(void)\ndrivers/net/dsa/dsa_loop.c-439-{\n--\ndrivers/net/dsa/dsa_loop.c-445-\ndrivers/net/dsa/dsa_loop.c:446:static int __init dsa_loop_create_switch_mdiodev(void)\ndrivers/net/dsa/dsa_loop.c-447-{\ndrivers/net/dsa/dsa_loop.c:448:\tstatic struct dsa_loop_pdata dsa_loop_pdata = {\ndrivers/net/dsa/dsa_loop.c-449-\t\t.cd = {\n--\ndrivers/net/dsa/dsa_loop.c-470-\ndrivers/net/dsa/dsa_loop.c:471:\tswitch_mdiodev-\u003ebus_match = dsa_loop_bus_match;\ndrivers/net/dsa/dsa_loop.c:472:\tswitch_mdiodev-\u003edev.platform_data = \u0026dsa_loop_pdata;\ndrivers/net/dsa/dsa_loop.c-473-\n--\ndrivers/net/dsa/dsa_loop.c-481-\ndrivers/net/dsa/dsa_loop.c:482:static int __init dsa_loop_init(void)\ndrivers/net/dsa/dsa_loop.c-483-{\n--\ndrivers/net/dsa/dsa_loop.c-486-\ndrivers/net/dsa/dsa_loop.c:487:\tret = dsa_loop_create_switch_mdiodev();\ndrivers/net/dsa/dsa_loop.c-488-\tif (ret)\n--\ndrivers/net/dsa/dsa_loop.c-493-\ndrivers/net/dsa/dsa_loop.c:494:\tret = mdio_driver_register(\u0026dsa_loop_drv);\ndrivers/net/dsa/dsa_loop.c-495-\tif (ret) {\ndrivers/net/dsa/dsa_loop.c:496:\t\tdsa_loop_phydevs_unregister();\ndrivers/net/dsa/dsa_loop.c-497-\t\tmdio_device_remove(switch_mdiodev);\n--\ndrivers/net/dsa/dsa_loop.c-502-}\ndrivers/net/dsa/dsa_loop.c:503:module_init(dsa_loop_init);\ndrivers/net/dsa/dsa_loop.c-504-\ndrivers/net/dsa/dsa_loop.c:505:static void __exit dsa_loop_exit(void)\ndrivers/net/dsa/dsa_loop.c-506-{\ndrivers/net/dsa/dsa_loop.c:507:\tmdio_driver_unregister(\u0026dsa_loop_drv);\ndrivers/net/dsa/dsa_loop.c:508:\tdsa_loop_phydevs_unregister();\ndrivers/net/dsa/dsa_loop.c-509-\tmdio_device_remove(switch_mdiodev);\n--\ndrivers/net/dsa/dsa_loop.c-511-}\ndrivers/net/dsa/dsa_loop.c:512:module_exit(dsa_loop_exit);\ndrivers/net/dsa/dsa_loop.c-513-\n"
} |
| 23/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 34263 output: 33 thoughts: 67 Thoughts: Here's my take: **Investigating the DSA Loop PHY** Okay, so I'm looking into the `dsa_loop_bdinfo` function, specifically within `drivers/net/dsa/dsa_loop_bdinfo.c`. The question that pops up immediately is: which PHY (Physical Layer) is this `dsa_loop` driver actually using? Time to dive into the code. Let's start by scrutinizing `drivers/net/dsa/dsa_loop_bdinfo.c` itself. I need to understand how the driver interacts with the PHY. |
| 24/2 | 2026/09/20 22:49 | tool | grepper |
0mError:no matches Args: {
"Expression": "dsa_loop_bdinfo",
"PathPrefix": "drivers/net/dsa"
}Results: {
"error": "no matches"
} |
| 25/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 34506 output: 41 thoughts: 29 Thoughts: Okay, let's dive into `drivers/net/dsa/dsa_loop.c`, specifically lines 440 to 485. I want to understand the specifics of how the loopback functionality is implemented within the DSA framework. My primary interest, as a network expert, is likely around performance and potential bottlenecks, or perhaps even subtle implementation details that could affect edge cases. I'm immediately looking for how packets are handled, the data structures used, and any interaction with hardware or other software components. I need to quickly grasp the core logic: what's the entry point, how's the data copied or referenced, and are there any optimizations employed, like DMA or zero-copy techniques? I'm anticipating potential issues with interrupt handling, buffer management, or even race conditions. I'm also curious about error handling and how the loopback interacts with other DSA features, like VLAN tagging or QoS. Ultimately, I'm expecting to understand this block well enough to suggest optimizations or, at least, to mentally map it against the rest of the relevant parts of the kernel. |
| 26/2 | 2026/09/20 22:49 | tool | read-file |
0mArgs:{
"File": "drivers/net/dsa/dsa_loop.c",
"FirstLine": 440,
"LineCount": 45
}Results: {
"Contents": " 440:\t\tfor (int i = 0; i \u003c NUM_FIXED_PHYS; i++) {\n 441:\t\t\tif (!IS_ERR(phydevs[i]))\n 442:\t\t\t\tfixed_phy_unregister(phydevs[i]);\n 443:\t\t}\n 444:\t}\n 445:\t\n 446:\tstatic int __init dsa_loop_create_switch_mdiodev(void)\n 447:\t{\n 448:\t\tstatic struct dsa_loop_pdata dsa_loop_pdata = {\n 449:\t\t\t.cd = {\n 450:\t\t\t\t.port_names[0] = \"lan1\",\n 451:\t\t\t\t.port_names[1] = \"lan2\",\n 452:\t\t\t\t.port_names[2] = \"lan3\",\n 453:\t\t\t\t.port_names[3] = \"lan4\",\n 454:\t\t\t\t.port_names[DSA_LOOP_CPU_PORT] = \"cpu\",\n 455:\t\t\t},\n 456:\t\t\t.name = \"DSA mockup driver\",\n 457:\t\t\t.enabled_ports = 0x1f,\n 458:\t\t\t.netdev = \"eth0\",\n 459:\t\t};\n 460:\t\tstruct mii_bus *bus;\n 461:\t\tint ret = -ENODEV;\n 462:\t\n 463:\t\tbus = mdio_find_bus(\"fixed-0\");\n 464:\t\tif (WARN_ON(!bus))\n 465:\t\t\treturn ret;\n 466:\t\n 467:\t\tswitch_mdiodev = mdio_device_create(bus, 31);\n 468:\t\tif (IS_ERR(switch_mdiodev))\n 469:\t\t\tgoto out;\n 470:\t\n 471:\t\tswitch_mdiodev-\u003ebus_match = dsa_loop_bus_match;\n 472:\t\tswitch_mdiodev-\u003edev.platform_data = \u0026dsa_loop_pdata;\n 473:\t\n 474:\t\tret = mdio_device_register(switch_mdiodev);\n 475:\t\tif (ret)\n 476:\t\t\tmdio_device_free(switch_mdiodev);\n 477:\tout:\n 478:\t\tput_device(\u0026bus-\u003edev);\n 479:\t\treturn ret;\n 480:\t}\n 481:\t\n 482:\tstatic int __init dsa_loop_init(void)\n 483:\t{\n 484:\t\tunsigned int i;\n"
} |
| 27/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 35491 output: 27 thoughts: 349 Thoughts: **Investigating the Device Matching for MTK GEPHY Driver** Okay, so `dsa_loop` is responsible for creating these `fixed_phy` devices on the `fixed-0` bus. The question now is, how does the `mtk_gephy_driver` actually *match* to one of these devices? I need to understand the connection. Let's dive into the `mtk_gephy_driver` itself and see what its matching criteria are. Examining its structure, it's defined as an array of `phy_driver` entries. Aha, here's the crucial part: the first entry is for the `MT7530` variant. Specifically, it uses `PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530)`. This looks promising. The driver also has a `mt753x_gphy_match` function, too, so there may be more to the matching than a simple ID. Now, where *is* this `MT7530` PHY actually created or registered in the kernel? I need to trace this back. I'll search for either `MTK_GPHY_ID_MT7530` directly, or I'll look for how these MT7530 PHYs are registered in the system. That should give me the complete picture of the device's lifecycle and how it connects to this driver. |
| 28/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "MTK_GPHY_ID_MT7530"
}Results: {
"Output": "drivers/net/phy/mediatek/mtk-ge.c-7-\ndrivers/net/phy/mediatek/mtk-ge.c:8:#define MTK_GPHY_ID_MT7530\t\t0x03a29412\ndrivers/net/phy/mediatek/mtk-ge.c-9-#define MTK_GPHY_ID_MT7531\t\t0x03a29441\n--\ndrivers/net/phy/mediatek/mtk-ge.c=77=static int mt7530_phy_config_init(struct phy_device *phydev)\n--\ndrivers/net/phy/mediatek/mtk-ge.c-104-/*\ndrivers/net/phy/mediatek/mtk-ge.c:105: * MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY\ndrivers/net/phy/mediatek/mtk-ge.c-106- * does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY\n--\ndrivers/net/phy/mediatek/mtk-ge.c=139=static struct phy_driver mtk_gephy_driver[] = {\ndrivers/net/phy/mediatek/mtk-ge.c-140-\t{\ndrivers/net/phy/mediatek/mtk-ge.c:141:\t\tPHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),\ndrivers/net/phy/mediatek/mtk-ge.c-142-\t\t.name\t\t= \"MediaTek MT7530 PHY\",\n--\ndrivers/net/phy/mediatek/mtk-ge.c=174=static const struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {\ndrivers/net/phy/mediatek/mtk-ge.c:175:\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },\ndrivers/net/phy/mediatek/mtk-ge.c-176-\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },\n"
} |
| 29/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 36738 output: 26 thoughts: 377 Thoughts: **My Analysis of the MTK_GPHY_ID_MT7530 Identifier** Okay, so `MTK_GPHY_ID_MT7530` is defined as `0x03a29412`. That's the PHY identifier I'm expecting to read from those MII registers, specifically `MII_PHYSID1` and `MII_PHYSID2`. It's how the system identifies the specific PHY hardware during MDIO bus scanning, whether it's through `mdiobus_scan` or Device Tree. The process is pretty straightforward: read those registers, and if I get that magic number, `phy_device_create` is invoked. Then, `phy_device_register` makes it part of the bus, and that’s where the drivers start matching up, in this case, `mtk_gephy_driver`. But, wait a minute, what kind of hardware are we actually talking about here? It's pretty specific: MediaTek hardware, like the MT7530 switch, or their MT7621/MT7623/EcoNet SoCs, or boards with the MT7530 specifically connected to an MDIO bus. Okay, so that's a pretty narrow scope. Now, the real question that pops up: Can this scenario even *happen* on an x86_64 system emulated in something like QEMU or Google Compute Engine? And the answer is immediately no! MediaTek switches are embedded components, primarily for MIPS/ARM router SoCs. The likelihood of an x86 host emulating MediaTek switch functionality is zero. Alright, so if not a virtual environment, what other possibilities exist? Can there be a USB-to-MDIO adapter? Does Linux even support that kind of thing? Are there any existing USB-MDIO adapter drivers or virtual MDIO drivers I can create from userspace? Time to go searching the kernel source for `mdio` drivers and `mii_bus` registration. |
| 30/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "mdiobus_register",
"PathPrefix": "drivers"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1018 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/bcm_sf2.c=607=static int bcm_sf2_mdio_register(struct dsa_switch *ds)\n--\ndrivers/net/dsa/bcm_sf2.c-683-\ndrivers/net/dsa/bcm_sf2.c:684:\terr = mdiobus_register(priv-\u003euser_mii_bus);\ndrivers/net/dsa/bcm_sf2.c-685-\tif (err)\n--\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c=187=static int gswip_mdio(struct gswip_priv *priv)\n--\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c-213-\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c:214:\terr = devm_of_mdiobus_register(dev, bus, mdio_np);\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c-215-\n--\ndrivers/net/dsa/microchip/ksz9477.c=321=static int ksz9477_pcs_create(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/ksz9477.c-341-\ndrivers/net/dsa/microchip/ksz9477.c:342:\tret = devm_mdiobus_register(dev-\u003edev, bus);\ndrivers/net/dsa/microchip/ksz9477.c-343-\tif (ret)\n--\ndrivers/net/dsa/microchip/ksz_common.c=2385=int ksz_mdio_register(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/ksz_common.c-2456-\ndrivers/net/dsa/microchip/ksz_common.c:2457:\tret = devm_of_mdiobus_register(ds-\u003edev, bus, mdio_np);\ndrivers/net/dsa/microchip/ksz_common.c-2458-\tif (ret) {\n--\ndrivers/net/dsa/microchip/lan937x_main.c=685=static int lan937x_mdio_register(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/lan937x_main.c-755-\ndrivers/net/dsa/microchip/lan937x_main.c:756:\tret = devm_of_mdiobus_register(ds-\u003edev, bus, mdio_np);\ndrivers/net/dsa/microchip/lan937x_main.c-757-\tif (ret)\n--\ndrivers/net/dsa/motorcomm/chip.c=389=yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)\n--\ndrivers/net/dsa/motorcomm/chip.c-406-\ndrivers/net/dsa/motorcomm/chip.c:407:\tres = devm_of_mdiobus_register(dev, mbus, mnp);\ndrivers/net/dsa/motorcomm/chip.c-408-\tif (res)\n--\ndrivers/net/dsa/motorcomm/chip.c=520=yt921x_mbus_ext_init(struct yt921x_priv *priv, struct device_node *mnp)\n--\ndrivers/net/dsa/motorcomm/chip.c-537-\ndrivers/net/dsa/motorcomm/chip.c:538:\tres = devm_of_mdiobus_register(dev, mbus, mnp);\ndrivers/net/dsa/motorcomm/chip.c-539-\tif (res)\n--\ndrivers/net/dsa/mt7530.c=2337=mt7530_setup_mdio(struct mt7530_priv *priv)\n--\ndrivers/net/dsa/mt7530.c-2372-\ndrivers/net/dsa/mt7530.c:2373:\tret = devm_of_mdiobus_register(dev, bus, mnp);\ndrivers/net/dsa/mt7530.c-2374-\tif (ret) {\n--\ndrivers/net/dsa/mt7628.c=242=static int mt7628_setup_internal_mdio(struct dsa_switch *ds)\n--\ndrivers/net/dsa/mt7628.c-261-\ndrivers/net/dsa/mt7628.c:262:\treturn devm_mdiobus_register(dev, bus);\ndrivers/net/dsa/mt7628.c-263-}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3842=static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3895-\ndrivers/net/dsa/mv88e6xxx/chip.c:3896:\terr = of_mdiobus_register(bus, np);\ndrivers/net/dsa/mv88e6xxx/chip.c-3897-\tif (err) {\n--\ndrivers/net/dsa/mxl862xx/mxl862xx.c=267=static int mxl862xx_setup_mdio(struct dsa_switch *ds)\n--\ndrivers/net/dsa/mxl862xx/mxl862xx.c-292-\ndrivers/net/dsa/mxl862xx/mxl862xx.c:293:\tret = devm_of_mdiobus_register(dev, bus, mdio_np);\ndrivers/net/dsa/mxl862xx/mxl862xx.c-294-\tof_node_put(mdio_np);\n--\ndrivers/net/dsa/netc/netc_main.c=149=static int netc_port_create_emdio_bus(struct netc_port *np,\n--\ndrivers/net/dsa/netc/netc_main.c-179-\ndrivers/net/dsa/netc/netc_main.c:180:\terr = devm_of_mdiobus_register(dev, bus, node);\ndrivers/net/dsa/netc/netc_main.c-181-\tif (err)\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c=957=static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-1013-\t/* Needed in order to initialize the bus mutex lock */\ndrivers/net/dsa/ocelot/felix_vsc9959.c:1014:\trc = mdiobus_register(bus);\ndrivers/net/dsa/ocelot/felix_vsc9959.c-1015-\tif (rc \u003c 0) {\n--\ndrivers/net/dsa/ocelot/seville_vsc9953.c=878=static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot)\n--\ndrivers/net/dsa/ocelot/seville_vsc9953.c-903-\t/* Needed in order to initialize the bus mutex lock */\ndrivers/net/dsa/ocelot/seville_vsc9953.c:904:\trc = devm_of_mdiobus_register(dev, bus, NULL);\ndrivers/net/dsa/ocelot/seville_vsc9953.c-905-\tif (rc \u003c 0) {\n--\ndrivers/net/dsa/qca/ar9331.c=357=static int ar9331_sw_mbus_init(struct ar9331_sw_priv *priv)\n--\ndrivers/net/dsa/qca/ar9331.c-381-\ndrivers/net/dsa/qca/ar9331.c:382:\tret = devm_of_mdiobus_register(dev, mbus, mnp);\ndrivers/net/dsa/qca/ar9331.c-383-\tof_node_put(mnp);\n--\ndrivers/net/dsa/qca/qca8k-8xxx.c=947=qca8k_mdio_register(struct qca8k_priv *priv)\n--\ndrivers/net/dsa/qca/qca8k-8xxx.c-986-\ndrivers/net/dsa/qca/qca8k-8xxx.c:987:\tret = devm_of_mdiobus_register(dev, bus, mdio);\ndrivers/net/dsa/qca/qca8k-8xxx.c-988-\n--\ndrivers/net/dsa/realtek/rtl83xx.c=75=int rtl83xx_setup_user_mdio(struct dsa_switch *ds)\n--\ndrivers/net/dsa/realtek/rtl83xx.c-100-\ndrivers/net/dsa/realtek/rtl83xx.c:101:\tret = devm_of_mdiobus_register(priv-\u003edev, bus, mdio_np);\ndrivers/net/dsa/realtek/rtl83xx.c-102-\tif (ret) {\n--\ndrivers/net/dsa/rzn1_a5psw.c=1117=static int a5psw_probe_mdio(struct a5psw *a5psw, struct device_node *node)\n--\ndrivers/net/dsa/rzn1_a5psw.c-1143-\ndrivers/net/dsa/rzn1_a5psw.c:1144:\treturn devm_of_mdiobus_register(dev, bus, node);\ndrivers/net/dsa/rzn1_a5psw.c-1145-}\n--\ndrivers/net/dsa/sja1105/sja1105.h=307=void sja1105_frame_memory_partitioning(struct sja1105_private *priv);\n--\ndrivers/net/dsa/sja1105/sja1105.h-309-/* From sja1105_mdio.c */\ndrivers/net/dsa/sja1105/sja1105.h:310:int sja1105_mdiobus_register(struct dsa_switch *ds);\ndrivers/net/dsa/sja1105/sja1105.h-311-void sja1105_mdiobus_unregister(struct dsa_switch *ds);\n--\ndrivers/net/dsa/sja1105/sja1105_main.c=3026=static int sja1105_setup(struct dsa_switch *ds)\n--\ndrivers/net/dsa/sja1105/sja1105_main.c-3067-\ndrivers/net/dsa/sja1105/sja1105_main.c:3068:\trc = sja1105_mdiobus_register(ds);\ndrivers/net/dsa/sja1105/sja1105_main.c-3069-\tif (rc \u003c 0) {\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c=258=static int sja1105_mdiobus_base_tx_register(struct sja1105_private *priv,\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c-287-\ndrivers/net/dsa/sja1105/sja1105_mdio.c:288:\trc = of_mdiobus_register(bus, np);\ndrivers/net/dsa/sja1105/sja1105_mdio.c-289-\tif (rc) {\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c=312=static int sja1105_mdiobus_base_t1_register(struct sja1105_private *priv,\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c-343-\ndrivers/net/dsa/sja1105/sja1105_mdio.c:344:\trc = of_mdiobus_register(bus, np);\ndrivers/net/dsa/sja1105/sja1105_mdio.c-345-\tif (rc) {\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c=368=static int sja1105_mdiobus_pcs_register(struct sja1105_private *priv)\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c-395-\ndrivers/net/dsa/sja1105/sja1105_mdio.c:396:\trc = mdiobus_register(bus);\ndrivers/net/dsa/sja1105/sja1105_mdio.c-397-\tif (rc) {\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c=439=static void sja1105_mdiobus_pcs_unregister(struct sja1105_private *priv)\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c-458-\ndrivers/net/dsa/sja1105/sja1105_mdio.c:459:int sja1105_mdiobus_register(struct dsa_switch *ds)\ndrivers/net/dsa/sja1105/sja1105_mdio.c-460-{\n--\ndrivers/net/ethernet/8390/ax88796.c=459=static int ax_mii_init(struct net_device *dev)\n--\ndrivers/net/ethernet/8390/ax88796.c-478-\ndrivers/net/ethernet/8390/ax88796.c:479:\terr = mdiobus_register(ax-\u003emii_bus);\ndrivers/net/ethernet/8390/ax88796.c-480-\tif (err)\n--\ndrivers/net/ethernet/actions/owl-emac.c=1321=static int owl_emac_mdio_init(struct net_device *netdev)\n--\ndrivers/net/ethernet/actions/owl-emac.c-1345-\ndrivers/net/ethernet/actions/owl-emac.c:1346:\tret = devm_of_mdiobus_register(dev, priv-\u003emii, mdio_node);\ndrivers/net/ethernet/actions/owl-emac.c-1347-\n--\ndrivers/net/ethernet/adi/adin1110.c=509=static int adin1110_register_mdiobus(struct adin1110_priv *priv,\n--\ndrivers/net/ethernet/adi/adin1110.c-529-\ndrivers/net/ethernet/adi/adin1110.c:530:\tret = devm_mdiobus_register(dev, mii_bus);\ndrivers/net/ethernet/adi/adin1110.c-531-\tif (ret)\n--\ndrivers/net/ethernet/adi/adin1140.c=617=static int adin1140_mdio_register(struct adin1140_priv *priv,\n--\ndrivers/net/ethernet/adi/adin1140.c-636-\ndrivers/net/ethernet/adi/adin1140.c:637:\treturn devm_mdiobus_register(\u0026spidev-\u003edev, priv-\u003emdiobus);\ndrivers/net/ethernet/adi/adin1140.c-638-}\n--\ndrivers/net/ethernet/aeroflex/greth.c=1290=static int greth_mdio_init(struct greth_private *greth)\n--\ndrivers/net/ethernet/aeroflex/greth.c-1306-\ndrivers/net/ethernet/aeroflex/greth.c:1307:\tret = mdiobus_register(greth-\u003emdio);\ndrivers/net/ethernet/aeroflex/greth.c-1308-\tif (ret) {\n--\ndrivers/net/ethernet/agere/et131x.c=3931=static int et131x_pci_setup(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/agere/et131x.c-4026-\ndrivers/net/ethernet/agere/et131x.c:4027:\trc = mdiobus_register(adapter-\u003emii_bus);\ndrivers/net/ethernet/agere/et131x.c-4028-\tif (rc \u003c 0) {\n--\ndrivers/net/ethernet/altera/altera_tse_main.c=121=static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)\n--\ndrivers/net/ethernet/altera/altera_tse_main.c-157-\ndrivers/net/ethernet/altera/altera_tse_main.c:158:\tret = of_mdiobus_register(mdio, mdio_node);\ndrivers/net/ethernet/altera/altera_tse_main.c-159-\tif (ret != 0) {\n--\ndrivers/net/ethernet/amd/au1000_eth.c=1061=static int au1000_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/amd/au1000_eth.c-1221-\ndrivers/net/ethernet/amd/au1000_eth.c:1222:\terr = mdiobus_register(aup-\u003emii_bus);\ndrivers/net/ethernet/amd/au1000_eth.c-1223-\tif (err) {\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c=3428=static int xgbe_phy_init(struct xgbe_prv_data *pdata)\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c-3717-\tsnprintf(mii-\u003eid, sizeof(mii-\u003eid), \"%s\", dev_name(pdata-\u003edev));\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:3718:\tret = mdiobus_register(mii);\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c-3719-\tif (ret) {\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:3720:\t\tdev_err(pdata-\u003edev, \"mdiobus_register failed\\n\");\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c-3721-\t\treturn ret;\n--\ndrivers/net/ethernet/apm/xgene-v2/mdio.c=98=int xge_mdio_config(struct net_device *ndev)\n--\ndrivers/net/ethernet/apm/xgene-v2/mdio.c-118-\tmdio_bus-\u003ephy_mask = 0x1;\ndrivers/net/ethernet/apm/xgene-v2/mdio.c:119:\tret = mdiobus_register(mdio_bus);\ndrivers/net/ethernet/apm/xgene-v2/mdio.c-120-\tif (ret)\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c=837=int xgene_enet_phy_connect(struct net_device *ndev)\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-887-\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c:888:static int xgene_mdiobus_register(struct xgene_enet_pdata *pdata,\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-889-\t\t\t\t struct mii_bus *mdio)\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-912-\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c:913:\t\tret = of_mdiobus_register(mdio, mdio_np);\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-914-\t\tof_node_put(mdio_np);\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-921-\t/* Register the MDIO bus */\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c:922:\tret = mdiobus_register(mdio);\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-923-\tif (ret)\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c=939=int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata)\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-957-\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c:958:\tret = xgene_mdiobus_register(pdata, mdio_bus);\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-959-\tif (ret) {\n--\ndrivers/net/ethernet/arc/emac_mdio.c=131=int arc_mdio_probe(struct arc_emac_priv *priv)\n--\ndrivers/net/ethernet/arc/emac_mdio.c-172-\ndrivers/net/ethernet/arc/emac_mdio.c:173:\terror = of_mdiobus_register(bus, mdio_node);\ndrivers/net/ethernet/arc/emac_mdio.c-174-\tof_node_put(mdio_node);\n--\ndrivers/net/ethernet/asix/ax88796c_main.c=966=static int ax88796c_probe(struct spi_device *spi)\n--\ndrivers/net/ethernet/asix/ax88796c_main.c-1010-\ndrivers/net/ethernet/asix/ax88796c_main.c:1011:\tret = devm_mdiobus_register(\u0026spi-\u003edev, ax_local-\u003emdiobus);\ndrivers/net/ethernet/asix/ax88796c_main.c-1012-\tif (ret \u003c 0) {\n--\ndrivers/net/ethernet/atheros/ag71xx.c=687=static int ag71xx_mdio_probe(struct ag71xx *ag)\n--\ndrivers/net/ethernet/atheros/ag71xx.c-727-\tmnp = of_get_child_by_name(np, \"mdio\");\ndrivers/net/ethernet/atheros/ag71xx.c:728:\terr = devm_of_mdiobus_register(dev, mii_bus, mnp);\ndrivers/net/ethernet/atheros/ag71xx.c-729-\tof_node_put(mnp);\n--\ndrivers/net/ethernet/broadcom/b44.c=2234=static int b44_register_phy_one(struct b44 *bp)\n--\ndrivers/net/ethernet/broadcom/b44.c-2259-\ndrivers/net/ethernet/broadcom/b44.c:2260:\terr = mdiobus_register(mii_bus);\ndrivers/net/ethernet/broadcom/b44.c-2261-\tif (err) {\n--\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c=1713=static int bcm_enet_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c-1829-\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c:1830:\t\tret = mdiobus_register(bus);\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c-1831-\t\tif (ret) {\n--\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c=211=struct mii_bus *bcma_mdio_mii_register(struct bgmac *bgmac)\n--\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c-235-\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c:236:\terr = of_mdiobus_register(mii_bus, np);\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c-237-\tof_node_put(np);\n--\ndrivers/net/ethernet/broadcom/genet/bcmmii.c=193=int bcmgenet_mii_config(struct net_device *dev, bool init)\n--\ndrivers/net/ethernet/broadcom/genet/bcmmii.c-233-\t\tphy_name = \"external RvMII\";\ndrivers/net/ethernet/broadcom/genet/bcmmii.c:234:\t\t/* of_mdiobus_register took care of reading the 'max-speed'\ndrivers/net/ethernet/broadcom/genet/bcmmii.c-235-\t\t * PHY property for us, effectively limiting the PHY supported\n--\ndrivers/net/ethernet/broadcom/sb1250-mac.c=2157=static int sbmac_init(struct platform_device *pldev, long long base)\n--\ndrivers/net/ethernet/broadcom/sb1250-mac.c-2227-\t */\ndrivers/net/ethernet/broadcom/sb1250-mac.c:2228:\terr = mdiobus_register(sc-\u003emii_bus);\ndrivers/net/ethernet/broadcom/sb1250-mac.c-2229-\tif (err) {\n--\ndrivers/net/ethernet/broadcom/tg3.c=1505=static int tg3_mdio_init(struct tg3 *tp)\n--\ndrivers/net/ethernet/broadcom/tg3.c-1557-\ndrivers/net/ethernet/broadcom/tg3.c:1558:\ti = mdiobus_register(tp-\u003emdio_bus);\ndrivers/net/ethernet/broadcom/tg3.c-1559-\tif (i) {\n--\ndrivers/net/ethernet/cadence/macb_main.c=1023=static int macb_mii_probe(struct net_device *netdev)\n--\ndrivers/net/ethernet/cadence/macb_main.c-1096-\ndrivers/net/ethernet/cadence/macb_main.c:1097:static int macb_mdiobus_register(struct macb *bp, struct device_node *mdio_np)\ndrivers/net/ethernet/cadence/macb_main.c-1098-{\n--\ndrivers/net/ethernet/cadence/macb_main.c-1104-\tif (mdio_np)\ndrivers/net/ethernet/cadence/macb_main.c:1105:\t\treturn of_mdiobus_register(bp-\u003emii_bus, mdio_np);\ndrivers/net/ethernet/cadence/macb_main.c-1106-\n--\ndrivers/net/ethernet/cadence/macb_main.c-1118-\ndrivers/net/ethernet/cadence/macb_main.c:1119:\t\t\treturn of_mdiobus_register(bp-\u003emii_bus, np);\ndrivers/net/ethernet/cadence/macb_main.c-1120-\t\t}\ndrivers/net/ethernet/cadence/macb_main.c-1121-\ndrivers/net/ethernet/cadence/macb_main.c:1122:\treturn mdiobus_register(bp-\u003emii_bus);\ndrivers/net/ethernet/cadence/macb_main.c-1123-}\n--\ndrivers/net/ethernet/cadence/macb_main.c=1125=static int macb_mii_init(struct macb *bp)\n--\ndrivers/net/ethernet/cadence/macb_main.c-1158-\ndrivers/net/ethernet/cadence/macb_main.c:1159:\terr = macb_mdiobus_register(bp, mdio_np);\ndrivers/net/ethernet/cadence/macb_main.c-1160-\tif (err)\n--\ndrivers/net/ethernet/davicom/dm9051.c=1107=static int dm9051_mdio_register(struct board_info *db)\n--\ndrivers/net/ethernet/davicom/dm9051.c-1124-\ndrivers/net/ethernet/davicom/dm9051.c:1125:\tret = devm_mdiobus_register(\u0026spi-\u003edev, db-\u003emdiobus);\ndrivers/net/ethernet/davicom/dm9051.c-1126-\tif (ret)\n--\ndrivers/net/ethernet/engleder/tsnep_main.c=2423=static int tsnep_mdio_init(struct tsnep_adapter *adapter)\n--\ndrivers/net/ethernet/engleder/tsnep_main.c-2454-\ndrivers/net/ethernet/engleder/tsnep_main.c:2455:\tretval = of_mdiobus_register(adapter-\u003emdiobus, np);\ndrivers/net/ethernet/engleder/tsnep_main.c-2456-\n--\ndrivers/net/ethernet/ethoc.c=1024=static int ethoc_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/ethoc.c-1207-\ndrivers/net/ethernet/ethoc.c:1208:\tret = mdiobus_register(priv-\u003emdio);\ndrivers/net/ethernet/ethoc.c-1209-\tif (ret) {\n--\ndrivers/net/ethernet/faraday/ftgmac100.c=1734=static int ftgmac100_setup_mdio(struct net_device *netdev)\n--\ndrivers/net/ethernet/faraday/ftgmac100.c-1769-\ndrivers/net/ethernet/faraday/ftgmac100.c:1770:\terr = devm_of_mdiobus_register(priv-\u003edev, priv-\u003emii_bus, mdio_np);\ndrivers/net/ethernet/faraday/ftgmac100.c-1771-\tof_node_put(mdio_np);\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c=36=static int enetc_pci_mdio_probe(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-90-\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c:91:\terr = of_mdiobus_register(bus, dev-\u003eof_node);\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-92-\tif (err)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c=284=static int enetc_mdio_probe(struct enetc_pf *pf, struct device_node *np)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-310-\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c:311:\terr = of_mdiobus_register(bus, np);\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-312-\tif (err)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c=326=static int enetc_imdio_create(struct enetc_pf *pf)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-360-\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c:361:\terr = mdiobus_register(bus);\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-362-\tif (err) {\n--\ndrivers/net/ethernet/freescale/fec_main.c=3042=static int fec_enet_mii_init(struct platform_device *pdev)\n--\ndrivers/net/ethernet/freescale/fec_main.c-3160-\ndrivers/net/ethernet/freescale/fec_main.c:3161:\terr = of_mdiobus_register(fep-\u003emii_bus, node);\ndrivers/net/ethernet/freescale/fec_main.c-3162-\tif (err)\n--\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c=65=static int mpc52xx_fec_mdio_probe(struct platform_device *of)\n--\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c-105-\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c:106:\terr = of_mdiobus_register(bus, np);\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c-107-\tif (err)\n--\ndrivers/net/ethernet/freescale/fs_enet/mii-bitbang.c=149=static int fs_enet_mdio_probe(struct platform_device *ofdev)\n--\ndrivers/net/ethernet/freescale/fs_enet/mii-bitbang.c-175-\ndrivers/net/ethernet/freescale/fs_enet/mii-bitbang.c:176:\tret = of_mdiobus_register(new_bus, ofdev-\u003edev.of_node);\ndrivers/net/ethernet/freescale/fs_enet/mii-bitbang.c-177-\tif (ret)\n--\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c=97=static int fs_enet_mdio_probe(struct platform_device *ofdev)\n--\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c-166-\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c:167:\tret = of_mdiobus_register(new_bus, ofdev-\u003edev.of_node);\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c-168-\tif (ret)\n--\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c=409=static int fsl_pq_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c-493-\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c:494:\terr = of_mdiobus_register(new_bus, np);\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c-495-\tif (err) {\n--\ndrivers/net/ethernet/freescale/xgmac_mdio.c=371=static int xgmac_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/freescale/xgmac_mdio.c-426-\tif (is_of_node(fwnode))\ndrivers/net/ethernet/freescale/xgmac_mdio.c:427:\t\tret = of_mdiobus_register(bus, to_of_node(fwnode));\ndrivers/net/ethernet/freescale/xgmac_mdio.c-428-\telse if (is_acpi_node(fwnode))\ndrivers/net/ethernet/freescale/xgmac_mdio.c:429:\t\tret = acpi_mdiobus_register(bus, fwnode);\ndrivers/net/ethernet/freescale/xgmac_mdio.c-430-\telse\n--\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c=266=int hbg_mdio_init(struct hbg_priv *priv)\n--\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c-291-\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c:292:\tret = devm_mdiobus_register(dev, mdio_bus);\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c-293-\tif (ret)\n--\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c=1094=static int hix5hd2_dev_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c-1185-\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c:1186:\tret = of_mdiobus_register(bus, node);\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c-1187-\tif (ret)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c=123=int hclge_mac_mdio_config(struct hclge_dev *hdev)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c-154-\tmdio_bus-\u003ephy_mask = ~(1U \u003c\u003c mac-\u003ephy_addr);\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c:155:\tret = mdiobus_register(mdio_bus);\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c-156-\tif (ret) {\n--\ndrivers/net/ethernet/hisilicon/hns_mdio.c=495=static int hns_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/hisilicon/hns_mdio.c-583-\ndrivers/net/ethernet/hisilicon/hns_mdio.c:584:\t\tret = of_mdiobus_register(new_bus, pdev-\u003edev.of_node);\ndrivers/net/ethernet/hisilicon/hns_mdio.c-585-\t} else if (is_acpi_node(pdev-\u003edev.fwnode)) {\n--\ndrivers/net/ethernet/hisilicon/hns_mdio.c-592-\t\t/* Register the MDIO bus */\ndrivers/net/ethernet/hisilicon/hns_mdio.c:593:\t\tret = mdiobus_register(new_bus);\ndrivers/net/ethernet/hisilicon/hns_mdio.c-594-\t} else {\n--\ndrivers/net/ethernet/ibm/emac/core.c=2560=static int emac_dt_mdio_probe(struct emac_instance *dev)\n--\ndrivers/net/ethernet/ibm/emac/core.c-2584-\tsnprintf(bus-\u003eid, MII_BUS_ID_SIZE, \"%s\", dev-\u003eofdev-\u003ename);\ndrivers/net/ethernet/ibm/emac/core.c:2585:\tres = devm_of_mdiobus_register(\u0026dev-\u003eofdev-\u003edev, bus, mii_np);\ndrivers/net/ethernet/ibm/emac/core.c-2586-\tif (res) {\n--\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c=1026=int ixgbe_mii_bus_init(struct ixgbe_hw *hw)\n--\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c-1088-\tadapter-\u003emii_bus = bus;\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c:1089:\treturn mdiobus_register(bus);\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c-1090-}\n--\ndrivers/net/ethernet/lantiq_etop.c=385=ltq_etop_mdio_init(struct net_device *dev)\n--\ndrivers/net/ethernet/lantiq_etop.c-402-\t\t priv-\u003epdev-\u003ename, priv-\u003epdev-\u003eid);\ndrivers/net/ethernet/lantiq_etop.c:403:\tif (mdiobus_register(priv-\u003emii_bus)) {\ndrivers/net/ethernet/lantiq_etop.c-404-\t\terr = -ENXIO;\n--\ndrivers/net/ethernet/marvell/mvmdio.c=283=static int orion_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/marvell/mvmdio.c-381-\t/* For the platforms not supporting DT/ACPI fall-back\ndrivers/net/ethernet/marvell/mvmdio.c:382:\t * to mdiobus_register via of_mdiobus_register.\ndrivers/net/ethernet/marvell/mvmdio.c-383-\t */\ndrivers/net/ethernet/marvell/mvmdio.c-384-\tif (is_acpi_node(pdev-\u003edev.fwnode))\ndrivers/net/ethernet/marvell/mvmdio.c:385:\t\tret = acpi_mdiobus_register(bus, pdev-\u003edev.fwnode);\ndrivers/net/ethernet/marvell/mvmdio.c-386-\telse\ndrivers/net/ethernet/marvell/mvmdio.c:387:\t\tret = of_mdiobus_register(bus, pdev-\u003edev.of_node);\ndrivers/net/ethernet/marvell/mvmdio.c-388-\tif (ret \u003c 0) {\n--\ndrivers/net/ethernet/marvell/pxa168_eth.c=1387=static int pxa168_eth_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/marvell/pxa168_eth.c-1504-\tpep-\u003esmi_bus-\u003ephy_mask = 0xffffffff;\ndrivers/net/ethernet/marvell/pxa168_eth.c:1505:\terr = mdiobus_register(pep-\u003esmi_bus);\ndrivers/net/ethernet/marvell/pxa168_eth.c-1506-\tif (err)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c=998=static int mtk_mdio_init(struct mtk_eth *eth)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-1037-\tdev_dbg(eth-\u003edev, \"MDC is running on %d Hz\\n\", MDC_MAX_FREQ / eth-\u003emdc_divider);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:1038:\tret = of_mdiobus_register(eth-\u003emii_bus, mii_np);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-1039-\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c=1422=static int mtk_star_mdio_init(struct net_device *ndev)\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1447-\ndrivers/net/ethernet/mediatek/mtk_star_emac.c:1448:\tret = devm_of_mdiobus_register(dev, priv-\u003emii, mdio_node);\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1449-\n--\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c=287=int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv)\n--\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c-332-\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c:333:\tret = mdiobus_register(priv-\u003emdiobus);\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c-334-\tif (ret)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c=253=int fbnic_mdiobus_create(struct fbnic_dev *fbd)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c-272-\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c:273:\terr = devm_mdiobus_register(fbd-\u003edev, bus);\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c-274-\tif (err) {\n--\ndrivers/net/ethernet/micrel/ks8851_common.c=1030=static int ks8851_register_mdiobus(struct ks8851_net *ks, struct device *dev)\n--\ndrivers/net/ethernet/micrel/ks8851_common.c-1046-\ndrivers/net/ethernet/micrel/ks8851_common.c:1047:\tret = mdiobus_register(mii_bus);\ndrivers/net/ethernet/micrel/ks8851_common.c-1048-\tif (ret)\ndrivers/net/ethernet/micrel/ks8851_common.c:1049:\t\tgoto err_mdiobus_register;\ndrivers/net/ethernet/micrel/ks8851_common.c-1050-\n--\ndrivers/net/ethernet/micrel/ks8851_common.c-1054-\ndrivers/net/ethernet/micrel/ks8851_common.c:1055:err_mdiobus_register:\ndrivers/net/ethernet/micrel/ks8851_common.c-1056-\tmdiobus_free(mii_bus);\n--\ndrivers/net/ethernet/microchip/lan743x_main.c=1379=static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter)\n--\ndrivers/net/ethernet/microchip/lan743x_main.c-1382-\ndrivers/net/ethernet/microchip/lan743x_main.c:1383:\t/* Only called with in probe, and before mdiobus_register */\ndrivers/net/ethernet/microchip/lan743x_main.c-1384-\n--\ndrivers/net/ethernet/microchip/lan743x_main.c=3628=static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)\n--\ndrivers/net/ethernet/microchip/lan743x_main.c-3671-\t/* register mdiobus */\ndrivers/net/ethernet/microchip/lan743x_main.c:3672:\tret = mdiobus_register(adapter-\u003emdiobus);\ndrivers/net/ethernet/microchip/lan743x_main.c-3673-\tif (ret \u003c 0)\n--\ndrivers/net/ethernet/ni/nixge.c=1212=static int nixge_mdio_setup(struct nixge_priv *priv, struct device_node *np)\n--\ndrivers/net/ethernet/ni/nixge.c-1230-\ndrivers/net/ethernet/ni/nixge.c:1231:\treturn of_mdiobus_register(bus, np);\ndrivers/net/ethernet/ni/nixge.c-1232-}\n--\n\n"
} |
| 31/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 50516 output: 24 thoughts: 42 Thoughts: Okay, here's my take on those thoughts, framed as an expert in the field: **Initial Assessment: Network Driver Initialization** Right, so I'm seeing a bunch of Ethernet MAC drivers or DSA switch drivers going through their initialization routines. It looks like they're focused on setting up their physical MDIO buses, which is standard practice. They are then scanning for the physical PHYs that are connected to those buses. All expected behavior so far. Let's make sure that's all there is to see: I should also take a look at the `drivers/net/mdio/` directory to see if there's anything else of interest in terms of MDIO configuration or supporting modules. |
| 32/2 | 2026/09/20 22:49 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/net/mdio"
}Results: {
"Files": [
"acpi_mdio.c",
"fwnode_mdio.c",
"mdio-airoha.c",
"mdio-aspeed.c",
"mdio-bcm-iproc.c",
"mdio-bcm-unimac.c",
"mdio-bitbang.c",
"mdio-cavium.c",
"mdio-cavium.h",
"mdio-gpio.c",
"mdio-hisi-femac.c",
"mdio-i2c.c",
"mdio-ipq4019.c",
"mdio-ipq8064.c",
"mdio-moxart.c",
"mdio-mscc-miim.c",
"mdio-mux-bcm-iproc.c",
"mdio-mux-bcm6368.c",
"mdio-mux-gpio.c",
"mdio-mux-meson-g12a.c",
"mdio-mux-meson-gxl.c",
"mdio-mux-mmioreg.c",
"mdio-mux-multiplexer.c",
"mdio-mux.c",
"mdio-mvusb.c",
"mdio-octeon.c",
"mdio-pic64hpsc.c",
"mdio-realtek-rtl9300.c",
"mdio-regmap.c",
"mdio-sun4i.c",
"mdio-thunder.c",
"mdio-xgene.c",
"of_mdio.c"
],
"Subdirs": null
} |
| 33/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 51131 output: 38 thoughts: 610 Thoughts: **My Assessment of the `mtk_gephy_driver` Fuzzing Feasibility** Okay, so I'm looking at this `mtk_gephy_driver` and trying to determine if it's a good target for fuzzing in a standard QEMU amd64 environment. The immediate concern is that none of the setups I've considered seem to create a matching MDIO device for this driver. My first thought was to investigate `mdio-mvusb.c`, assuming it might be a USB-to-MDIO bus controller. But, after a quick look, it's a Marvell USB-to-MDIO controller. Even if USB emulation were happening, which is unlikely, what PHY would be *behind* that? Plus, does syzkaller even *emulate* `mdio-mvusb`? Nope, syzkaller tends to stick to standard USB gadgets or uses Raw Gadget. Either way, `mtk_gephy_driver` is specifically for MediaTek MT7530/MT7531 Gigabit Ethernet PHYs. This isn't promising. Time to revisit the negative criteria from Section 2. We're looking to see if this code falls under "structurally unreachable hardware". Specifically, is the MediaTek MT7530/MT7531 Ethernet PHY structurally unreachable? Let's break this down. What *is* an MT7530? Or MT7531? They are both MediaTek 7-port Gigabit Ethernet switch chips. These are external or integrated switch/PHY ICs. They're typically used in MediaTek MIPS/ARM router platforms like the MT7621, MT7623, Banana Pi BPI-R2, and MT7988. I'm starting to see a pattern here. The next question is, can `mtk-ge.c` even compile on amd64? I check Kconfig for `MEDIATEK_GE_PHY`, and it has no architectural dependencies, it's a `tristate` which means it *could* compile if `COMPILE_TEST` is enabled or manually enabled. This means it's *not* architecture-specific, so the amd64 part of QEMU shouldn't stop us. So, why does `mtk-ge.c` even exist? I'll need to check the commit logs for that file to understand its purpose and context within the kernel. This is a crucial next step to figure out if it's remotely relevant, or easily testable. |
| 34/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "MODULE_DESCRIPTION",
"PathPrefix": "drivers/net/phy/mediatek/mtk-ge.c"
}Results: {
"Output": "drivers/net/phy/mediatek/mtk-ge.c=174=static const struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {\n--\ndrivers/net/phy/mediatek/mtk-ge.c-179-\ndrivers/net/phy/mediatek/mtk-ge.c:180:MODULE_DESCRIPTION(\"MediaTek Gigabit Ethernet PHY driver\");\ndrivers/net/phy/mediatek/mtk-ge.c-181-MODULE_AUTHOR(\"DENG, Qingfang \u003cdqfext@gmail.com\u003e\");\n"
} |
| 35/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 52480 output: 26 thoughts: 1136 Thoughts: **Analyzing a PHY Driver Patch** Alright, let's break this down. First, this commit modifies the `mtk-ge.c` driver, specifically adding a `mt753x_gphy_match` function. The code comment explicitly states the goal: to differentiate the MT7530 PHY from a similar EcoNet SoC FE PHY. The key is the advertised gigabit capability (`ESTATUS_1000_TFULL`). It seems like a straightforward fix for a potential misidentification issue. But, a thought emerges. Can a standard QEMU setup on amd64 even *trigger* this scenario? Is it possible for an MDIO PHY device to be probed or matched in that environment? And, if so, can syzkaller be used to fuzz this? I need to know if this code is relevant for syzkaller. I'll check the syzkaller configuration. Can I quickly search through the syzkaller descriptions to see if it even *creates* MDIO devices or targets Ethernet PHYs at all? Hmm, no direct grep-able pseudo-syscalls. Okay, a slightly more involved approach is needed. I'll search kernel code for any user-space interface that allows registering an MDIO device or PHY device. That should give me a good indication of whether syzkaller *could* interact with this area. Can userspace actually *register* a `phy_device` or `mii_bus`? Let's look for callers of `mdiobus_register` or `phy_device_register`. Okay, here's what the search reveals: `fixed_phy_register`, `mdiobus_scan`, `tja1102_p1_register`, `sfp_sm_probe_phy`, and `of_mdiobus_phy_device_register`. None of these seems to be directly user-accessible; they're all called by platform code, device tree parsing, or internal driver initialization. So, no direct userspace registration. Now, let's dig into `__mdiobus_register`. Who calls `mdiobus_register` or `devm_mdiobus_register`? MAC drivers, DSA switch drivers, and MDIO bus controller drivers (like gpio or i2c). This looks like the right area. The question is can an MDIO bus be created and accessed by userspace. Is there a user-space controllable MDIO bus (like `/dev/mdio` or something using netlink)? I need to investigate that. |
| 36/2 | 2026/09/20 22:49 | tool | grepper |
0mArgs:{
"Expression": "mdiobus_alloc",
"PathPrefix": "drivers"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 801 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/bcm_sf2.c=607=static int bcm_sf2_mdio_register(struct dsa_switch *ds)\n--\ndrivers/net/dsa/bcm_sf2.c-623-\ndrivers/net/dsa/bcm_sf2.c:624:\tpriv-\u003euser_mii_bus = mdiobus_alloc();\ndrivers/net/dsa/bcm_sf2.c-625-\tif (!priv-\u003euser_mii_bus) {\n--\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c=187=static int gswip_mdio(struct gswip_priv *priv)\n--\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c-200-\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c:201:\tbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/lantiq/lantiq_gswip_common.c-202-\tif (!bus) {\n--\ndrivers/net/dsa/microchip/ksz9477.c=321=static int ksz9477_pcs_create(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/ksz9477.c-328-\ndrivers/net/dsa/microchip/ksz9477.c:329:\tbus = devm_mdiobus_alloc(dev-\u003edev);\ndrivers/net/dsa/microchip/ksz9477.c-330-\tif (!bus)\n--\ndrivers/net/dsa/microchip/ksz_common.c=2385=int ksz_mdio_register(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/ksz_common.c-2414-\ndrivers/net/dsa/microchip/ksz_common.c:2415:\tbus = devm_mdiobus_alloc(ds-\u003edev);\ndrivers/net/dsa/microchip/ksz_common.c-2416-\tif (!bus) {\n--\ndrivers/net/dsa/microchip/lan937x_main.c=685=static int lan937x_mdio_register(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/lan937x_main.c-714-\ndrivers/net/dsa/microchip/lan937x_main.c:715:\tbus = devm_mdiobus_alloc(ds-\u003edev);\ndrivers/net/dsa/microchip/lan937x_main.c-716-\tif (!bus) {\n--\ndrivers/net/dsa/motorcomm/chip.c=389=yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)\n--\ndrivers/net/dsa/motorcomm/chip.c-394-\ndrivers/net/dsa/motorcomm/chip.c:395:\tmbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/motorcomm/chip.c-396-\tif (!mbus)\n--\ndrivers/net/dsa/motorcomm/chip.c=520=yt921x_mbus_ext_init(struct yt921x_priv *priv, struct device_node *mnp)\n--\ndrivers/net/dsa/motorcomm/chip.c-525-\ndrivers/net/dsa/motorcomm/chip.c:526:\tmbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/motorcomm/chip.c-527-\tif (!mbus)\n--\ndrivers/net/dsa/mt7530.c=2337=mt7530_setup_mdio(struct mt7530_priv *priv)\n--\ndrivers/net/dsa/mt7530.c-2350-\ndrivers/net/dsa/mt7530.c:2351:\tbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/mt7530.c-2352-\tif (!bus) {\n--\ndrivers/net/dsa/mt7628.c=242=static int mt7628_setup_internal_mdio(struct dsa_switch *ds)\n--\ndrivers/net/dsa/mt7628.c-247-\ndrivers/net/dsa/mt7628.c:248:\tbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/mt7628.c-249-\tif (!bus)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3842=static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3862-\ndrivers/net/dsa/mv88e6xxx/chip.c:3863:\tbus = mdiobus_alloc_size(sizeof(*mdio_bus));\ndrivers/net/dsa/mv88e6xxx/chip.c-3864-\tif (!bus)\n--\ndrivers/net/dsa/mxl862xx/mxl862xx.c=267=static int mxl862xx_setup_mdio(struct dsa_switch *ds)\n--\ndrivers/net/dsa/mxl862xx/mxl862xx.c-274-\ndrivers/net/dsa/mxl862xx/mxl862xx.c:275:\tbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/mxl862xx/mxl862xx.c-276-\tif (!bus)\n--\ndrivers/net/dsa/netc/netc_main.c=149=static int netc_port_create_emdio_bus(struct netc_port *np,\n--\ndrivers/net/dsa/netc/netc_main.c-163-\ndrivers/net/dsa/netc/netc_main.c:164:\tbus = devm_mdiobus_alloc_size(dev, sizeof(*mdio_priv));\ndrivers/net/dsa/netc/netc_main.c-165-\tif (!bus)\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c=957=static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)\n--\ndrivers/net/dsa/ocelot/felix_vsc9959.c-994-\ndrivers/net/dsa/ocelot/felix_vsc9959.c:995:\tbus = mdiobus_alloc_size(sizeof(*mdio_priv));\ndrivers/net/dsa/ocelot/felix_vsc9959.c-996-\tif (!bus)\n--\ndrivers/net/dsa/qca/ar9331.c=357=static int ar9331_sw_mbus_init(struct ar9331_sw_priv *priv)\n--\ndrivers/net/dsa/qca/ar9331.c-365-\ndrivers/net/dsa/qca/ar9331.c:366:\tmbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/qca/ar9331.c-367-\tif (!mbus)\n--\ndrivers/net/dsa/qca/qca8k-8xxx.c=947=qca8k_mdio_register(struct qca8k_priv *priv)\n--\ndrivers/net/dsa/qca/qca8k-8xxx.c-958-\ndrivers/net/dsa/qca/qca8k-8xxx.c:959:\tbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/qca/qca8k-8xxx.c-960-\tif (!bus) {\n--\ndrivers/net/dsa/realtek/rtl83xx.c=75=int rtl83xx_setup_user_mdio(struct dsa_switch *ds)\n--\ndrivers/net/dsa/realtek/rtl83xx.c-87-\ndrivers/net/dsa/realtek/rtl83xx.c:88:\tbus = devm_mdiobus_alloc(priv-\u003edev);\ndrivers/net/dsa/realtek/rtl83xx.c-89-\tif (!bus) {\n--\ndrivers/net/dsa/rzn1_a5psw.c=1117=static int a5psw_probe_mdio(struct a5psw *a5psw, struct device_node *node)\n--\ndrivers/net/dsa/rzn1_a5psw.c-1130-\ndrivers/net/dsa/rzn1_a5psw.c:1131:\tbus = devm_mdiobus_alloc(dev);\ndrivers/net/dsa/rzn1_a5psw.c-1132-\tif (!bus)\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c=258=static int sja1105_mdiobus_base_tx_register(struct sja1105_private *priv,\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c-272-\ndrivers/net/dsa/sja1105/sja1105_mdio.c:273:\tbus = mdiobus_alloc_size(sizeof(*mdio_priv));\ndrivers/net/dsa/sja1105/sja1105_mdio.c-274-\tif (!bus) {\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c=312=static int sja1105_mdiobus_base_t1_register(struct sja1105_private *priv,\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c-326-\ndrivers/net/dsa/sja1105/sja1105_mdio.c:327:\tbus = mdiobus_alloc_size(sizeof(*mdio_priv));\ndrivers/net/dsa/sja1105/sja1105_mdio.c-328-\tif (!bus) {\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c=368=static int sja1105_mdiobus_pcs_register(struct sja1105_private *priv)\n--\ndrivers/net/dsa/sja1105/sja1105_mdio.c-378-\ndrivers/net/dsa/sja1105/sja1105_mdio.c:379:\tbus = mdiobus_alloc_size(sizeof(*mdio_priv));\ndrivers/net/dsa/sja1105/sja1105_mdio.c-380-\tif (!bus)\n--\ndrivers/net/ethernet/actions/owl-emac.c=1321=static int owl_emac_mdio_init(struct net_device *netdev)\n--\ndrivers/net/ethernet/actions/owl-emac.c-1331-\ndrivers/net/ethernet/actions/owl-emac.c:1332:\tpriv-\u003emii = devm_mdiobus_alloc(dev);\ndrivers/net/ethernet/actions/owl-emac.c-1333-\tif (!priv-\u003emii) {\n--\ndrivers/net/ethernet/adi/adin1110.c=509=static int adin1110_register_mdiobus(struct adin1110_priv *priv,\n--\ndrivers/net/ethernet/adi/adin1110.c-514-\ndrivers/net/ethernet/adi/adin1110.c:515:\tmii_bus = devm_mdiobus_alloc(dev);\ndrivers/net/ethernet/adi/adin1110.c-516-\tif (!mii_bus)\n--\ndrivers/net/ethernet/adi/adin1140.c=617=static int adin1140_mdio_register(struct adin1140_priv *priv,\n--\ndrivers/net/ethernet/adi/adin1140.c-619-{\ndrivers/net/ethernet/adi/adin1140.c:620:\tpriv-\u003emdiobus = devm_mdiobus_alloc(\u0026spidev-\u003edev);\ndrivers/net/ethernet/adi/adin1140.c-621-\tif (!priv-\u003emdiobus)\n--\ndrivers/net/ethernet/aeroflex/greth.c=1290=static int greth_mdio_init(struct greth_private *greth)\n--\ndrivers/net/ethernet/aeroflex/greth.c-1295-\ndrivers/net/ethernet/aeroflex/greth.c:1296:\tgreth-\u003emdio = mdiobus_alloc();\ndrivers/net/ethernet/aeroflex/greth.c-1297-\tif (!greth-\u003emdio) {\n--\ndrivers/net/ethernet/agere/et131x.c=3931=static int et131x_pci_setup(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/agere/et131x.c-4014-\ndrivers/net/ethernet/agere/et131x.c:4015:\tadapter-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/agere/et131x.c-4016-\tif (!adapter-\u003emii_bus) {\n--\ndrivers/net/ethernet/altera/altera_tse_main.c=121=static int altera_tse_mdio_create(struct net_device *dev, unsigned int id)\n--\ndrivers/net/ethernet/altera/altera_tse_main.c-142-\ndrivers/net/ethernet/altera/altera_tse_main.c:143:\tmdio = mdiobus_alloc();\ndrivers/net/ethernet/altera/altera_tse_main.c-144-\tif (mdio == NULL) {\n--\ndrivers/net/ethernet/amd/au1000_eth.c=1061=static int au1000_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/amd/au1000_eth.c-1198-\t\terr = -ENODEV;\ndrivers/net/ethernet/amd/au1000_eth.c:1199:\t\tgoto err_mdiobus_alloc;\ndrivers/net/ethernet/amd/au1000_eth.c-1200-\t}\ndrivers/net/ethernet/amd/au1000_eth.c-1201-\ndrivers/net/ethernet/amd/au1000_eth.c:1202:\taup-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/amd/au1000_eth.c-1203-\tif (!aup-\u003emii_bus) {\n--\ndrivers/net/ethernet/amd/au1000_eth.c-1205-\t\terr = -ENOMEM;\ndrivers/net/ethernet/amd/au1000_eth.c:1206:\t\tgoto err_mdiobus_alloc;\ndrivers/net/ethernet/amd/au1000_eth.c-1207-\t}\n--\ndrivers/net/ethernet/amd/au1000_eth.c-1305-\tmdiobus_free(aup-\u003emii_bus);\ndrivers/net/ethernet/amd/au1000_eth.c:1306:err_mdiobus_alloc:\ndrivers/net/ethernet/amd/au1000_eth.c-1307-\tiounmap(aup-\u003emacdma);\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c=3428=static int xgbe_phy_init(struct xgbe_prv_data *pdata)\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c-3702-\t/* Register for driving external PHYs */\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:3703:\tmii = devm_mdiobus_alloc(pdata-\u003edev);\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c-3704-\tif (!mii) {\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:3705:\t\tdev_err(pdata-\u003edev, \"mdiobus_alloc failed\\n\");\ndrivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c-3706-\t\treturn -ENOMEM;\n--\ndrivers/net/ethernet/apm/xgene-v2/mdio.c=98=int xge_mdio_config(struct net_device *ndev)\n--\ndrivers/net/ethernet/apm/xgene-v2/mdio.c-105-\ndrivers/net/ethernet/apm/xgene-v2/mdio.c:106:\tmdio_bus = mdiobus_alloc();\ndrivers/net/ethernet/apm/xgene-v2/mdio.c-107-\tif (!mdio_bus)\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c=939=int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata)\n--\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-944-\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c:945:\tmdio_bus = mdiobus_alloc();\ndrivers/net/ethernet/apm/xgene/xgene_enet_hw.c-946-\tif (!mdio_bus)\n--\ndrivers/net/ethernet/arc/emac_mdio.c=108=static int arc_mdio_reset(struct mii_bus *bus)\n--\ndrivers/net/ethernet/arc/emac_mdio.c-125- *\ndrivers/net/ethernet/arc/emac_mdio.c:126: * returns:\t0 on success, -ENOMEM when mdiobus_alloc\ndrivers/net/ethernet/arc/emac_mdio.c-127- * (to allocate memory for MII bus structure) fails.\n--\ndrivers/net/ethernet/arc/emac_mdio.c=131=int arc_mdio_probe(struct arc_emac_priv *priv)\n--\ndrivers/net/ethernet/arc/emac_mdio.c-139-\ndrivers/net/ethernet/arc/emac_mdio.c:140:\tbus = mdiobus_alloc();\ndrivers/net/ethernet/arc/emac_mdio.c-141-\tif (!bus)\n--\ndrivers/net/ethernet/asix/ax88796c_main.c=966=static int ax88796c_probe(struct spi_device *spi)\n--\ndrivers/net/ethernet/asix/ax88796c_main.c-996-\ndrivers/net/ethernet/asix/ax88796c_main.c:997:\tax_local-\u003emdiobus = devm_mdiobus_alloc(\u0026spi-\u003edev);\ndrivers/net/ethernet/asix/ax88796c_main.c-998-\tif (!ax_local-\u003emdiobus)\n--\ndrivers/net/ethernet/atheros/ag71xx.c=687=static int ag71xx_mdio_probe(struct ag71xx *ag)\n--\ndrivers/net/ethernet/atheros/ag71xx.c-703-\ndrivers/net/ethernet/atheros/ag71xx.c:704:\tmii_bus = devm_mdiobus_alloc(dev);\ndrivers/net/ethernet/atheros/ag71xx.c-705-\tif (!mii_bus)\n--\ndrivers/net/ethernet/broadcom/b44.c=2234=static int b44_register_phy_one(struct b44 *bp)\n--\ndrivers/net/ethernet/broadcom/b44.c-2242-\ndrivers/net/ethernet/broadcom/b44.c:2243:\tmii_bus = mdiobus_alloc();\ndrivers/net/ethernet/broadcom/b44.c-2244-\tif (!mii_bus) {\ndrivers/net/ethernet/broadcom/b44.c:2245:\t\tdev_err(sdev-\u003edev, \"mdiobus_alloc() failed\\n\");\ndrivers/net/ethernet/broadcom/b44.c-2246-\t\terr = -ENOMEM;\n--\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c=1713=static int bcm_enet_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c-1807-\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c:1808:\t\tpriv-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/broadcom/bcm63xx_enet.c-1809-\t\tif (!priv-\u003emii_bus) {\n--\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c=211=struct mii_bus *bcma_mdio_mii_register(struct bgmac *bgmac)\n--\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c-217-\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c:218:\tmii_bus = mdiobus_alloc();\ndrivers/net/ethernet/broadcom/bgmac-bcma-mdio.c-219-\tif (!mii_bus) {\n--\ndrivers/net/ethernet/broadcom/sb1250-mac.c=2157=static int sbmac_init(struct platform_device *pldev, long long base)\n--\ndrivers/net/ethernet/broadcom/sb1250-mac.c-2210-\ndrivers/net/ethernet/broadcom/sb1250-mac.c:2211:\tsc-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/broadcom/sb1250-mac.c-2212-\tif (sc-\u003emii_bus == NULL) {\n--\ndrivers/net/ethernet/broadcom/tg3.c=1505=static int tg3_mdio_init(struct tg3 *tp)\n--\ndrivers/net/ethernet/broadcom/tg3.c-1537-\ndrivers/net/ethernet/broadcom/tg3.c:1538:\ttp-\u003emdio_bus = mdiobus_alloc();\ndrivers/net/ethernet/broadcom/tg3.c-1539-\tif (tp-\u003emdio_bus == NULL)\n--\ndrivers/net/ethernet/cadence/macb_main.c=1125=static int macb_mii_init(struct macb *bp)\n--\ndrivers/net/ethernet/cadence/macb_main.c-1140-\ndrivers/net/ethernet/cadence/macb_main.c:1141:\tbp-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/cadence/macb_main.c-1142-\tif (!bp-\u003emii_bus) {\n--\ndrivers/net/ethernet/davicom/dm9051.c=1107=static int dm9051_mdio_register(struct board_info *db)\n--\ndrivers/net/ethernet/davicom/dm9051.c-1111-\ndrivers/net/ethernet/davicom/dm9051.c:1112:\tdb-\u003emdiobus = devm_mdiobus_alloc(\u0026spi-\u003edev);\ndrivers/net/ethernet/davicom/dm9051.c-1113-\tif (!db-\u003emdiobus)\n--\ndrivers/net/ethernet/engleder/tsnep_main.c=2423=static int tsnep_mdio_init(struct tsnep_adapter *adapter)\n--\ndrivers/net/ethernet/engleder/tsnep_main.c-2436-\ndrivers/net/ethernet/engleder/tsnep_main.c:2437:\tadapter-\u003emdiobus = devm_mdiobus_alloc(\u0026adapter-\u003epdev-\u003edev);\ndrivers/net/ethernet/engleder/tsnep_main.c-2438-\tif (!adapter-\u003emdiobus) {\n--\ndrivers/net/ethernet/ethoc.c=1024=static int ethoc_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/ethoc.c-1194-\t/* register MII bus */\ndrivers/net/ethernet/ethoc.c:1195:\tpriv-\u003emdio = mdiobus_alloc();\ndrivers/net/ethernet/ethoc.c-1196-\tif (!priv-\u003emdio) {\n--\ndrivers/net/ethernet/faraday/ftgmac100.c=1734=static int ftgmac100_setup_mdio(struct net_device *netdev)\n--\ndrivers/net/ethernet/faraday/ftgmac100.c-1743-\t/* initialize mdio bus */\ndrivers/net/ethernet/faraday/ftgmac100.c:1744:\tpriv-\u003emii_bus = devm_mdiobus_alloc(priv-\u003edev);\ndrivers/net/ethernet/faraday/ftgmac100.c-1745-\tif (!priv-\u003emii_bus)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c=36=static int enetc_pci_mdio_probe(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-58-\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c:59:\tbus = devm_mdiobus_alloc_size(dev, sizeof(*mdio_priv));\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-60-\tif (!bus) {\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-61-\t\terr = -ENOMEM;\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c:62:\t\tgoto err_mdiobus_alloc;\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-63-\t}\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-104-err_pci_enable:\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c:105:err_mdiobus_alloc:\ndrivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c-106-err_hw_alloc:\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c=284=static int enetc_mdio_probe(struct enetc_pf *pf, struct device_node *np)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-290-\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c:291:\tbus = devm_mdiobus_alloc_size(dev, sizeof(*mdio_priv));\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-292-\tif (!bus)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c=326=static int enetc_imdio_create(struct enetc_pf *pf)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-339-\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c:340:\tbus = mdiobus_alloc_size(sizeof(*mdio_priv));\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-341-\tif (!bus)\n--\ndrivers/net/ethernet/freescale/fec_main.c=3042=static int fec_enet_mii_init(struct platform_device *pdev)\n--\ndrivers/net/ethernet/freescale/fec_main.c-3142-\ndrivers/net/ethernet/freescale/fec_main.c:3143:\tfep-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/freescale/fec_main.c-3144-\tif (fep-\u003emii_bus == NULL) {\n--\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c=65=static int mpc52xx_fec_mdio_probe(struct platform_device *of)\n--\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c-73-\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c:74:\tbus = mdiobus_alloc();\ndrivers/net/ethernet/freescale/fec_mpc52xx_phy.c-75-\tif (bus == NULL)\n--\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c=97=static int fs_enet_mdio_probe(struct platform_device *ofdev)\n--\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c-106-\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c:107:\tnew_bus = mdiobus_alloc();\ndrivers/net/ethernet/freescale/fs_enet/mii-fec.c-108-\tif (!new_bus)\n--\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c=409=static int fsl_pq_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c-424-\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c:425:\tnew_bus = mdiobus_alloc_size(sizeof(*priv));\ndrivers/net/ethernet/freescale/fsl_pq_mdio.c-426-\tif (!new_bus)\n--\ndrivers/net/ethernet/freescale/xgmac_mdio.c=371=static int xgmac_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/freescale/xgmac_mdio.c-389-\ndrivers/net/ethernet/freescale/xgmac_mdio.c:390:\tbus = devm_mdiobus_alloc_size(\u0026pdev-\u003edev, sizeof(struct mdio_fsl_priv));\ndrivers/net/ethernet/freescale/xgmac_mdio.c-391-\tif (!bus)\n--\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c=266=int hbg_mdio_init(struct hbg_priv *priv)\n--\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c-277-\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c:278:\tmdio_bus = devm_mdiobus_alloc(dev);\ndrivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c-279-\tif (!mdio_bus)\n--\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c=1094=static int hix5hd2_dev_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c-1171-\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c:1172:\tbus = mdiobus_alloc();\ndrivers/net/ethernet/hisilicon/hix5hd2_gmac.c-1173-\tif (bus == NULL) {\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c=123=int hclge_mac_mdio_config(struct hclge_dev *hdev)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c-141-\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c:142:\tmdio_bus = devm_mdiobus_alloc(\u0026hdev-\u003epdev-\u003edev);\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c-143-\tif (!mdio_bus)\n--\ndrivers/net/ethernet/hisilicon/hns_mdio.c=495=static int hns_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/hisilicon/hns_mdio.c-509-\ndrivers/net/ethernet/hisilicon/hns_mdio.c:510:\tnew_bus = devm_mdiobus_alloc(\u0026pdev-\u003edev);\ndrivers/net/ethernet/hisilicon/hns_mdio.c-511-\tif (!new_bus) {\ndrivers/net/ethernet/hisilicon/hns_mdio.c:512:\t\tdev_err(\u0026pdev-\u003edev, \"mdiobus_alloc fail!\\n\");\ndrivers/net/ethernet/hisilicon/hns_mdio.c-513-\t\treturn -ENOMEM;\n--\ndrivers/net/ethernet/ibm/emac/core.c=2560=static int emac_dt_mdio_probe(struct emac_instance *dev)\n--\ndrivers/net/ethernet/ibm/emac/core.c-2571-\ndrivers/net/ethernet/ibm/emac/core.c:2572:\tbus = devm_mdiobus_alloc(\u0026dev-\u003eofdev-\u003edev);\ndrivers/net/ethernet/ibm/emac/core.c-2573-\tif (!bus) {\n--\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c=1026=int ixgbe_mii_bus_init(struct ixgbe_hw *hw)\n--\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c-1063-\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c:1064:\tbus = devm_mdiobus_alloc(dev);\ndrivers/net/ethernet/intel/ixgbe/ixgbe_phy.c-1065-\tif (!bus)\n--\ndrivers/net/ethernet/lantiq_etop.c=385=ltq_etop_mdio_init(struct net_device *dev)\n--\ndrivers/net/ethernet/lantiq_etop.c-389-\ndrivers/net/ethernet/lantiq_etop.c:390:\tpriv-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/lantiq_etop.c-391-\tif (!priv-\u003emii_bus) {\n--\ndrivers/net/ethernet/marvell/mvmdio.c=283=static int orion_mdio_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/marvell/mvmdio.c-298-\ndrivers/net/ethernet/marvell/mvmdio.c:299:\tbus = devm_mdiobus_alloc_size(\u0026pdev-\u003edev,\ndrivers/net/ethernet/marvell/mvmdio.c-300-\t\t\t\t sizeof(struct orion_mdio_dev));\n--\ndrivers/net/ethernet/marvell/pxa168_eth.c=1387=static int pxa168_eth_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/marvell/pxa168_eth.c-1491-\ndrivers/net/ethernet/marvell/pxa168_eth.c:1492:\tpep-\u003esmi_bus = mdiobus_alloc();\ndrivers/net/ethernet/marvell/pxa168_eth.c-1493-\tif (!pep-\u003esmi_bus) {\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c=998=static int mtk_mdio_init(struct mtk_eth *eth)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-1010-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:1011:\teth-\u003emii_bus = devm_mdiobus_alloc(eth-\u003edev);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-1012-\tif (!eth-\u003emii_bus) {\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c=1422=static int mtk_star_mdio_init(struct net_device *ndev)\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1434-\ndrivers/net/ethernet/mediatek/mtk_star_emac.c:1435:\tpriv-\u003emii = devm_mdiobus_alloc(dev);\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1436-\tif (!priv-\u003emii) {\n--\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c=287=int mlxbf_gige_mdio_probe(struct platform_device *pdev, struct mlxbf_gige *priv)\n--\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c-318-\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c:319:\tpriv-\u003emdiobus = devm_mdiobus_alloc(dev);\ndrivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c-320-\tif (!priv-\u003emdiobus) {\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c=253=int fbnic_mdiobus_create(struct fbnic_dev *fbd)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c-257-\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c:258:\tbus = devm_mdiobus_alloc(fbd-\u003edev);\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c-259-\tif (!bus)\n--\ndrivers/net/ethernet/micrel/ks8851_common.c=1030=static int ks8851_register_mdiobus(struct ks8851_net *ks, struct device *dev)\n--\ndrivers/net/ethernet/micrel/ks8851_common.c-1034-\ndrivers/net/ethernet/micrel/ks8851_common.c:1035:\tmii_bus = mdiobus_alloc();\ndrivers/net/ethernet/micrel/ks8851_common.c-1036-\tif (!mii_bus)\n--\ndrivers/net/ethernet/microchip/lan743x_main.c=3628=static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)\n--\ndrivers/net/ethernet/microchip/lan743x_main.c-3631-\ndrivers/net/ethernet/microchip/lan743x_main.c:3632:\tadapter-\u003emdiobus = devm_mdiobus_alloc(\u0026adapter-\u003epdev-\u003edev);\ndrivers/net/ethernet/microchip/lan743x_main.c-3633-\tif (!(adapter-\u003emdiobus)) {\n--\ndrivers/net/ethernet/ni/nixge.c=1212=static int nixge_mdio_setup(struct nixge_priv *priv, struct device_node *np)\n--\ndrivers/net/ethernet/ni/nixge.c-1215-\ndrivers/net/ethernet/ni/nixge.c:1216:\tbus = devm_mdiobus_alloc(priv-\u003edev);\ndrivers/net/ethernet/ni/nixge.c-1217-\tif (!bus)\n--\ndrivers/net/ethernet/nxp/lpc_eth.c=790=static int lpc_mii_init(struct netdata_local *pldat)\n--\ndrivers/net/ethernet/nxp/lpc_eth.c-794-\ndrivers/net/ethernet/nxp/lpc_eth.c:795:\tpldat-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/nxp/lpc_eth.c-796-\tif (!pldat-\u003emii_bus) {\n--\ndrivers/net/ethernet/oa_tc6.c=531=static int oa_tc6_mdiobus_register(struct oa_tc6 *tc6)\n--\ndrivers/net/ethernet/oa_tc6.c-534-\ndrivers/net/ethernet/oa_tc6.c:535:\ttc6-\u003emdiobus = mdiobus_alloc();\ndrivers/net/ethernet/oa_tc6.c-536-\tif (!tc6-\u003emdiobus) {\n--\ndrivers/net/ethernet/qualcomm/emac/emac-phy.c=92=int emac_phy_config(struct platform_device *pdev, struct emac_adapter *adpt)\n--\ndrivers/net/ethernet/qualcomm/emac/emac-phy.c-98-\t/* Create the mii_bus object for talking to the MDIO bus */\ndrivers/net/ethernet/qualcomm/emac/emac-phy.c:99:\tadpt-\u003emii_bus = mii_bus = devm_mdiobus_alloc(\u0026pdev-\u003edev);\ndrivers/net/ethernet/qualcomm/emac/emac-phy.c-100-\tif (!mii_bus)\n--\ndrivers/net/ethernet/rdc/r6040.c=1027=static int r6040_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)\n--\ndrivers/net/ethernet/rdc/r6040.c-1131-\ndrivers/net/ethernet/rdc/r6040.c:1132:\tlp-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/rdc/r6040.c-1133-\tif (!lp-\u003emii_bus) {\ndrivers/net/ethernet/rdc/r6040.c:1134:\t\tdev_err(\u0026pdev-\u003edev, \"mdiobus_alloc() failed\\n\");\ndrivers/net/ethernet/rdc/r6040.c-1135-\t\terr = -ENOMEM;\n--\ndrivers/net/ethernet/realtek/r8169_main.c=5571=static int r8169_mdio_register(struct rtl8169_private *tp)\n--\ndrivers/net/ethernet/realtek/r8169_main.c-5585-\ndrivers/net/ethernet/realtek/r8169_main.c:5586:\tnew_bus = devm_mdiobus_alloc(\u0026pdev-\u003edev);\ndrivers/net/ethernet/realtek/r8169_main.c-5587-\tif (!new_bus)\n--\ndrivers/net/ethernet/renesas/rswitch_main.c=1367=static int rswitch_mii_register(struct rswitch_device *rdev)\n--\ndrivers/net/ethernet/renesas/rswitch_main.c-1372-\ndrivers/net/ethernet/renesas/rswitch_main.c:1373:\tmii_bus = mdiobus_alloc();\ndrivers/net/ethernet/renesas/rswitch_main.c-1374-\tif (!mii_bus)\n--\ndrivers/net/ethernet/renesas/rtsn.c=774=static int rtsn_mdio_alloc(struct rtsn_private *priv)\n--\ndrivers/net/ethernet/renesas/rtsn.c-781-\ndrivers/net/ethernet/renesas/rtsn.c:782:\tmii = mdiobus_alloc();\ndrivers/net/ethernet/renesas/rtsn.c-783-\tif (!mii)\n--\ndrivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c=195=int sxgbe_mdio_register(struct net_device *ndev)\n--\ndrivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c-205-\t/* allocate the new mdio bus */\ndrivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c:206:\tmdio_bus = mdiobus_alloc();\ndrivers/net/ethernet/samsung/sxgbe/sxgbe_mdio.c-207-\tif (!mdio_bus) {\n--\ndrivers/net/ethernet/smsc/smsc911x.c=1062=static int smsc911x_mii_init(struct platform_device *pdev,\n--\ndrivers/net/ethernet/smsc/smsc911x.c-1068-\ndrivers/net/ethernet/smsc/smsc911x.c:1069:\tpdata-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/smsc/smsc911x.c-1070-\tif (!pdata-\u003emii_bus) {\n--\ndrivers/net/ethernet/smsc/smsc9420.c=1137=static int smsc9420_mii_init(struct net_device *dev)\n--\ndrivers/net/ethernet/smsc/smsc9420.c-1141-\ndrivers/net/ethernet/smsc/smsc9420.c:1142:\tpd-\u003emii_bus = mdiobus_alloc();\ndrivers/net/ethernet/smsc/smsc9420.c-1143-\tif (!pd-\u003emii_bus) {\n--\ndrivers/net/ethernet/socionext/netsec.c=1929=static int netsec_register_mdio(struct netsec_priv *priv, u32 phy_addr)\n--\ndrivers/net/ethernet/socionext/netsec.c-1933-\ndrivers/net/ethernet/socionext/netsec.c:1934:\tbus = devm_mdiobus_alloc(priv-\u003edev);\ndrivers/net/ethernet/socionext/netsec.c-1935-\tif (!bus)\n--\n\n"
} |
| 37/2 | 2026/09/20 22:49 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 66727 output: 27 thoughts: 794 Thoughts: **Investigating Potential MDIO/PHY Device Spoofing**
Okay, so I'm looking into these allocations – they're all happening within hardware device driver probe functions, mostly PCI and platform device stuff. My initial thought is to check for any virtual MDIO devices that might be present and being misidentified.
I started by looking at `drivers/net/phy/mdio-gpio.c`. That's a platform driver, but it requires platform data or Device Tree (DT) information, so it's probably not a free-for-all. Then, I considered USB netdevs that might have MDIO interfaces, like `ax88179_178a` or `asix`, but nothing obvious jumped out.
Then I wondered about USB Ethernet adapters that *might* be using a MediaTek MT7530 PHY. That seems unlikely since the MT7530 is a switch chip, but worth a quick look. Nope. Wait... `mt753x_gphy_match`!
```c
/*
* MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY
* does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY
* advertizes gigabit capability.
*/
static int mt753x_gphy_match(struct phy_device *phydev,
const struct phy_driver *phydrv)
{
return genphy_match_phy_device(phydev, phydrv) &&
(phy_read(phydev, MII_ESTATUS) & ESTATUS_1000_TFULL) != 0;
}
```
Okay, so this function is called by `phy_bus_match`, the MDIO bus driver matching logic. To even get here, we need a `phy_device` registered with `phy_id` of `MTK_GPHY_ID_MT7530` (0x03a29412). The crucial question is: can we create a `phy_device` with that ID *without* the physical hardware? That's what I want to know.
Can userspace somehow create a `phy_device` or spoof an MDIO bus? I need to search for any mechanism in the kernel – syscalls, netlink interfaces, sysfs entries, debugfs, or ioctls – that might allow us to create an MDIO bus or PHY device. Let's look for `mdio_device_register` or `phy_device_register`. I think I already did that, but let's double-check.
Okay, here's what I found: `phy_device_register` is only called by a few functions: `fixed_phy_register`, `mdiobus_scan`, `tja1102_p1_register`, `sfp_sm_probe_phy`, and `of_mdiobus_phy_device_register`. `fixed_phy_register` deals with fixed PHYs and IDs like `0xa5510000 | speed` or generated internally. `mdiobus_scan` scans the bus by reading PHYID1 and PHYID2. `tja1102_p1_register` is driver-specific and hardcodes a PHY ID. `sfp_sm_probe_phy` reads from an SFP transceiver via I2C. `of_mdiobus_phy_device_register` parses the device tree.
Hmm, so it doesn't look like any of these methods allow the user to arbitrarily register a PHY device. Next up, I need to check the callers of `mdio_device_register`.
|
| 38/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "mdio_device_register",
"PathPrefix": "drivers"
}Results: {
"Output": "drivers/net/dsa/dsa_loop.c=446=static int __init dsa_loop_create_switch_mdiodev(void)\n--\ndrivers/net/dsa/dsa_loop.c-473-\ndrivers/net/dsa/dsa_loop.c:474:\tret = mdio_device_register(switch_mdiodev);\ndrivers/net/dsa/dsa_loop.c-475-\tif (ret)\n--\ndrivers/net/mdio/of_mdio.c=52=static int of_mdiobus_register_device(struct mii_bus *mdio,\n--\ndrivers/net/mdio/of_mdio.c-68-\t/* All data is now stored in the mdiodev struct; register it. */\ndrivers/net/mdio/of_mdio.c:69:\trc = mdio_device_register(mdiodev);\ndrivers/net/mdio/of_mdio.c-70-\tif (rc) {\n--\ndrivers/net/pcs/pcs-xpcs-plat.c=337=static int xpcs_plat_init_dev(struct dw_xpcs_plat *pxpcs)\n--\ndrivers/net/pcs/pcs-xpcs-plat.c-356-\ndrivers/net/pcs/pcs-xpcs-plat.c:357:\tret = mdio_device_register(mdiodev);\ndrivers/net/pcs/pcs-xpcs-plat.c-358-\tif (ret) {\n--\ndrivers/net/phy/air_en8811h.c=1131=static int an8811hb_probe(struct phy_device *phydev)\n--\ndrivers/net/phy/air_en8811h.c-1155-\ndrivers/net/phy/air_en8811h.c:1156:\tret = mdio_device_register(mdiodev);\ndrivers/net/phy/air_en8811h.c-1157-\tif (ret)\n--\ndrivers/net/phy/mdio_device.c-26-/**\ndrivers/net/phy/mdio_device.c:27: * mdio_device_register_reset - Read and initialize the reset properties of\ndrivers/net/phy/mdio_device.c-28- *\t\t\t\tan mdio device\n--\ndrivers/net/phy/mdio_device.c-32- */\ndrivers/net/phy/mdio_device.c:33:static int mdio_device_register_reset(struct mdio_device *mdiodev)\ndrivers/net/phy/mdio_device.c-34-{\n--\ndrivers/net/phy/mdio_device.c=143=EXPORT_SYMBOL(mdio_device_create);\n--\ndrivers/net/phy/mdio_device.c-145-/**\ndrivers/net/phy/mdio_device.c:146: * mdio_device_register - Register the mdio device on the MDIO bus\ndrivers/net/phy/mdio_device.c-147- * @mdiodev: mdio_device structure to be added to the MDIO bus\n--\ndrivers/net/phy/mdio_device.c-150- */\ndrivers/net/phy/mdio_device.c:151:int mdio_device_register(struct mdio_device *mdiodev)\ndrivers/net/phy/mdio_device.c-152-{\n--\ndrivers/net/phy/mdio_device.c-172-}\ndrivers/net/phy/mdio_device.c:173:EXPORT_SYMBOL(mdio_device_register);\ndrivers/net/phy/mdio_device.c-174-\n--\ndrivers/net/phy/mdio_device.c-180- * This doesn't free the mdio_device itself, it merely reverses the effects\ndrivers/net/phy/mdio_device.c:181: * of mdio_device_register(). Use mdio_device_free() to free the device\ndrivers/net/phy/mdio_device.c-182- * after calling this function.\n--\ndrivers/net/phy/mdio_device.c=191=int mdiobus_register_device(struct mdio_device *mdiodev)\n--\ndrivers/net/phy/mdio_device.c-198-\tif (mdiodev-\u003eflags \u0026 MDIO_DEVICE_FLAG_PHY) {\ndrivers/net/phy/mdio_device.c:199:\t\terr = mdio_device_register_reset(mdiodev);\ndrivers/net/phy/mdio_device.c-200-\t\tif (err)\n"
} |
| 39/2 | 2026/09/20 22:50 | llm | patch-evaluator-compressor |
0mModel:gemini-3.8-flash Args: null Results: null Reply: ### Summary of Investigation
#### 1. Approaches Tried and Results
- **Examined Git Diff / Patch Contents**:
- The patch modifies `drivers/net/phy/mediatek/mtk-ge.c`.
- Added function `mt753x_gphy_match(struct phy_device *phydev, const struct phy_driver *phydrv)`:
```c
static int mt753x_gphy_match(struct phy_device *phydev,
const struct phy_driver *phydrv)
{
return genphy_match_phy_device(phydev, phydrv) &&
(phy_read(phydev, MII_ESTATUS) & ESTATUS_1000_TFULL) != 0;
}
```
- Assigned `.match_phy_device = mt753x_gphy_match` in `mtk_gephy_driver[0]` (matching `MTK_GPHY_ID_MT7530` = `0x03a29412`).
- Reason stated in comment: `MTK_GPHY_ID_MT7530` is also shared with an EcoNet SoC FE phy lacking `ESTATUS_1000_TFULL`. Match only when gigabit capability is advertised.
- **Kconfig and Build System Inspection**:
- In `drivers/net/phy/mediatek/Makefile`: `obj-$(CONFIG_MEDIATEK_GE_PHY) += mtk-ge.o`.
- In `drivers/net/phy/mediatek/Kconfig`:
```kconfig
config MEDIATEK_GE_PHY
tristate "MediaTek Gigabit Ethernet PHYs"
select MTK_NET_PHYLIB
help
Supports the MediaTek non-built-in Gigabit Ethernet PHYs.
Non-built-in Gigabit Ethernet PHYs include mt7530/mt7531.
You may find mt7530 inside mt7621. This driver shares some
common operations with MediaTek SoC built-in Gigabit
Ethernet PHYs.
```
- `CONFIG_MEDIATEK_GE_PHY` has no architecture dependencies (can be compiled on `x86_64` / `amd64`).
- **Hardware and Driver Reachability Analysis**:
- Investigated how `mtk_gephy_driver` binds:
- Bus driver callback `phy_bus_match()` in `drivers/net/phy/phy_device.c` checks `phydrv->match_phy_device` or `genphy_match_phy_device`.
- Drivers match against PHY devices created on an MDIO bus with ID `MTK_GPHY_ID_MT7530` (`0x03a29412`).
- Investigated MT7530 usage in kernel:
- MT7530 is a multi-port Gigabit Ethernet switch chip used primarily in MediaTek SoCs (MT7621, MT7623, Bananapi BPI-R2, MT7988) in embedded ARM/MIPS routers.
- Used via DSA (`drivers/net/dsa/mt7530.c`, `mt7530-mdio.c`, `mt7530-mmio.c`).
- Device creation requires MDIO bus scanning (`mdiobus_scan`) encountering physical hardware returning PHY ID `0x03a29412` or Device Tree bindings (`of_mdiobus_register`).
- Checked virtual/emulated MDIO buses:
- `dsa_loop.c` uses `fixed_phy` devices on `fixed-0`, not creating dynamic MediaTek PHYs.
- No software-emulated devices in QEMU (e.g. e1000, virtio-net) expose a MediaTek MT7530 switch/PHY MDIO bus.
- Standard virtual environments (QEMU / GCE on amd64) lack the physical MediaTek hardware, MDIO controller, and Device Tree nodes required to instantiate this PHY device.
#### 2. Current Hypotheses and Working Evaluation
- **Reachability Assessment**:
- The modified code is in `drivers/net/phy/mediatek/mtk-ge.c` (`mt753x_gphy_match`).
- While it compiles on `amd64` (`CONFIG_MEDIATEK_GE_PHY`), the code is structurally unreachable during fuzzing in QEMU/GCE because it requires physical MediaTek switch hardware (MT7530) or Device Tree MDIO probe matching specific hardware register readouts.
- Per Negative Criteria (Section 2 of instructions): "Structurally unreachable hardware: Vendor-specific PCIe switches, SmartNICs, or GPU drivers ... requiring physical ASIC/PCIe cards not emulated in standard QEMU" and execution paths not reachable via virtual buses (virtio, USB gadget, netdev, loopback, netlink, etc.).
- Therefore, `WorthFuzzing` is expected to evaluate to `false`.
#### 3. Critical Code and References
- **Modified File**:
- `drivers/net/phy/mediatek/mtk-ge.c`
- **Config Option**:
- `MEDIATEK_GE_PHY`
- **Function Added**:
```c
static int mt753x_gphy_match(struct phy_device *phydev,
const struct phy_driver *phydrv)
{
return genphy_match_phy_device(phydev, phydrv) &&
(phy_read(phydev, MII_ESTATUS) & ESTATUS_1000_TFULL) != 0;
}
```
- **Driver Struct**:
`mtk_gephy_driver` in `drivers/net/phy/mediatek/mtk-ge.c:139`
#### 4. Watchouts / Next Steps
- Avoid repetitive searches over MDIO buses.
- Invoke `set-results` with `WorthFuzzing=false` (or complete any remaining confirmation before setting results).
- Prepare final answer justifying why physical MediaTek MT7530/MT7531 Ethernet PHYs are structurally unreachable in standard amd64 virtualization environments.Tokens: input: 50246 output: 1443 thoughts: 0 |
| 40/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21071 output: 28 thoughts: 0 |
| 41/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "mt7530",
"PathPrefix": "drivers/net"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1340 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/Makefile=4=obj-$(CONFIG_NET_DSA_LOOP)\t+= dsa_loop.o\ndrivers/net/dsa/Makefile:5:obj-$(CONFIG_NET_DSA_MT7530)\t+= mt7530.o\ndrivers/net/dsa/Makefile:6:obj-$(CONFIG_NET_DSA_MT7530_MDIO) += mt7530-mdio.o\ndrivers/net/dsa/Makefile:7:obj-$(CONFIG_NET_DSA_MT7530_MMIO) += mt7530-mmio.o\ndrivers/net/dsa/Makefile-8-obj-$(CONFIG_NET_DSA_MT7628) += mt7628.o\n--\ndrivers/net/dsa/mt7530-mdio.c-15-\ndrivers/net/dsa/mt7530-mdio.c:16:#include \"mt7530.h\"\ndrivers/net/dsa/mt7530-mdio.c-17-\ndrivers/net/dsa/mt7530-mdio.c=18=static int\ndrivers/net/dsa/mt7530-mdio.c:19:mt7530_regmap_write(void *context, unsigned int reg, unsigned int val)\ndrivers/net/dsa/mt7530-mdio.c-20-{\ndrivers/net/dsa/mt7530-mdio.c:21:\tstruct mt7530_priv *priv = context;\ndrivers/net/dsa/mt7530-mdio.c-22-\tstruct mii_bus *bus = priv-\u003ebus;\n--\ndrivers/net/dsa/mt7530-mdio.c=43=static int\ndrivers/net/dsa/mt7530-mdio.c:44:mt7530_regmap_read(void *context, unsigned int reg, unsigned int *val)\ndrivers/net/dsa/mt7530-mdio.c-45-{\ndrivers/net/dsa/mt7530-mdio.c:46:\tstruct mt7530_priv *priv = context;\ndrivers/net/dsa/mt7530-mdio.c-47-\tstruct mii_bus *bus = priv-\u003ebus;\n--\ndrivers/net/dsa/mt7530-mdio.c=76=static void\ndrivers/net/dsa/mt7530-mdio.c:77:mt7530_mdio_regmap_lock(void *mdio_lock)\ndrivers/net/dsa/mt7530-mdio.c-78-{\n--\ndrivers/net/dsa/mt7530-mdio.c=82=static void\ndrivers/net/dsa/mt7530-mdio.c:83:mt7530_mdio_regmap_unlock(void *mdio_lock)\ndrivers/net/dsa/mt7530-mdio.c-84-{\n--\ndrivers/net/dsa/mt7530-mdio.c-87-\ndrivers/net/dsa/mt7530-mdio.c:88:static const struct regmap_bus mt7530_regmap_bus = {\ndrivers/net/dsa/mt7530-mdio.c:89:\t.reg_write = mt7530_regmap_write,\ndrivers/net/dsa/mt7530-mdio.c:90:\t.reg_read = mt7530_regmap_read,\ndrivers/net/dsa/mt7530-mdio.c-91-};\n--\ndrivers/net/dsa/mt7530-mdio.c=93=static int\ndrivers/net/dsa/mt7530-mdio.c:94:mt7531_create_sgmii(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530-mdio.c-95-{\n--\ndrivers/net/dsa/mt7530-mdio.c-115-\t\tmt7531_pcs_config[i]-\u003emax_register = 0x17c;\ndrivers/net/dsa/mt7530-mdio.c:116:\t\tmt7531_pcs_config[i]-\u003elock = mt7530_mdio_regmap_lock;\ndrivers/net/dsa/mt7530-mdio.c:117:\t\tmt7531_pcs_config[i]-\u003eunlock = mt7530_mdio_regmap_unlock;\ndrivers/net/dsa/mt7530-mdio.c-118-\t\tmt7531_pcs_config[i]-\u003elock_arg = \u0026priv-\u003ebus-\u003emdio_lock;\ndrivers/net/dsa/mt7530-mdio.c-119-\ndrivers/net/dsa/mt7530-mdio.c:120:\t\tregmap = devm_regmap_init(priv-\u003edev, \u0026mt7530_regmap_bus, priv,\ndrivers/net/dsa/mt7530-mdio.c-121-\t\t\t\t\t mt7531_pcs_config[i]);\n--\ndrivers/net/dsa/mt7530-mdio.c-140-\ndrivers/net/dsa/mt7530-mdio.c:141:static const struct of_device_id mt7530_of_match[] = {\ndrivers/net/dsa/mt7530-mdio.c-142-\t{ .compatible = \"mediatek,mt7621\", .data = \u0026mt753x_table[ID_MT7621], },\ndrivers/net/dsa/mt7530-mdio.c:143:\t{ .compatible = \"mediatek,mt7530\", .data = \u0026mt753x_table[ID_MT7530], },\ndrivers/net/dsa/mt7530-mdio.c-144-\t{ .compatible = \"mediatek,mt7531\", .data = \u0026mt753x_table[ID_MT7531], },\n--\ndrivers/net/dsa/mt7530-mdio.c-146-};\ndrivers/net/dsa/mt7530-mdio.c:147:MODULE_DEVICE_TABLE(of, mt7530_of_match);\ndrivers/net/dsa/mt7530-mdio.c-148-\ndrivers/net/dsa/mt7530-mdio.c=149=static const struct regmap_config regmap_config = {\n--\ndrivers/net/dsa/mt7530-mdio.c-153-\t.max_register = MT7530_CREV,\ndrivers/net/dsa/mt7530-mdio.c:154:\t.lock = mt7530_mdio_regmap_lock,\ndrivers/net/dsa/mt7530-mdio.c:155:\t.unlock = mt7530_mdio_regmap_unlock,\ndrivers/net/dsa/mt7530-mdio.c-156-};\n--\ndrivers/net/dsa/mt7530-mdio.c=158=static int\ndrivers/net/dsa/mt7530-mdio.c:159:mt7530_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/mt7530-mdio.c-160-{\ndrivers/net/dsa/mt7530-mdio.c-161-\tstruct regmap_config rc = regmap_config;\ndrivers/net/dsa/mt7530-mdio.c:162:\tstruct mt7530_priv *priv;\ndrivers/net/dsa/mt7530-mdio.c-163-\tstruct device_node *dn;\n--\ndrivers/net/dsa/mt7530-mdio.c-175-\ndrivers/net/dsa/mt7530-mdio.c:176:\tret = mt7530_probe_common(priv);\ndrivers/net/dsa/mt7530-mdio.c-177-\tif (ret)\n--\ndrivers/net/dsa/mt7530-mdio.c-215-\trc.lock_arg = \u0026priv-\u003ebus-\u003emdio_lock;\ndrivers/net/dsa/mt7530-mdio.c:216:\tpriv-\u003eregmap = devm_regmap_init(priv-\u003edev, \u0026mt7530_regmap_bus,\ndrivers/net/dsa/mt7530-mdio.c-217-\t\t\t\t\tpriv, \u0026rc);\n--\ndrivers/net/dsa/mt7530-mdio.c=227=static void\ndrivers/net/dsa/mt7530-mdio.c:228:mt7530_remove(struct mdio_device *mdiodev)\ndrivers/net/dsa/mt7530-mdio.c-229-{\ndrivers/net/dsa/mt7530-mdio.c:230:\tstruct mt7530_priv *priv = dev_get_drvdata(\u0026mdiodev-\u003edev);\ndrivers/net/dsa/mt7530-mdio.c-231-\tint ret = 0, i;\n--\ndrivers/net/dsa/mt7530-mdio.c-245-\ndrivers/net/dsa/mt7530-mdio.c:246:\tmt7530_remove_common(priv);\ndrivers/net/dsa/mt7530-mdio.c-247-\n--\ndrivers/net/dsa/mt7530-mdio.c-251-\ndrivers/net/dsa/mt7530-mdio.c:252:static void mt7530_shutdown(struct mdio_device *mdiodev)\ndrivers/net/dsa/mt7530-mdio.c-253-{\ndrivers/net/dsa/mt7530-mdio.c:254:\tstruct mt7530_priv *priv = dev_get_drvdata(\u0026mdiodev-\u003edev);\ndrivers/net/dsa/mt7530-mdio.c-255-\n--\ndrivers/net/dsa/mt7530-mdio.c-263-\ndrivers/net/dsa/mt7530-mdio.c:264:static struct mdio_driver mt7530_mdio_driver = {\ndrivers/net/dsa/mt7530-mdio.c:265:\t.probe = mt7530_probe,\ndrivers/net/dsa/mt7530-mdio.c:266:\t.remove = mt7530_remove,\ndrivers/net/dsa/mt7530-mdio.c:267:\t.shutdown = mt7530_shutdown,\ndrivers/net/dsa/mt7530-mdio.c-268-\t.mdiodrv.driver = {\ndrivers/net/dsa/mt7530-mdio.c:269:\t\t.name = \"mt7530-mdio\",\ndrivers/net/dsa/mt7530-mdio.c:270:\t\t.of_match_table = mt7530_of_match,\ndrivers/net/dsa/mt7530-mdio.c-271-\t},\n--\ndrivers/net/dsa/mt7530-mdio.c-273-\ndrivers/net/dsa/mt7530-mdio.c:274:mdio_module_driver(mt7530_mdio_driver);\ndrivers/net/dsa/mt7530-mdio.c-275-\n--\ndrivers/net/dsa/mt7530-mmio.c-9-\ndrivers/net/dsa/mt7530-mmio.c:10:#include \"mt7530.h\"\ndrivers/net/dsa/mt7530-mmio.c-11-\n--\ndrivers/net/dsa/mt7530-mmio.c=30=mt7988_probe(struct platform_device *pdev)\ndrivers/net/dsa/mt7530-mmio.c-31-{\ndrivers/net/dsa/mt7530-mmio.c:32:\tstruct mt7530_priv *priv;\ndrivers/net/dsa/mt7530-mmio.c-33-\tvoid __iomem *base_addr;\n--\ndrivers/net/dsa/mt7530-mmio.c-42-\ndrivers/net/dsa/mt7530-mmio.c:43:\tret = mt7530_probe_common(priv);\ndrivers/net/dsa/mt7530-mmio.c-44-\tif (ret)\n--\ndrivers/net/dsa/mt7530-mmio.c=67=static void mt7988_remove(struct platform_device *pdev)\ndrivers/net/dsa/mt7530-mmio.c-68-{\ndrivers/net/dsa/mt7530-mmio.c:69:\tstruct mt7530_priv *priv = platform_get_drvdata(pdev);\ndrivers/net/dsa/mt7530-mmio.c-70-\ndrivers/net/dsa/mt7530-mmio.c-71-\tif (priv)\ndrivers/net/dsa/mt7530-mmio.c:72:\t\tmt7530_remove_common(priv);\ndrivers/net/dsa/mt7530-mmio.c-73-}\n--\ndrivers/net/dsa/mt7530-mmio.c=75=static void mt7988_shutdown(struct platform_device *pdev)\ndrivers/net/dsa/mt7530-mmio.c-76-{\ndrivers/net/dsa/mt7530-mmio.c:77:\tstruct mt7530_priv *priv = platform_get_drvdata(pdev);\ndrivers/net/dsa/mt7530-mmio.c-78-\n--\ndrivers/net/dsa/mt7530-mmio.c=87=static struct platform_driver mt7988_platform_driver = {\n--\ndrivers/net/dsa/mt7530-mmio.c-91-\t.driver = {\ndrivers/net/dsa/mt7530-mmio.c:92:\t\t.name = \"mt7530-mmio\",\ndrivers/net/dsa/mt7530-mmio.c-93-\t\t.of_match_table = mt7988_of_match,\n--\ndrivers/net/dsa/mt7530.c-25-\ndrivers/net/dsa/mt7530.c:26:#include \"mt7530.h\"\ndrivers/net/dsa/mt7530.c-27-\n--\ndrivers/net/dsa/mt7530.c=31=static struct mt753x_pcs *pcs_to_mt753x_pcs(struct phylink_pcs *pcs)\n--\ndrivers/net/dsa/mt7530.c-36-/* String, offset, and register size in bytes if different from 4 bytes */\ndrivers/net/dsa/mt7530.c:37:static const struct mt7530_mib_desc mt7530_mib[] = {\ndrivers/net/dsa/mt7530.c-38-\tMIB_DESC(1, MT7530_PORT_MIB_TX_DROP, \"TxDrop\"),\n--\ndrivers/net/dsa/mt7530.c=49=static void\ndrivers/net/dsa/mt7530.c:50:mt7530_mutex_lock(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-51-{\n--\ndrivers/net/dsa/mt7530.c=56=static void\ndrivers/net/dsa/mt7530.c:57:mt7530_mutex_unlock(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-58-{\n--\ndrivers/net/dsa/mt7530.c=63=static void\ndrivers/net/dsa/mt7530.c:64:core_write(struct mt7530_priv *priv, u32 reg, u32 val)\ndrivers/net/dsa/mt7530.c-65-{\n--\ndrivers/net/dsa/mt7530.c-68-\ndrivers/net/dsa/mt7530.c:69:\tmt7530_mutex_lock(priv);\ndrivers/net/dsa/mt7530.c-70-\n--\ndrivers/net/dsa/mt7530.c-95-\ndrivers/net/dsa/mt7530.c:96:\tmt7530_mutex_unlock(priv);\ndrivers/net/dsa/mt7530.c-97-}\n--\ndrivers/net/dsa/mt7530.c=99=static void\ndrivers/net/dsa/mt7530.c:100:core_rmw(struct mt7530_priv *priv, u32 reg, u32 mask, u32 set)\ndrivers/net/dsa/mt7530.c-101-{\n--\ndrivers/net/dsa/mt7530.c-105-\ndrivers/net/dsa/mt7530.c:106:\tmt7530_mutex_lock(priv);\ndrivers/net/dsa/mt7530.c-107-\n--\ndrivers/net/dsa/mt7530.c-141-\ndrivers/net/dsa/mt7530.c:142:\tmt7530_mutex_unlock(priv);\ndrivers/net/dsa/mt7530.c-143-}\n--\ndrivers/net/dsa/mt7530.c=145=static void\ndrivers/net/dsa/mt7530.c:146:core_set(struct mt7530_priv *priv, u32 reg, u32 val)\ndrivers/net/dsa/mt7530.c-147-{\n--\ndrivers/net/dsa/mt7530.c=151=static void\ndrivers/net/dsa/mt7530.c:152:core_clear(struct mt7530_priv *priv, u32 reg, u32 val)\ndrivers/net/dsa/mt7530.c-153-{\n--\ndrivers/net/dsa/mt7530.c=157=static int\ndrivers/net/dsa/mt7530.c:158:mt7530_fdb_cmd(struct mt7530_priv *priv, enum mt7530_fdb_cmd cmd, u32 *rsp)\ndrivers/net/dsa/mt7530.c-159-{\n--\ndrivers/net/dsa/mt7530.c-190-\ndrivers/net/dsa/mt7530.c:191:static void mt7530_port_fast_age(struct dsa_switch *ds, int port)\ndrivers/net/dsa/mt7530.c-192-{\ndrivers/net/dsa/mt7530.c:193:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-194-\tu32 val;\n--\ndrivers/net/dsa/mt7530.c=211=static void\ndrivers/net/dsa/mt7530.c:212:mt7530_fdb_read(struct mt7530_priv *priv, struct mt7530_fdb *fdb)\ndrivers/net/dsa/mt7530.c-213-{\n--\ndrivers/net/dsa/mt7530.c=238=static void\ndrivers/net/dsa/mt7530.c:239:mt7530_fdb_write(struct mt7530_priv *priv, u16 vid,\ndrivers/net/dsa/mt7530.c-240-\t\t u8 port_mask, const u8 *mac,\n--\ndrivers/net/dsa/mt7530.c-268-/* Set up switch core clock for MT7530 */\ndrivers/net/dsa/mt7530.c:269:static void mt7530_pll_setup(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-270-{\n--\ndrivers/net/dsa/mt7530.c=309=static void\ndrivers/net/dsa/mt7530.c:310:mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface)\ndrivers/net/dsa/mt7530.c-311-{\ndrivers/net/dsa/mt7530.c:312:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-313-\tu32 ncpo1, ssc_delta, xtal;\n--\ndrivers/net/dsa/mt7530.c=364=static void\ndrivers/net/dsa/mt7530.c:365:mt7531_pll_setup(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-366-{\n--\ndrivers/net/dsa/mt7530.c=452=static void\ndrivers/net/dsa/mt7530.c:453:mt7530_mib_reset(struct dsa_switch *ds)\ndrivers/net/dsa/mt7530.c-454-{\ndrivers/net/dsa/mt7530.c:455:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-456-\n--\ndrivers/net/dsa/mt7530.c-460-\ndrivers/net/dsa/mt7530.c:461:static int mt7530_phy_read_c22(struct mt7530_priv *priv, int port, int regnum)\ndrivers/net/dsa/mt7530.c-462-{\n--\ndrivers/net/dsa/mt7530.c-465-\ndrivers/net/dsa/mt7530.c:466:static int mt7530_phy_write_c22(struct mt7530_priv *priv, int port, int regnum,\ndrivers/net/dsa/mt7530.c-467-\t\t\t\tu16 val)\n--\ndrivers/net/dsa/mt7530.c-471-\ndrivers/net/dsa/mt7530.c:472:static int mt7530_phy_read_c45(struct mt7530_priv *priv, int port,\ndrivers/net/dsa/mt7530.c-473-\t\t\t int devad, int regnum)\n--\ndrivers/net/dsa/mt7530.c-477-\ndrivers/net/dsa/mt7530.c:478:static int mt7530_phy_write_c45(struct mt7530_priv *priv, int port, int devad,\ndrivers/net/dsa/mt7530.c-479-\t\t\t\tint regnum, u16 val)\n--\ndrivers/net/dsa/mt7530.c=484=static int\ndrivers/net/dsa/mt7530.c:485:mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad,\ndrivers/net/dsa/mt7530.c-486-\t\t\tint regnum)\n--\ndrivers/net/dsa/mt7530.c=535=static int\ndrivers/net/dsa/mt7530.c:536:mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad,\ndrivers/net/dsa/mt7530.c-537-\t\t\t int regnum, u16 data)\n--\ndrivers/net/dsa/mt7530.c=585=static int\ndrivers/net/dsa/mt7530.c:586:mt7531_ind_c22_phy_read(struct mt7530_priv *priv, int port, int regnum)\ndrivers/net/dsa/mt7530.c-587-{\n--\ndrivers/net/dsa/mt7530.c=622=static int\ndrivers/net/dsa/mt7530.c:623:mt7531_ind_c22_phy_write(struct mt7530_priv *priv, int port, int regnum,\ndrivers/net/dsa/mt7530.c-624-\t\t\t u16 data)\n--\ndrivers/net/dsa/mt7530.c=660=mt753x_phy_read_c22(struct mii_bus *bus, int port, int regnum)\ndrivers/net/dsa/mt7530.c-661-{\ndrivers/net/dsa/mt7530.c:662:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-663-\n--\ndrivers/net/dsa/mt7530.c=668=mt753x_phy_read_c45(struct mii_bus *bus, int port, int devad, int regnum)\ndrivers/net/dsa/mt7530.c-669-{\ndrivers/net/dsa/mt7530.c:670:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-671-\n--\ndrivers/net/dsa/mt7530.c=676=mt753x_phy_write_c22(struct mii_bus *bus, int port, int regnum, u16 val)\ndrivers/net/dsa/mt7530.c-677-{\ndrivers/net/dsa/mt7530.c:678:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-679-\n--\ndrivers/net/dsa/mt7530.c=684=mt753x_phy_write_c45(struct mii_bus *bus, int port, int devad, int regnum,\n--\ndrivers/net/dsa/mt7530.c-686-{\ndrivers/net/dsa/mt7530.c:687:\tstruct mt7530_priv *priv = bus-\u003epriv;\ndrivers/net/dsa/mt7530.c-688-\n--\ndrivers/net/dsa/mt7530.c=692=static void\ndrivers/net/dsa/mt7530.c:693:mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset,\ndrivers/net/dsa/mt7530.c-694-\t\t uint8_t *data)\n--\ndrivers/net/dsa/mt7530.c-700-\ndrivers/net/dsa/mt7530.c:701:\tfor (i = 0; i \u003c ARRAY_SIZE(mt7530_mib); i++)\ndrivers/net/dsa/mt7530.c:702:\t\tethtool_puts(\u0026data, mt7530_mib[i].name);\ndrivers/net/dsa/mt7530.c-703-}\n--\ndrivers/net/dsa/mt7530.c=705=static void\ndrivers/net/dsa/mt7530.c:706:mt7530_read_port_stats(struct mt7530_priv *priv, int port,\ndrivers/net/dsa/mt7530.c-707-\t\t u32 offset, u8 size, uint64_t *data)\n--\ndrivers/net/dsa/mt7530.c=720=static void\ndrivers/net/dsa/mt7530.c:721:mt7530_get_ethtool_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-722-\t\t\t uint64_t *data)\ndrivers/net/dsa/mt7530.c-723-{\ndrivers/net/dsa/mt7530.c:724:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c:725:\tconst struct mt7530_mib_desc *mib;\ndrivers/net/dsa/mt7530.c-726-\tint i;\ndrivers/net/dsa/mt7530.c-727-\ndrivers/net/dsa/mt7530.c:728:\tfor (i = 0; i \u003c ARRAY_SIZE(mt7530_mib); i++) {\ndrivers/net/dsa/mt7530.c:729:\t\tmib = \u0026mt7530_mib[i];\ndrivers/net/dsa/mt7530.c-730-\ndrivers/net/dsa/mt7530.c:731:\t\tmt7530_read_port_stats(priv, port, mib-\u003eoffset, mib-\u003esize,\ndrivers/net/dsa/mt7530.c-732-\t\t\t\t data + i);\n--\ndrivers/net/dsa/mt7530.c=736=static int\ndrivers/net/dsa/mt7530.c:737:mt7530_get_sset_count(struct dsa_switch *ds, int port, int sset)\ndrivers/net/dsa/mt7530.c-738-{\n--\ndrivers/net/dsa/mt7530.c-741-\ndrivers/net/dsa/mt7530.c:742:\treturn ARRAY_SIZE(mt7530_mib);\ndrivers/net/dsa/mt7530.c-743-}\ndrivers/net/dsa/mt7530.c-744-\ndrivers/net/dsa/mt7530.c:745:static void mt7530_get_eth_mac_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-746-\t\t\t\t struct ethtool_eth_mac_stats *mac_stats)\ndrivers/net/dsa/mt7530.c-747-{\ndrivers/net/dsa/mt7530.c:748:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-749-\n--\ndrivers/net/dsa/mt7530.c-754-\t */\ndrivers/net/dsa/mt7530.c:755:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-756-\t\t\t \u0026mac_stats-\u003eFramesTransmittedOK);\ndrivers/net/dsa/mt7530.c-757-\ndrivers/net/dsa/mt7530.c:758:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_SINGLE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-759-\t\t\t \u0026mac_stats-\u003eSingleCollisionFrames);\ndrivers/net/dsa/mt7530.c-760-\ndrivers/net/dsa/mt7530.c:761:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_MULTIPLE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-762-\t\t\t \u0026mac_stats-\u003eMultipleCollisionFrames);\ndrivers/net/dsa/mt7530.c-763-\ndrivers/net/dsa/mt7530.c:764:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-765-\t\t\t \u0026mac_stats-\u003eFramesReceivedOK);\ndrivers/net/dsa/mt7530.c-766-\ndrivers/net/dsa/mt7530.c:767:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-768-\t\t\t \u0026mac_stats-\u003eOctetsTransmittedOK);\ndrivers/net/dsa/mt7530.c-769-\ndrivers/net/dsa/mt7530.c:770:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_ALIGN_ERR, 1,\ndrivers/net/dsa/mt7530.c-771-\t\t\t \u0026mac_stats-\u003eAlignmentErrors);\ndrivers/net/dsa/mt7530.c-772-\ndrivers/net/dsa/mt7530.c:773:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_DEFERRED, 1,\ndrivers/net/dsa/mt7530.c-774-\t\t\t \u0026mac_stats-\u003eFramesWithDeferredXmissions);\ndrivers/net/dsa/mt7530.c-775-\ndrivers/net/dsa/mt7530.c:776:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_LATE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-777-\t\t\t \u0026mac_stats-\u003eLateCollisions);\ndrivers/net/dsa/mt7530.c-778-\ndrivers/net/dsa/mt7530.c:779:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_EXCESSIVE_COLLISION, 1,\ndrivers/net/dsa/mt7530.c-780-\t\t\t \u0026mac_stats-\u003eFramesAbortedDueToXSColls);\ndrivers/net/dsa/mt7530.c-781-\ndrivers/net/dsa/mt7530.c:782:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-783-\t\t\t \u0026mac_stats-\u003eOctetsReceivedOK);\ndrivers/net/dsa/mt7530.c-784-\ndrivers/net/dsa/mt7530.c:785:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-786-\t\t\t \u0026mac_stats-\u003eMulticastFramesXmittedOK);\ndrivers/net/dsa/mt7530.c-787-\tmac_stats-\u003eFramesTransmittedOK += mac_stats-\u003eMulticastFramesXmittedOK;\ndrivers/net/dsa/mt7530.c:788:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-789-\t\t\t \u0026mac_stats-\u003eBroadcastFramesXmittedOK);\n--\ndrivers/net/dsa/mt7530.c-791-\ndrivers/net/dsa/mt7530.c:792:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-793-\t\t\t \u0026mac_stats-\u003eMulticastFramesReceivedOK);\ndrivers/net/dsa/mt7530.c-794-\tmac_stats-\u003eFramesReceivedOK += mac_stats-\u003eMulticastFramesReceivedOK;\ndrivers/net/dsa/mt7530.c:795:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-796-\t\t\t \u0026mac_stats-\u003eBroadcastFramesReceivedOK);\n--\ndrivers/net/dsa/mt7530.c-799-\ndrivers/net/dsa/mt7530.c:800:static const struct ethtool_rmon_hist_range mt7530_rmon_ranges[] = {\ndrivers/net/dsa/mt7530.c-801-\t{ 0, 64 },\n--\ndrivers/net/dsa/mt7530.c-809-\ndrivers/net/dsa/mt7530.c:810:static void mt7530_get_rmon_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-811-\t\t\t\t struct ethtool_rmon_stats *rmon_stats,\n--\ndrivers/net/dsa/mt7530.c-813-{\ndrivers/net/dsa/mt7530.c:814:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-815-\ndrivers/net/dsa/mt7530.c:816:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_UNDER_SIZE_ERR, 1,\ndrivers/net/dsa/mt7530.c-817-\t\t\t \u0026rmon_stats-\u003eundersize_pkts);\ndrivers/net/dsa/mt7530.c:818:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_OVER_SZ_ERR, 1,\ndrivers/net/dsa/mt7530.c-819-\t\t\t \u0026rmon_stats-\u003eoversize_pkts);\ndrivers/net/dsa/mt7530.c:820:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_FRAG_ERR, 1,\ndrivers/net/dsa/mt7530.c-821-\t\t\t \u0026rmon_stats-\u003efragments);\ndrivers/net/dsa/mt7530.c:822:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_JABBER_ERR, 1,\ndrivers/net/dsa/mt7530.c-823-\t\t\t \u0026rmon_stats-\u003ejabbers);\ndrivers/net/dsa/mt7530.c-824-\ndrivers/net/dsa/mt7530.c:825:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_64, 1,\ndrivers/net/dsa/mt7530.c-826-\t\t\t \u0026rmon_stats-\u003ehist[0]);\ndrivers/net/dsa/mt7530.c:827:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_65_TO_127, 1,\ndrivers/net/dsa/mt7530.c-828-\t\t\t \u0026rmon_stats-\u003ehist[1]);\ndrivers/net/dsa/mt7530.c:829:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_128_TO_255, 1,\ndrivers/net/dsa/mt7530.c-830-\t\t\t \u0026rmon_stats-\u003ehist[2]);\ndrivers/net/dsa/mt7530.c:831:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_256_TO_511, 1,\ndrivers/net/dsa/mt7530.c-832-\t\t\t \u0026rmon_stats-\u003ehist[3]);\ndrivers/net/dsa/mt7530.c:833:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_512_TO_1023, 1,\ndrivers/net/dsa/mt7530.c-834-\t\t\t \u0026rmon_stats-\u003ehist[4]);\ndrivers/net/dsa/mt7530.c:835:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PKT_SZ_1024_TO_MAX, 1,\ndrivers/net/dsa/mt7530.c-836-\t\t\t \u0026rmon_stats-\u003ehist[5]);\ndrivers/net/dsa/mt7530.c-837-\ndrivers/net/dsa/mt7530.c:838:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_64, 1,\ndrivers/net/dsa/mt7530.c-839-\t\t\t \u0026rmon_stats-\u003ehist_tx[0]);\ndrivers/net/dsa/mt7530.c:840:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_65_TO_127, 1,\ndrivers/net/dsa/mt7530.c-841-\t\t\t \u0026rmon_stats-\u003ehist_tx[1]);\ndrivers/net/dsa/mt7530.c:842:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_128_TO_255, 1,\ndrivers/net/dsa/mt7530.c-843-\t\t\t \u0026rmon_stats-\u003ehist_tx[2]);\ndrivers/net/dsa/mt7530.c:844:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_256_TO_511, 1,\ndrivers/net/dsa/mt7530.c-845-\t\t\t \u0026rmon_stats-\u003ehist_tx[3]);\ndrivers/net/dsa/mt7530.c:846:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_512_TO_1023, 1,\ndrivers/net/dsa/mt7530.c-847-\t\t\t \u0026rmon_stats-\u003ehist_tx[4]);\ndrivers/net/dsa/mt7530.c:848:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PKT_SZ_1024_TO_MAX, 1,\ndrivers/net/dsa/mt7530.c-849-\t\t\t \u0026rmon_stats-\u003ehist_tx[5]);\ndrivers/net/dsa/mt7530.c-850-\ndrivers/net/dsa/mt7530.c:851:\t*ranges = mt7530_rmon_ranges;\ndrivers/net/dsa/mt7530.c-852-}\ndrivers/net/dsa/mt7530.c-853-\ndrivers/net/dsa/mt7530.c:854:static void mt7530_read_port_stats64(struct mt7530_priv *priv, int port,\ndrivers/net/dsa/mt7530.c-855-\t\t\t\t struct rtnl_link_stats64 *storage)\n--\ndrivers/net/dsa/mt7530.c-863-\t */\ndrivers/net/dsa/mt7530.c:864:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-865-\t\t\t \u0026storage-\u003erx_packets);\ndrivers/net/dsa/mt7530.c:866:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-867-\t\t\t \u0026storage-\u003emulticast);\ndrivers/net/dsa/mt7530.c-868-\tstorage-\u003erx_packets += storage-\u003emulticast;\ndrivers/net/dsa/mt7530.c:869:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-870-\t\t\t \u0026data);\n--\ndrivers/net/dsa/mt7530.c-872-\ndrivers/net/dsa/mt7530.c:873:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_UNICAST, 1,\ndrivers/net/dsa/mt7530.c-874-\t\t\t \u0026storage-\u003etx_packets);\ndrivers/net/dsa/mt7530.c:875:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_MULTICAST, 1,\ndrivers/net/dsa/mt7530.c-876-\t\t\t \u0026data);\ndrivers/net/dsa/mt7530.c-877-\tstorage-\u003etx_packets += data;\ndrivers/net/dsa/mt7530.c:878:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BROADCAST, 1,\ndrivers/net/dsa/mt7530.c-879-\t\t\t \u0026data);\n--\ndrivers/net/dsa/mt7530.c-881-\ndrivers/net/dsa/mt7530.c:882:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-883-\t\t\t \u0026storage-\u003erx_bytes);\ndrivers/net/dsa/mt7530.c-884-\ndrivers/net/dsa/mt7530.c:885:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_BYTES, 2,\ndrivers/net/dsa/mt7530.c-886-\t\t\t \u0026storage-\u003etx_bytes);\ndrivers/net/dsa/mt7530.c-887-\ndrivers/net/dsa/mt7530.c:888:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_DROP, 1,\ndrivers/net/dsa/mt7530.c-889-\t\t\t \u0026storage-\u003erx_dropped);\ndrivers/net/dsa/mt7530.c-890-\ndrivers/net/dsa/mt7530.c:891:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_DROP, 1,\ndrivers/net/dsa/mt7530.c-892-\t\t\t \u0026storage-\u003etx_dropped);\ndrivers/net/dsa/mt7530.c-893-\ndrivers/net/dsa/mt7530.c:894:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_CRC_ERR, 1,\ndrivers/net/dsa/mt7530.c-895-\t\t\t \u0026storage-\u003erx_crc_errors);\n--\ndrivers/net/dsa/mt7530.c-897-\ndrivers/net/dsa/mt7530.c:898:static void mt7530_stats_refresh(struct mt7530_priv *priv)\ndrivers/net/dsa/mt7530.c-899-{\n--\ndrivers/net/dsa/mt7530.c-906-\ndrivers/net/dsa/mt7530.c:907:\t\tmt7530_read_port_stats64(priv, port, \u0026stats);\ndrivers/net/dsa/mt7530.c-908-\n--\ndrivers/net/dsa/mt7530.c-915-\ndrivers/net/dsa/mt7530.c:916:static void mt7530_stats_poll(struct work_struct *work)\ndrivers/net/dsa/mt7530.c-917-{\ndrivers/net/dsa/mt7530.c:918:\tstruct mt7530_priv *priv = container_of(work, struct mt7530_priv,\ndrivers/net/dsa/mt7530.c-919-\t\t\t\t\t\tstats_work.work);\ndrivers/net/dsa/mt7530.c-920-\ndrivers/net/dsa/mt7530.c:921:\tmt7530_stats_refresh(priv);\ndrivers/net/dsa/mt7530.c-922-\tschedule_delayed_work(\u0026priv-\u003estats_work,\n--\ndrivers/net/dsa/mt7530.c-925-\ndrivers/net/dsa/mt7530.c:926:static void mt7530_get_stats64(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-927-\t\t\t struct rtnl_link_stats64 *storage)\ndrivers/net/dsa/mt7530.c-928-{\ndrivers/net/dsa/mt7530.c:929:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-930-\tbool refresh;\n--\ndrivers/net/dsa/mt7530.c-941-\t} else {\ndrivers/net/dsa/mt7530.c:942:\t\tmt7530_read_port_stats64(priv, port, storage);\ndrivers/net/dsa/mt7530.c-943-\t}\n--\ndrivers/net/dsa/mt7530.c-945-\ndrivers/net/dsa/mt7530.c:946:static void mt7530_get_eth_ctrl_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mt7530.c-947-\t\t\t\t struct ethtool_eth_ctrl_stats *ctrl_stats)\ndrivers/net/dsa/mt7530.c-948-{\ndrivers/net/dsa/mt7530.c:949:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-950-\ndrivers/net/dsa/mt7530.c:951:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_TX_PAUSE, 1,\ndrivers/net/dsa/mt7530.c-952-\t\t\t \u0026ctrl_stats-\u003eMACControlFramesTransmitted);\ndrivers/net/dsa/mt7530.c-953-\ndrivers/net/dsa/mt7530.c:954:\tmt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_PAUSE, 1,\ndrivers/net/dsa/mt7530.c-955-\t\t\t \u0026ctrl_stats-\u003eMACControlFramesReceived);\n--\ndrivers/net/dsa/mt7530.c=958=static int\ndrivers/net/dsa/mt7530.c:959:mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)\ndrivers/net/dsa/mt7530.c-960-{\ndrivers/net/dsa/mt7530.c:961:\tstruct mt7530_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/mt7530.c-962-\tunsigned int secs = msecs / 1000;\n--\ndrivers/net/dsa/mt7530.c-1002-\ndrivers/net/dsa/mt7530.c:1003:static const char *mt7530_p5_mode_str(unsigned int mode)\n\n"
} |
| 42/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 35444 output: 43 thoughts: 555 Thoughts: **Analyzing the MediaTek Gigabit PHY Driver Patch** Okay, let's break this down. First, I see we're looking at a patch for `mtk-ge.c`, specifically related to MediaTek Gigabit PHY drivers. My initial thought is to determine *exactly* what's being changed and why, to ensure it aligns with best practices and doesn't introduce any regressions or unforeseen issues within the broader networking stack. The added code introduces a new function, `mt753x_gphy_match`. It looks like we're handling a specific scenario, likely dealing with a PHY with the `MTK_GPHY_ID_MT7530` ID that *also* might be used by an EcoNet SoC FE phy. The core issue, as I understand it, is that this EcoNet PHY *doesn't* necessarily advertise the `ESTATUS_1000_TFULL` bit, which indicates gigabit capability. The new `mt753x_gphy_match` function, from a code-reading perspective, looks like the key. It leverages `genphy_match_phy_device` – a standard PHY matching function – and then *adds* a check to ensure the PHY actually advertises gigabit capability. That means this function will only be considered a match if `genphy_match_phy_device` says yes *and* the ESTATUS register includes that critical bit, `ESTATUS_1000_TFULL`, indicating Gigabit Ethernet support. The effect of this patch, I surmise, is to be more specific in identifying the intended MediaTek PHY, and avoid conflicts with that EcoNet SoC PHY if it happens to be present. It seems like the goal is to prevent the MediaTek driver from accidentally claiming an EcoNet PHY, potentially leading to incorrect configuration and behavior. The patch seems well-reasoned. The approach is to add a more precise match criterion, ensuring the correct driver is bound to the correct hardware. It's a pretty standard technique for dealing with potential hardware ID conflicts or overlapping IDs. This seems like a reasonable, targeted fix for a potential driver binding issue. Now I'll need to think about potential side effects or if this change is actually the correct one. |
| 43/2 | 2026/09/20 22:50 | tool | read-file |
0mArgs:{
"File": "drivers/net/phy/mediatek/mtk-ge.c",
"FirstLine": 100,
"LineCount": 85
}Results: {
"Contents": " 100:\t\n 101:\t\treturn 0;\n 102:\t}\n 103:\t\n 104:\t/*\n 105:\t * MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY\n 106:\t * does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY\n 107:\t * advertizes gigabit capability.\n 108:\t */\n 109:\tstatic int mt753x_gphy_match(struct phy_device *phydev,\n 110:\t\t\t\t const struct phy_driver *phydrv)\n 111:\t{\n 112:\t\treturn genphy_match_phy_device(phydev, phydrv) \u0026\u0026\n 113:\t\t (phy_read(phydev, MII_ESTATUS) \u0026 ESTATUS_1000_TFULL) != 0;\n 114:\t}\n 115:\t\n 116:\tstatic int mt7531_phy_config_init(struct phy_device *phydev)\n 117:\t{\n 118:\t\tmtk_gephy_config_init(phydev);\n 119:\t\n 120:\t\t/* PHY link down power saving enable */\n 121:\t\tphy_set_bits(phydev, 0x17, BIT(4));\n 122:\t\tphy_modify_mmd(phydev, MDIO_MMD_VEND1, MTK_PHY_RXADC_CTRL_RG7,\n 123:\t\t\t MTK_PHY_DA_AD_BUF_BIAS_LP_MASK,\n 124:\t\t\t FIELD_PREP(MTK_PHY_DA_AD_BUF_BIAS_LP_MASK, 0x3));\n 125:\t\n 126:\t\t/* Set TX Pair delay selection */\n 127:\t\tphy_modify_mmd(phydev, MDIO_MMD_VEND1, MTK_PHY_GBE_MODE_TX_DELAY_SEL,\n 128:\t\t\t MTK_TX_DELAY_PAIR_B_MASK | MTK_TX_DELAY_PAIR_D_MASK,\n 129:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_B_MASK, 0x4) |\n 130:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_D_MASK, 0x4));\n 131:\t\tphy_modify_mmd(phydev, MDIO_MMD_VEND1, MTK_PHY_TEST_MODE_TX_DELAY_SEL,\n 132:\t\t\t MTK_TX_DELAY_PAIR_B_MASK | MTK_TX_DELAY_PAIR_D_MASK,\n 133:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_B_MASK, 0x4) |\n 134:\t\t\t FIELD_PREP(MTK_TX_DELAY_PAIR_D_MASK, 0x4));\n 135:\t\n 136:\t\treturn 0;\n 137:\t}\n 138:\t\n 139:\tstatic struct phy_driver mtk_gephy_driver[] = {\n 140:\t\t{\n 141:\t\t\tPHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),\n 142:\t\t\t.name\t\t= \"MediaTek MT7530 PHY\",\n 143:\t\t\t.probe\t\t= mt7530_phy_probe,\n 144:\t\t\t.config_init\t= mt7530_phy_config_init,\n 145:\t\t\t/* Interrupts are handled by the switch, not the PHY\n 146:\t\t\t * itself.\n 147:\t\t\t */\n 148:\t\t\t.config_intr\t= genphy_no_config_intr,\n 149:\t\t\t.handle_interrupt = genphy_handle_interrupt_no_ack,\n 150:\t\t\t.match_phy_device = mt753x_gphy_match,\n 151:\t\t\t.suspend\t= genphy_suspend,\n 152:\t\t\t.resume\t\t= genphy_resume,\n 153:\t\t\t.read_page\t= mtk_phy_read_page,\n 154:\t\t\t.write_page\t= mtk_phy_write_page,\n 155:\t\t},\n 156:\t\t{\n 157:\t\t\tPHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531),\n 158:\t\t\t.name\t\t= \"MediaTek MT7531 PHY\",\n 159:\t\t\t.config_init\t= mt7531_phy_config_init,\n 160:\t\t\t/* Interrupts are handled by the switch, not the PHY\n 161:\t\t\t * itself.\n 162:\t\t\t */\n 163:\t\t\t.config_intr\t= genphy_no_config_intr,\n 164:\t\t\t.handle_interrupt = genphy_handle_interrupt_no_ack,\n 165:\t\t\t.suspend\t= genphy_suspend,\n 166:\t\t\t.resume\t\t= genphy_resume,\n 167:\t\t\t.read_page\t= mtk_phy_read_page,\n 168:\t\t\t.write_page\t= mtk_phy_write_page,\n 169:\t\t},\n 170:\t};\n 171:\t\n 172:\tmodule_phy_driver(mtk_gephy_driver);\n 173:\t\n 174:\tstatic const struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {\n 175:\t\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },\n 176:\t\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },\n 177:\t\t{ }\n 178:\t};\n 179:\t\n 180:\tMODULE_DESCRIPTION(\"MediaTek Gigabit Ethernet PHY driver\");\n 181:\tMODULE_AUTHOR(\"DENG, Qingfang \u003cdqfext@gmail.com\u003e\");\n 182:\tMODULE_LICENSE(\"GPL\");\n 183:\t\n 184:\tMODULE_DEVICE_TABLE(mdio, mtk_gephy_tbl);\n"
} |
| 44/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 38152 output: 30 thoughts: 72 Thoughts: **Investigating the mtk-ge.c Driver** Okay, let's dive into this. I'm looking at `mtk-ge.c` and immediately see it's implementing `mtk_gephy_driver`. Right, and that driver is being registered using `module_phy_driver(mtk_gephy_driver)`. Now, I need to understand when the device matching actually happens. The key function for that, in these types of drivers, would be the `match_phy_device` function pointer within the `phy_driver` struct. So, let's cut to the chase – I'll do a quick search through the kernel source to pinpoint exactly where `.match_phy_device` is being called. That'll tell me the framework for device probing and hopefully give me more context for how this driver interacts with the hardware. |
| 45/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "match_phy_device",
"PathPrefix": "drivers/net/phy"
}Results: {
"Output": "drivers/net/phy/as21xxx.c=847=static int as21xxx_led_polarity_set(struct phy_device *phydev, int index,\n--\ndrivers/net/phy/as21xxx.c-878-\ndrivers/net/phy/as21xxx.c:879:static int as21xxx_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/as21xxx.c-880-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/as21xxx.c-889-\t\t\t\t PHY_VENDOR_AEONSEMI))\ndrivers/net/phy/as21xxx.c:890:\t\treturn genphy_match_phy_device(phydev, phydrv);\ndrivers/net/phy/as21xxx.c-891-\n--\ndrivers/net/phy/as21xxx.c=946=static struct phy_driver as21xxx_drivers[] = {\n--\ndrivers/net/phy/as21xxx.c-954-\t\t.name\t\t= \"Aeonsemi AS21xxx\",\ndrivers/net/phy/as21xxx.c:955:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-956-\t},\n--\ndrivers/net/phy/as21xxx.c-960-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:961:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-962-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-972-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:973:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-974-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-984-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:985:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-986-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-996-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:997:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-998-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-1008-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:1009:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-1010-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-1020-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:1021:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-1022-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-1032-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:1033:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-1034-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-1044-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:1045:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-1046-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-1056-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:1057:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-1058-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/as21xxx.c-1068-\t\t.probe\t\t= as21xxx_probe,\ndrivers/net/phy/as21xxx.c:1069:\t\t.match_phy_device = as21xxx_match_phy_device,\ndrivers/net/phy/as21xxx.c-1070-\t\t.read_status\t= as21xxx_read_status,\n--\ndrivers/net/phy/bcm87xx.c=170=static irqreturn_t bcm87xx_handle_interrupt(struct phy_device *phydev)\n--\ndrivers/net/phy/bcm87xx.c-187-\ndrivers/net/phy/bcm87xx.c:188:static int bcm87xx_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/bcm87xx.c-189-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/bcm87xx.c=194=static struct phy_driver bcm87xx_driver[] = {\n--\ndrivers/net/phy/bcm87xx.c-204-\t.handle_interrupt = bcm87xx_handle_interrupt,\ndrivers/net/phy/bcm87xx.c:205:\t.match_phy_device = bcm87xx_match_phy_device,\ndrivers/net/phy/bcm87xx.c-206-}, {\n--\ndrivers/net/phy/bcm87xx.c-215-\t.handle_interrupt = bcm87xx_handle_interrupt,\ndrivers/net/phy/bcm87xx.c:216:\t.match_phy_device = bcm87xx_match_phy_device,\ndrivers/net/phy/bcm87xx.c-217-} };\n--\ndrivers/net/phy/icplus.c=481=static int ip101a_g_has_page_register(struct phy_device *phydev)\n--\ndrivers/net/phy/icplus.c-503-\ndrivers/net/phy/icplus.c:504:static int ip101a_g_match_phy_device(struct phy_device *phydev, bool ip101a)\ndrivers/net/phy/icplus.c-505-{\n--\ndrivers/net/phy/icplus.c-522-\ndrivers/net/phy/icplus.c:523:static int ip101a_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/icplus.c-524-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/icplus.c-525-{\ndrivers/net/phy/icplus.c:526:\treturn ip101a_g_match_phy_device(phydev, true);\ndrivers/net/phy/icplus.c-527-}\ndrivers/net/phy/icplus.c-528-\ndrivers/net/phy/icplus.c:529:static int ip101g_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/icplus.c-530-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/icplus.c-531-{\ndrivers/net/phy/icplus.c:532:\treturn ip101a_g_match_phy_device(phydev, false);\ndrivers/net/phy/icplus.c-533-}\n--\ndrivers/net/phy/icplus.c=575=static struct phy_driver icplus_driver[] = {\n--\ndrivers/net/phy/icplus.c-594-\t.name\t\t= \"ICPlus IP101A\",\ndrivers/net/phy/icplus.c:595:\t.match_phy_device = ip101a_match_phy_device,\ndrivers/net/phy/icplus.c-596-\t.probe\t\t= ip101a_g_probe,\n--\ndrivers/net/phy/icplus.c-608-\t.name\t\t= \"ICPlus IP101G\",\ndrivers/net/phy/icplus.c:609:\t.match_phy_device = ip101g_match_phy_device,\ndrivers/net/phy/icplus.c-610-\t.probe\t\t= ip101a_g_probe,\n--\ndrivers/net/phy/marvell10g.c=1253=static int mv3310_get_number_of_ports(struct phy_device *phydev)\n--\ndrivers/net/phy/marvell10g.c-1266-\ndrivers/net/phy/marvell10g.c:1267:static int mv3310_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/marvell10g.c-1268-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/marvell10g.c-1276-\ndrivers/net/phy/marvell10g.c:1277:static int mv3340_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/marvell10g.c-1278-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/marvell10g.c-1286-\ndrivers/net/phy/marvell10g.c:1287:static int mv211x_match_phy_device(struct phy_device *phydev, bool has_5g)\ndrivers/net/phy/marvell10g.c-1288-{\n--\ndrivers/net/phy/marvell10g.c-1301-\ndrivers/net/phy/marvell10g.c:1302:static int mv2110_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/marvell10g.c-1303-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/marvell10g.c-1304-{\ndrivers/net/phy/marvell10g.c:1305:\treturn mv211x_match_phy_device(phydev, true);\ndrivers/net/phy/marvell10g.c-1306-}\ndrivers/net/phy/marvell10g.c-1307-\ndrivers/net/phy/marvell10g.c:1308:static int mv2111_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/marvell10g.c-1309-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/marvell10g.c-1310-{\ndrivers/net/phy/marvell10g.c:1311:\treturn mv211x_match_phy_device(phydev, false);\ndrivers/net/phy/marvell10g.c-1312-}\n--\ndrivers/net/phy/marvell10g.c=1388=static struct phy_driver mv3310_drivers[] = {\n--\ndrivers/net/phy/marvell10g.c-1391-\t\t.phy_id_mask\t= MARVELL_PHY_ID_MASK,\ndrivers/net/phy/marvell10g.c:1392:\t\t.match_phy_device = mv3310_match_phy_device,\ndrivers/net/phy/marvell10g.c-1393-\t\t.name\t\t= \"mv88x3310\",\n--\ndrivers/net/phy/marvell10g.c-1414-\t\t.phy_id_mask\t= MARVELL_PHY_ID_MASK,\ndrivers/net/phy/marvell10g.c:1415:\t\t.match_phy_device = mv3340_match_phy_device,\ndrivers/net/phy/marvell10g.c-1416-\t\t.name\t\t= \"mv88x3340\",\n--\ndrivers/net/phy/marvell10g.c-1435-\t\t.phy_id_mask\t= MARVELL_PHY_ID_MASK,\ndrivers/net/phy/marvell10g.c:1436:\t\t.match_phy_device = mv2110_match_phy_device,\ndrivers/net/phy/marvell10g.c-1437-\t\t.name\t\t= \"mv88e2110\",\n--\ndrivers/net/phy/marvell10g.c-1457-\t\t.phy_id_mask\t= MARVELL_PHY_ID_MASK,\ndrivers/net/phy/marvell10g.c:1458:\t\t.match_phy_device = mv2111_match_phy_device,\ndrivers/net/phy/marvell10g.c-1459-\t\t.name\t\t= \"mv88e2111\",\n--\ndrivers/net/phy/mediatek/mtk-ge.c=109=static int mt753x_gphy_match(struct phy_device *phydev,\n--\ndrivers/net/phy/mediatek/mtk-ge.c-111-{\ndrivers/net/phy/mediatek/mtk-ge.c:112:\treturn genphy_match_phy_device(phydev, phydrv) \u0026\u0026\ndrivers/net/phy/mediatek/mtk-ge.c-113-\t (phy_read(phydev, MII_ESTATUS) \u0026 ESTATUS_1000_TFULL) != 0;\n--\ndrivers/net/phy/mediatek/mtk-ge.c=139=static struct phy_driver mtk_gephy_driver[] = {\n--\ndrivers/net/phy/mediatek/mtk-ge.c-149-\t\t.handle_interrupt = genphy_handle_interrupt_no_ack,\ndrivers/net/phy/mediatek/mtk-ge.c:150:\t\t.match_phy_device = mt753x_gphy_match,\ndrivers/net/phy/mediatek/mtk-ge.c-151-\t\t.suspend\t= genphy_suspend,\n--\ndrivers/net/phy/micrel.c=787=static int ksz8041_config_aneg(struct phy_device *phydev)\n--\ndrivers/net/phy/micrel.c-797-\ndrivers/net/phy/micrel.c:798:static int ksz8051_ksz8795_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/micrel.c-799-\t\t\t\t\t const bool ksz_8051)\n--\ndrivers/net/phy/micrel.c-821-\ndrivers/net/phy/micrel.c:822:static int ksz8051_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/micrel.c-823-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/micrel.c-824-{\ndrivers/net/phy/micrel.c:825:\treturn ksz8051_ksz8795_match_phy_device(phydev, true);\ndrivers/net/phy/micrel.c-826-}\n--\ndrivers/net/phy/micrel.c=921=static int ksz8061_config_init(struct phy_device *phydev)\n--\ndrivers/net/phy/micrel.c-942-\ndrivers/net/phy/micrel.c:943:static int ksz8795_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/micrel.c-944-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/micrel.c-945-{\ndrivers/net/phy/micrel.c:946:\treturn ksz8051_ksz8795_match_phy_device(phydev, false);\ndrivers/net/phy/micrel.c-947-}\n--\ndrivers/net/phy/micrel.c=6781=static struct phy_driver ksphy_driver[] = {\n--\ndrivers/net/phy/micrel.c-6862-\t.get_stats\t= kszphy_get_stats,\ndrivers/net/phy/micrel.c:6863:\t.match_phy_device = ksz8051_match_phy_device,\ndrivers/net/phy/micrel.c-6864-\t.suspend\t= kszphy_suspend,\n--\ndrivers/net/phy/micrel.c-7081-\t.config_init\t= kszphy_config_init,\ndrivers/net/phy/micrel.c:7082:\t.match_phy_device = ksz8795_match_phy_device,\ndrivers/net/phy/micrel.c-7083-\t.get_tunable\t= ksz8795_get_tunable,\n--\ndrivers/net/phy/nxp-c45-tja11xx.c=1982=static bool tja11xx_phy_id_compare(struct phy_device *phydev,\n--\ndrivers/net/phy/nxp-c45-tja11xx.c-1990-\ndrivers/net/phy/nxp-c45-tja11xx.c:1991:static int tja11xx_no_macsec_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/nxp-c45-tja11xx.c-1992-\t\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/nxp-c45-tja11xx.c-1997-\ndrivers/net/phy/nxp-c45-tja11xx.c:1998:static int tja11xx_macsec_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/nxp-c45-tja11xx.c-1999-\t\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/nxp-c45-tja11xx.c=2073=static struct phy_driver nxp_c45_driver[] = {\n--\ndrivers/net/phy/nxp-c45-tja11xx.c-2096-\t\t.remove\t\t\t= nxp_c45_remove,\ndrivers/net/phy/nxp-c45-tja11xx.c:2097:\t\t.match_phy_device\t= tja11xx_no_macsec_match_phy_device,\ndrivers/net/phy/nxp-c45-tja11xx.c-2098-\t},\n--\ndrivers/net/phy/nxp-c45-tja11xx.c-2121-\t\t.remove\t\t\t= nxp_c45_remove,\ndrivers/net/phy/nxp-c45-tja11xx.c:2122:\t\t.match_phy_device\t= tja11xx_macsec_match_phy_device,\ndrivers/net/phy/nxp-c45-tja11xx.c-2123-\t},\n--\ndrivers/net/phy/nxp-c45-tja11xx.c-2147-\t\t.remove\t\t\t= nxp_c45_remove,\ndrivers/net/phy/nxp-c45-tja11xx.c:2148:\t\t.match_phy_device\t= tja11xx_no_macsec_match_phy_device,\ndrivers/net/phy/nxp-c45-tja11xx.c-2149-\t},\n--\ndrivers/net/phy/nxp-c45-tja11xx.c-2173-\t\t.remove\t\t\t= nxp_c45_remove,\ndrivers/net/phy/nxp-c45-tja11xx.c:2174:\t\t.match_phy_device\t= tja11xx_macsec_match_phy_device,\ndrivers/net/phy/nxp-c45-tja11xx.c-2175-\t},\n--\ndrivers/net/phy/nxp-tja11xx.c=635=static void tja1102_p0_remove(struct phy_device *phydev)\n--\ndrivers/net/phy/nxp-tja11xx.c-641-\ndrivers/net/phy/nxp-tja11xx.c:642:static int tja1102_match_phy_device(struct phy_device *phydev, bool port0)\ndrivers/net/phy/nxp-tja11xx.c-643-{\n--\ndrivers/net/phy/nxp-tja11xx.c-661-\ndrivers/net/phy/nxp-tja11xx.c:662:static int tja1102_p0_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/nxp-tja11xx.c-663-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/nxp-tja11xx.c-664-{\ndrivers/net/phy/nxp-tja11xx.c:665:\treturn tja1102_match_phy_device(phydev, true);\ndrivers/net/phy/nxp-tja11xx.c-666-}\ndrivers/net/phy/nxp-tja11xx.c-667-\ndrivers/net/phy/nxp-tja11xx.c:668:static int tja1102_p1_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/nxp-tja11xx.c-669-\t\t\t\t const struct phy_driver *phydrv)\ndrivers/net/phy/nxp-tja11xx.c-670-{\ndrivers/net/phy/nxp-tja11xx.c:671:\treturn tja1102_match_phy_device(phydev, false);\ndrivers/net/phy/nxp-tja11xx.c-672-}\n--\ndrivers/net/phy/nxp-tja11xx.c=818=static struct phy_driver tja11xx_driver[] = {\n--\ndrivers/net/phy/nxp-tja11xx.c-866-\t\t.get_sqi_max\t= tja11xx_get_sqi_max,\ndrivers/net/phy/nxp-tja11xx.c:867:\t\t.match_phy_device = tja1102_p0_match_phy_device,\ndrivers/net/phy/nxp-tja11xx.c-868-\t\t.suspend\t= genphy_suspend,\n--\ndrivers/net/phy/nxp-tja11xx.c-889-\t\t.get_sqi_max\t= tja11xx_get_sqi_max,\ndrivers/net/phy/nxp-tja11xx.c:890:\t\t.match_phy_device = tja1102_p1_match_phy_device,\ndrivers/net/phy/nxp-tja11xx.c-891-\t\t.suspend\t= genphy_suspend,\n--\ndrivers/net/phy/phy_device.c=416=static SIMPLE_DEV_PM_OPS(mdio_bus_phy_pm_ops, mdio_bus_phy_suspend,\n--\ndrivers/net/phy/phy_device.c-419-/**\ndrivers/net/phy/phy_device.c:420: * genphy_match_phy_device - match a PHY device with a PHY driver\ndrivers/net/phy/phy_device.c-421- * @phydev: target phy_device struct\n--\ndrivers/net/phy/phy_device.c-431- */\ndrivers/net/phy/phy_device.c:432:int genphy_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/phy_device.c-433-\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/phy_device.c-453-}\ndrivers/net/phy/phy_device.c:454:EXPORT_SYMBOL_GPL(genphy_match_phy_device);\ndrivers/net/phy/phy_device.c-455-\ndrivers/net/phy/phy_device.c=456=static int phy_bus_match(struct device *dev, const struct device_driver *drv)\n--\ndrivers/net/phy/phy_device.c-463-\ndrivers/net/phy/phy_device.c:464:\tif (phydrv-\u003ematch_phy_device)\ndrivers/net/phy/phy_device.c:465:\t\treturn phydrv-\u003ematch_phy_device(phydev, phydrv);\ndrivers/net/phy/phy_device.c-466-\ndrivers/net/phy/phy_device.c:467:\treturn genphy_match_phy_device(phydev, phydrv);\ndrivers/net/phy/phy_device.c-468-}\n--\ndrivers/net/phy/realtek/realtek_main.c=2795=static bool rtlgen_supports_mmd(struct phy_device *phydev)\n--\ndrivers/net/phy/realtek/realtek_main.c-2808-\ndrivers/net/phy/realtek/realtek_main.c:2809:static int rtlgen_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/realtek/realtek_main.c-2810-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/realtek/realtek_main.c-2815-\ndrivers/net/phy/realtek/realtek_main.c:2816:static int rtl8226_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/realtek/realtek_main.c-2817-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/realtek/realtek_main.c=2824=static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,\n--\ndrivers/net/phy/realtek/realtek_main.c-2832-\ndrivers/net/phy/realtek/realtek_main.c:2833:static int rtl8221b_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/realtek/realtek_main.c-2834-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/realtek/realtek_main.c-2838-\ndrivers/net/phy/realtek/realtek_main.c:2839:static int rtl8221b_vb_cg_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/realtek/realtek_main.c-2840-\t\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/realtek/realtek_main.c-2845-\ndrivers/net/phy/realtek/realtek_main.c:2846:static int rtl8221b_vm_cg_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/realtek/realtek_main.c-2847-\t\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/realtek/realtek_main.c-2852-\ndrivers/net/phy/realtek/realtek_main.c:2853:static int rtl_internal_nbaset_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/realtek/realtek_main.c-2854-\t\t\t\t\t\tconst struct phy_driver *phydrv)\n--\ndrivers/net/phy/realtek/realtek_main.c-2872-\ndrivers/net/phy/realtek/realtek_main.c:2873:static int rtl8251b_c45_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/realtek/realtek_main.c-2874-\t\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/realtek/realtek_main.c=3061=static struct phy_driver realtek_drvs[] = {\n--\ndrivers/net/phy/realtek/realtek_main.c-3171-\t\t.name\t\t= \"Generic FE-GE Realtek PHY\",\ndrivers/net/phy/realtek/realtek_main.c:3172:\t\t.match_phy_device = rtlgen_match_phy_device,\ndrivers/net/phy/realtek/realtek_main.c-3173-\t\t.read_status\t= rtlgen_read_status,\n--\ndrivers/net/phy/realtek/realtek_main.c-3181-\t\t.name\t\t= \"RTL8226 2.5Gbps PHY\",\ndrivers/net/phy/realtek/realtek_main.c:3182:\t\t.match_phy_device = rtl8226_match_phy_device,\ndrivers/net/phy/realtek/realtek_main.c-3183-\t\t.get_features\t= rtl822x_get_features,\n--\ndrivers/net/phy/realtek/realtek_main.c-3192-\t}, {\ndrivers/net/phy/realtek/realtek_main.c:3193:\t\t.match_phy_device = rtl8221b_match_phy_device,\ndrivers/net/phy/realtek/realtek_main.c-3194-\t\t.name\t\t= \"RTL8226B_RTL8221B 2.5Gbps PHY\",\n--\ndrivers/net/phy/realtek/realtek_main.c-3239-\t}, {\ndrivers/net/phy/realtek/realtek_main.c:3240:\t\t.match_phy_device = rtl8221b_vb_cg_match_phy_device,\ndrivers/net/phy/realtek/realtek_main.c-3241-\t\t.name\t\t= \"RTL8221B-VB-CG 2.5Gbps PHY\",\n--\ndrivers/net/phy/realtek/realtek_main.c-3262-\t}, {\ndrivers/net/phy/realtek/realtek_main.c:3263:\t\t.match_phy_device = rtl8221b_vm_cg_match_phy_device,\ndrivers/net/phy/realtek/realtek_main.c-3264-\t\t.name\t\t= \"RTL8221B-VM-CG 2.5Gbps PHY\",\n--\ndrivers/net/phy/realtek/realtek_main.c-3285-\t}, {\ndrivers/net/phy/realtek/realtek_main.c:3286:\t\t.match_phy_device = rtl8251b_c45_match_phy_device,\ndrivers/net/phy/realtek/realtek_main.c-3287-\t\t.name\t\t= \"RTL8251B 5Gbps PHY\",\n--\ndrivers/net/phy/realtek/realtek_main.c-3296-\t}, {\ndrivers/net/phy/realtek/realtek_main.c:3297:\t\t.match_phy_device = rtl_internal_nbaset_match_phy_device,\ndrivers/net/phy/realtek/realtek_main.c-3298-\t\t.name\t\t= \"Realtek Internal NBASE-T PHY\",\n--\ndrivers/net/phy/teranetics.c=45=static int teranetics_read_status(struct phy_device *phydev)\n--\ndrivers/net/phy/teranetics.c-69-\ndrivers/net/phy/teranetics.c:70:static int teranetics_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/teranetics.c-71-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/teranetics.c=76=static struct phy_driver teranetics_driver[] = {\n--\ndrivers/net/phy/teranetics.c-84-\t.read_status\t= teranetics_read_status,\ndrivers/net/phy/teranetics.c:85:\t.match_phy_device = teranetics_match_phy_device,\ndrivers/net/phy/teranetics.c-86-},\n--\ndrivers/net/phy/xpowers/acx00.c=543=static int acx00_ephy_suspend(struct phy_device *phydev)\n--\ndrivers/net/phy/xpowers/acx00.c-582-\ndrivers/net/phy/xpowers/acx00.c:583:static int acx00_ephy_match_phy_device(struct phy_device *phydev,\ndrivers/net/phy/xpowers/acx00.c-584-\t\t\t\t const struct phy_driver *phydrv)\n--\ndrivers/net/phy/xpowers/acx00.c-589-\ndrivers/net/phy/xpowers/acx00.c:590:\tif (!genphy_match_phy_device(phydev, phydrv) || !node)\ndrivers/net/phy/xpowers/acx00.c-591-\t\treturn 0;\n--\ndrivers/net/phy/xpowers/acx00.c=608=static struct phy_driver acx00_ephy_driver[] = {\n--\ndrivers/net/phy/xpowers/acx00.c-611-\t\t.name = \"X-Powers AC200/AC300 EPHY\",\ndrivers/net/phy/xpowers/acx00.c:612:\t\t.match_phy_device = acx00_ephy_match_phy_device,\ndrivers/net/phy/xpowers/acx00.c-613-\t\t.probe = acx00_ephy_probe,\n"
} |
| 46/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 47513 output: 27 thoughts: 269 Thoughts: **My Analysis of PHY Device Matching** Alright, let's break this down. I see we're looking at `phy_bus_match()` within `drivers/net/phy/phy_device.c`. This is where the core logic resides for matching a PHY device to a PHY driver. The key here is that it takes a `device` and a `device_driver` as input, converts them into `phy_device` and `phy_driver` respectively, and then attempts a match. It looks like the `phydrv->match_phy_device` callback is the primary matching mechanism, falling back to `genphy_match_phy_device` if not defined. A crucial point, of course, is that `phy_bus_match` is invoked during probe/matching operations, specifically for devices associated with the `mdio_bus_type`. This is the essential link. Now, the real question is whether a `phy_device` instance with `phydev->phy_id` equal to `MTK_GPHY_ID_MT7530` can be realistically simulated within a standard fuzzing environment, such as QEMU on an AMD64 architecture. This is important to determine the ability to reach specific PHY drivers in a standard fuzzing environment. I need to trace where this ID is defined and used to fully answer this. This tells me if fuzzing is a viable approach, or if special hardware setup will be required. |
| 47/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "MTK_GPHY_ID_MT7530"
}Results: {
"Output": "drivers/net/phy/mediatek/mtk-ge.c-7-\ndrivers/net/phy/mediatek/mtk-ge.c:8:#define MTK_GPHY_ID_MT7530\t\t0x03a29412\ndrivers/net/phy/mediatek/mtk-ge.c-9-#define MTK_GPHY_ID_MT7531\t\t0x03a29441\n--\ndrivers/net/phy/mediatek/mtk-ge.c=77=static int mt7530_phy_config_init(struct phy_device *phydev)\n--\ndrivers/net/phy/mediatek/mtk-ge.c-104-/*\ndrivers/net/phy/mediatek/mtk-ge.c:105: * MTK_GPHY_ID_MT7530 ID is also used for an EcoNet SoC FE phy, but that PHY\ndrivers/net/phy/mediatek/mtk-ge.c-106- * does not advertise ESTATUS_1000_TFULL. Match this driver only if the PHY\n--\ndrivers/net/phy/mediatek/mtk-ge.c=139=static struct phy_driver mtk_gephy_driver[] = {\ndrivers/net/phy/mediatek/mtk-ge.c-140-\t{\ndrivers/net/phy/mediatek/mtk-ge.c:141:\t\tPHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),\ndrivers/net/phy/mediatek/mtk-ge.c-142-\t\t.name\t\t= \"MediaTek MT7530 PHY\",\n--\ndrivers/net/phy/mediatek/mtk-ge.c=174=static const struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {\ndrivers/net/phy/mediatek/mtk-ge.c:175:\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },\ndrivers/net/phy/mediatek/mtk-ge.c-176-\t{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },\n"
} |
| 48/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 48681 output: 20 thoughts: 78 Thoughts: Here's my thinking process: **Diving Deep into the MTK_GPHY_ID_MT7530 Discovery** Okay, so `MTK_GPHY_ID_MT7530` is *only* defined within `drivers/net/phy/mediatek/mtk-ge.c`. That's the starting point. I need to understand the implications of that definition being so isolated. It's unusual for an ID like this to be so specifically confined. Now, my next step is clear. I'll need to confirm if that hex value of `0x03a29412` or potentially a shorter version like `0x03a2` or just `03a2` shows up anywhere else in the code base. Are there any other files that reference this identifier, even if it's not defined there? It could be in a related driver, some configuration file, or even in documentation. I need to determine if this ID is just referenced here or used anywhere else. This will give me a better understanding of how the MT7530 PHY is being used in the larger system. |
| 49/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "0x03a2"
}Results: {
"Output": "arch/powerpc/platforms/44x/pci.h-164-#define PESDR0_PLLLCT2\t\t\t0x03a1\narch/powerpc/platforms/44x/pci.h:165:#define PESDR0_PLLLCT3\t\t\t0x03a2\narch/powerpc/platforms/44x/pci.h-166-\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_offset.h-15048-#define mmMPCC_OGAM5_MPCC_OGAM_RAMA_REGION_22_23_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_offset.h:15049:#define mmMPCC_OGAM5_MPCC_OGAM_RAMA_REGION_24_25 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_offset.h-15050-#define mmMPCC_OGAM5_MPCC_OGAM_RAMA_REGION_24_25_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_0_offset.h-4924-#define regMPC_CRC_RESULT_C_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_0_offset.h:4925:#define regMPC_BYPASS_BG_AR 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_0_offset.h-4926-#define regMPC_BYPASS_BG_AR_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_1_offset.h-4923-#define regMPC_CRC_RESULT_C_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_1_offset.h:4924:#define regMPC_BYPASS_BG_AR 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_1_offset.h-4925-#define regMPC_BYPASS_BG_AR_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_5_0_offset.h-13015-#define regMPC_PERFMON_EVENT_CTRL_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_5_0_offset.h:13016:#define regMPC_BYPASS_BG_AR 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_5_0_offset.h-13017-#define regMPC_BYPASS_BG_AR_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_5_1_offset.h-12994-#define regMPC_PERFMON_EVENT_CTRL_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_5_1_offset.h:12995:#define regMPC_BYPASS_BG_AR 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_5_1_offset.h-12996-#define regMPC_BYPASS_BG_AR_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_6_0_offset.h-5345-#define regMPC_PERFMON_EVENT_CTRL_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_6_0_offset.h:5346:#define regMPC_BYPASS_BG_AR 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_6_0_offset.h-5347-#define regMPC_BYPASS_BG_AR_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_0_offset.h-15447-#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMB_REGION_4_5_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_0_offset.h:15448:#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMB_REGION_6_7 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_0_offset.h-15449-#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMB_REGION_6_7_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_1_offset.h-8780-#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMB_REGION_4_5_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_1_offset.h:8781:#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMB_REGION_6_7 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_1_offset.h-8782-#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMB_REGION_6_7_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_offset.h-9063-#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMA_REGION_18_19_BASE_IDX 3\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_offset.h:9064:#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMA_REGION_20_21 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_offset.h-9065-#define regMPC_RMCM1_MPC_RMCM_SHAPER_RAMA_REGION_20_21_BASE_IDX 3\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_1_0_offset.h-6948-#define mmCB_COLOR1_FMASK_BASE_EXT_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_1_0_offset.h:6949:#define mmCB_COLOR2_FMASK_BASE_EXT 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_1_0_offset.h-6950-#define mmCB_COLOR2_FMASK_BASE_EXT_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h-1003-#define mmSDMA0_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h:1004:#define mmSDMA0_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h-1005-#define mmSDMA0_RLC7_IB_CNTL_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h-6581-#define mmCB_COLOR1_FMASK_BASE_EXT_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h:6582:#define mmCB_COLOR2_FMASK_BASE_EXT 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h-6583-#define mmCB_COLOR2_FMASK_BASE_EXT_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h-11572-#define mmSDMA2_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h:11573:#define mmSDMA2_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h-11574-#define mmSDMA2_RLC7_IB_CNTL_BASE_IDX 2\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_0_offset.h-560-#define mmSQ_LB_CTR3_CU_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_0_offset.h:561:#define mmSQC_EDC_CNT 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_0_offset.h-562-#define mmSQC_EDC_CNT_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_1_offset.h-554-#define mmSQ_LB_CTR3_CU_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_1_offset.h:555:#define mmSQC_EDC_CNT 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_1_offset.h-556-#define mmSQC_EDC_CNT_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_1_offset.h-159-#define mmSQC_EDC_PARITY_CNT3_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_1_offset.h:160:#define mmSQC_EDC_CNT 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_1_offset.h-161-#define mmSQC_EDC_CNT_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_2_offset.h-6293-#define regSQ_LB_CTR3_CU_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_2_offset.h:6294:#define regSQC_EDC_CNT 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_2_offset.h-6295-#define regSQC_EDC_CNT_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_3_offset.h-603-#define regSQ_LB_CTR3_CU_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_3_offset.h:604:#define regSQC_EDC_CNT 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_3_offset.h-605-#define regSQC_EDC_CNT_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_1_7_offset.h-1871-#define regMMEA0_ADDRDEC2_ADDR_SEL_CS01_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_1_7_offset.h:1872:#define regMMEA0_ADDRDEC2_ADDR_SEL_CS23 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_1_7_offset.h-1873-#define regMMEA0_ADDRDEC2_ADDR_SEL_CS23_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_2_0_0_offset.h-917-#define mmPCTL2_STCTRL_REGISTER_SAVE_EXCL_SET_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_2_0_0_offset.h:918:#define mmPCTL2_STCTRL_REGISTER_SAVE_EXCL_SET1 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_2_0_0_offset.h-919-#define mmPCTL2_STCTRL_REGISTER_SAVE_EXCL_SET1_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_2_3_0_offset.h-827-#define mmPCTL_UTCL2_STCTRL_REGISTER_SAVE_EXCL_SET1_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_2_3_0_offset.h:828:#define mmPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_2_3_0_offset.h-829-#define mmPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_0_offset.h-645-#define regPCTL_UTCL2_STCTRL_REGISTER_SAVE_EXCL_SET1_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_0_offset.h:646:#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_0_offset.h-647-#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_1_offset.h-469-#define regPCTL_UTCL2_STCTRL_REGISTER_SAVE_EXCL_SET1_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_1_offset.h:470:#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_1_offset.h-471-#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_2_offset.h-649-#define regPCTL_UTCL2_STCTRL_REGISTER_SAVE_EXCL_SET1_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_2_offset.h:650:#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_0_2_offset.h-651-#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_3_0_offset.h-481-#define regPCTL_UTCL2_STCTRL_REGISTER_SAVE_EXCL_SET1_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_3_0_offset.h:482:#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_3_3_0_offset.h-483-#define regPCTL_SLICE0_STCTRL_REGISTER_SAVE_RANGE0_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_3_0_offset.h-1199-#define mmPCTL2_STCTRL_REGISTER_SAVE_RANGE2_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_3_0_offset.h:1200:#define mmPCTL2_STCTRL_REGISTER_SAVE_RANGE3 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_3_0_offset.h-1201-#define mmPCTL2_STCTRL_REGISTER_SAVE_RANGE3_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_2_3_offset.h-1812-#define cfgBIF_CFG_DEV0_EPF2_0_PCIE_TPH_ST_TABLE_18 0x03a0\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_2_3_offset.h:1813:#define cfgBIF_CFG_DEV0_EPF2_0_PCIE_TPH_ST_TABLE_19 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_2_3_offset.h-1814-#define cfgBIF_CFG_DEV0_EPF2_0_PCIE_TPH_ST_TABLE_20 0x03a4\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_2_3_offset.h-2007-#define cfgBIF_CFG_DEV0_EPF3_0_PCIE_TPH_ST_TABLE_18 0x03a0\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_2_3_offset.h:2008:#define cfgBIF_CFG_DEV0_EPF3_0_PCIE_TPH_ST_TABLE_19 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_2_3_offset.h-2009-#define cfgBIF_CFG_DEV0_EPF3_0_PCIE_TPH_ST_TABLE_20 0x03a4\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_6_3_2_offset.h-2173-#define regBIF_CFG_DEV0_RC0_IDE_2_ADDR_ASSOCIATION_0_REG2_BASE_IDX 5\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_6_3_2_offset.h:2174:#define regBIF_CFG_DEV0_RC0_IDE_2_ADDR_ASSOCIATION_0_REG3 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_6_3_2_offset.h-2175-#define regBIF_CFG_DEV0_RC0_IDE_2_ADDR_ASSOCIATION_0_REG3_BASE_IDX 5\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1258-#define cfgBIF_CFG_DEV0_EPF2_PCIE_TPH_ST_TABLE_18 0x03a0\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h:1259:#define cfgBIF_CFG_DEV0_EPF2_PCIE_TPH_ST_TABLE_19 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1260-#define cfgBIF_CFG_DEV0_EPF2_PCIE_TPH_ST_TABLE_20 0x03a4\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1451-#define cfgBIF_CFG_DEV0_EPF3_PCIE_TPH_ST_TABLE_18 0x03a0\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h:1452:#define cfgBIF_CFG_DEV0_EPF3_PCIE_TPH_ST_TABLE_19 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1453-#define cfgBIF_CFG_DEV0_EPF3_PCIE_TPH_ST_TABLE_20 0x03a4\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1644-#define cfgBIF_CFG_DEV0_EPF4_PCIE_TPH_ST_TABLE_18 0x03a0\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h:1645:#define cfgBIF_CFG_DEV0_EPF4_PCIE_TPH_ST_TABLE_19 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1646-#define cfgBIF_CFG_DEV0_EPF4_PCIE_TPH_ST_TABLE_20 0x03a4\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1837-#define cfgBIF_CFG_DEV0_EPF5_PCIE_TPH_ST_TABLE_18 0x03a0\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h:1838:#define cfgBIF_CFG_DEV0_EPF5_PCIE_TPH_ST_TABLE_19 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-1839-#define cfgBIF_CFG_DEV0_EPF5_PCIE_TPH_ST_TABLE_20 0x03a4\n--\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-2030-#define cfgBIF_CFG_DEV0_EPF6_PCIE_TPH_ST_TABLE_18 0x03a0\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h:2031:#define cfgBIF_CFG_DEV0_EPF6_PCIE_TPH_ST_TABLE_19 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_2_0_offset.h-2032-#define cfgBIF_CFG_DEV0_EPF6_PCIE_TPH_ST_TABLE_20 0x03a4\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_0_offset.h-1002-#define regSDMA0_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_0_offset.h:1003:#define regSDMA0_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_0_offset.h-1004-#define regSDMA0_RLC7_IB_CNTL_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_2_offset.h-1047-#define regSDMA_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_2_offset.h:1048:#define regSDMA_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma/sdma_4_4_2_offset.h-1049-#define regSDMA_RLC7_IB_CNTL_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma0/sdma0_4_2_2_offset.h-985-#define mmSDMA0_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/sdma0/sdma0_4_2_2_offset.h:986:#define mmSDMA0_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma0/sdma0_4_2_2_offset.h-987-#define mmSDMA0_RLC7_IB_CNTL_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma1/sdma1_4_2_2_offset.h-977-#define mmSDMA1_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 0\ndrivers/gpu/drm/amd/include/asic_reg/sdma1/sdma1_4_2_2_offset.h:978:#define mmSDMA1_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma1/sdma1_4_2_2_offset.h-979-#define mmSDMA1_RLC7_IB_CNTL_BASE_IDX 0\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma2/sdma2_4_2_2_offset.h-977-#define mmSDMA2_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/sdma2/sdma2_4_2_2_offset.h:978:#define mmSDMA2_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma2/sdma2_4_2_2_offset.h-979-#define mmSDMA2_RLC7_IB_CNTL_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma3/sdma3_4_2_2_offset.h-977-#define mmSDMA3_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/sdma3/sdma3_4_2_2_offset.h:978:#define mmSDMA3_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma3/sdma3_4_2_2_offset.h-979-#define mmSDMA3_RLC7_IB_CNTL_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma4/sdma4_4_2_2_offset.h-977-#define mmSDMA4_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/sdma4/sdma4_4_2_2_offset.h:978:#define mmSDMA4_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma4/sdma4_4_2_2_offset.h-979-#define mmSDMA4_RLC7_IB_CNTL_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma5/sdma5_4_2_2_offset.h-977-#define mmSDMA5_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/sdma5/sdma5_4_2_2_offset.h:978:#define mmSDMA5_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma5/sdma5_4_2_2_offset.h-979-#define mmSDMA5_RLC7_IB_CNTL_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma6/sdma6_4_2_2_offset.h-977-#define mmSDMA6_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/sdma6/sdma6_4_2_2_offset.h:978:#define mmSDMA6_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma6/sdma6_4_2_2_offset.h-979-#define mmSDMA6_RLC7_IB_CNTL_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/sdma7/sdma7_4_2_2_offset.h-977-#define mmSDMA7_RLC7_RB_RPTR_ADDR_LO_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/sdma7/sdma7_4_2_2_offset.h:978:#define mmSDMA7_RLC7_IB_CNTL 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/sdma7/sdma7_4_2_2_offset.h-979-#define mmSDMA7_RLC7_IB_CNTL_BASE_IDX 1\n--\ndrivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_5_offset.h-836-#define mmUVD_MIF_REF_UV_ADDR_CONFIG_BASE_IDX 1\ndrivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_5_offset.h:837:#define mmUVD_MIF_RECON1_UV_ADDR_CONFIG 0x03a2\ndrivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_5_offset.h-838-#define mmUVD_MIF_RECON1_UV_ADDR_CONFIG_BASE_IDX 1\n--\ndrivers/gpu/drm/msm/registers/adreno/a5xx.xml=4=xsi:schemaLocation=\"https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd\"\u003e\n--\ndrivers/gpu/drm/msm/registers/adreno/a5xx.xml-1134-\t\u003creg32 offset=\"0x03a1\" name=\"RBBM_PERFCTR_CP_0_HI\"/\u003e\ndrivers/gpu/drm/msm/registers/adreno/a5xx.xml:1135:\t\u003creg32 offset=\"0x03a2\" name=\"RBBM_PERFCTR_CP_1_LO\"/\u003e\ndrivers/gpu/drm/msm/registers/adreno/a5xx.xml-1136-\t\u003creg32 offset=\"0x03a3\" name=\"RBBM_PERFCTR_CP_1_HI\"/\u003e\n--\ndrivers/net/phy/air_en8811h.c-26-\ndrivers/net/phy/air_en8811h.c:27:#define EN8811H_PHY_ID\t\t0x03a2a411\ndrivers/net/phy/air_en8811h.c-28-#define AN8811HB_PHY_ID\t\t0xc0ff04a0\n--\ndrivers/net/phy/mediatek/mtk-fe-soc.c-7-\ndrivers/net/phy/mediatek/mtk-fe-soc.c:8:#define MTK_FPHY_ID_MT7628\t0x03a29410\ndrivers/net/phy/mediatek/mtk-fe-soc.c-9-#define MTK_EXT_PAGE_ACCESS\t0x1f\n--\ndrivers/net/phy/mediatek/mtk-ge-soc.c-16-\ndrivers/net/phy/mediatek/mtk-ge-soc.c:17:#define MTK_GPHY_ID_MT7981\t\t\t0x03a29461\ndrivers/net/phy/mediatek/mtk-ge-soc.c:18:#define MTK_GPHY_ID_MT7988\t\t\t0x03a29481\ndrivers/net/phy/mediatek/mtk-ge-soc.c:19:#define MTK_GPHY_ID_EN7528\t\t\t0x03a29491\ndrivers/net/phy/mediatek/mtk-ge-soc.c:20:#define MTK_GPHY_ID_AN7581\t\t\t0x03a294c1\ndrivers/net/phy/mediatek/mtk-ge-soc.c-21-#define MTK_GPHY_ID_AN7583\t\t\t0xc0ff0420\n--\ndrivers/net/phy/mediatek/mtk-ge.c-7-\ndrivers/net/phy/mediatek/mtk-ge.c:8:#define MTK_GPHY_ID_MT7530\t\t0x03a29412\ndrivers/net/phy/mediatek/mtk-ge.c:9:#define MTK_GPHY_ID_MT7531\t\t0x03a29441\ndrivers/net/phy/mediatek/mtk-ge.c-10-\n--\ndrivers/net/phy/mscc/mscc_main.c=1074=static int vsc8574_config_pre_init(struct phy_device *phydev)\n--\ndrivers/net/phy/mscc/mscc_main.c-1086-\t\t{0x02e0, 0x00000012},\ndrivers/net/phy/mscc/mscc_main.c:1087:\t\t{0x03a2, 0x00050208},\ndrivers/net/phy/mscc/mscc_main.c-1088-\t\t{0x03b2, 0x00009186},\n--\ndrivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c=516=static const u16 rtl8225z2_rxgain[] = {\n--\ndrivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c-525-\t0x0394, 0x0395, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d,\ndrivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c:526:\t0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a8, 0x03a9,\ndrivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c-527-\t0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03b0, 0x03b1, 0x03b2, 0x03b3,\n--\nfs/exfat/nls.c=23=static const unsigned short uni_def_upcase[EXFAT_NUM_UPCASE] = {\n--\nfs/exfat/nls.c-139-\t0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,\nfs/exfat/nls.c:140:\t0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,\nfs/exfat/nls.c-141-\t0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x0386, 0x0388, 0x0389, 0x038a,\n"
} |
| 50/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 59026 output: 30 thoughts: 71 Thoughts: Here's my summary, as I delve into this: **Investigating MDIO Bus Device Registration** Okay, so I'm trying to understand how PHY devices are showing up within the `mdio_bus_type` framework. The central question is, what's triggering a device's registration? My thinking is that it boils down to two primary methods: either an MDIO bus is actively scanning its addresses – specifically, addresses 0 through 31, using `mdiobus_scan()` – or, alternatively, the device tree is employed, leading to the creation and registration through `of_mdiobus_register`. Right, that seems straightforward enough. Now, I should probably zero in on `mdiobus_scan` to get a clearer picture of that process. That's the key starting point to uncover the registration mechanism. |
| 51/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "mdiobus_scan",
"PathPrefix": "drivers/net/phy"
}Results: {
"Output": "drivers/net/phy/mdio_bus_provider.c=396=static void of_mdiobus_link_mdiodev(struct mii_bus *bus,\n--\ndrivers/net/phy/mdio_bus_provider.c-407-\ndrivers/net/phy/mdio_bus_provider.c:408:static struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr, bool c45)\ndrivers/net/phy/mdio_bus_provider.c-409-{\n--\ndrivers/net/phy/mdio_bus_provider.c-447-/**\ndrivers/net/phy/mdio_bus_provider.c:448: * mdiobus_scan_c22 - scan one address on a bus for C22 MDIO devices.\ndrivers/net/phy/mdio_bus_provider.c-449- * @bus: mii_bus to scan\n--\ndrivers/net/phy/mdio_bus_provider.c-458- */\ndrivers/net/phy/mdio_bus_provider.c:459:struct phy_device *mdiobus_scan_c22(struct mii_bus *bus, int addr)\ndrivers/net/phy/mdio_bus_provider.c-460-{\ndrivers/net/phy/mdio_bus_provider.c:461:\treturn mdiobus_scan(bus, addr, false);\ndrivers/net/phy/mdio_bus_provider.c-462-}\ndrivers/net/phy/mdio_bus_provider.c:463:EXPORT_SYMBOL(mdiobus_scan_c22);\ndrivers/net/phy/mdio_bus_provider.c-464-\ndrivers/net/phy/mdio_bus_provider.c-465-/**\ndrivers/net/phy/mdio_bus_provider.c:466: * mdiobus_scan_c45 - scan one address on a bus for C45 MDIO devices.\ndrivers/net/phy/mdio_bus_provider.c-467- * @bus: mii_bus to scan\n--\ndrivers/net/phy/mdio_bus_provider.c-476- */\ndrivers/net/phy/mdio_bus_provider.c:477:static struct phy_device *mdiobus_scan_c45(struct mii_bus *bus, int addr)\ndrivers/net/phy/mdio_bus_provider.c-478-{\ndrivers/net/phy/mdio_bus_provider.c:479:\treturn mdiobus_scan(bus, addr, true);\ndrivers/net/phy/mdio_bus_provider.c-480-}\ndrivers/net/phy/mdio_bus_provider.c-481-\ndrivers/net/phy/mdio_bus_provider.c:482:static int mdiobus_scan_bus_c22(struct mii_bus *bus)\ndrivers/net/phy/mdio_bus_provider.c-483-{\n--\ndrivers/net/phy/mdio_bus_provider.c-489-\ndrivers/net/phy/mdio_bus_provider.c:490:\t\t\tphydev = mdiobus_scan_c22(bus, i);\ndrivers/net/phy/mdio_bus_provider.c-491-\t\t\tif (IS_ERR(phydev) \u0026\u0026 (PTR_ERR(phydev) != -ENODEV))\n--\ndrivers/net/phy/mdio_bus_provider.c-497-\ndrivers/net/phy/mdio_bus_provider.c:498:static int mdiobus_scan_bus_c45(struct mii_bus *bus)\ndrivers/net/phy/mdio_bus_provider.c-499-{\n--\ndrivers/net/phy/mdio_bus_provider.c-509-\ndrivers/net/phy/mdio_bus_provider.c:510:\t\t\tphydev = mdiobus_scan_c45(bus, i);\ndrivers/net/phy/mdio_bus_provider.c-511-\t\t\tif (IS_ERR(phydev) \u0026\u0026 (PTR_ERR(phydev) != -ENODEV))\n--\ndrivers/net/phy/mdio_bus_provider.c=553=int __mdiobus_register(struct mii_bus *bus, struct module *owner)\n--\ndrivers/net/phy/mdio_bus_provider.c-632-\tif (bus-\u003eread) {\ndrivers/net/phy/mdio_bus_provider.c:633:\t\terr = mdiobus_scan_bus_c22(bus);\ndrivers/net/phy/mdio_bus_provider.c-634-\t\tif (err)\n--\ndrivers/net/phy/mdio_bus_provider.c-640-\tif (!prevent_c45_scan \u0026\u0026 bus-\u003eread_c45) {\ndrivers/net/phy/mdio_bus_provider.c:641:\t\terr = mdiobus_scan_bus_c45(bus);\ndrivers/net/phy/mdio_bus_provider.c-642-\t\tif (err)\n"
} |
| 52/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 60599 output: 31 thoughts: 345 Thoughts: **My Analysis of MDIO Device Matching** Okay, here's what's going through my head as I dissect this MDIO bus interaction. My initial focus is on how a specific PHY device, in this case, the `MTK_GPHY_ID_MT7530`, gets recognized and registered within the system. First, I see that the MDIO bus is being enumerated; it's reading the `MII_PHYSID1` and `MII_PHYSID2` registers from each address. That's standard discovery. If it finds the tell-tale PHY ID of an MT7530, it triggers the `phy_device_create` function, which is, of course, the key to bringing this PHY into the driver's sphere. The important part is that `phy_device_register` gets called after device creation, this registration is what triggers the whole matching procedure. Then, the critical driver matching phase happens via `phy_bus_match`. It looks like it boils down to calling the PHY driver's match function for each potentially compatible driver, `mt753x_gphy_match` in this case. It looks like it will match when both: 1. The `genphy_match_phy_device` function returns true, meaning generic PHY matching checks are successful. 2. The MII_ESTATUS register of the device contains the `ESTATUS_1000_TFULL` bit set. The question I'm trying to answer, the one that really matters for my work, is whether this entire sequence can be manipulated or even triggered from userspace. I'm thinking specifically about vulnerability research, fuzzing, and the creation of reproducible test cases. Can I use a tool like Syzkaller or some other method to inject MDIO devices or somehow trigger this device matching process? I need to dig deeper. I'm wondering if there are any user-accessible interfaces for MDIO buses. Is there an MDIO bus emulator I can use, or perhaps a netlink interface, sysfs interface, or something similar that would allow me to create virtual devices or influence the MDIO bus state from userspace? My next step is to research how MDIO buses and PHY devices are usually created, and whether any virtual MDIO bus implementations exist. I need to understand if there is a surface that I can manipulate. |
| 53/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "mdio_bus_type",
"PathPrefix": "drivers/net/phy"
}Results: {
"Output": "drivers/net/phy/mdio_bus_provider.c=298=__ATTRIBUTE_GROUPS(mdio_bus_device_statistics);\ndrivers/net/phy/mdio_bus_provider.c-299-\ndrivers/net/phy/mdio_bus_provider.c:300:const struct bus_type mdio_bus_type = {\ndrivers/net/phy/mdio_bus_provider.c-301-\t.name\t\t= \"mdio_bus\",\n--\ndrivers/net/phy/mdio_device.c=119=struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr)\n--\ndrivers/net/phy/mdio_device.c-129-\tmdiodev-\u003edev.parent = \u0026bus-\u003edev;\ndrivers/net/phy/mdio_device.c:130:\tmdiodev-\u003edev.bus = \u0026mdio_bus_type;\ndrivers/net/phy/mdio_device.c-131-\tmdiodev-\u003edevice_free = mdio_device_free;\n--\ndrivers/net/phy/mdio_device.c=285=int mdio_driver_register(struct mdio_driver *drv)\n--\ndrivers/net/phy/mdio_device.c-291-\ndrivers/net/phy/mdio_device.c:292:\tmdiodrv-\u003edriver.bus = \u0026mdio_bus_type;\ndrivers/net/phy/mdio_device.c-293-\tmdiodrv-\u003edriver.probe = mdio_probe;\n--\ndrivers/net/phy/phy_device.c=658=struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,\n--\ndrivers/net/phy/phy_device.c-672-\tmdiodev-\u003edev.parent = \u0026bus-\u003edev;\ndrivers/net/phy/phy_device.c:673:\tmdiodev-\u003edev.bus = \u0026mdio_bus_type;\ndrivers/net/phy/phy_device.c-674-\tmdiodev-\u003edev.type = \u0026mdio_bus_phy_type;\n--\ndrivers/net/phy/phy_device.c=1171=struct phy_device *phy_connect(struct net_device *dev, const char *bus_id,\n--\ndrivers/net/phy/phy_device.c-1181-\t */\ndrivers/net/phy/phy_device.c:1182:\td = bus_find_device_by_name(\u0026mdio_bus_type, NULL, bus_id);\ndrivers/net/phy/phy_device.c-1183-\tif (!d) {\n--\ndrivers/net/phy/phy_device.c=3583=struct mdio_device *fwnode_mdio_find_device(struct fwnode_handle *fwnode)\n--\ndrivers/net/phy/phy_device.c-3589-\ndrivers/net/phy/phy_device.c:3590:\td = bus_find_device_by_fwnode(\u0026mdio_bus_type, fwnode);\ndrivers/net/phy/phy_device.c-3591-\tif (!d)\n--\ndrivers/net/phy/phy_device.c=3834=static int phy_driver_register(struct phy_driver *new_driver,\n--\ndrivers/net/phy/phy_device.c-3859-\tnew_driver-\u003emdiodrv.driver.name = new_driver-\u003ename;\ndrivers/net/phy/phy_device.c:3860:\tnew_driver-\u003emdiodrv.driver.bus = \u0026mdio_bus_type;\ndrivers/net/phy/phy_device.c-3861-\tnew_driver-\u003emdiodrv.driver.probe = phy_probe;\n--\ndrivers/net/phy/phy_device.c=3948=static int __init phy_init(void)\n--\ndrivers/net/phy/phy_device.c-3955-\ndrivers/net/phy/phy_device.c:3956:\trc = bus_register(\u0026mdio_bus_type);\ndrivers/net/phy/phy_device.c-3957-\tif (rc)\n--\ndrivers/net/phy/phy_device.c-3987-\trtnl_unlock();\ndrivers/net/phy/phy_device.c:3988:\tbus_unregister(\u0026mdio_bus_type);\ndrivers/net/phy/phy_device.c-3989-err_class:\n--\ndrivers/net/phy/phy_device.c=3995=static void __exit phy_exit(void)\n--\ndrivers/net/phy/phy_device.c-4002-\trtnl_unlock();\ndrivers/net/phy/phy_device.c:4003:\tbus_unregister(\u0026mdio_bus_type);\ndrivers/net/phy/phy_device.c-4004-\tclass_unregister(\u0026mdio_bus_class);\n--\ndrivers/net/phy/phylib-internal.h=10=struct phy_device;\ndrivers/net/phy/phylib-internal.h-11-\ndrivers/net/phy/phylib-internal.h:12:extern const struct bus_type mdio_bus_type;\ndrivers/net/phy/phylib-internal.h-13-extern const struct class mdio_bus_class;\n"
} |
| 54/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 62848 output: 19 thoughts: 42 Thoughts: Okay, let's break this down. **Investigating the MDIO Bus and PHY Device Creation** Right, so I'm looking at how PHY devices are brought online within this MDIO bus framework. First thing I'm checking is if `mdio_bus_type` handles any dynamic userspace device creation. The answer, as far as I can see, is no – it doesn't seem to be responsible for that aspect. That means I need to dig deeper. So, where *does* the magic happen? `phy_device_create` is the obvious next stop. I need to trace its usage within the kernel to understand the device instantiation sequence. Where is that crucial function actually *called*? That’s where the real action will be. |
| 55/2 | 2026/09/20 22:50 | tool | grepper |
0mArgs:{
"Expression": "phy_device_create"
}Results: {
"Output": "drivers/net/mdio/fwnode_mdio.c=117=int fwnode_mdiobus_register_phy(struct mii_bus *bus,\n--\ndrivers/net/mdio/fwnode_mdio.c-134-\telse\ndrivers/net/mdio/fwnode_mdio.c:135:\t\tphy = phy_device_create(bus, addr, phy_id, 0, NULL);\ndrivers/net/mdio/fwnode_mdio.c-136-\tif (IS_ERR(phy)) {\n--\ndrivers/net/phy/nxp-tja11xx.c=551=static void tja1102_p1_register(struct work_struct *work)\n--\ndrivers/net/phy/nxp-tja11xx.c-585-\t\t/* Real PHY ID of Port 1 is 0 */\ndrivers/net/phy/nxp-tja11xx.c:586:\t\tphy = phy_device_create(bus, addr, PHY_ID_TJA1102, false, NULL);\ndrivers/net/phy/nxp-tja11xx.c-587-\t\tif (IS_ERR(phy)) {\n--\ndrivers/net/phy/nxp-tja11xx.c-592-\ndrivers/net/phy/nxp-tja11xx.c:593:\t\t/* Overwrite parent device. phy_device_create() set parent to\ndrivers/net/phy/nxp-tja11xx.c-594-\t\t * the mii_bus-\u003edev, which is not correct in case.\n--\ndrivers/net/phy/phy_device.c=638=static int phy_request_driver_module(struct phy_device *dev, u32 phy_id)\n--\ndrivers/net/phy/phy_device.c-657-\ndrivers/net/phy/phy_device.c:658:struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,\ndrivers/net/phy/phy_device.c-659-\t\t\t\t bool is_c45,\n--\ndrivers/net/phy/phy_device.c-749-}\ndrivers/net/phy/phy_device.c:750:EXPORT_SYMBOL(phy_device_create);\ndrivers/net/phy/phy_device.c-751-\n--\ndrivers/net/phy/phy_device.c=981=struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)\n--\ndrivers/net/phy/phy_device.c-1006-\t\tif (!r)\ndrivers/net/phy/phy_device.c:1007:\t\t\treturn phy_device_create(bus, addr, phy_id,\ndrivers/net/phy/phy_device.c-1008-\t\t\t\t\t\t true, \u0026c45_ids);\n--\ndrivers/net/phy/phy_device.c-1010-\ndrivers/net/phy/phy_device.c:1011:\treturn phy_device_create(bus, addr, phy_id, is_c45, \u0026c45_ids);\ndrivers/net/phy/phy_device.c-1012-}\n--\ninclude/linux/phy.h=2167=int phy_modify_paged(struct phy_device *phydev, int page, u32 regnum,\n--\ninclude/linux/phy.h-2169-\ninclude/linux/phy.h:2170:struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,\ninclude/linux/phy.h-2171-\t\t\t\t bool is_c45,\n"
} |
| 56/2 | 2026/09/20 22:50 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 64029 output: 160 thoughts: 951 Thoughts: **Analysis of Reachability for Fuzzing** Okay, let's break this down from a fuzzing perspective. The core issue is `drivers/net/phy/mediatek/mtk-ge.c`, specifically the `mt753x_gphy_match` function. I see that this code is only relevant if a `phy_device` is registered with the ID `MTK_GPHY_ID_MT7530`, which is `0x03a29412`. This registration, critically, happens either via MDIO bus scanning triggered by `mdiobus_scan` or through explicit Device Tree or ACPI node specification via `fwnode_mdiobus_register_phy()`. Now, how does a `phy_device` with that ID get *created* in the first place? It's going to be through MDIO probe to hardware or instantiated via Device Tree. This specifically points to the MediaTek MT7530 switch chip or a related SoC like the MT7621/MT7988 family that has an integrated PHY. These are physical hardware components. The key is that, based on my understanding, QEMU and GCE *do not* emulate this MediaTek hardware. They don't have this level of detail for the MT7530, nor do they emulate the underlying MDIO bus necessary to discover and use such a device. Standard amd64 QEMU/KVM and GCE environments use the usual virtio-net, e1000, igb, and vmxnet3 emulated network interfaces and certainly don't involve the `mtk-ge` PHY driver. This aligns directly with the instructions, especially the sections on "REACHABILITY IS THE PRIMARY GATE" and "Structurally unreachable hardware." This code is specifically for MediaTek Gigabit Ethernet switch/PHYs (MT7530/MT7531), hardware that requires physical hardware not emulated in standard QEMU/GCE environments. The `mt753x_gphy_match` function, and by extension the modified code, is therefore structurally unreachable within these standard virtualized environments. No amount of fuzzing will expose any bugs. Therefore, `WorthFuzzing` must be false. Let me make sure I've got all the pieces right for the `set-results` tool: 1. `set-results` must be called only once. Check. 2. `WorthFuzzing`: false. Check. 3. Reasoning: Concise explanation of the fuzzing verdict. Check. I've detailed the lack of hardware emulation and the reliance on a specific MDIO bus. 4. `FocusSymbols`: empty - no need to specify because `WorthFuzzing` is false. 5. `EnableConfigs`: empty - no need to specify because `WorthFuzzing` is false. I think I'm good to go. |
| 57/2 | 2026/09/20 22:50 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies drivers/net/phy/mediatek/mtk-ge.c by adding a custom match function mt753x_gphy_match() for MediaTek MT7530 Gigabit Ethernet PHYs. This code can only be reached when an MDIO bus registers a PHY device matching MTK_GPHY_ID_MT7530, which requires physical MediaTek switch hardware (or specific MediaTek SoC Device Tree bindings on ARM/MIPS platforms). Because this hardware is not emulated in standard QEMU/GCE virtualization environments, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies drivers/net/phy/mediatek/mtk-ge.c by adding a custom match function mt753x_gphy_match() for MediaTek MT7530 Gigabit Ethernet PHYs. This code can only be reached when an MDIO bus registers a PHY device matching MTK_GPHY_ID_MT7530, which requires physical MediaTek switch hardware (or specific MediaTek SoC Device Tree bindings on ARM/MIPS platforms). Because this hardware is not emulated in standard QEMU/GCE virtualization environments, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 58/1 | 2026/09/20 22:50 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|