| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/28 08:58 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch introduces a new driver for the Maxio MAE0621A Ethernet PHY along with DeviceTree bindings and Kconfig options. This driver requires specific physical Ethernet PHY hardware (or emulation thereof) connected via MDIO, which is not present or emulated in standard virtualized environments (QEMU/GCE). As such, the code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/28 08:58 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 2341c5008e44837e9ba2087d50737f64e18e05d9\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Mon Sep 28 08:58:55 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/Documentation/devicetree/bindings/net/maxio,mae0621a.yaml b/Documentation/devicetree/bindings/net/maxio,mae0621a.yaml\nnew file mode 100644\nindex 0000000000000..c4d06c6261681\n--- /dev/null\n+++ b/Documentation/devicetree/bindings/net/maxio,mae0621a.yaml\n@@ -0,0 +1,40 @@\n+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)\n+%YAML 1.2\n+---\n+$id: http://devicetree.org/schemas/net/maxio,mae0621a.yaml#\n+$schema: http://devicetree.org/meta-schemas/core.yaml#\n+\n+title: Maxio MAE0621A Ethernet PHY\n+\n+maintainers:\n+ - Liu Changjie \u003cliucj1228@outlook.com\u003e\n+\n+allOf:\n+ - $ref: ethernet-phy.yaml#\n+\n+properties:\n+ compatible:\n+ enum:\n+ - ethernet-phy-id7b74.4411\n+ - ethernet-phy-id7b74.4412\n+\n+ maxio,clk-out-frequency-hz:\n+ description:\n+ Selects a 125 MHz clock on the CLKOUT pin. If the property is absent,\n+ the hardware strap or bootloader configuration is preserved.\n+ const: 125000000\n+\n+unevaluatedProperties: false\n+\n+examples:\n+ - |\n+ mdio {\n+ #address-cells = \u003c1\u003e;\n+ #size-cells = \u003c0\u003e;\n+\n+ ethernet-phy@1 {\n+ compatible = \"ethernet-phy-id7b74.4412\";\n+ reg = \u003c1\u003e;\n+ maxio,clk-out-frequency-hz = \u003c125000000\u003e;\n+ };\n+ };\ndiff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml\nindex ba20029693734..8ea4d421719b0 100644\n--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml\n+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml\n@@ -1035,6 +1035,8 @@ patternProperties:\n description: MaxBotix Inc.\n \"^maxim,.*\":\n description: Maxim Integrated Products\n+ \"^maxio,.*\":\n+ description: Maxio Technology (Hangzhou) Co., Ltd.\n \"^maxlinear,.*\":\n description: MaxLinear Inc.\n \"^maxtor,.*\":\ndiff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig\nindex b4ef927fd4a67..eb40276113a57 100644\n--- a/drivers/net/phy/Kconfig\n+++ b/drivers/net/phy/Kconfig\n@@ -298,6 +298,14 @@ config MARVELL_88X2222_PHY\n \t Support for the Marvell 88X2222 Dual-port Multi-speed Ethernet\n \t Transceiver.\n \n+config MAXIO_PHY\n+\ttristate \"Maxio Ethernet PHYs\"\n+\thelp\n+\t Support for Maxio Ethernet PHYs. Currently this driver supports the\n+\t MAE0621A Gigabit Ethernet PHY. The driver optionally selects a 125 MHz\n+\t clock on the CLKOUT pin while preserving the hardware configuration on\n+\t boards which do not request it.\n+\n config MAXLINEAR_GPHY\n \ttristate \"Maxlinear Ethernet PHYs\"\n \tselect POLYNOMIAL if HWMON\ndiff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile\nindex 25c4a3c2429f7..9730b8a6fa5b0 100644\n--- a/drivers/net/phy/Makefile\n+++ b/drivers/net/phy/Makefile\n@@ -72,6 +72,7 @@ obj-$(CONFIG_MARVELL_10G_PHY)\t+= marvell10g.o\n obj-$(CONFIG_MARVELL_PHY)\t+= marvell.o\n obj-$(CONFIG_MARVELL_88Q2XXX_PHY)\t+= marvell-88q2xxx.o\n obj-$(CONFIG_MARVELL_88X2222_PHY)\t+= marvell-88x2222.o\n+obj-$(CONFIG_MAXIO_PHY)\t\t+= maxio.o\n obj-$(CONFIG_MAXLINEAR_GPHY)\t+= mxl-gpy.o\n obj-$(CONFIG_MAXLINEAR_86110_PHY)\t+= mxl-86110.o\n obj-y\t\t\t\t+= mediatek/\ndiff --git a/drivers/net/phy/maxio.c b/drivers/net/phy/maxio.c\nnew file mode 100644\nindex 0000000000000..8c33c8433b127\n--- /dev/null\n+++ b/drivers/net/phy/maxio.c\n@@ -0,0 +1,124 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+/* Driver for Maxio Ethernet PHYs. */\n+\n+#include \u003clinux/bitops.h\u003e\n+#include \u003clinux/clk.h\u003e\n+#include \u003clinux/module.h\u003e\n+#include \u003clinux/phy.h\u003e\n+#include \u003clinux/property.h\u003e\n+\n+#define MAXIO_MAE0621A_Q2C_PHY_ID\t0x7b744411\n+#define MAXIO_MAE0621A_Q3C_PHY_ID\t0x7b744412\n+\n+#define MAXIO_PAGE_SELECT\t\t0x1f\n+#define MAXIO_MAE0621A_PHYCR2_PAGE\t0xa43\n+#define MAXIO_MAE0621A_PHYCR2\t\t0x19\n+#define MAXIO_MAE0621A_CLKOUT_125M\tBIT(11)\n+#define MAXIO_MAE0621A_CLKOUT_ENABLE\tBIT(0)\n+\n+struct maxio_priv {\n+\tstruct clk *clk;\n+\tbool clk_out_125m;\n+};\n+\n+static int maxio_read_page(struct phy_device *phydev)\n+{\n+\treturn __phy_read(phydev, MAXIO_PAGE_SELECT);\n+}\n+\n+static int maxio_write_page(struct phy_device *phydev, int page)\n+{\n+\treturn __phy_write(phydev, MAXIO_PAGE_SELECT, page);\n+}\n+\n+static int maxio_mae0621a_probe(struct phy_device *phydev)\n+{\n+\tstruct device *dev = \u0026phydev-\u003emdio.dev;\n+\tstruct maxio_priv *priv;\n+\tu32 frequency;\n+\tint ret;\n+\n+\tpriv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);\n+\tif (!priv)\n+\t\treturn -ENOMEM;\n+\n+\tphydev-\u003epriv = priv;\n+\n+\tret = device_property_read_u32(dev, \"maxio,clk-out-frequency-hz\",\n+\t\t\t\t \u0026frequency);\n+\tif (ret) {\n+\t\t/* the property is optional, so ignore -EINVAL */\n+\t\tif (ret != -EINVAL)\n+\t\t\treturn ret;\n+\t} else {\n+\t\tif (frequency != 125000000) {\n+\t\t\tphydev_err(phydev, \"invalid CLKOUT frequency %u\\n\",\n+\t\t\t\t frequency);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tpriv-\u003eclk_out_125m = true;\n+\t}\n+\n+\t/* PHY clock from the generic PHY binding */\n+\tpriv-\u003eclk = devm_clk_get_optional_enabled(\u0026phydev-\u003emdio.dev, NULL);\n+\tif (IS_ERR(priv-\u003eclk))\n+\t\treturn PTR_ERR(priv-\u003eclk);\n+\n+\treturn 0;\n+}\n+\n+static int maxio_mae0621a_config_init(struct phy_device *phydev)\n+{\n+\tstruct maxio_priv *priv = phydev-\u003epriv;\n+\tint ret;\n+\n+\tif (!priv-\u003eclk_out_125m)\n+\t\treturn 0;\n+\n+\tret = phy_modify_paged_changed(phydev, MAXIO_MAE0621A_PHYCR2_PAGE,\n+\t\t\t\t MAXIO_MAE0621A_PHYCR2,\n+\t\t\t\t MAXIO_MAE0621A_CLKOUT_ENABLE |\n+\t\t\t\t MAXIO_MAE0621A_CLKOUT_125M,\n+\t\t\t\t MAXIO_MAE0621A_CLKOUT_ENABLE |\n+\t\t\t\t MAXIO_MAE0621A_CLKOUT_125M);\n+\tif (ret \u003c= 0)\n+\t\treturn ret;\n+\n+\treturn genphy_soft_reset(phydev);\n+}\n+\n+static struct phy_driver maxio_drivers[] = {\n+\t{\n+\t\tPHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q2C_PHY_ID),\n+\t\t.name\t\t= \"Maxio MAE0621A-Q2C\",\n+\t\t.probe\t\t= maxio_mae0621a_probe,\n+\t\t.config_init\t= maxio_mae0621a_config_init,\n+\t\t.suspend\t= genphy_suspend,\n+\t\t.resume\t\t= genphy_resume,\n+\t\t.read_page\t= maxio_read_page,\n+\t\t.write_page\t= maxio_write_page,\n+\t},\n+\t{\n+\t\tPHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q3C_PHY_ID),\n+\t\t.name\t\t= \"Maxio MAE0621A-Q3C\",\n+\t\t.probe\t\t= maxio_mae0621a_probe,\n+\t\t.config_init\t= maxio_mae0621a_config_init,\n+\t\t.suspend\t= genphy_suspend,\n+\t\t.resume\t\t= genphy_resume,\n+\t\t.read_page\t= maxio_read_page,\n+\t\t.write_page\t= maxio_write_page,\n+\t},\n+};\n+module_phy_driver(maxio_drivers);\n+\n+static const struct mdio_device_id __maybe_unused maxio_tbl[] = {\n+\t{ PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q2C_PHY_ID) },\n+\t{ PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q3C_PHY_ID) },\n+\t{ }\n+};\n+MODULE_DEVICE_TABLE(mdio, maxio_tbl);\n+\n+MODULE_AUTHOR(\"Liu Changjie \u003cliucj1228@outlook.com\u003e\");\n+MODULE_DESCRIPTION(\"Maxio Ethernet PHY driver\");\n+MODULE_LICENSE(\"GPL\");\n"
} |
| 2/1 | 2026/09/28 08:58 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch introduces a new driver for the Maxio MAE0621A Ethernet PHY along with DeviceTree bindings and Kconfig options. This driver requires specific physical Ethernet PHY hardware (or emulation thereof) connected via MDIO, which is not present or emulated in standard virtualized environments (QEMU/GCE). As such, the 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 2341c5008e44837e9ba2087d50737f64e18e05d9
Author: syz-cluster <triage@syzkaller.com>
Date: Mon Sep 28 08:58:55 2026 +0000
syz-cluster: applied patch under review
diff --git a/Documentation/devicetree/bindings/net/maxio,mae0621a.yaml b/Documentation/devicetree/bindings/net/maxio,mae0621a.yaml
new file mode 100644
index 0000000000000..c4d06c6261681
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/maxio,mae0621a.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/maxio,mae0621a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxio MAE0621A Ethernet PHY
+
+maintainers:
+ - Liu Changjie <liucj1228@outlook.com>
+
+allOf:
+ - $ref: ethernet-phy.yaml#
+
+properties:
+ compatible:
+ enum:
+ - ethernet-phy-id7b74.4411
+ - ethernet-phy-id7b74.4412
+
+ maxio,clk-out-frequency-hz:
+ description:
+ Selects a 125 MHz clock on the CLKOUT pin. If the property is absent,
+ the hardware strap or bootloader configuration is preserved.
+ const: 125000000
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-phy@1 {
+ compatible = "ethernet-phy-id7b74.4412";
+ reg = <1>;
+ maxio,clk-out-frequency-hz = <125000000>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index ba20029693734..8ea4d421719b0 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1035,6 +1035,8 @@ patternProperties:
description: MaxBotix Inc.
"^maxim,.*":
description: Maxim Integrated Products
+ "^maxio,.*":
+ description: Maxio Technology (Hangzhou) Co., Ltd.
"^maxlinear,.*":
description: MaxLinear Inc.
"^maxtor,.*":
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index b4ef927fd4a67..eb40276113a57 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -298,6 +298,14 @@ config MARVELL_88X2222_PHY
Support for the Marvell 88X2222 Dual-port Multi-speed Ethernet
Transceiver.
+config MAXIO_PHY
+ tristate "Maxio Ethernet PHYs"
+ help
+ Support for Maxio Ethernet PHYs. Currently this driver supports the
+ MAE0621A Gigabit Ethernet PHY. The driver optionally selects a 125 MHz
+ clock on the CLKOUT pin while preserving the hardware configuration on
+ boards which do not request it.
+
config MAXLINEAR_GPHY
tristate "Maxlinear Ethernet PHYs"
select POLYNOMIAL if HWMON
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 25c4a3c2429f7..9730b8a6fa5b0 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -72,6 +72,7 @@ obj-$(CONFIG_MARVELL_10G_PHY) += marvell10g.o
obj-$(CONFIG_MARVELL_PHY) += marvell.o
obj-$(CONFIG_MARVELL_88Q2XXX_PHY) += marvell-88q2xxx.o
obj-$(CONFIG_MARVELL_88X2222_PHY) += marvell-88x2222.o
+obj-$(CONFIG_MAXIO_PHY) += maxio.o
obj-$(CONFIG_MAXLINEAR_GPHY) += mxl-gpy.o
obj-$(CONFIG_MAXLINEAR_86110_PHY) += mxl-86110.o
obj-y += mediatek/
diff --git a/drivers/net/phy/maxio.c b/drivers/net/phy/maxio.c
new file mode 100644
index 0000000000000..8c33c8433b127
--- /dev/null
+++ b/drivers/net/phy/maxio.c
@@ -0,0 +1,124 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/* Driver for Maxio Ethernet PHYs. */
+
+#include <linux/bitops.h>
+#include <linux/clk.h>
+#include <linux/module.h>
+#include <linux/phy.h>
+#include <linux/property.h>
+
+#define MAXIO_MAE0621A_Q2C_PHY_ID 0x7b744411
+#define MAXIO_MAE0621A_Q3C_PHY_ID 0x7b744412
+
+#define MAXIO_PAGE_SELECT 0x1f
+#define MAXIO_MAE0621A_PHYCR2_PAGE 0xa43
+#define MAXIO_MAE0621A_PHYCR2 0x19
+#define MAXIO_MAE0621A_CLKOUT_125M BIT(11)
+#define MAXIO_MAE0621A_CLKOUT_ENABLE BIT(0)
+
+struct maxio_priv {
+ struct clk *clk;
+ bool clk_out_125m;
+};
+
+static int maxio_read_page(struct phy_device *phydev)
+{
+ return __phy_read(phydev, MAXIO_PAGE_SELECT);
+}
+
+static int maxio_write_page(struct phy_device *phydev, int page)
+{
+ return __phy_write(phydev, MAXIO_PAGE_SELECT, page);
+}
+
+static int maxio_mae0621a_probe(struct phy_device *phydev)
+{
+ struct device *dev = &phydev->mdio.dev;
+ struct maxio_priv *priv;
+ u32 frequency;
+ int ret;
+
+ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ phydev->priv = priv;
+
+ ret = device_property_read_u32(dev, "maxio,clk-out-frequency-hz",
+ &frequency);
+ if (ret) {
+ /* the property is optional, so ignore -EINVAL */
+ if (ret != -EINVAL)
+ return ret;
+ } else {
+ if (frequency != 125000000) {
+ phydev_err(phydev, "invalid CLKOUT frequency %u\n",
+ frequency);
+ return -EINVAL;
+ }
+
+ priv->clk_out_125m = true;
+ }
+
+ /* PHY clock from the generic PHY binding */
+ priv->clk = devm_clk_get_optional_enabled(&phydev->mdio.dev, NULL);
+ if (IS_ERR(priv->clk))
+ return PTR_ERR(priv->clk);
+
+ return 0;
+}
+
+static int maxio_mae0621a_config_init(struct phy_device *phydev)
+{
+ struct maxio_priv *priv = phydev->priv;
+ int ret;
+
+ if (!priv->clk_out_125m)
+ return 0;
+
+ ret = phy_modify_paged_changed(phydev, MAXIO_MAE0621A_PHYCR2_PAGE,
+ MAXIO_MAE0621A_PHYCR2,
+ MAXIO_MAE0621A_CLKOUT_ENABLE |
+ MAXIO_MAE0621A_CLKOUT_125M,
+ MAXIO_MAE0621A_CLKOUT_ENABLE |
+ MAXIO_MAE0621A_CLKOUT_125M);
+ if (ret <= 0)
+ return ret;
+
+ return genphy_soft_reset(phydev);
+}
+
+static struct phy_driver maxio_drivers[] = {
+ {
+ PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q2C_PHY_ID),
+ .name = "Maxio MAE0621A-Q2C",
+ .probe = maxio_mae0621a_probe,
+ .config_init = maxio_mae0621a_config_init,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .read_page = maxio_read_page,
+ .write_page = maxio_write_page,
+ },
+ {
+ PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q3C_PHY_ID),
+ .name = "Maxio MAE0621A-Q3C",
+ .probe = maxio_mae0621a_probe,
+ .config_init = maxio_mae0621a_config_init,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .read_page = maxio_read_page,
+ .write_page = maxio_write_page,
+ },
+};
+module_phy_driver(maxio_drivers);
+
+static const struct mdio_device_id __maybe_unused maxio_tbl[] = {
+ { PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q2C_PHY_ID) },
+ { PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q3C_PHY_ID) },
+ { }
+};
+MODULE_DEVICE_TABLE(mdio, maxio_tbl);
+
+MODULE_AUTHOR("Liu Changjie <liucj1228@outlook.com>");
+MODULE_DESCRIPTION("Maxio Ethernet PHY driver");
+MODULE_LICENSE("GPL");
|
| 3/2 | 2026/09/28 08:58 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5543 output: 19 thoughts: 382 Thoughts: **Evaluating This Patch Commit** Okay, here's the deal. I've got this patch commit in front of me, and my initial goal is to determine if it's "WorthFuzzing." Let's break it down. Right now, it looks like this commit is introducing the `drivers/net/phy/maxio.c` driver, along with corresponding Kconfig, Makefile, and devicetree bindings for the Maxio MAE0621A Ethernet PHY. Alright, so I need to check against the "WorthFuzzing" rules, specifically the *negative* criteria. Let's see... the rules say I should return `WorthFuzzing=false` if the code falls strictly into one or more of several categories. One of them that immediately jumps out is "Structurally unreachable hardware." This specifically calls out things like vendor-specific PCIe switches or drivers requiring physical ASICs or PCIe cards that aren't emulated in standard QEMU. That's a good starting point. Now, my key question: **is an Ethernet PHY driver, like this one for the Maxio MAE0621A, reachable and testable within a syzkaller or standard virtualized environment like GCE or QEMU?** I need to understand how these PHY drivers work. Does the MDIO PHY device for this Maxio hardware stand a chance of being probed in my usual QEMU/syzkaller setup? I need to know if MDIO or a `phy_device` is instantiable from userspace or virtual buses. Can I make this work? This leads me to a fundamental question: **does syzkaller have any MDIO emulation? Can I create an MDIO bus virtually?** Or am I dealing with fundamentally structurally unreachable hardware that's not worth my time? I know that I need to search for prior knowledge, search the codebase, and see what the community has to say about this. That's the next step! |
| 4/2 | 2026/09/28 08:59 | tool | grepper |
0mArgs:{
"Expression": "phy_driver_register"
}Results: {
"Output": "drivers/gpu/drm/msm/dsi/dsi.c=219=void __init msm_dsi_register(void)\n--\ndrivers/gpu/drm/msm/dsi/dsi.c-221-\tDBG(\"\");\ndrivers/gpu/drm/msm/dsi/dsi.c:222:\tmsm_dsi_phy_driver_register();\ndrivers/gpu/drm/msm/dsi/dsi.c-223-\tplatform_driver_register(\u0026dsi_driver);\n--\ndrivers/gpu/drm/msm/dsi/dsi.h=136=struct msm_dsi_phy_clk_request {\n--\ndrivers/gpu/drm/msm/dsi/dsi.h-140-\ndrivers/gpu/drm/msm/dsi/dsi.h:141:void msm_dsi_phy_driver_register(void);\ndrivers/gpu/drm/msm/dsi/dsi.h-142-void msm_dsi_phy_driver_unregister(void);\n--\ndrivers/gpu/drm/msm/dsi/phy/dsi_phy.c=718=static struct platform_driver dsi_phy_platform_driver = {\n--\ndrivers/gpu/drm/msm/dsi/phy/dsi_phy.c-726-\ndrivers/gpu/drm/msm/dsi/phy/dsi_phy.c:727:void __init msm_dsi_phy_driver_register(void)\ndrivers/gpu/drm/msm/dsi/phy/dsi_phy.c-728-{\n--\ndrivers/gpu/drm/msm/hdmi/hdmi.c=474=void __init msm_hdmi_register(void)\ndrivers/gpu/drm/msm/hdmi/hdmi.c-475-{\ndrivers/gpu/drm/msm/hdmi/hdmi.c:476:\tmsm_hdmi_phy_driver_register();\ndrivers/gpu/drm/msm/hdmi/hdmi.c-477-\tplatform_driver_register(\u0026msm_hdmi_driver);\n--\ndrivers/gpu/drm/msm/hdmi/hdmi.h=190=void msm_hdmi_phy_powerdown(struct hdmi_phy *phy);\ndrivers/gpu/drm/msm/hdmi/hdmi.h:191:void __init msm_hdmi_phy_driver_register(void);\ndrivers/gpu/drm/msm/hdmi/hdmi.h-192-void __exit msm_hdmi_phy_driver_unregister(void);\n--\ndrivers/gpu/drm/msm/hdmi/hdmi_phy.c=209=static struct platform_driver msm_hdmi_phy_platform_driver = {\n--\ndrivers/gpu/drm/msm/hdmi/hdmi_phy.c-217-\ndrivers/gpu/drm/msm/hdmi/hdmi_phy.c:218:void __init msm_hdmi_phy_driver_register(void)\ndrivers/gpu/drm/msm/hdmi/hdmi_phy.c-219-{\n--\ndrivers/net/phy/phy_device.c=3829=static int phy_remove(struct device *dev)\n--\ndrivers/net/phy/phy_device.c-3859-/**\ndrivers/net/phy/phy_device.c:3860: * phy_driver_register - register a phy_driver with the PHY layer\ndrivers/net/phy/phy_device.c-3861- * @new_driver: new phy_driver to register\n--\ndrivers/net/phy/phy_device.c-3863- */\ndrivers/net/phy/phy_device.c:3864:static int phy_driver_register(struct phy_driver *new_driver,\ndrivers/net/phy/phy_device.c-3865-\t\t\t struct module *owner)\n--\ndrivers/net/phy/phy_device.c=3914=int phy_drivers_register(struct phy_driver *new_driver, int n,\n--\ndrivers/net/phy/phy_device.c-3919-\tfor (i = 0; i \u003c n; i++) {\ndrivers/net/phy/phy_device.c:3920:\t\tret = phy_driver_register(new_driver + i, owner);\ndrivers/net/phy/phy_device.c-3921-\t\tif (ret) {\n--\ndrivers/net/phy/phy_device.c=3978=static int __init phy_init(void)\n--\ndrivers/net/phy/phy_device.c-4000-\ndrivers/net/phy/phy_device.c:4001:\trc = phy_driver_register(\u0026genphy_c45_driver, THIS_MODULE);\ndrivers/net/phy/phy_device.c-4002-\tif (rc)\n--\ndrivers/net/phy/phy_device.c-4004-\ndrivers/net/phy/phy_device.c:4005:\trc = phy_driver_register(\u0026genphy_driver, THIS_MODULE);\ndrivers/net/phy/phy_device.c-4006-\tif (rc)\n"
} |
| 5/2 | 2026/09/28 08:59 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7690 output: 19 thoughts: 198 Thoughts: **Investigating MDIO Bus and PHY Device Creation** Okay, so I'm trying to figure out the exact mechanics of how MDIO bus devices are brought into existence, and specifically, how PHY devices are matched up. I see that the `maxio_drivers` module registers two PHY drivers: `MAXIO_MAE0621A_Q2C_PHY_ID` and `MAXIO_MAE0621A_Q3C_PHY_ID`. I recognize these; they're essentially physical Ethernet PHY chips – the Maxio MAE0621A – connected to the MDIO bus of a MAC. The question then becomes: can I actually simulate this setup in a standard QEMU environment or even on Google Compute Engine? My hunch is leaning towards a need for a virtual MDIO bus. Is there a way to instantiate MDIO devices using something like sysfs or Netlink? I need to check. To confirm I'm on the right track, I should probably grep for functions like `mdiobus_register` or `phy_device_create` in my codebase and see where they're being used. That should give me a clearer picture of how these virtual MDIO buses and PHY devices are implemented. |
| 6/2 | 2026/09/28 08:59 | tool | grepper |
0mArgs:{
"Expression": "mdiobus_register"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1138 lines.\nUse more precise expression if possible.\n\nDocumentation/driver-api/driver-model/devres.rst=349=MDIO\n--\nDocumentation/driver-api/driver-model/devres.rst-351- devm_mdiobus_alloc_size()\nDocumentation/driver-api/driver-model/devres.rst:352: devm_mdiobus_register()\nDocumentation/driver-api/driver-model/devres.rst:353: devm_of_mdiobus_register()\nDocumentation/driver-api/driver-model/devres.rst-354-\n--\nDocumentation/firmware-guide/acpi/dsd/motorcomm-yt8xxx-phy.rst=12=device (the same objects that are registered via\nDocumentation/firmware-guide/acpi/dsd/motorcomm-yt8xxx-phy.rst:13:``fwnode_mdiobus_register_phy()``). MAC-side connection properties such as\nDocumentation/firmware-guide/acpi/dsd/motorcomm-yt8xxx-phy.rst-14-``phy-handle`` and ``phy-mode`` are documented in [acpi-mdio-phy]_.\n--\nDocumentation/firmware-guide/acpi/dsd/phy.rst=7=The PHYs on an MDIO bus [phy] are probed and registered using\nDocumentation/firmware-guide/acpi/dsd/phy.rst:8:fwnode_mdiobus_register_phy().\nDocumentation/firmware-guide/acpi/dsd/phy.rst-9-\n--\nDocumentation/networking/phy.rst=40=registered as a distinct device.\n--\nDocumentation/networking/phy.rst-56- driver needs, setup the mii_bus structure, and register with the PAL using\nDocumentation/networking/phy.rst:57: mdiobus_register. Similarly, there's a remove function to undo all of\nDocumentation/networking/phy.rst-58- that (use mdiobus_unregister).\n--\narch/powerpc/platforms/82xx/ep8248e.c=109=static int ep8248e_mdio_probe(struct platform_device *ofdev)\n--\narch/powerpc/platforms/82xx/ep8248e.c-132-\narch/powerpc/platforms/82xx/ep8248e.c:133:\tret = of_mdiobus_register(bus, ofdev-\u003edev.of_node);\narch/powerpc/platforms/82xx/ep8248e.c-134-\tif (ret)\n--\narch/powerpc/platforms/pasemi/gpio_mdio.c=207=static int gpio_mdio_probe(struct platform_device *ofdev)\n--\narch/powerpc/platforms/pasemi/gpio_mdio.c-243-\narch/powerpc/platforms/pasemi/gpio_mdio.c:244:\terr = of_mdiobus_register(new_bus, np);\narch/powerpc/platforms/pasemi/gpio_mdio.c-245-\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=2321=int ksz_mdio_register(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/ksz_common.c-2392-\ndrivers/net/dsa/microchip/ksz_common.c:2393:\tret = devm_of_mdiobus_register(ds-\u003edev, bus, mdio_np);\ndrivers/net/dsa/microchip/ksz_common.c-2394-\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/mt7530.c=2409=mt7530_setup_mdio(struct mt7530_priv *priv)\n--\ndrivers/net/dsa/mt7530.c-2444-\ndrivers/net/dsa/mt7530.c:2445:\tret = devm_of_mdiobus_register(dev, bus, mnp);\ndrivers/net/dsa/mt7530.c-2446-\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=3834=static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3887-\ndrivers/net/dsa/mv88e6xxx/chip.c:3888:\terr = of_mdiobus_register(bus, np);\ndrivers/net/dsa/mv88e6xxx/chip.c-3889-\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=74=int rtl83xx_setup_user_mdio(struct dsa_switch *ds)\n--\ndrivers/net/dsa/realtek/rtl83xx.c-99-\ndrivers/net/dsa/realtek/rtl83xx.c:100:\tret = devm_of_mdiobus_register(priv-\u003edev, bus, mdio_np);\ndrivers/net/dsa/realtek/rtl83xx.c-101-\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/dsa/yt921x.c=595=yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)\n--\ndrivers/net/dsa/yt921x.c-612-\ndrivers/net/dsa/yt921x.c:613:\tres = devm_of_mdiobus_register(dev, mbus, mnp);\ndrivers/net/dsa/yt921x.c-614-\tif (res)\n--\ndrivers/net/dsa/yt921x.c=726=yt921x_mbus_ext_init(struct yt921x_priv *priv, struct device_node *mnp)\n--\ndrivers/net/dsa/yt921x.c-743-\ndrivers/net/dsa/yt921x.c:744:\tres = devm_of_mdiobus_register(dev, mbus, mnp);\ndrivers/net/dsa/yt921x.c-745-\tif (res)\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=266=static int enetc_mdio_probe(struct enetc_pf *pf, struct device_node *np)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-292-\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c:293:\terr = of_mdiobus_register(bus, np);\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-294-\tif (err)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c=308=static int enetc_imdio_create(struct enetc_pf *pf)\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-342-\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c:343:\terr = mdiobus_register(bus);\ndrivers/net/ethernet/freescale/enetc/enetc_pf_common.c-344-\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-\n\n"
} |
| 7/2 | 2026/09/28 08:59 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21039 output: 28 thoughts: 488 Thoughts: **Analyzing the Fuzzing Potential of the Maxio Ethernet PHY Driver** Okay, I'm looking at `drivers/net/phy/maxio.c`, the driver for the Maxio MAE0621A Ethernet PHY. My immediate thought is, can this be fuzzed or probed without the actual physical hardware? I need to figure out the constraints. Let's see… The instructions list "Structurally unreachable hardware" as an issue. This includes vendor-specific PCIe switches and drivers that require specific hardware not emulated in standard QEMU. But, is this the case for PHY drivers? Then, there's the issue of "Unreachable execution paths" - teardown callbacks and architecture-specific code. That makes sense, but are they relevant to a PHY driver? Now, how are PHY drivers probed in Linux, exactly? Ah, the driver registers with the MDIO bus using `module_phy_driver(maxio_drivers);`. The MDIO bus, instantiated by a MAC driver or MDIO controller, scans addresses 0-31, reading the `MII_PHYSID1` and `MII_PHYSID2` registers. If the PHY ID matches `MAXIO_MAE0621A_Q2C_PHY_ID` or `MAXIO_MAE0621A_Q3C_PHY_ID`, or if the devicetree has a specific compatible string, the driver's probe routine gets called. Wait a second… Can Syzkaller do any of this? Can it instantiate MDIO devices, emulate an MDIO bus, or even a Maxio PHY? I need to know if I can create an MDIO device from userspace. I'll need to grep through Syzkaller and the kernel for "mdio" and "phy". Better yet, let's search within the kernel to see if any virtual device actually *creates* an MDIO bus. That would be the jackpot! |
| 8/2 | 2026/09/28 08:59 | tool | grepper |
0mArgs:{
"Expression": "mdio-sample|mdio-gpio|mdio_bus"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 2647 lines.\nUse more precise expression if possible.\n\nDocumentation/ABI/testing/sysfs-bus-mdio:1:What: /sys/bus/mdio_bus/devices/.../statistics/\nDocumentation/ABI/testing/sysfs-bus-mdio:2:What: /sys/class/mdio_bus/.../statistics/\nDocumentation/ABI/testing/sysfs-bus-mdio-3-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=6=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-9-\nDocumentation/ABI/testing/sysfs-bus-mdio:10:What: /sys/bus/mdio_bus/devices/.../statistics/transfers\nDocumentation/ABI/testing/sysfs-bus-mdio:11:What: /sys/class/mdio_bus/.../transfers\nDocumentation/ABI/testing/sysfs-bus-mdio-12-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=15=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-17-\nDocumentation/ABI/testing/sysfs-bus-mdio:18:What: /sys/bus/mdio_bus/devices/.../statistics/errors\nDocumentation/ABI/testing/sysfs-bus-mdio:19:What: /sys/class/mdio_bus/.../statistics/errors\nDocumentation/ABI/testing/sysfs-bus-mdio-20-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=23=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-25-\nDocumentation/ABI/testing/sysfs-bus-mdio:26:What: /sys/bus/mdio_bus/devices/.../statistics/writes\nDocumentation/ABI/testing/sysfs-bus-mdio:27:What: /sys/class/mdio_bus/.../statistics/writes\nDocumentation/ABI/testing/sysfs-bus-mdio-28-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=31=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-33-\nDocumentation/ABI/testing/sysfs-bus-mdio:34:What: /sys/bus/mdio_bus/devices/.../statistics/reads\nDocumentation/ABI/testing/sysfs-bus-mdio:35:What: /sys/class/mdio_bus/.../statistics/reads\nDocumentation/ABI/testing/sysfs-bus-mdio-36-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=39=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-41-\nDocumentation/ABI/testing/sysfs-bus-mdio:42:What: /sys/bus/mdio_bus/devices/.../statistics/transfers_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio:43:What: /sys/class/mdio_bus/.../statistics/transfers_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio-44-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=47=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-49-\nDocumentation/ABI/testing/sysfs-bus-mdio:50:What: /sys/bus/mdio_bus/devices/.../statistics/errors_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio:51:What: /sys/class/mdio_bus/.../statistics/errors_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio-52-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=55=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-57-\nDocumentation/ABI/testing/sysfs-bus-mdio:58:What: /sys/bus/mdio_bus/devices/.../statistics/writes_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio:59:What: /sys/class/mdio_bus/.../statistics/writes_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio-60-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-bus-mdio=63=Description:\n--\nDocumentation/ABI/testing/sysfs-bus-mdio-65-\nDocumentation/ABI/testing/sysfs-bus-mdio:66:What: /sys/bus/mdio_bus/devices/.../statistics/reads_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio:67:What: /sys/class/mdio_bus/.../statistics/reads_\u003caddr\u003e\nDocumentation/ABI/testing/sysfs-bus-mdio-68-Date: January 2020\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev:1:What:\t\t/sys/class/mdio_bus/\u003cbus\u003e/\u003cdevice\u003e/attached_dev\nDocumentation/ABI/testing/sysfs-class-net-phydev-2-Date:\t\tMay 2017\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev=5=Description:\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev-8-\nDocumentation/ABI/testing/sysfs-class-net-phydev:9:What:\t\t/sys/class/mdio_bus/\u003cbus\u003e/\u003cdevice\u003e/phy_has_fixups\nDocumentation/ABI/testing/sysfs-class-net-phydev-10-Date:\t\tFebruary 2014\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev=13=Description:\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev-18-\nDocumentation/ABI/testing/sysfs-class-net-phydev:19:What:\t\t/sys/class/mdio_bus/\u003cbus\u003e/\u003cdevice\u003e/phy_id\nDocumentation/ABI/testing/sysfs-class-net-phydev-20-Date:\t\tNovember 2012\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev=23=Description:\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev-28-\nDocumentation/ABI/testing/sysfs-class-net-phydev:29:What:\t\t/sys/class/mdio_bus/\u003cbus\u003e/\u003cdevice\u003e/c45_phy_ids/mmd\u003cn\u003e_device_id\nDocumentation/ABI/testing/sysfs-class-net-phydev-30-Date:\t\tJune 2025\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev=33=Description:\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev-38-\nDocumentation/ABI/testing/sysfs-class-net-phydev:39:What:\t\t/sys/class/mdio_bus/\u003cbus\u003e/\u003cdevice\u003e/phy_interface\nDocumentation/ABI/testing/sysfs-class-net-phydev-40-Date:\t\tFebruary 2014\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev=43=Description:\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev-55-\nDocumentation/ABI/testing/sysfs-class-net-phydev:56:What:\t\t/sys/class/mdio_bus/\u003cbus\u003e/\u003cdevice\u003e/phy_standalone\nDocumentation/ABI/testing/sysfs-class-net-phydev-57-Date:\t\tMay 2019\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev=60=Description:\n--\nDocumentation/ABI/testing/sysfs-class-net-phydev-64-\nDocumentation/ABI/testing/sysfs-class-net-phydev:65:What:\t\t/sys/class/mdio_bus/\u003cbus\u003e/\u003cdevice\u003e/phy_dev_flags\nDocumentation/ABI/testing/sysfs-class-net-phydev-66-Date:\t\tMarch 2021\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml=37=properties:\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-53-\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml:54: mdio-gpios:\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-55- description: GPIO line for the MDIO data line.\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml=115=then:\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-119- - mdc-gpios\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml:120: - mdio-gpios\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-121- - mdio\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-124- mdc-gpios: false\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml:125: mdio-gpios: false\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-126- mdio: false\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml=128=else:\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-130- - mdc-gpios\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml:131: - mdio-gpios\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-132- - mdio\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml=134=required:\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-137- # - mdc-gpios\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml:138: # - mdio-gpios\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-139- # - reset-gpios\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml=144=examples:\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-153- mdc-gpios = \u003c\u0026gpio0 21 GPIO_ACTIVE_HIGH\u003e;\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml:154: mdio-gpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e;\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-155- reset-gpios = \u003c\u0026gpio0 14 GPIO_ACTIVE_LOW\u003e;\n--\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-246- mdc-gpios = \u003c\u0026gpio1 16 GPIO_ACTIVE_HIGH\u003e;\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml:247: mdio-gpios = \u003c\u0026gpio1 17 GPIO_ACTIVE_HIGH\u003e;\nDocumentation/devicetree/bindings/net/dsa/realtek.yaml-248- reset-gpios = \u003c\u0026gpio5 0 GPIO_ACTIVE_LOW\u003e;\n--\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-3----\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml:4:$id: http://devicetree.org/schemas/net/mdio-gpio.yaml#\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-5-$schema: http://devicetree.org/meta-schemas/core.yaml#\n--\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml=17=properties:\n--\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-19- enum:\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml:20: - virtual,mdio-gpio\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-21- - microchip,mdio-smi0\n--\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml=41=examples:\n--\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-43- aliases {\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml:44: mdio-gpio0 = \u0026mdio0;\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-45- };\n--\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-47- mdio0: mdio {\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml:48: compatible = \"virtual,mdio-gpio\";\nDocumentation/devicetree/bindings/net/mdio-gpio.yaml-49- #address-cells = \u003c1\u003e;\n--\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst=352=finds::\n--\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst-361-\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst:362: struct stmmac_mdio_bus_data *mdio_bus_data;\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst-363-\n--\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst=502=For MDIO bus data, we have:\n--\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst-505-\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst:506: struct stmmac_mdio_bus_data {\nDocumentation/networking/device_drivers/ethernet/stmicro/stmmac.rst-507-\n--\nDocumentation/networking/dsa/dsa.rst=432=DSA currently leverages the following subsystems:\nDocumentation/networking/dsa/dsa.rst-433-\nDocumentation/networking/dsa/dsa.rst:434:- MDIO/PHY library: ``drivers/net/phy/phy.c``, ``mdio_bus.c``\nDocumentation/networking/dsa/dsa.rst-435-- Switchdev:``net/switchdev/*``\n--\nDocumentation/networking/kapi.rst=110=PHY Support\n--\nDocumentation/networking/kapi.rst-133-\nDocumentation/networking/kapi.rst:134:.. kernel-doc:: drivers/net/phy/mdio_bus.c\nDocumentation/networking/kapi.rst-135- :export:\nDocumentation/networking/kapi.rst-136-\nDocumentation/networking/kapi.rst:137:.. kernel-doc:: drivers/net/phy/mdio_bus.c\nDocumentation/networking/kapi.rst-138- :internal:\n--\narch/arm/boot/dts/broadcom/bcm2711.dtsi=938=\t\tpin-irq {\n--\narch/arm/boot/dts/broadcom/bcm2711.dtsi-942-\t};\narch/arm/boot/dts/broadcom/bcm2711.dtsi:943:\trgmii_mdio_gpio28: rgmii-mdio-gpio28 {\narch/arm/boot/dts/broadcom/bcm2711.dtsi-944-\t\tpins-mdio {\n--\narch/arm/boot/dts/broadcom/bcm2711.dtsi-949-\t};\narch/arm/boot/dts/broadcom/bcm2711.dtsi:950:\trgmii_mdio_gpio37: rgmii-mdio-gpio37 {\narch/arm/boot/dts/broadcom/bcm2711.dtsi-951-\t\tpins-mdio {\n--\narch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts=20=\tswitch {\n--\narch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts-22-\t\tmdc-gpios = \u003c\u0026chipcommon 6 GPIO_ACTIVE_HIGH\u003e;\narch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts:23:\t\tmdio-gpios = \u003c\u0026chipcommon 7 GPIO_ACTIVE_HIGH\u003e;\narch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts-24-\t\treset-gpios = \u003c\u0026chipcommon 10 GPIO_ACTIVE_LOW\u003e;\n--\narch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts=190=\tethernet-switch {\n--\narch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts-193-\t\tmdc-gpios = \u003c\u0026gpio0 21 GPIO_ACTIVE_HIGH\u003e;\narch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts:194:\t\tmdio-gpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e;\narch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts-195-\t\treset-gpios = \u003c\u0026gpio0 14 GPIO_ACTIVE_LOW\u003e;\n--\narch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts=24=\taliases {\narch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts:25:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts-26-\t};\n--\narch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts=152=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts:153:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts-154-\t\t/* Uses MDC and MDIO */\n--\narch/arm/boot/dts/gemini/gemini-nas4210b.dts=67=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-nas4210b.dts:68:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-nas4210b.dts-69-\t\tgpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e, /* MDC */\n--\narch/arm/boot/dts/gemini/gemini-nas4220b.dts=66=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-nas4220b.dts:67:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-nas4220b.dts-68-\t\tgpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e, /* MDC */\n--\narch/arm/boot/dts/gemini/gemini-ns2502.dts=23=\taliases {\narch/arm/boot/dts/gemini/gemini-ns2502.dts:24:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm/boot/dts/gemini/gemini-ns2502.dts-25-\t};\n--\narch/arm/boot/dts/gemini/gemini-ns2502.dts=32=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-ns2502.dts:33:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-ns2502.dts-34-\t\tgpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e, /* MDC */\n--\narch/arm/boot/dts/gemini/gemini-rut1xx.dts=59=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-rut1xx.dts:60:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-rut1xx.dts-61-\t\tgpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e, /* MDC */\n--\narch/arm/boot/dts/gemini/gemini-sl93512r.dts=71=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-sl93512r.dts:72:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-sl93512r.dts-73-\t\t/* Uses MDC and MDIO */\n--\narch/arm/boot/dts/gemini/gemini-sq201.dts=56=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-sq201.dts:57:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-sq201.dts-58-\t\t/* Uses MDC and MDIO */\n--\narch/arm/boot/dts/gemini/gemini-ssi1328.dts=23=\taliases {\narch/arm/boot/dts/gemini/gemini-ssi1328.dts:24:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm/boot/dts/gemini/gemini-ssi1328.dts-25-\t};\n--\narch/arm/boot/dts/gemini/gemini-ssi1328.dts=32=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-ssi1328.dts:33:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-ssi1328.dts-34-\t\tgpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e, /* MDC */\n--\narch/arm/boot/dts/gemini/gemini-verbatim-s08v1901-d1.dts=57=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-verbatim-s08v1901-d1.dts:58:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-verbatim-s08v1901-d1.dts-59-\t\t/* Uses MDC and MDIO */\n--\narch/arm/boot/dts/gemini/gemini-wbd111.dts=71=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-wbd111.dts:72:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-wbd111.dts-73-\t\tgpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e, /* MDC */\n--\narch/arm/boot/dts/gemini/gemini-wbd222.dts=70=\tmdio0: mdio {\narch/arm/boot/dts/gemini/gemini-wbd222.dts:71:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/gemini/gemini-wbd222.dts-72-\t\tgpios = \u003c\u0026gpio0 22 GPIO_ACTIVE_HIGH\u003e, /* MDC */\n--\narch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts=24=\taliases {\narch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts:25:\t\tmdio-gpio0 = \u0026mdio_gpio;\narch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts-26-\t\trtc0 = \u0026ds1341;\n--\narch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts=163=\tmdio_gpio: mdio {\narch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts:164:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/nxp/imx/imx51-zii-rdu1.dts-165-\t\tpinctrl-names = \"default\";\n--\narch/arm/boot/dts/nxp/imx/imx51-zii-scu2-mezz.dts=25=\taliases {\narch/arm/boot/dts/nxp/imx/imx51-zii-scu2-mezz.dts:26:\t\tmdio-gpio0 = \u0026mdio_gpio;\narch/arm/boot/dts/nxp/imx/imx51-zii-scu2-mezz.dts-27-\t};\n--\narch/arm/boot/dts/nxp/imx/imx51-zii-scu2-mezz.dts=40=\tmdio_gpio: mdio {\narch/arm/boot/dts/nxp/imx/imx51-zii-scu2-mezz.dts:41:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/nxp/imx/imx51-zii-scu2-mezz.dts-42-\t\tpinctrl-names = \"default\";\n--\narch/arm/boot/dts/nxp/imx/imx6q-bx50v3.dtsi=93=\taliases {\narch/arm/boot/dts/nxp/imx/imx6q-bx50v3.dtsi:94:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm/boot/dts/nxp/imx/imx6q-bx50v3.dtsi-95-\t};\n--\narch/arm/boot/dts/nxp/imx/imx6q-bx50v3.dtsi=97=\tmdio0: mdio {\narch/arm/boot/dts/nxp/imx/imx6q-bx50v3.dtsi:98:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/nxp/imx/imx6q-bx50v3.dtsi-99-\t\tgpios = \u003c\u0026gpio2 5 GPIO_ACTIVE_HIGH\u003e, /* mdc */\n--\narch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi=13=\taliases {\n--\narch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi-18-\t\tethernet2 = \u0026lan2;\narch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi:19:\t\tmdio-gpio0 = \u0026mdio;\narch/arm/boot/dts/nxp/imx/imx6qdl-skov-cpu.dtsi-20-\t\tnand = \u0026gpmi;\n--\narch/arm/boot/dts/nxp/imx/imx6qdl-zii-rdu2.dtsi=14=\taliases {\narch/arm/boot/dts/nxp/imx/imx6qdl-zii-rdu2.dtsi:15:\t\tmdio-gpio0 = \u0026mdio1;\narch/arm/boot/dts/nxp/imx/imx6qdl-zii-rdu2.dtsi-16-\t\trtc0 = \u0026ds1341;\n--\narch/arm/boot/dts/nxp/imx/imx6qdl-zii-rdu2.dtsi=19=\tmdio1: mdio {\narch/arm/boot/dts/nxp/imx/imx6qdl-zii-rdu2.dtsi:20:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/nxp/imx/imx6qdl-zii-rdu2.dtsi-21-\t\t#address-cells = \u003c1\u003e;\n--\narch/arm/boot/dts/nxp/imx/imx6qp-prtwd3.dts=53=\tmdio {\narch/arm/boot/dts/nxp/imx/imx6qp-prtwd3.dts:54:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/nxp/imx/imx6qp-prtwd3.dts-55-\t\tpinctrl-names = \"default\";\n--\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts=10=\taliases {\n--\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts-13-\t\tethernet1 = \u0026gmac3;\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts:14:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts:15:\t\tmdio-gpio1 = \u0026mdio1;\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts-16-\t};\n--\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts=55=\tmdio0: mdio-0 {\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts-56-\t\tstatus = \"okay\";\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts:57:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts-58-\t\tgpios = \u003c\u0026qcom_pinmux 1 GPIO_ACTIVE_HIGH\u003e,\n--\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts=180=\tmdio1: mdio-1 {\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts-181-\t\tstatus = \"okay\";\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts:182:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts-183-\t\tgpios = \u003c\u0026qcom_pinmux 11 GPIO_ACTIVE_HIGH\u003e,\n--\narch/arm/boot/dts/st/stm32mp133c-prihmb.dts=16=\taliases {\narch/arm/boot/dts/st/stm32mp133c-prihmb.dts-17-\t\tethernet0 = \u0026ethernet1;\narch/arm/boot/dts/st/stm32mp133c-prihmb.dts:18:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm/boot/dts/st/stm32mp133c-prihmb.dts-19-\t\tmmc0 = \u0026sdmmc1;\n--\narch/arm/boot/dts/st/stm32mp133c-prihmb.dts=118=\tmdio0: mdio {\narch/arm/boot/dts/st/stm32mp133c-prihmb.dts:119:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/st/stm32mp133c-prihmb.dts-120-\t\t#address-cells = \u003c1\u003e;\n--\narch/arm/boot/dts/st/stm32mp151a-prtt1c.dts=38=\tmdio0: mdio {\narch/arm/boot/dts/st/stm32mp151a-prtt1c.dts:39:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/st/stm32mp151a-prtt1c.dts-40-\t\t#address-cells = \u003c1\u003e;\n--\narch/arm/boot/dts/st/stm32mp151a-prtt1l.dtsi=16=\taliases {\narch/arm/boot/dts/st/stm32mp151a-prtt1l.dtsi-17-\t\tethernet0 = \u0026ethernet0;\narch/arm/boot/dts/st/stm32mp151a-prtt1l.dtsi:18:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm/boot/dts/st/stm32mp151a-prtt1l.dtsi-19-\t\tserial0 = \u0026uart4;\n--\narch/arm/boot/dts/st/stm32mp151a-prtt1l.dtsi=44=\tmdio0: mdio {\narch/arm/boot/dts/st/stm32mp151a-prtt1l.dtsi:45:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm/boot/dts/st/stm32mp151a-prtt1l.dtsi-46-\t\t#address-cells = \u003c1\u003e;\n--\narch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi=9=\taliases {\narch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi:10:\t\tmdio-gpio0 = \u0026mdio0;\narch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi-11-\t\trtc0 = \u0026ds1341;\n--\narch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi=18=\tmdio0: mdio {\narch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi:19:\t\tcompatible = \"virtual,mdio-gpio\";\narch/arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi-20-\t\tpinctrl-names = \"default\";\n--\narch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts=108=\tgmac1: mac@1 {\n--\narch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts-115-\narch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts:116:\u0026mdio_bus {\narch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts-117-\tphy15: ethernet-phy@f {\n--\narch/arm64/boot/dts/mediatek/mt7981b.dtsi=431=\t\teth: ethernet@15100000 {\n--\narch/arm64/boot/dts/mediatek/mt7981b.dtsi-476-\narch/arm64/boot/dts/mediatek/mt7981b.dtsi:477:\t\t\tmdio_bus: mdio-bus {\narch/arm64/boot/dts/mediatek/mt7981b.dtsi-478-\t\t\t\t#address-cells = \u003c1\u003e;\n--\narch/arm64/boot/dts/mediatek/mt7988a.dtsi=988=\t\t\tgmac2: mac@2 {\n--\narch/arm64/boot/dts/mediatek/mt7988a.dtsi-993-\narch/arm64/boot/dts/mediatek/mt7988a.dtsi:994:\t\t\tmdio_bus: mdio-bus {\narch/arm64/boot/dts/mediatek/mt7988a.dtsi-995-\t\t\t\t#address-cells = \u003c1\u003e;\n--\ndrivers/net/dsa/microchip/ksz9477.c=321=static int ksz9477_pcs_create(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/ksz9477.c-332-\ndrivers/net/dsa/microchip/ksz9477.c:333:\tbus-\u003ename = \"ksz_pcs_mdio_bus\";\ndrivers/net/dsa/microchip/ksz9477.c-334-\tsnprintf(bus-\u003eid, MII_BUS_ID_SIZE, \"%s-pcs\",\n--\ndrivers/net/dsa/microchip/ksz_common.c=2125=int ksz_parent_mdio_read(struct mii_bus *bus, int addr, int regnum)\n--\ndrivers/net/dsa/microchip/ksz_common.c-2128-\ndrivers/net/dsa/microchip/ksz_common.c:2129:\treturn mdiobus_read_nested(dev-\u003eparent_mdio_bus, addr, regnum);\ndrivers/net/dsa/microchip/ksz_common.c-2130-}\n--\ndrivers/net/dsa/microchip/ksz_common.c=2145=int ksz_parent_mdio_write(struct mii_bus *bus, int addr, int regnum, u16 val)\n--\ndrivers/net/dsa/microchip/ksz_common.c-2148-\ndrivers/net/dsa/microchip/ksz_common.c:2149:\treturn mdiobus_write_nested(dev-\u003eparent_mdio_bus, addr, regnum, val);\ndrivers/net/dsa/microchip/ksz_common.c-2150-}\n--\ndrivers/net/dsa/microchip/ksz_common.c=2321=int ksz_mdio_register(struct ksz_device *dev)\n--\ndrivers/net/dsa/microchip/ksz_common.c-2347-\ndrivers/net/dsa/microchip/ksz_common.c:2348:\t\tdev-\u003eparent_mdio_bus = parent_bus;\ndrivers/net/dsa/microchip/ksz_common.c-2349-\t}\n--\ndrivers/net/dsa/microchip/ksz_common.h=206=struct ksz_device {\n--\ndrivers/net/dsa/microchip/ksz_common.h-258-\t/**\ndrivers/net/dsa/microchip/ksz_common.h:259:\t * @parent_mdio_bus: Pointer to the external MDIO bus controller.\ndrivers/net/dsa/microchip/ksz_common.h-260-\t *\n--\ndrivers/net/dsa/microchip/ksz_common.h-265-\t */\ndrivers/net/dsa/microchip/ksz_common.h:266:\tstruct mii_bus *parent_mdio_bus;\ndrivers/net/dsa/microchip/ksz_common.h-267-\n--\ndrivers/net/dsa/microchip/lan937x_main.c=143=static int lan937x_create_phy_addr_map(struct ksz_device *dev, bool side_mdio)\n--\ndrivers/net/dsa/microchip/lan937x_main.c-210-/**\ndrivers/net/dsa/microchip/lan937x_main.c:211: * lan937x_mdio_bus_preinit - Pre-initialize MDIO bus for accessing PHYs.\ndrivers/net/dsa/microchip/lan937x_main.c-212- * @dev: Pointer to device structure.\n--\ndrivers/net/dsa/microchip/lan937x_main.c-226- */\ndrivers/net/dsa/microchip/lan937x_main.c:227:static int lan937x_mdio_bus_preinit(struct ksz_device *dev, bool side_mdio)\ndrivers/net/dsa/microchip/lan937x_main.c-228-{\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-711-\ndrivers/net/dsa/microchip/lan937x_main.c:712:\t\tdev-\u003eparent_mdio_bus = parent_bus;\ndrivers/net/dsa/microchip/lan937x_main.c-713-\t}\n--\ndrivers/net/dsa/microchip/lan937x_main.c-720-\ndrivers/net/dsa/microchip/lan937x_main.c:721:\tret = lan937x_mdio_bus_preinit(dev, !!parent_bus);\ndrivers/net/dsa/microchip/lan937x_main.c-722-\tif (ret)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=126=int mv88e6xxx_wait_bit(struct mv88e6xxx_chip *chip, int addr, int reg,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-132-\ndrivers/net/dsa/mv88e6xxx/chip.c:133:struct mii_bus *mv88e6xxx_default_mdio_bus(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-134-{\ndrivers/net/dsa/mv88e6xxx/chip.c:135:\tstruct mv88e6xxx_mdio_bus *mdio_bus;\ndrivers/net/dsa/mv88e6xxx/chip.c-136-\ndrivers/net/dsa/mv88e6xxx/chip.c:137:\tmdio_bus = list_first_entry_or_null(\u0026chip-\u003emdios,\ndrivers/net/dsa/mv88e6xxx/chip.c:138:\t\t\t\t\t struct mv88e6xxx_mdio_bus, list);\ndrivers/net/dsa/mv88e6xxx/chip.c:139:\tif (!mdio_bus)\ndrivers/net/dsa/mv88e6xxx/chip.c-140-\t\treturn NULL;\ndrivers/net/dsa/mv88e6xxx/chip.c-141-\ndrivers/net/dsa/mv88e6xxx/chip.c:142:\treturn mdio_bus-\u003ebus;\ndrivers/net/dsa/mv88e6xxx/chip.c-143-}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3757=static int mv88e6xxx_mdio_read(struct mii_bus *bus, int phy, int reg)\ndrivers/net/dsa/mv88e6xxx/chip.c-3758-{\ndrivers/net/dsa/mv88e6xxx/chip.c:3759:\tstruct mv88e6xxx_mdio_bus *mdio_bus = bus-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c:3760:\tstruct mv88e6xxx_chip *chip = mdio_bus-\u003echip;\ndrivers/net/dsa/mv88e6xxx/chip.c-3761-\tu16 prod_id;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3783=static int mv88e6xxx_mdio_read_c45(struct mii_bus *bus, int phy, int devad,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3785-{\ndrivers/net/dsa/mv88e6xxx/chip.c:3786:\tstruct mv88e6xxx_mdio_bus *mdio_bus = bus-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c:3787:\tstruct mv88e6xxx_chip *chip = mdio_bus-\u003echip;\ndrivers/net/dsa/mv88e6xxx/chip.c-3788-\tu16 val;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3801=static int mv88e6xxx_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val)\ndrivers/net/dsa/mv88e6xxx/chip.c-3802-{\ndrivers/net/dsa/mv88e6xxx/chip.c:3803:\tstruct mv88e6xxx_mdio_bus *mdio_bus = bus-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c:3804:\tstruct mv88e6xxx_chip *chip = mdio_bus-\u003echip;\ndrivers/net/dsa/mv88e6xxx/chip.c-3805-\tint err;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3817=static int mv88e6xxx_mdio_write_c45(struct mii_bus *bus, int phy, int devad,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3819-{\ndrivers/net/dsa/mv88e6xxx/chip.c:3820:\tstruct mv88e6xxx_mdio_bus *mdio_bus = bus-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c:3821:\tstruct mv88e6xxx_chip *chip = mdio_bus-\u003echip;\ndrivers/net/dsa/mv88e6xxx/chip.c-3822-\tint err;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3834=static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3838-\tstatic int index;\ndrivers/net/dsa/mv88e6xxx/chip.c:3839:\tstruct mv88e6xxx_mdio_bus *mdio_bus;\ndrivers/net/dsa/mv88e6xxx/chip.c-3840-\tstruct mii_bus *bus;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3854-\ndrivers/net/dsa/mv88e6xxx/chip.c:3855:\tbus = mdiobus_alloc_size(sizeof(*mdio_bus));\ndrivers/net/dsa/mv88e6xxx/chip.c-3856-\tif (!bus)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3858-\ndrivers/net/dsa/mv88e6xxx/chip.c:3859:\tmdio_bus = bus-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c:3860:\tmdio_bus-\u003ebus = bus;\ndrivers/net/dsa/mv88e6xxx/chip.c:3861:\tmdio_bus-\u003echip = chip;\ndrivers/net/dsa/mv88e6xxx/chip.c:3862:\tINIT_LIST_HEAD(\u0026mdio_bus-\u003elist);\ndrivers/net/dsa/mv88e6xxx/chip.c:3863:\tmdio_bus-\u003eexternal = external;\ndrivers/net/dsa/mv88e6xxx/chip.c-3864-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3895-\tif (external)\ndrivers/net/dsa/mv88e6xxx/chip.c:3896:\t\tlist_add_tail(\u0026mdio_bus-\u003elist, \u0026chip-\u003emdios);\ndrivers/net/dsa/mv88e6xxx/chip.c-3897-\telse\ndrivers/net/dsa/mv88e6xxx/chip.c:3898:\t\tlist_add(\u0026mdio_bus-\u003elist, \u0026chip-\u003emdios);\ndrivers/net/dsa/mv88e6xxx/chip.c-3899-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3907=static void mv88e6xxx_mdios_unregister(struct mv88e6xxx_chip *chip)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-3909-{\ndrivers/net/dsa/mv88e6xxx/chip.c:3910:\tstruct mv88e6xxx_mdio_bus *mdio_bus, *p;\ndrivers/net/dsa/mv88e6xxx/chip.c-3911-\tstruct mii_bus *bus;\ndrivers/net/dsa/mv88e6xxx/chip.c-3912-\ndrivers/net/dsa/mv88e6xxx/chip.c:3913:\tlist_for_each_entry_safe(mdio_bus, p, \u0026chip-\u003emdios, list) {\ndrivers/net/dsa/mv88e6xxx/chip.c:3914:\t\tbus = mdio_bus-\u003ebus;\ndrivers/net/dsa/mv88e6xxx/chip.c-3915-\ndrivers/net/dsa/mv88e6xxx/chip.c:3916:\t\tif (!mdio_bus-\u003eexternal)\ndrivers/net/dsa/mv88e6xxx/chip.c-3917-\t\t\tmv88e6xxx_g2_irq_mdio_free(chip, bus);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3980=static int mv88e6xxx_setup(struct dsa_switch *ds)\n\n"
} |
| 9/2 | 2026/09/28 08:59 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 35199 output: 38 thoughts: 62 Thoughts: Okay, let's dive into this. I need to understand how the MDIO bus and PHY devices are bound together in this system. My first thought is to examine `mdio_bus.c`. That's the obvious starting point. I want to see exactly how the kernel handles the connection between the bus and the PHYs. Now, a key question pops into my mind: can these bindings happen dynamically? Are there mechanisms, like sysfs entries, that allow for "hot-plugging" or reconfiguration of MDIO devices after the system is up and running? That's a crucial detail for flexibility and maintainability. Alright, I'm going to head directly into the source code – specifically `drivers/net/phy/mdio_bus.c`. Let's see what's actually going on in that part of the networking stack. I need to get a clear picture of how these MDIO devices are orchestrated. |
| 10/2 | 2026/09/28 08:59 | tool | read-file |
0mArgs:{
"File": "drivers/net/phy/mdio_bus.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0+\n 2:\t/* MDIO Bus interface\n 3:\t *\n 4:\t * Author: Andy Fleming\n 5:\t *\n 6:\t * Copyright (c) 2004 Freescale Semiconductor, Inc.\n 7:\t */\n 8:\t\n 9:\t#define pr_fmt(fmt) KBUILD_MODNAME \": \" fmt\n 10:\t\n 11:\t#include \u003clinux/device.h\u003e\n 12:\t#include \u003clinux/errno.h\u003e\n 13:\t#include \u003clinux/ethtool.h\u003e\n 14:\t#include \u003clinux/init.h\u003e\n 15:\t#include \u003clinux/io.h\u003e\n 16:\t#include \u003clinux/kernel.h\u003e\n 17:\t#include \u003clinux/mii.h\u003e\n 18:\t#include \u003clinux/mm.h\u003e\n 19:\t#include \u003clinux/module.h\u003e\n 20:\t#include \u003clinux/phy.h\u003e\n 21:\t#include \u003clinux/slab.h\u003e\n 22:\t#include \u003clinux/spinlock.h\u003e\n 23:\t#include \u003clinux/string.h\u003e\n 24:\t#include \u003clinux/uaccess.h\u003e\n 25:\t#include \u003clinux/unistd.h\u003e\n 26:\t\n 27:\t#define CREATE_TRACE_POINTS\n 28:\t#include \u003ctrace/events/mdio.h\u003e\n 29:\t\n 30:\tstatic struct mdio_device *mdiobus_find_device(struct mii_bus *bus, int addr)\n 31:\t{\n 32:\t\tbool addr_valid = addr \u003e= 0 \u0026\u0026 addr \u003c ARRAY_SIZE(bus-\u003emdio_map);\n 33:\t\n 34:\t\tif (WARN_ONCE(!addr_valid, \"addr %d out of range\\n\", addr))\n 35:\t\t\treturn NULL;\n 36:\t\n 37:\t\treturn bus-\u003emdio_map[addr];\n 38:\t}\n 39:\t\n 40:\tstruct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr)\n 41:\t{\n 42:\t\tstruct mdio_device *mdiodev;\n 43:\t\n 44:\t\tmdiodev = mdiobus_find_device(bus, addr);\n 45:\t\tif (!mdiodev)\n 46:\t\t\treturn NULL;\n 47:\t\n 48:\t\tif (!(mdiodev-\u003eflags \u0026 MDIO_DEVICE_FLAG_PHY))\n 49:\t\t\treturn NULL;\n 50:\t\n 51:\t\treturn container_of(mdiodev, struct phy_device, mdio);\n 52:\t}\n 53:\tEXPORT_SYMBOL(mdiobus_get_phy);\n 54:\t\n 55:\tbool mdiobus_is_registered_device(struct mii_bus *bus, int addr)\n 56:\t{\n 57:\t\treturn mdiobus_find_device(bus, addr) != NULL;\n 58:\t}\n 59:\tEXPORT_SYMBOL(mdiobus_is_registered_device);\n 60:\t\n 61:\tstatic void mdiobus_stats_acct(struct mdio_bus_stats *stats, bool op, int ret)\n 62:\t{\n 63:\t\tpreempt_disable();\n 64:\t\tu64_stats_update_begin(\u0026stats-\u003esyncp);\n 65:\t\n 66:\t\tu64_stats_inc(\u0026stats-\u003etransfers);\n 67:\t\tif (ret \u003c 0) {\n 68:\t\t\tu64_stats_inc(\u0026stats-\u003eerrors);\n 69:\t\t\tgoto out;\n 70:\t\t}\n 71:\t\n 72:\t\tif (op)\n 73:\t\t\tu64_stats_inc(\u0026stats-\u003ereads);\n 74:\t\telse\n 75:\t\t\tu64_stats_inc(\u0026stats-\u003ewrites);\n 76:\tout:\n 77:\t\tu64_stats_update_end(\u0026stats-\u003esyncp);\n 78:\t\tpreempt_enable();\n 79:\t}\n 80:\t\n"
} |
| 11/2 | 2026/09/28 08:59 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 36581 output: 19 thoughts: 265 Thoughts: **Analyzing the MAXIO PHY Driver** Okay, let's dive into this `drivers/net/phy/maxio.c` file. My initial thought is to quickly understand the landscape of functions within this file. A quick glance reveals `maxio_read_page`, `maxio_write_page`, `maxio_mae0621a_probe`, and `maxio_mae0621a_config_init`. Standard PHY driver fare, but I need to ensure the probe function is actually getting called. I'm wondering if this driver will ever get a chance to do anything. Hmm, let's see, the driver registration uses `PHY_ID_MATCH_EXACT` with `MAXIO_MAE0621A_Q2C_PHY_ID` and `MAXIO_MAE0621A_Q3C_PHY_ID`. That's good; it's specific, but I need to connect the dots. I need to know the mechanism for how a `phy_driver` actually gets probed. Let me check the core PHY framework in `drivers/net/phy/phy_device.c`. Specifically, I'll need to look at `phy_bus_match` and `phy_probe` functions to understand the matching process and the probe sequence. |
| 12/2 | 2026/09/28 08:59 | tool | grepper |
0mArgs:{
"Expression": "phy_bus_match"
}Results: {
"Output": "drivers/net/phy/phy_device.c=544=EXPORT_SYMBOL_GPL(genphy_match_phy_device);\ndrivers/net/phy/phy_device.c-545-\ndrivers/net/phy/phy_device.c:546:static int phy_bus_match(struct device *dev, const struct device_driver *drv)\ndrivers/net/phy/phy_device.c-547-{\n--\ndrivers/net/phy/phy_device.c=748=struct phy_device *phy_device_create(struct mii_bus *bus, int addr, u32 phy_id,\n--\ndrivers/net/phy/phy_device.c-765-\tmdiodev-\u003ebus = bus;\ndrivers/net/phy/phy_device.c:766:\tmdiodev-\u003ebus_match = phy_bus_match;\ndrivers/net/phy/phy_device.c-767-\tmdiodev-\u003eaddr = addr;\n"
} |
| 13/2 | 2026/09/28 08:59 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 37398 output: 39 thoughts: 25 Thoughts: Okay, here's my interpretation of what's going through my mind as I approach this code: **Diving into PHY Bus Matching** Alright, time to crack open `drivers/net/phy/phy_device.c` and zero in on the `phy_bus_match` function. I'm going to start by getting a handle on exactly how the system identifies and associates a specific PHY (Physical Layer Transceiver) with its corresponding bus. It's the lynchpin for proper device initialization, so understanding this is critical for any PHY-related troubleshooting or enhancement I might need to do. I need to see if it's based on some ID and a list or a more complicated detection system. I hope it has good commenting - this is fundamental stuff, and well-commented code is a godsend. I'm especially interested in how it handles different bus types – is there a specific method for each (e.g., MDIO, RGMII, SGMII)? How flexible and robust is the matching logic? Does it leave room for future expansion or accommodate new PHY devices with minimal modifications? I'll be looking for any potential bottlenecks or areas where performance could be optimized. Let's see what we've got. |
| 14/2 | 2026/09/28 09:00 | tool | read-file |
0mArgs:{
"File": "drivers/net/phy/phy_device.c",
"FirstLine": 540,
"LineCount": 40
}Results: {
"Contents": " 540:\t\n 541:\t\treturn phy_id_compare(phydev-\u003ephy_id, phydrv-\u003ephy_id,\n 542:\t\t\t\t phydrv-\u003ephy_id_mask);\n 543:\t}\n 544:\tEXPORT_SYMBOL_GPL(genphy_match_phy_device);\n 545:\t\n 546:\tstatic int phy_bus_match(struct device *dev, const struct device_driver *drv)\n 547:\t{\n 548:\t\tstruct phy_device *phydev = to_phy_device(dev);\n 549:\t\tconst struct phy_driver *phydrv = to_phy_driver(drv);\n 550:\t\n 551:\t\tif (!(phydrv-\u003emdiodrv.flags \u0026 MDIO_DEVICE_IS_PHY))\n 552:\t\t\treturn 0;\n 553:\t\n 554:\t\tif (phydrv-\u003ematch_phy_device)\n 555:\t\t\treturn phydrv-\u003ematch_phy_device(phydev, phydrv);\n 556:\t\n 557:\t\treturn genphy_match_phy_device(phydev, phydrv);\n 558:\t}\n 559:\t\n 560:\tstatic ssize_t\n 561:\tphy_id_show(struct device *dev, struct device_attribute *attr, char *buf)\n 562:\t{\n 563:\t\tstruct phy_device *phydev = to_phy_device(dev);\n 564:\t\n 565:\t\treturn sysfs_emit(buf, \"0x%.8lx\\n\", (unsigned long)phydev-\u003ephy_id);\n 566:\t}\n 567:\tstatic DEVICE_ATTR_RO(phy_id);\n 568:\t\n 569:\tstatic ssize_t\n 570:\tphy_interface_show(struct device *dev, struct device_attribute *attr, char *buf)\n 571:\t{\n 572:\t\tstruct phy_device *phydev = to_phy_device(dev);\n 573:\t\tconst char *mode = NULL;\n 574:\t\n 575:\t\tif (phydev-\u003eis_internal)\n 576:\t\t\tmode = \"internal\";\n 577:\t\telse\n 578:\t\t\tmode = phy_modes(phydev-\u003einterface);\n 579:\t\n"
} |
| 15/2 | 2026/09/28 09:00 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 38354 output: 110 thoughts: 1469 Thoughts: **Analysis of Code Reachability for Fuzzing** Okay, so the `phy_bus_match` function is the key here. It's the gatekeeper, right? It only matches a PHY device if the `phydev->phy_id` exactly matches `phydrv->phy_id`. `phydev` itself gets created when an MDIO bus is registered, which, as I recall, happens either during bus scanning or via the device tree. Now, the big question is, can we *ever* have a physical MDIO PHY device with the IDs 0x7b744411 or 0x7b744412 in a standard QEMU or GCE environment? No. Absolutely not. QEMU emulates common network cards, like e1000, virtio-net, etc., but none of them, or any other virtual devices I can think of, use the Maxio MAE0621A Ethernet PHY chip (PHY ID 0x7b744411 / 0x7b744412). Could some software-emulated device – a USB network gadget or something similarly inventive – create an MDIO bus with *that* specific PHY ID? No way. Those IDs are hardware identifiers for a real-world Maxio chip. Alright, what about sysfs driver binding? Even if we were to try and force a binding via `/sys/bus/mdio_bus/drivers/Maxio.../bind`, the driver core itself uses `bus_match`, which, as we established, calls `phy_bus_match` under the hood. The `genphy_match_phy_device` function returns `phy_id_compare(phydev->phy_id, phydrv->phy_id, phydrv->phy_id_mask)`, and so even if an MDIO device existed, it would not have the Maxio PHY ID unless it was the specific hardware, which we do not have. And does QEMU or GCE even *have* an MDIO bus in their standard x86_64 VMs? No, not by default. Virtio-net, for example, doesn't use an MDIO bus. e1000 has internal PHY emulation, but it uses Intel PHY IDs, not Maxio IDs, and more to the point, uses its *own* phy handling. So, even if some emulated QEMU card were to use phylib and an MDIO bus, it would have *that* card's PHY ID, not a Maxio PHY ID. Now, let's revisit the triage criteria: Specifically the negative criteria. We're looking at "Structurally unreachable hardware," and the Maxio MAE0621A Ethernet PHY definitely falls into that category. It's a *physical* Ethernet PHY chip requiring either physical hardware or precise device tree description. This is not emulated in standard QEMU or GCE setups. The patch includes: documentation on device tree bindings, Kconfig, Makefile and `maxio.c`. All executable code in `drivers/net/phy/maxio.c` (`maxio_mae0621a_probe`, `maxio_mae0621a_config_init`, `maxio_read_page`, `maxio_write_page`) is *exclusively* for the Maxio MAE0621A Ethernet PHY. Without the actual hardware (or some *very* specific emulation of *this* PHY), the driver will never probe, and those functions are unreachable. Therefore, the modified code is structurally unreachable in standard virtualized fuzzing environments. We *must* set `WorthFuzzing` to `false`. No question. It is all clear and fits Section 2 "Structurally unreachable hardware". The target architecture is amd64. The driver is PHY driver for Maxio MAE0621A Gigabit Ethernet PHY, requiring the hardware, and the hardware is not emulated in the fuzzing environment. |
| 16/2 | 2026/09/28 09:00 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch introduces a new driver for the Maxio MAE0621A Ethernet PHY along with DeviceTree bindings and Kconfig options. This driver requires specific physical Ethernet PHY hardware (or emulation thereof) connected via MDIO, which is not present or emulated in standard virtualized environments (QEMU/GCE). As such, the code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch introduces a new driver for the Maxio MAE0621A Ethernet PHY along with DeviceTree bindings and Kconfig options. This driver requires specific physical Ethernet PHY hardware (or emulation thereof) connected via MDIO, which is not present or emulated in standard virtualized environments (QEMU/GCE). As such, the code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 17/1 | 2026/09/28 09:00 | 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) |
|---|