| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/27 20:09 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"STMMAC_ETH",
"STMMAC_PCI",
"STMMAC_SELFTESTS"
],
"FocusSymbols": [
"phylink_pcs_loopback",
"stmmac_selftest_run"
],
"Reasoning": "The patch adds loopback support to the stmmac integrated PCS and phylink, which is utilized by the stmmac ethtool selftests. This code is reachable via the SIOCETHTOOL ioctl with the ETHTOOL_TEST command. Syzkaller can trigger this by injecting a virtual PCI stmmac device using syz_pci_device_add and calling ethtool on the resulting netdev.",
"WorthFuzzing": true
} |
| 1/1 | 2026/07/27 20:09 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit dee28d7aa004281d3e0af23d8eeb034e4d060e0b\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Mon Jul 27 20:09:38 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c\nindex df37af5ab837af..90a21a2f7e8731 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c\n@@ -168,6 +168,22 @@ static void dwmac_integrated_pcs_an_restart(struct phylink_pcs *pcs)\n \t}\n }\n \n+static int dwmac_integrated_pcs_loopback(struct phylink_pcs *pcs, bool enable)\n+{\n+\tstruct stmmac_pcs *spcs = phylink_pcs_to_stmmac_pcs(pcs);\n+\tvoid __iomem *an_control = spcs-\u003ebase + GMAC_AN_CTRL(0);\n+\tu32 ctrl;\n+\n+\tctrl = readl(an_control);\n+\tif (enable)\n+\t\tctrl |= GMAC_AN_CTRL_ELE;\n+\telse\n+\t\tctrl \u0026= ~GMAC_AN_CTRL_ELE;\n+\twritel(ctrl, an_control);\n+\n+\treturn 0;\n+}\n+\n static const struct phylink_pcs_ops dwmac_integrated_pcs_ops = {\n \t.pcs_inband_caps = dwmac_integrated_pcs_inband_caps,\n \t.pcs_enable = dwmac_integrated_pcs_enable,\n@@ -175,6 +191,7 @@ static const struct phylink_pcs_ops dwmac_integrated_pcs_ops = {\n \t.pcs_get_state = dwmac_integrated_pcs_get_state,\n \t.pcs_config = dwmac_integrated_pcs_config,\n \t.pcs_an_restart = dwmac_integrated_pcs_an_restart,\n+\t.pcs_loopback = dwmac_integrated_pcs_loopback,\n };\n \n void stmmac_integrated_pcs_irq(struct stmmac_priv *priv, u32 status,\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c\nindex 29e824bd90ca6b..77a457b2fa5cf7 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c\n@@ -19,6 +19,7 @@\n #include \u003cnet/udp.h\u003e\n #include \u003cnet/tc_act/tc_gact.h\u003e\n #include \"stmmac.h\"\n+#include \"stmmac_pcs.h\"\n \n struct stmmachdr {\n \t__be32 version;\n@@ -374,23 +375,51 @@ static int stmmac_test_mac_loopback(struct stmmac_priv *priv)\n \treturn __stmmac_test_loopback(priv, \u0026attr);\n }\n \n+static struct phylink_pcs *stmmac_selftest_get_pcs(struct stmmac_priv *priv)\n+{\n+\t/* Try glue driver's PCS first, then the integrated PCS. */\n+\tif (priv-\u003ehw-\u003ephylink_pcs)\n+\t\treturn priv-\u003ehw-\u003ephylink_pcs;\n+\n+\tif (priv-\u003eintegrated_pcs)\n+\t\treturn \u0026priv-\u003eintegrated_pcs-\u003epcs;\n+\n+\treturn NULL;\n+}\n+\n static int stmmac_test_phy_loopback(struct stmmac_priv *priv)\n {\n \tstruct stmmac_packet_attrs attr = { };\n+\tstruct phylink_pcs *pcs;\n \tint ret;\n \n-\tif (!priv-\u003edev-\u003ephydev)\n-\t\treturn -EOPNOTSUPP;\n+\tif (priv-\u003edev-\u003ephydev) {\n+\t\tret = phy_loopback(priv-\u003edev-\u003ephydev, true, 0);\n+\t\tif (ret)\n+\t\t\treturn ret;\n \n-\tret = phy_loopback(priv-\u003edev-\u003ephydev, true, 0);\n-\tif (ret)\n+\t\tattr.dst = priv-\u003edev-\u003edev_addr;\n+\t\tret = __stmmac_test_loopback(priv, \u0026attr);\n+\n+\t\tphy_loopback(priv-\u003edev-\u003ephydev, false, 0);\n \t\treturn ret;\n+\t}\n \n-\tattr.dst = priv-\u003edev-\u003edev_addr;\n-\tret = __stmmac_test_loopback(priv, \u0026attr);\n+\t/* Use PCS loopback for interfaces without an external PHY. */\n+\tpcs = stmmac_selftest_get_pcs(priv);\n+\tif (pcs) {\n+\t\tret = phylink_pcs_loopback(pcs, true);\n+\t\tif (ret)\n+\t\t\treturn ret;\n \n-\tphy_loopback(priv-\u003edev-\u003ephydev, false, 0);\n-\treturn ret;\n+\t\tattr.dst = priv-\u003edev-\u003edev_addr;\n+\t\tret = __stmmac_test_loopback(priv, \u0026attr);\n+\n+\t\tphylink_pcs_loopback(pcs, false);\n+\t\treturn ret;\n+\t}\n+\n+\treturn -EOPNOTSUPP;\n }\n \n static int stmmac_test_mmc(struct stmmac_priv *priv)\n@@ -1986,6 +2015,9 @@ void stmmac_selftest_run(struct net_device *dev,\n \t\t\tret = -EOPNOTSUPP;\n \t\t\tif (dev-\u003ephydev)\n \t\t\t\tret = phy_loopback(dev-\u003ephydev, true, 0);\n+\t\t\telse\n+\t\t\t\tret = phylink_pcs_loopback(stmmac_selftest_get_pcs(priv),\n+\t\t\t\t\t\t\t true);\n \t\t\tif (!ret)\n \t\t\t\tbreak;\n \t\t\tfallthrough;\n@@ -2019,6 +2051,9 @@ void stmmac_selftest_run(struct net_device *dev,\n \t\t\tret = -EOPNOTSUPP;\n \t\t\tif (dev-\u003ephydev)\n \t\t\t\tret = phy_loopback(dev-\u003ephydev, false, 0);\n+\t\t\telse\n+\t\t\t\tret = phylink_pcs_loopback(stmmac_selftest_get_pcs(priv),\n+\t\t\t\t\t\t\t false);\n \t\t\tif (!ret)\n \t\t\t\tbreak;\n \t\t\tfallthrough;\ndiff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c\nindex 59dfe35afa54fc..69242caffaef51 100644\n--- a/drivers/net/phy/phylink.c\n+++ b/drivers/net/phy/phylink.c\n@@ -997,6 +997,25 @@ int phylink_pcs_pre_init(struct phylink *pl, struct phylink_pcs *pcs)\n }\n EXPORT_SYMBOL_GPL(phylink_pcs_pre_init);\n \n+/**\n+ * phylink_pcs_loopback() - Enable or disable loopback at the PCS\n+ * @pcs: a pointer to a \u0026struct phylink_pcs.\n+ * @enable: true to enable loopback, false to disable\n+ *\n+ * Enable or disable loopback mode at the PCS level. This is used by MAC\n+ * drivers for selftest purposes when no external PHY is present.\n+ *\n+ * Returns 0 on success, negative error code on failure.\n+ */\n+int phylink_pcs_loopback(struct phylink_pcs *pcs, bool enable)\n+{\n+\tif (pcs \u0026\u0026 pcs-\u003eops-\u003epcs_loopback)\n+\t\treturn pcs-\u003eops-\u003epcs_loopback(pcs, enable);\n+\n+\treturn -EOPNOTSUPP;\n+}\n+EXPORT_SYMBOL_GPL(phylink_pcs_loopback);\n+\n static void phylink_mac_config(struct phylink *pl,\n \t\t\t const struct phylink_link_state *state)\n {\ndiff --git a/include/linux/phylink.h b/include/linux/phylink.h\nindex 2bc0db3d52ac8d..66c7016d4acdcb 100644\n--- a/include/linux/phylink.h\n+++ b/include/linux/phylink.h\n@@ -518,6 +518,7 @@ struct phylink_pcs {\n *\t\t the MAC.\n * @pcs_pre_init: configure PCS components necessary for MAC hardware\n * initialization e.g. RX clock for stmmac.\n+ * @pcs_loopback: enable/disable loopback mode at the PCS.\n */\n struct phylink_pcs_ops {\n \tint (*pcs_validate)(struct phylink_pcs *pcs, unsigned long *supported,\n@@ -542,6 +543,7 @@ struct phylink_pcs_ops {\n \tvoid (*pcs_disable_eee)(struct phylink_pcs *pcs);\n \tvoid (*pcs_enable_eee)(struct phylink_pcs *pcs);\n \tint (*pcs_pre_init)(struct phylink_pcs *pcs);\n+\tint (*pcs_loopback)(struct phylink_pcs *pcs, bool enable);\n };\n \n #if 0 /* For kernel-doc purposes only. */\n@@ -717,8 +719,22 @@ void pcs_enable_eee(struct phylink_pcs *pcs);\n */\n int pcs_pre_init(struct phylink_pcs *pcs);\n \n+/**\n+ * pcs_loopback() - Enable or disable loopback at the PCS\n+ * @pcs: a pointer to a \u0026struct phylink_pcs.\n+ * @enable: true to enable loopback, false to disable\n+ *\n+ * Enable or disable loopback mode at the PCS level. This is used by MAC\n+ * drivers for selftest purposes when no external PHY is present.\n+ *\n+ * Returns 0 on success, or a negative error code on failure.\n+ */\n+int pcs_loopback(struct phylink_pcs *pcs, bool enable);\n+\n #endif\n \n+int phylink_pcs_loopback(struct phylink_pcs *pcs, bool enable);\n+\n struct phylink *phylink_create(struct phylink_config *,\n \t\t\t const struct fwnode_handle *,\n \t\t\t phy_interface_t,\n"
} |
| 2/1 | 2026/07/27 20:09 | agent | patch-evaluator |
1mModel:best-expensive Args: null Results: {
"EnableConfigs": [
"STMMAC_ETH",
"STMMAC_PCI",
"STMMAC_SELFTESTS"
],
"FocusSymbols": [
"phylink_pcs_loopback",
"stmmac_selftest_run"
],
"Reasoning": "The patch adds loopback support to the stmmac integrated PCS and phylink, which is utilized by the stmmac ethtool selftests. This code is reachable via the SIOCETHTOOL ioctl with the ETHTOOL_TEST command. Syzkaller can trigger this by injecting a virtual PCI stmmac device using syz_pci_device_add and calling ethtool on the resulting netdev.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a '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: For your convenience, here is the diff of the changes:
commit dee28d7aa004281d3e0af23d8eeb034e4d060e0b
Author: syz-cluster <triage@syzkaller.com>
Date: Mon Jul 27 20:09:38 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c
index df37af5ab837af..90a21a2f7e8731 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pcs.c
@@ -168,6 +168,22 @@ static void dwmac_integrated_pcs_an_restart(struct phylink_pcs *pcs)
}
}
+static int dwmac_integrated_pcs_loopback(struct phylink_pcs *pcs, bool enable)
+{
+ struct stmmac_pcs *spcs = phylink_pcs_to_stmmac_pcs(pcs);
+ void __iomem *an_control = spcs->base + GMAC_AN_CTRL(0);
+ u32 ctrl;
+
+ ctrl = readl(an_control);
+ if (enable)
+ ctrl |= GMAC_AN_CTRL_ELE;
+ else
+ ctrl &= ~GMAC_AN_CTRL_ELE;
+ writel(ctrl, an_control);
+
+ return 0;
+}
+
static const struct phylink_pcs_ops dwmac_integrated_pcs_ops = {
.pcs_inband_caps = dwmac_integrated_pcs_inband_caps,
.pcs_enable = dwmac_integrated_pcs_enable,
@@ -175,6 +191,7 @@ static const struct phylink_pcs_ops dwmac_integrated_pcs_ops = {
.pcs_get_state = dwmac_integrated_pcs_get_state,
.pcs_config = dwmac_integrated_pcs_config,
.pcs_an_restart = dwmac_integrated_pcs_an_restart,
+ .pcs_loopback = dwmac_integrated_pcs_loopback,
};
void stmmac_integrated_pcs_irq(struct stmmac_priv *priv, u32 status,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
index 29e824bd90ca6b..77a457b2fa5cf7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
@@ -19,6 +19,7 @@
#include <net/udp.h>
#include <net/tc_act/tc_gact.h>
#include "stmmac.h"
+#include "stmmac_pcs.h"
struct stmmachdr {
__be32 version;
@@ -374,23 +375,51 @@ static int stmmac_test_mac_loopback(struct stmmac_priv *priv)
return __stmmac_test_loopback(priv, &attr);
}
+static struct phylink_pcs *stmmac_selftest_get_pcs(struct stmmac_priv *priv)
+{
+ /* Try glue driver's PCS first, then the integrated PCS. */
+ if (priv->hw->phylink_pcs)
+ return priv->hw->phylink_pcs;
+
+ if (priv->integrated_pcs)
+ return &priv->integrated_pcs->pcs;
+
+ return NULL;
+}
+
static int stmmac_test_phy_loopback(struct stmmac_priv *priv)
{
struct stmmac_packet_attrs attr = { };
+ struct phylink_pcs *pcs;
int ret;
- if (!priv->dev->phydev)
- return -EOPNOTSUPP;
+ if (priv->dev->phydev) {
+ ret = phy_loopback(priv->dev->phydev, true, 0);
+ if (ret)
+ return ret;
- ret = phy_loopback(priv->dev->phydev, true, 0);
- if (ret)
+ attr.dst = priv->dev->dev_addr;
+ ret = __stmmac_test_loopback(priv, &attr);
+
+ phy_loopback(priv->dev->phydev, false, 0);
return ret;
+ }
- attr.dst = priv->dev->dev_addr;
- ret = __stmmac_test_loopback(priv, &attr);
+ /* Use PCS loopback for interfaces without an external PHY. */
+ pcs = stmmac_selftest_get_pcs(priv);
+ if (pcs) {
+ ret = phylink_pcs_loopback(pcs, true);
+ if (ret)
+ return ret;
- phy_loopback(priv->dev->phydev, false, 0);
- return ret;
+ attr.dst = priv->dev->dev_addr;
+ ret = __stmmac_test_loopback(priv, &attr);
+
+ phylink_pcs_loopback(pcs, false);
+ return ret;
+ }
+
+ return -EOPNOTSUPP;
}
static int stmmac_test_mmc(struct stmmac_priv *priv)
@@ -1986,6 +2015,9 @@ void stmmac_selftest_run(struct net_device *dev,
ret = -EOPNOTSUPP;
if (dev->phydev)
ret = phy_loopback(dev->phydev, true, 0);
+ else
+ ret = phylink_pcs_loopback(stmmac_selftest_get_pcs(priv),
+ true);
if (!ret)
break;
fallthrough;
@@ -2019,6 +2051,9 @@ void stmmac_selftest_run(struct net_device *dev,
ret = -EOPNOTSUPP;
if (dev->phydev)
ret = phy_loopback(dev->phydev, false, 0);
+ else
+ ret = phylink_pcs_loopback(stmmac_selftest_get_pcs(priv),
+ false);
if (!ret)
break;
fallthrough;
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 59dfe35afa54fc..69242caffaef51 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -997,6 +997,25 @@ int phylink_pcs_pre_init(struct phylink *pl, struct phylink_pcs *pcs)
}
EXPORT_SYMBOL_GPL(phylink_pcs_pre_init);
+/**
+ * phylink_pcs_loopback() - Enable or disable loopback at the PCS
+ * @pcs: a pointer to a &struct phylink_pcs.
+ * @enable: true to enable loopback, false to disable
+ *
+ * Enable or disable loopback mode at the PCS level. This is used by MAC
+ * drivers for selftest purposes when no external PHY is present.
+ *
+ * Returns 0 on success, negative error code on failure.
+ */
+int phylink_pcs_loopback(struct phylink_pcs *pcs, bool enable)
+{
+ if (pcs && pcs->ops->pcs_loopback)
+ return pcs->ops->pcs_loopback(pcs, enable);
+
+ return -EOPNOTSUPP;
+}
+EXPORT_SYMBOL_GPL(phylink_pcs_loopback);
+
static void phylink_mac_config(struct phylink *pl,
const struct phylink_link_state *state)
{
diff --git a/include/linux/phylink.h b/include/linux/phylink.h
index 2bc0db3d52ac8d..66c7016d4acdcb 100644
--- a/include/linux/phylink.h
+++ b/include/linux/phylink.h
@@ -518,6 +518,7 @@ struct phylink_pcs {
* the MAC.
* @pcs_pre_init: configure PCS components necessary for MAC hardware
* initialization e.g. RX clock for stmmac.
+ * @pcs_loopback: enable/disable loopback mode at the PCS.
*/
struct phylink_pcs_ops {
int (*pcs_validate)(struct phylink_pcs *pcs, unsigned long *supported,
@@ -542,6 +543,7 @@ struct phylink_pcs_ops {
void (*pcs_disable_eee)(struct phylink_pcs *pcs);
void (*pcs_enable_eee)(struct phylink_pcs *pcs);
int (*pcs_pre_init)(struct phylink_pcs *pcs);
+ int (*pcs_loopback)(struct phylink_pcs *pcs, bool enable);
};
#if 0 /* For kernel-doc purposes only. */
@@ -717,8 +719,22 @@ void pcs_enable_eee(struct phylink_pcs *pcs);
*/
int pcs_pre_init(struct phylink_pcs *pcs);
+/**
+ * pcs_loopback() - Enable or disable loopback at the PCS
+ * @pcs: a pointer to a &struct phylink_pcs.
+ * @enable: true to enable loopback, false to disable
+ *
+ * Enable or disable loopback mode at the PCS level. This is used by MAC
+ * drivers for selftest purposes when no external PHY is present.
+ *
+ * Returns 0 on success, or a negative error code on failure.
+ */
+int pcs_loopback(struct phylink_pcs *pcs, bool enable);
+
#endif
+int phylink_pcs_loopback(struct phylink_pcs *pcs, bool enable);
+
struct phylink *phylink_create(struct phylink_config *,
const struct fwnode_handle *,
phy_interface_t,
|
| 3/2 | 2026/07/27 20:09 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4466 output: 37 thoughts: 699 Thoughts: **Analyzing the Viability of STMMAC Loopback Support in a Virtualized Context** Okay, so we've got a patch here that adds loopback support to the `stmmac` PCS driver and phylink, touching a few key files: `stmmac_pcs.c`, `stmmac_selftests.c`, `phylink.c`, and `phylink.h`. This is interesting because the `stmmac` driver handles STMicroelectronics' Ethernet MACs. My immediate question, given that I'm working in a potentially virtualized environment, is: Can I actually *reach* this functionality? Typically, `stmmac` is a platform driver, tightly coupled with specific SoCs – ARM, Intel Elkhart Lake, that sort of thing. But there's that PCI wrapper, `stmmac_pci.c`, which supports some Intel and AMD chips. So, is there any possibility that QEMU, my virtualization tool of choice, emulates one of these PCI devices? A quick check shows QEMU supports the likes of `e1000`, `e1000e`, `rtl8139`, etc., but nothing directly labeled `stmmac`. Hmm, is there even a platform *with* `stmmac` that QEMU might emulate? Let's see... Allwinner, i.MX, NPCM, Cadence, FTGMAC, LAN9118, SMC91c111, Stellaris, XGMAC... wait, XGMAC *is* a Synopsys DesignWare MAC, but it's 10G, and `stmmac` is for 10/100/1000. Not quite the same thing. So, realistically, is `stmmac` *probeable* in QEMU? I know that, normally, `stmmac` isn't a target for fuzzing with syzkaller because it needs specific hardware that QEMU doesn't offer. But wait, did syzkaller even support `stmmac`? No, it looks like syzkaller sticks to more standard stuff like `tun`, `veth`, `virtio`, `e1000` and so on, which are all easily reproduced. My conclusion is it's unlikely this loopback support is going to be easily testable in a standard QEMU environment. This is something that needs a targeted, hardware-specific setup. The question now becomes: how do I verify this functionality without that? Is there a test bench that uses the `stmmac` driver that I could look at, to try to understand if there is a workaround? |
| 4/2 | 2026/07/27 20:09 | tool | grepper |
0mArgs:{
"Expression": "stmmac",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 11627 lines.\nUse more precise expression if possible.\n\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=29=config STMMAC_PLATFORM\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-33-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:34:\t This selects the platform specific bus support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-35-\t This is the driver used on several SoCs:\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=60=config DWMAC_ANARION\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-66-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:67:\t This selects the Anarion SoC glue layer support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-68-\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=78=config DWMAC_INGENIC\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-85-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:86:\t This selects Ingenic SoCs glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-87-\t device driver. This driver is used on for the Ingenic SoCs\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=90=config DWMAC_IPQ806X\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-97-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:98:\t This selects the IPQ806x SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-99-\t device driver. This driver does not use any of the hardware\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=114=config DWMAC_MEDIATEK\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-119-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:120:\t This selects the MT2712 SoC support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-121-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=122=config DWMAC_MESON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-129-\t This selects the Amlogic Meson SoC glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:130:\t the stmmac device driver. This driver is used for Meson6,\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-131-\t Meson8, Meson8b and GXBB SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=133=config DWMAC_NUVOTON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-141-\t This selects the Nuvoton MA35 series SoC glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:142:\t for the stmmac device driver. The nuvoton-dwmac driver is\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-143-\t used for MA35 series SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=145=config DWMAC_QCOM_ETHQOS\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-152-\t This selects the Qualcomm ETHQOS glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:153:\t stmmac device driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-154-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=155=config DWMAC_RENESAS_GBETH\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-163-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:164:\t This selects Renesas SoC glue layer support for the stmmac device\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-165-\t driver. This driver is used for the RZ/V2H(P) family, RZ/T2H and\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=168=config DWMAC_ROCKCHIP\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-176-\t This selects the Rockchip RK3288 SoC glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:177:\t the stmmac device driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-178-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=179=config DWMAC_RZN1\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-187-\t This selects the Renesas RZ/N1 SoC glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:188:\t the stmmac device driver. This support can make use of a custom MII\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-189-\t converter PCS device.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=191=config DWMAC_S32\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-197-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:198:\t This selects NXP SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-199-\t device driver. This driver is used for the S32CC series\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=203=config DWMAC_SOCFPGA\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-214-\t This selects the Altera SOCFPGA SoC glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:215:\t for the stmmac device driver. This driver is used for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-216-\t arria5 and cyclone5 FPGA SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=218=config DWMAC_SOPHGO\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-225-\t This selects the Sophgo SoC specific glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:226:\t for the stmmac device driver. This driver is used for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-227-\t ethernet controllers on various Sophgo SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=229=config DWMAC_SPACEMIT\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-237-\t This selects the Spacemit platform specific glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:238:\t for the stmmac device driver. This driver is used for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-239-\t Spacemit K3 ethernet controllers.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=241=config DWMAC_STARFIVE\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-249-\t This selects the StarFive platform specific glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:250:\t for the stmmac device driver. This driver is used for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-251-\t StarFive JH7100 and JH7110 ethernet controllers.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=253=config DWMAC_STI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-260-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:261:\t This selects STi SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-262-\t device driver. This driver is used on for the STi series\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=265=config DWMAC_STM32\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-272-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:273:\t This selects STM32 SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-274-\t device driver. This driver is used on for the STM32 series\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=277=config DWMAC_SUNXI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-284-\t This selects Allwinner SoC glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:285:\t stmmac device driver. This driver is used for A20/A31\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-286-\t GMAC ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=288=config DWMAC_SUN8I\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-296-\t This selects Allwinner SoC glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:297:\t stmmac device driver. This driver is used for H3/A83T/A64\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-298-\t EMAC ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=300=config DWMAC_SUN55I\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-308-\t This selects Allwinner SoC glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:309:\t stmmac device driver. This driver is used for A523/T527\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-310-\t GMAC200 ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=312=config DWMAC_THEAD\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-318-\t This selects the T-HEAD platform specific glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:319:\t the stmmac device driver. This driver is used for T-HEAD TH1520\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-320-\t ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=322=config DWMAC_IMX8\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-329-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:330:\t This selects NXP SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-331-\t device driver. This driver is used for i.MX8 series like\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=334=config DWMAC_INTEL_PLAT\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-340-\t This selects the Intel platform specific glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:341:\t the stmmac device driver. This driver is used for the Intel Keem Bay\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-342-\t SoC.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=344=config DWMAC_LOONGSON1\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-350-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:351:\t This selects Loongson1 SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-352-\t device driver. This driver is used for Loongson1-based boards\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=355=config DWMAC_TEGRA\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-360-\t found on the NVIDIA Tegra SoC devices. This driver provides the glue\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:361:\t layer on top of the stmmac driver required for these NVIDIA Tegra SoC\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-362-\t devices.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=373=config STMMAC_LIBPCI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-375-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:376:\t This option enables the PCI bus helpers for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-377-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=378=config DWMAC_INTEL\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-385-\t This selects the Intel platform specific bus support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:386:\t stmmac driver. This driver is used for Intel Quark/EHL/TGL.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-387-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=388=config DWMAC_LOONGSON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-394-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:395:\t This selects the LOONGSON PCI bus support for the stmmac driver,\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-396-\t Support for ethernet controller on Loongson-2K1000 SoC and LS7A1000 bridge.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=407=config STMMAC_PCI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-412-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:413:\t This selects the platform specific bus support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-414-\t This driver was tested on XLINX XC2V3000 FF1152AMT0221\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile-1-# SPDX-License-Identifier: GPL-2.0\ndrivers/net/ethernet/stmicro/stmmac/Makefile:2:obj-$(CONFIG_STMMAC_ETH) += stmmac.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:3:stmmac-objs:= stmmac_main.o stmmac_ethtool.o stmmac_mdio.o ring_mode.o\t\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile-4-\t chain_mode.o dwmac_lib.o dwmac1000_core.o dwmac1000_dma.o\t\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile-5-\t dwmac100_core.o dwmac100_dma.o enh_desc.o norm_desc.o\t\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:6:\t mmc_core.o stmmac_hwtstamp.o stmmac_ptp.o dwmac4_descs.o\t\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile-7-\t dwmac4_dma.o dwmac4_lib.o dwmac4_core.o dwmac5.o hwif.o \\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:8:\t stmmac_tc.o dwxgmac2_core.o dwxgmac2_dma.o dwxgmac2_descs.o \\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:9:\t stmmac_xdp.o stmmac_est.o stmmac_fpe.o stmmac_vlan.o \\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:10:\t stmmac_pcs.o $(stmmac-y)\ndrivers/net/ethernet/stmicro/stmmac/Makefile-11-\ndrivers/net/ethernet/stmicro/stmmac/Makefile:12:stmmac-$(CONFIG_STMMAC_SELFTESTS) += stmmac_selftests.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-13-\ndrivers/net/ethernet/stmicro/stmmac/Makefile-14-# Ordering matters. Generic driver must be last.\ndrivers/net/ethernet/stmicro/stmmac/Makefile:15:obj-$(CONFIG_STMMAC_PLATFORM)\t+= stmmac-platform.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-16-obj-$(CONFIG_DWMAC_ANARION)\t+= dwmac-anarion.o\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile=45=obj-$(CONFIG_DWMAC_VISCONTI)\t+= dwmac-visconti.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:46:stmmac-platform-objs:= stmmac_platform.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-47-dwmac-altr-socfpga-objs := dwmac-socfpga.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-48-\ndrivers/net/ethernet/stmicro/stmmac/Makefile:49:obj-$(CONFIG_STMMAC_LIBPCI)\t+= stmmac_libpci.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:50:obj-$(CONFIG_STMMAC_PCI)\t+= stmmac-pci.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-51-obj-$(CONFIG_DWMAC_INTEL)\t+= dwmac-intel.o\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile=53=obj-$(CONFIG_DWMAC_MOTORCOMM)\t+= dwmac-motorcomm.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:54:stmmac-pci-objs:= stmmac_pci.o\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-14-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:15:#include \"stmmac.h\"\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-16-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:17:static int jumbo_frm(struct stmmac_tx_queue *tx_q, struct sk_buff *skb,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-18-\t\t int csum)\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-20-\tunsigned int nopaged_len = skb_headlen(skb);\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:21:\tstruct stmmac_priv *priv = tx_q-\u003epriv_data;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-22-\tunsigned int entry = tx_q-\u003ecur_tx;\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-44-\t/* do not close the descriptor and do not set own bit */\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:45:\tstmmac_prepare_tx_desc(priv, desc, 1, buf_len, csum, STMMAC_CHAIN_MODE,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-46-\t\t\t0, false, skb-\u003elen);\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-61-\t\t\ttx_q-\u003etx_skbuff_dma[entry].len = bmax;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:62:\t\t\tstmmac_prepare_tx_desc(priv, desc, 0, bmax, csum,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-63-\t\t\t\t\tSTMMAC_CHAIN_MODE, 1, false, skb-\u003elen);\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-75-\t\t\t/* last descriptor can be set now */\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:76:\t\t\tstmmac_prepare_tx_desc(priv, desc, 0, len, csum,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-77-\t\t\t\t\tSTMMAC_CHAIN_MODE, 1, true, skb-\u003elen);\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c=98=static void init_dma_chain(void *des, dma_addr_t phy_addr,\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-127-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:128:static void refill_desc3(struct stmmac_rx_queue *rx_q, struct dma_desc *p)\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-129-{\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:130:\tstruct stmmac_priv *priv = rx_q-\u003epriv_data;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-131-\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-142-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:143:static void clean_desc3(struct stmmac_tx_queue *tx_q, struct dma_desc *p)\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-144-{\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:145:\tstruct stmmac_priv *priv = tx_q-\u003epriv_data;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-146-\tunsigned int entry = tx_q-\u003edirty_tx;\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-159-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:160:const struct stmmac_mode_ops chain_mode_ops = {\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-161-\t.init = init_dma_chain,\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-15-#include \u003clinux/netdevice.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/common.h:16:#include \u003clinux/stmmac.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/common.h-17-#include \u003clinux/phy.h\u003e\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=49=static inline bool dwmac_is_xmac(enum dwmac_core_type core_type)\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-70-\ndrivers/net/ethernet/stmicro/stmmac/common.h:71:struct stmmac_q_tx_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-72-\tu64_stats_t tx_bytes;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-77-\ndrivers/net/ethernet/stmicro/stmmac/common.h:78:struct stmmac_napi_tx_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-79-\tu64_stats_t tx_packets;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-85-\ndrivers/net/ethernet/stmicro/stmmac/common.h:86:struct stmmac_txq_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-87-\t/* Updates protected by tx queue lock. */\ndrivers/net/ethernet/stmicro/stmmac/common.h-88-\tstruct u64_stats_sync q_syncp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:89:\tstruct stmmac_q_tx_stats q;\ndrivers/net/ethernet/stmicro/stmmac/common.h-90-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-92-\tstruct u64_stats_sync napi_syncp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:93:\tstruct stmmac_napi_tx_stats napi;\ndrivers/net/ethernet/stmicro/stmmac/common.h-94-} ____cacheline_aligned_in_smp;\ndrivers/net/ethernet/stmicro/stmmac/common.h-95-\ndrivers/net/ethernet/stmicro/stmmac/common.h:96:struct stmmac_napi_rx_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-97-\tu64_stats_t rx_bytes;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-102-\ndrivers/net/ethernet/stmicro/stmmac/common.h:103:struct stmmac_rxq_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-104-\t/* Updates protected by NAPI poll logic. */\ndrivers/net/ethernet/stmicro/stmmac/common.h-105-\tstruct u64_stats_sync napi_syncp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:106:\tstruct stmmac_napi_rx_stats napi;\ndrivers/net/ethernet/stmicro/stmmac/common.h-107-} ____cacheline_aligned_in_smp;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-109-/* Updates on each CPU protected by not allowing nested irqs. */\ndrivers/net/ethernet/stmicro/stmmac/common.h:110:struct stmmac_pcpu_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-111-\tstruct u64_stats_sync syncp;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-116-/* Extra statistic and debug information exposed by ethtool */\ndrivers/net/ethernet/stmicro/stmmac/common.h:117:struct stmmac_extra_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-118-\t/* Transmit errors */\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-237-\t/* per queue statistics */\ndrivers/net/ethernet/stmicro/stmmac/common.h:238:\tstruct stmmac_txq_stats txq_stats[MTL_MAX_TX_QUEUES];\ndrivers/net/ethernet/stmicro/stmmac/common.h:239:\tstruct stmmac_rxq_stats rxq_stats[MTL_MAX_RX_QUEUES];\ndrivers/net/ethernet/stmicro/stmmac/common.h:240:\tstruct stmmac_pcpu_stats __percpu *pcpu_stats;\ndrivers/net/ethernet/stmicro/stmmac/common.h-241-\tunsigned long rx_dropped;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-247-/* Safety Feature statistics exposed by ethtool */\ndrivers/net/ethernet/stmicro/stmmac/common.h:248:struct stmmac_safety_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-249-\tunsigned long mac_errors[32];\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-256-#define STMMAC_SAFETY_FEAT_SIZE\t\\\ndrivers/net/ethernet/stmicro/stmmac/common.h:257:\t(sizeof(struct stmmac_safety_stats) / sizeof(unsigned long))\ndrivers/net/ethernet/stmicro/stmmac/common.h-258-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=416=struct dma_features {\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-564-\ndrivers/net/ethernet/stmicro/stmmac/common.h:565:void stmmac_axi_blen_to_mask(u32 *regval, const u32 *blen, size_t len);\ndrivers/net/ethernet/stmicro/stmmac/common.h-566-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=613=struct mac_device_info {\ndrivers/net/ethernet/stmicro/stmmac/common.h:614:\tconst struct stmmac_ops *mac;\ndrivers/net/ethernet/stmicro/stmmac/common.h:615:\tconst struct stmmac_desc_ops *desc;\ndrivers/net/ethernet/stmicro/stmmac/common.h:616:\tconst struct stmmac_dma_ops *dma;\ndrivers/net/ethernet/stmicro/stmmac/common.h:617:\tconst struct stmmac_mode_ops *mode;\ndrivers/net/ethernet/stmicro/stmmac/common.h:618:\tconst struct stmmac_hwtimestamp *ptp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:619:\tconst struct stmmac_tc_ops *tc;\ndrivers/net/ethernet/stmicro/stmmac/common.h:620:\tconst struct stmmac_mmc_ops *mmc;\ndrivers/net/ethernet/stmicro/stmmac/common.h:621:\tconst struct stmmac_est_ops *est;\ndrivers/net/ethernet/stmicro/stmmac/common.h:622:\tconst struct stmmac_vlan_ops *vlan;\ndrivers/net/ethernet/stmicro/stmmac/common.h-623-\tstruct dw_xpcs *xpcs;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-644-\ndrivers/net/ethernet/stmicro/stmmac/common.h:645:struct stmmac_rx_routing {\ndrivers/net/ethernet/stmicro/stmmac/common.h-646-\tu32 reg_mask;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-649-\ndrivers/net/ethernet/stmicro/stmmac/common.h:650:int dwmac100_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:651:int dwmac1000_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:652:int dwmac4_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:653:int dwxgmac2_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:654:int dwxlgmac2_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h-655-\ndrivers/net/ethernet/stmicro/stmmac/common.h:656:void stmmac_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],\ndrivers/net/ethernet/stmicro/stmmac/common.h-657-\t\t\t unsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:658:void stmmac_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,\ndrivers/net/ethernet/stmicro/stmmac/common.h-659-\t\t\t unsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:660:void stmmac_set_mac(void __iomem *ioaddr, bool enable);\ndrivers/net/ethernet/stmicro/stmmac/common.h-661-\ndrivers/net/ethernet/stmicro/stmmac/common.h:662:void stmmac_dwmac4_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],\ndrivers/net/ethernet/stmicro/stmmac/common.h-663-\t\t\t\tunsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:664:void stmmac_dwmac4_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,\ndrivers/net/ethernet/stmicro/stmmac/common.h-665-\t\t\t\tunsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:666:void stmmac_dwmac4_set_mac(void __iomem *ioaddr, bool enable);\ndrivers/net/ethernet/stmicro/stmmac/common.h-667-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-11-#include \u003clinux/of_net.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:12:#include \u003clinux/stmmac.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-13-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:14:#include \"stmmac.h\"\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:15:#include \"stmmac_platform.h\"\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-16-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c=63=anarion_config_dt(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:64:\t\t struct plat_stmmacenet_data *plat_dat)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-65-{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c=93=static int anarion_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-96-\tstruct anarion_gmac *gmac;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:97:\tstruct plat_stmmacenet_data *plat_dat;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:98:\tstruct stmmac_resources stmmac_res;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-99-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:100:\tret = stmmac_get_platform_resources(pdev, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-101-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-103-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:104:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-105-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-115-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:116:\treturn devm_stmmac_pltfr_probe(pdev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-117-}\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c=125=static struct platform_driver anarion_dwmac_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-128-\t\t.name = \"anarion-dwmac\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:129:\t\t.pm\t\t= \u0026stmmac_pltfr_pm_ops,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-130-\t\t.of_match_table = anarion_dwmac_match,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-21-#include \u003clinux/reset.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:22:#include \u003clinux/stmmac.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-23-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:24:#include \"stmmac_platform.h\"\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-25-#include \"dwmac4.h\"\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=36=static int dwc_eth_dwmac_config_dt(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:37:\t\t\t\t struct plat_stmmacenet_data *plat_dat)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-38-{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-43-\t\tplat_dat-\u003eaxi = devm_kzalloc(\u0026pdev-\u003edev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:44:\t\t\t\t\t sizeof(struct stmmac_axi),\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-45-\t\t\t\t\t GFP_KERNEL);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=96=static int dwc_qos_probe(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:97:\t\t\t struct plat_stmmacenet_data *plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:98:\t\t\t struct stmmac_resources *stmmac_res)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-99-{\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:100:\tplat_dat-\u003epclk = stmmac_pltfr_find_clk(plat_dat, \"phy_ref_clk\");\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-101-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=115=static void tegra_eqos_fix_speed(void *bsp_priv, phy_interface_t interface,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-119-\tbool needs_calibration = false;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:120:\tstruct stmmac_priv *priv;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-121-\tu32 value;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-141-\t\t/* Calibration should be done with the MDIO bus idle */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:142:\t\tstmmac_mdio_lock(priv);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-143-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-177-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:178:\t\tstmmac_mdio_unlock(priv);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-179-\t} else {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=186=static int tegra_eqos_probe(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:187:\t\t\t struct plat_stmmacenet_data *plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:188:\t\t\t struct stmmac_resources *res)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-189-{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-203-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:204:\tplat_dat-\u003eclk_tx_i = stmmac_pltfr_find_clk(plat_dat, \"tx\");\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-205-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-237-\tplat_dat-\u003efix_mac_speed = tegra_eqos_fix_speed;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:238:\tplat_dat-\u003eset_clk_tx_rate = stmmac_set_clk_tx_rate;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-239-\tplat_dat-\u003ebsp_priv = eqos;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=252=static void tegra_eqos_remove(struct platform_device *pdev)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-253-{\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:254:\tstruct tegra_eqos *eqos = get_stmmac_bsp_priv(\u0026pdev-\u003edev);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-255-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=260=struct dwc_eth_dwmac_data {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-261-\tint (*probe)(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:262:\t\t struct plat_stmmacenet_data *plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:263:\t\t struct stmmac_resources *res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-264-\tvoid (*remove)(struct platform_device *pdev);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:265:\tconst char *stmmac_clk_name;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-266-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=268=static const struct dwc_eth_dwmac_data dwc_qos_data = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-269-\t.probe = dwc_qos_probe,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:270:\t.stmmac_clk_name = \"apb_pclk\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-271-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=273=static const struct dwc_eth_dwmac_data tegra_eqos_data = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-275-\t.remove = tegra_eqos_remove,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:276:\t.stmmac_clk_name = \"slave_bus\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-277-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=279=static const struct dwc_eth_dwmac_data fsd_eqos_data = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:280:\t.stmmac_clk_name = \"slave_bus\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-281-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=283=static int dwc_eth_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-285-\tconst struct dwc_eth_dwmac_data *data;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:286:\tstruct plat_stmmacenet_data *plat_dat;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:287:\tstruct stmmac_resources stmmac_res;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-288-\tint ret;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-291-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:292:\tmemset(\u0026stmmac_res, 0, sizeof(struct stmmac_resources));\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-293-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-294-\t/**\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:295:\t * Since stmmac_platform supports name IRQ only, basic platform\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-296-\t * resource initialization is done in the glue logic.\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-297-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:298:\tstmmac_res.irq = platform_get_irq(pdev, 0);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:299:\tif (stmmac_res.irq \u003c 0)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:300:\t\treturn stmmac_res.irq;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:301:\tstmmac_res.wol_irq = stmmac_res.irq;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-302-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:303:\tstmmac_res.addr = devm_platform_ioremap_resource(pdev, 0);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:304:\tif (IS_ERR(stmmac_res.addr))\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:305:\t\treturn PTR_ERR(stmmac_res.addr);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-306-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:307:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-308-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-315-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:316:\tplat_dat-\u003estmmac_clk = stmmac_pltfr_find_clk(plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:317:\t\t\t\t\t\t data-\u003estmmac_clk_name);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-318-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-319-\tif (data-\u003eprobe)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:320:\t\tret = data-\u003eprobe(pdev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-321-\tif (ret \u003c 0) {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-329-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:330:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-331-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=343=static void dwc_eth_dwmac_remove(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-346-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:347:\tstmmac_dvr_remove(\u0026pdev-\u003edev);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-348-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=361=static struct platform_driver dwc_eth_dwmac_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-365-\t\t.name = \"dwc-eth-dwmac\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:366:\t\t.pm = \u0026stmmac_pltfr_pm_ops,\n\n"
} |
| 5/2 | 2026/07/27 20:09 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 20191 output: 48 thoughts: 58 Thoughts: **Investigating the stmmac Driver's PCI Capabilities** Okay, so the stmmac driver is fundamentally a platform driver, that much is clear. But then I remember seeing `stmmac-pci.c` in the code, which immediately suggests PCI support is also included, a key distinction. Now, this raises a crucial question for my current work, whatever it may be. I need to quickly determine whether QEMU, the virtual machine I'm using, actually emulates any of the specific PCI devices that the `stmmac-pci.c` module is designed to handle. This will directly affect the usefulness of my current setup for testing or development. It's time to investigate QEMU's device emulation capabilities. |
| 6/2 | 2026/07/27 20:09 | tool | grepper |
0mArgs:{
"Expression": "PCI_DEVICE_ID_",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=192=static void stmmac_pci_remove(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-199-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:200:#define PCI_DEVICE_ID_STMMAC_STMMAC\t\t0x1108\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:201:#define PCI_DEVICE_ID_SYNOPSYS_GMAC5_ID\t\t0x7102\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-202-\n"
} |
| 7/2 | 2026/07/27 20:09 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 20674 output: 25 thoughts: 65 Thoughts: **Investigating QEMU and stmmac Emulation for Testing** Okay, so I'm looking at these PCI IDs, 0x1108 and 0x7102. The immediate question is, does QEMU natively emulate these devices? My initial thought is no, that's not something I recall seeing in the standard QEMU setup. But hold on, I seem to recall something about syzkaller and stmmac. It's time to check if syzkaller has any predefined descriptions or configurations for the stmmac driver. That could be a valuable lead, offering a potential path for testing, even if direct QEMU emulation isn't available. |
| 8/2 | 2026/07/27 20:09 | tool | grepper |
0mArgs:{
"Expression": "stmmac",
"PathPrefix": "net/"
}Results: {
"Output": "net/core/selftests.c-3- * Copyright (c) 2019 Synopsys, Inc. and/or its affiliates.\nnet/core/selftests.c:4: * stmmac Selftests Support\nnet/core/selftests.c-5- *\n--\nnet/core/selftests.c-7- *\nnet/core/selftests.c:8: * Ported from stmmac by:\nnet/core/selftests.c-9- * Copyright (C) 2021 Oleksij Rempel \u003co.rempel@pengutronix.de\u003e\n"
} |
| 9/2 | 2026/07/27 20:09 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 21073 output: 40 thoughts: 369 Thoughts: **Decoding the Syzkaller Bug Hunt** Okay, let's see. The commit message says "syz-cluster: applied patch under review," and the author is "syz-cluster <triage@syzkaller.com>". This screams syzkaller, right? This means it found a bug, or is currently fuzzing this particular chunk of code. How did it manage that? The key is probably in that file, `stmmac_selftests.c`. Wait a second, the patch *does* modify `stmmac_selftests.c`! So, the code under scrutiny is reachable via ethtool selftests? Yes, looks like `stmmac_selftest_run` is called by ethtool, and that's the entry point. But how did syzkaller get a `stmmac` network device (netdev) to actually call ethtool on? Hmm... maybe a dummy driver? Or perhaps a virtual device? Wait, `stmmac` is a platform driver. Can syzkaller create platform devices via, say `syz_devlink` or similar? No, definitely not using `syz_devlink`. Does syzkaller offer some form of `syz_platform_device_add`? No, no such functionality. Wait... Eureka! Syzkaller *can* inject PCI devices using `syz_pci_device_add`! That's the pseudo-syscall I was missing. It allows injection of *any* PCI device into the guest, assuming the kernel supports PCI hotplug and the specific driver is present. Now, `stmmac_pci.c` is a PCI driver! That confirms it, syzkaller *can* inject the `stmmac` driver using `syz_pci_device_add`! Now, let's just confirm that `stmmac_pci.c` is compiled into the kernel. |
| 10/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "stmmac_pci",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Makefile=53=obj-$(CONFIG_DWMAC_MOTORCOMM)\t+= dwmac-motorcomm.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:54:stmmac-pci-objs:= stmmac_pci.o\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=25=struct intel_priv_data {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-39- */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:40:struct stmmac_pci_func_data {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-41-\tunsigned int func;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-44-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:45:struct stmmac_pci_dmi_data {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:46:\tconst struct stmmac_pci_func_data *func;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-47-\tsize_t nfuncs;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-49-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:50:struct stmmac_pci_info {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-51-\tint (*setup)(struct pci_dev *pdev, struct plat_stmmacenet_data *plat);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=91=static const int adln_tsn_lane_regs[] = {6};\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-92-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:93:static int stmmac_pci_find_phy_addr(struct pci_dev *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-94-\t\t\t\t const struct dmi_system_id *dmi_list)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-95-{\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:96:\tconst struct stmmac_pci_func_data *func_data;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:97:\tconst struct stmmac_pci_dmi_data *dmi_data;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-98-\tconst struct dmi_system_id *dmi_id;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=755=static int ehl_sgmii_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-774-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:775:static struct stmmac_pci_info ehl_sgmii1g_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-776-\t.setup = ehl_sgmii_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=779=static int ehl_rgmii_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-789-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:790:static struct stmmac_pci_info ehl_rgmii1g_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-791-\t.setup = ehl_rgmii_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=810=static int ehl_pse0_rgmii1g_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-816-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:817:static struct stmmac_pci_info ehl_pse0_rgmii1g_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-818-\t.setup = ehl_pse0_rgmii1g_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=821=static int ehl_pse0_sgmii1g_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-838-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:839:static struct stmmac_pci_info ehl_pse0_sgmii1g_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-840-\t.setup = ehl_pse0_sgmii1g_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=859=static int ehl_pse1_rgmii1g_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-865-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:866:static struct stmmac_pci_info ehl_pse1_rgmii1g_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-867-\t.setup = ehl_pse1_rgmii1g_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=870=static int ehl_pse1_sgmii1g_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-887-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:888:static struct stmmac_pci_info ehl_pse1_sgmii1g_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-889-\t.setup = ehl_pse1_sgmii1g_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=913=static int tgl_sgmii_phy0_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-921-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:922:static struct stmmac_pci_info tgl_sgmii1g_phy0_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-923-\t.setup = tgl_sgmii_phy0_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=926=static int tgl_sgmii_phy1_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-934-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:935:static struct stmmac_pci_info tgl_sgmii1g_phy1_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-936-\t.setup = tgl_sgmii_phy1_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=939=static int adls_sgmii_phy0_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-948-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:949:static struct stmmac_pci_info adls_sgmii1g_phy0_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-950-\t.setup = adls_sgmii_phy0_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=953=static int adls_sgmii_phy1_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-962-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:963:static struct stmmac_pci_info adls_sgmii1g_phy1_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-964-\t.setup = adls_sgmii_phy1_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=992=static int adln_sgmii_phy0_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1010-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1011:static struct stmmac_pci_info adln_sgmii1g_phy0_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1012-\t.setup = adln_sgmii_phy0_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1014-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1015:static const struct stmmac_pci_func_data galileo_stmmac_func_data[] = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1016-\t{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1021-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1022:static const struct stmmac_pci_dmi_data galileo_stmmac_dmi_data = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1023-\t.func = galileo_stmmac_func_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1026-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1027:static const struct stmmac_pci_func_data iot2040_stmmac_func_data[] = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1028-\t{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1037-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1038:static const struct stmmac_pci_dmi_data iot2040_stmmac_dmi_data = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1039-\t.func = iot2040_stmmac_func_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1078=static int quark_default_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1088-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1089:\tret = stmmac_pci_find_phy_addr(pdev, quark_pci_dmi);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1090-\tif (ret \u003c 0) {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1113-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1114:static const struct stmmac_pci_info quark_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1115-\t.setup = quark_default_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1232=static int intel_eth_pci_probe(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1234-{\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1235:\tstruct stmmac_pci_info *info = (struct stmmac_pci_info *)id-\u003edriver_data;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1236-\tstruct intel_priv_data *intel_priv;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=76=struct loongson_data {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-81-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:82:struct stmmac_pci_info {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-83-\tint (*setup)(struct pci_dev *pdev, struct plat_stmmacenet_data *plat);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=132=static int loongson_gmac_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-141-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:142:static struct stmmac_pci_info loongson_gmac_pci_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-143-\t.setup = loongson_gmac_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=165=static int loongson_gnet_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-176-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:177:static struct stmmac_pci_info loongson_gnet_pci_info = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-178-\t.setup = loongson_gnet_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=498=static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-501-\tstruct stmmac_resources res = {};\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:502:\tstruct stmmac_pci_info *info;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-503-\tstruct loongson_data *ld;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-537-\tplat-\u003efix_soc_reset = loongson_dwmac_fix_reset;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:538:\tplat-\u003esuspend = stmmac_pci_plat_suspend;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:539:\tplat-\u003eresume = stmmac_pci_plat_resume;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-540-\tld-\u003edev = \u0026pdev-\u003edev;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-542-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:543:\tinfo = (struct stmmac_pci_info *)id-\u003edriver_data;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-544-\tret = info-\u003esetup(pdev, plat);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c=188=static int motorcomm_resume(struct device *dev, void *bsp_priv)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-192-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:193:\tret = stmmac_pci_plat_resume(dev, bsp_priv);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-194-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c=208=motorcomm_default_plat_data(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-248-\tplat-\u003ecore_type\t\t= DWMAC_CORE_GMAC4;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:249:\tplat-\u003esuspend\t\t= stmmac_pci_plat_suspend;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-250-\tplat-\u003eresume\t\t= motorcomm_resume;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c-11-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c:12:int stmmac_pci_plat_suspend(struct device *dev, void *bsp_priv)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c-13-{\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c-25-}\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c:26:EXPORT_SYMBOL_GPL(stmmac_pci_plat_suspend);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c-27-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c:28:int stmmac_pci_plat_resume(struct device *dev, void *bsp_priv)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c-29-{\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c-43-}\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c:44:EXPORT_SYMBOL_GPL(stmmac_pci_plat_resume);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c-45-\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.h-8-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.h:9:int stmmac_pci_plat_suspend(struct device *dev, void *bsp_priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.h:10:int stmmac_pci_plat_resume(struct device *dev, void *bsp_priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_libpci.h-11-\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-18-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:19:struct stmmac_pci_info {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-20-\tint (*setup)(struct pci_dev *pdev, struct plat_stmmacenet_data *plat);\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=33=static int stmmac_default_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-49-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:50:static const struct stmmac_pci_info stmmac_pci_info = {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-51-\t.setup = stmmac_default_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=54=static int snps_gmac5_default_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-101-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:102:static const struct stmmac_pci_info snps_gmac5_pci_info = {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-103-\t.setup = snps_gmac5_default_data,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-106-/**\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:107: * stmmac_pci_probe\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-108- *\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-117- */\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:118:static int stmmac_pci_probe(struct pci_dev *pdev,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-119-\t\t\t const struct pci_device_id *id)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-120-{\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:121:\tstruct stmmac_pci_info *info = (struct stmmac_pci_info *)id-\u003edriver_data;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-122-\tstruct plat_stmmacenet_data *plat;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-179-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:180:\tplat-\u003esuspend = stmmac_pci_plat_suspend;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:181:\tplat-\u003eresume = stmmac_pci_plat_resume;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-182-\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-186-/**\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:187: * stmmac_pci_remove\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-188- *\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-191- */\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:192:static void stmmac_pci_remove(struct pci_dev *pdev)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-193-{\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=203=static const struct pci_device_id stmmac_id_table[] = {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:204:\t{ PCI_DEVICE_DATA(STMMAC, STMMAC, \u0026stmmac_pci_info) },\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:205:\t{ PCI_DEVICE_DATA(STMICRO, MAC, \u0026stmmac_pci_info) },\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-206-\t{ PCI_DEVICE_DATA(SYNOPSYS, GMAC5_ID, \u0026snps_gmac5_pci_info) },\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=210=MODULE_DEVICE_TABLE(pci, stmmac_id_table);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-211-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:212:static struct pci_driver stmmac_pci_driver = {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-213-\t.name = STMMAC_RESOURCE_NAME,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-214-\t.id_table = stmmac_id_table,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:215:\t.probe = stmmac_pci_probe,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:216:\t.remove = stmmac_pci_remove,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-217-\t.driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-221-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:222:module_pci_driver(stmmac_pci_driver);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-223-\n"
} |
| 11/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 29122 output: 42 thoughts: 190 Thoughts: **Analyzing the Syzkaller Potential for a STMMAC Vulnerability** Okay, so `stmmac_pci.c` is definitely a PCI driver – good, Syzkaller can inject it. But hold on, the patch introduces `dwmac_integrated_pcs_loopback` within `stmmac_pcs.c`. I need to confirm if that file is even compiled into the kernel image. Yep, it's there: `stmmac_pcs.o` is listed in `stmmac-objs`. That's a good sign. And the patch also touches `stmmac_selftests.c`, which calls `phylink_pcs_loopback`. Is that also going to be compiled in? Let me see… yes, `stmmac-$(CONFIG_STMMAC_SELFTESTS) += stmmac_selftests.o`. Okay, so we'll need to enable `CONFIG_STMMAC_SELFTESTS` for this to have an impact. Let's verify how it is currently configured. |
| 12/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "config STMMAC_SELFTESTS",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Kconfig=18=if STMMAC_ETH\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-19-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:20:config STMMAC_SELFTESTS\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-21-\tbool \"Support for STMMAC Selftests\"\n"
} |
| 13/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 29704 output: 40 thoughts: 43 Thoughts: Okay, here's my interpretation of that thought process, from an expert's perspective: **Diving into the STMMAC Configuration** Alright, let's see... I'm looking at the configuration options for the STMMAC driver, specifically the self-test capability. So, `CONFIG_STMMAC_SELFTESTS` is a boolean configuration option that seems to be nested under `STMMAC_ETH`, which is itself a config option related to the Ethernet implementation of the driver. Now, I should double check what options are available under both `STMMAC_ETH` and `STMMAC_PCI`. I want to make sure I understand the dependencies and how self-tests are enabled. Perhaps checking `STMMAC_PCI` is relevant, so I understand the full scope of where this can run in hardware. Knowing that the Ethernet and PCI versions of the driver are important, I can start to understand the implications for the target platform. |
| 14/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "config STMMAC_ETH",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:2:config STMMAC_ETH\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-3-\ttristate \"STMicroelectronics Multi-Gigabit Ethernet driver\"\n"
} |
| 15/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 30094 output: 40 thoughts: 8 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **Decoding that Phrase** Hmm, "STMMAC_PCI". That's intriguing. My initial thought process immediately starts dissecting this. "STMMAC" likely refers to the STMicroelectronics Media Access Controller (MAC) IP core, a common component found in a lot of embedded systems, particularly those using STM32 microcontrollers or their associated SoCs. The "PCI" part is the more interesting piece. It implies this MAC core is connected to a PCI (Peripheral Component Interconnect) or PCI Express bus. This narrows down the application significantly. I'm likely looking at a system with some degree of sophistication, potentially a networking card, an industrial control system with higher bandwidth requirements, or even a specialized embedded system needing high-speed network connectivity. My mind immediately starts ticking through the implications: driver requirements, interrupt handling, DMA (Direct Memory Access) configuration... all of these take on a different flavor when dealing with a PCI interface rather than something simpler like a standard Ethernet PHY. I'd be looking for PCI configuration space access, potentially dealing with BARs (Base Address Registers) and memory-mapped I/O, and the associated complexity of bus mastering. Furthermore, I'd need to consider the power management aspects. PCI devices often have their own power states, and optimizing this to reduce power consumption or improve responsiveness may be a key consideration in any potential design or debugging exercise. The clocking scheme is also likely to be very important, since the MAC needs a stable clock signal and needs to be synchronized with the PCI bus clock. Ultimately, I'd need to look at the overall architecture of this device, in particular, the configuration and interaction of this STMMAC IP core and PCI bus. The specific details, like the type of PCI bus (standard PCI, PCI Express, etc.) will strongly impact driver choices and overall design constraints. |
| 16/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "config STMMAC_PCI",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Kconfig=398=config DWMAC_MOTORCOMM\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-406-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:407:config STMMAC_PCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-408-\ttristate \"STMMAC PCI bus support\"\n"
} |
| 17/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 30678 output: 42 thoughts: 386 Thoughts: **Reaching Phylink PCS Loopback for Fuzzing** Okay, so I've identified a promising area for fuzzing: specifically, the potential loopback functionality within the STMMAC driver. I need to ensure these components are enabled: `STMMAC_ETH`, `STMMAC_PCI`, and `STMMAC_SELFTESTS`. My primary focus is getting to the `phylink_pcs_loopback` function, as that seems like a good target. Let's trace how this function is reached. The path is clear: The patch adds `phylink_pcs_loopback` to `drivers/net/phy/phylink.c`. This function is then called by `stmmac_test_phy_loopback`, which lives in `stmmac_selftests.c`. That function is, in turn, called by `stmmac_selftest_run`. And finally, `stmmac_selftest_run` is invoked through `stmmac_ethtool_ops.self_test`. The important part is that ethtool self tests are triggered by syzkaller via `ioctl(SIOCETHTOOL, ETHTOOL_TEST)`. This means that it's a completely reachable path. Now, I want to drill down and see the exact functions involved. The patch also adds `dwmac_integrated_pcs_loopback` in `stmmac_pcs.c` and a static function `stmmac_selftest_get_pcs` in `stmmac_selftests.c`. The more interesting one is `phylink_pcs_loopback` because it's exported and can be called from outside. Hang on... `dwmac_integrated_pcs_loopback` is static. That's not ideal for fuzzing. Can I focus on `phylink_pcs_loopback`? Yes! It is exported. And what about `stmmac_test_phy_loopback`? It's static, but I'm getting there. It's called by `stmmac_selftest_run`, which is the entry point, so I'll also check `stmmac_selftest_run` in `stmmac_selftests.c` to understand the bigger picture. This seems very promising. |
| 18/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "stmmac_selftest_run",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/stmmac.h=434=struct timespec64 stmmac_calc_tas_basetime(ktime_t old_base_time,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-438-#if IS_ENABLED(CONFIG_STMMAC_SELFTESTS)\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:439:void stmmac_selftest_run(struct net_device *dev,\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-440-\t\t\t struct ethtool_test *etest, u64 *buf);\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h=442=int stmmac_selftest_get_count(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-443-#else\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:444:static inline void stmmac_selftest_run(struct net_device *dev,\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-445-\t\t\t\t struct ethtool_test *etest, u64 *buf)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c=1092=static const struct ethtool_ops stmmac_ethtool_ops = {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-1105-\t.set_pauseparam = stmmac_set_pauseparam,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:1106:\t.self_test = stmmac_selftest_run,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-1107-\t.get_ethtool_stats = stmmac_get_ethtool_stats,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c=1851=static const struct stmmac_test {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1986-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1987:void stmmac_selftest_run(struct net_device *dev,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1988-\t\t\t struct ethtool_test *etest, u64 *buf)\n"
} |
| 19/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 32315 output: 37 thoughts: 226 Thoughts: **Analyzing the Ethernet Driver Self-Test Flow** Okay, so I'm diving into this self-test function for the Ethernet driver. The entry point, as I see it, is `stmmac_selftest_run`. First, I want to confirm whether or not `stmmac_test_phy_loopback` is static. Alright, it is. That means I can probably avoid focusing on it directly. Next, I'm going to look closely at `stmmac_selftest_run` itself and also `phylink_pcs_loopback`. Wait a minute, what about `dwmac_integrated_pcs_loopback`? It's marked as static, but it's assigned to `pcs_loopback` inside `dwmac_integrated_pcs_ops`. The inlining makes it harder, but since it's assigned to a function pointer, it *shouldn't* be inlined. Even so, it's generally better to prioritize exported or non-static functions for this kind of analysis. Thankfully, `phylink_pcs_loopback` *is* exported, which is perfect. And confirming that `stmmac_selftest_run` is also non-static, I can get to work. Therefore, my next move is to check the implementation of `phylink_pcs_loopback` located in `drivers/net/phy/phylink.c`. |
| 20/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "phylink_pcs_loopback",
"PathPrefix": "drivers/net/phy/phylink.c"
}Results: {
"Output": "drivers/net/phy/phylink.c=998=EXPORT_SYMBOL_GPL(phylink_pcs_pre_init);\n--\ndrivers/net/phy/phylink.c-1000-/**\ndrivers/net/phy/phylink.c:1001: * phylink_pcs_loopback() - Enable or disable loopback at the PCS\ndrivers/net/phy/phylink.c-1002- * @pcs: a pointer to a \u0026struct phylink_pcs.\n--\ndrivers/net/phy/phylink.c-1009- */\ndrivers/net/phy/phylink.c:1010:int phylink_pcs_loopback(struct phylink_pcs *pcs, bool enable)\ndrivers/net/phy/phylink.c-1011-{\n--\ndrivers/net/phy/phylink.c-1016-}\ndrivers/net/phy/phylink.c:1017:EXPORT_SYMBOL_GPL(phylink_pcs_loopback);\ndrivers/net/phy/phylink.c-1018-\n"
} |
| 21/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 33154 output: 38 thoughts: 125 Thoughts: **Focusing on Self-Test and Configuration** Okay, so I've zeroed in on the right areas to investigate. `phylink_pcs_loopback` feels like a solid focus symbol; it's right in the wheelhouse. Similarly, `stmmac_selftest_run` is another excellent point of reference for this self-test work. Now, let's pivot to the configuration aspects. What are the key config symbols we need to consider? I'm thinking: `STMMAC_ETH`, `STMMAC_PCI`, `STMMAC_SELFTESTS`, and `PHYLINK`. `PHYLINK` is usually brought in via `STMMAC_ETH` or something like `MACB`, but it's worth listing explicitly for clarity. The next logical step is to quickly confirm if `STMMAC_ETH` properly selects or triggers `PHYLINK`. We need to be sure the dependencies are as we expect them to be. |
| 22/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "select PHYLINK",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Kconfig=2=config STMMAC_ETH\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-9-\tselect PAGE_POOL\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:10:\tselect PHYLINK\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-11-\tselect CRC32\n"
} |
| 23/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 33643 output: 41 thoughts: 53 Thoughts: **Analyzing the Patch's Impact** Okay, so I've confirmed the initial assessment – the change definitely applies. But hold on a second... the patch isn't *just* touching that one file. It looks like it's also modifying `stmmac_pcs.c`. This raises a question I need to be absolutely sure about. Is `stmmac_pcs.c` unconditionally compiled into the build when `STMMAC_ETH` is enabled? I need to be certain, because any conditional compilation changes the scope of my review. Time to dive into the `Makefile` and confirm how this is configured. Gotta get the build dependencies and any potentially hidden interactions ironed out now, before I waste time on a downstream issue. |
| 24/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "stmmac_pcs.o",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Makefile=3=stmmac-objs:= stmmac_main.o stmmac_ethtool.o stmmac_mdio.o ring_mode.o\t\\\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile-9-\t stmmac_xdp.o stmmac_est.o stmmac_fpe.o stmmac_vlan.o \\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:10:\t stmmac_pcs.o $(stmmac-y)\ndrivers/net/ethernet/stmicro/stmmac/Makefile-11-\n"
} |
| 25/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 34072 output: 40 thoughts: 224 Thoughts: **My Current Line of Reasoning** Okay, yes, that's correct. Let's see, the relevant configurations here are `STMMAC_ETH`, `STMMAC_PCI`, and `STMMAC_SELFTESTS`. Now, a quick pause... does just `STMMAC_PCI` alone enable the driver to probe properly in a virtualized context? I know syzkaller can inject PCI devices using `syz_pci_device_add`. Hang on, maybe it *doesn't* need `STMMAC_PCI` if it can inject platform devices directly? Ah, right, syzkaller doesn't have a `syz_platform_device_add` function, only things like `syz_pci_device_add` and `syz_usb_connect`. So, to leverage PCI injection with syzkaller, it *does* need `STMMAC_PCI`. Let me just quickly confirm that `STMMAC_PCI` is, in fact, a tristate. Good, it is. Therefore, we should absolutely include `STMMAC_PCI` in the configuration. Now, just to be thorough, I should double-check to see if there are any other dependencies on `STMMAC_PCI` that might need to be considered. |
| 26/2 | 2026/07/27 20:10 | tool | grepper |
0mArgs:{
"Expression": "config STMMAC_PCI",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Kconfig=398=config DWMAC_MOTORCOMM\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-406-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:407:config STMMAC_PCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-408-\ttristate \"STMMAC PCI bus support\"\n"
} |
| 27/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 34740 output: 44 thoughts: 14 Thoughts: Here's my thought process, summarized as you requested: **Deconstructing `STMMAC_PCI` Dependencies** Okay, so I need to figure out what `STMMAC_PCI` actually *relies* on. I'm thinking, in terms of system architecture, this is likely a network driver, right? More specifically, it's probably related to a specific Ethernet controller, the one with an "ST" prefix which suggests a particular silicon vendor - possibly STMicroelectronics, though I should verify that. The "MAC" part strongly suggests it’s dealing with the Media Access Controller layer, which is crucial for handling Ethernet frames. And the "PCI" suffix? That immediately tells me this driver interfaces with the hardware via the Peripheral Component Interconnect bus. Therefore, the first questions I'm asking myself are: What specific hardware variations is it designed to handle? What other drivers or modules might be required for this to function correctly? For example, is there a specific PCI controller driver it needs? Are there any lower-level hardware abstraction layers that it uses? Are there any firmware or shared library dependencies that it might load? I need to look for headers, include files, or configuration files to determine what other parts of the system are needed to make it run. I'll need to look at its Kconfig entries. This is going to be my starting point. I know I'm already thinking about potential conflicts or dependencies on other drivers, and I need to start figuring out potential version requirements of any external libraries, so I can start to develop a holistic view of the `STMMAC_PCI` ecosystem. |
| 28/2 | 2026/07/27 20:10 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/stmicro/stmmac/Kconfig",
"FirstLine": 400,
"LineCount": 20
}Results: {
"Contents": " 400:\t\tdepends on PCI\n 401:\t\tselect MOTORCOMM_PHY\n 402:\t\tselect STMMAC_LIBPCI\n 403:\t\thelp\n 404:\t\t This enables glue driver for Motorcomm DWMAC-based PCI Ethernet\n 405:\t\t controllers. Currently only YT6801 is supported.\n 406:\t\n 407:\tconfig STMMAC_PCI\n 408:\t\ttristate \"STMMAC PCI bus support\"\n 409:\t\tdepends on PCI\n 410:\t\tdepends on COMMON_CLK\n 411:\t\tselect STMMAC_LIBPCI\n 412:\t\thelp\n 413:\t\t This selects the platform specific bus support for the stmmac driver.\n 414:\t\t This driver was tested on XLINX XC2V3000 FF1152AMT0221\n 415:\t\t D1215994A VIRTEX FPGA board and SNPS QoS IPK Prototyping Kit.\n 416:\t\n 417:\t\t If you have a controller with this interface, say Y or M here.\n 418:\t\n 419:\t\t If unsure, say N.\n"
} |
| 29/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 35455 output: 44 thoughts: 78 Thoughts: Okay, let me think this through. **Analyzing Driver Dependencies** Alright, so the `STMMAC_PCI` driver leverages the `PCI` and `COMMON_CLK` subsystems. `PCI` is pretty much ubiquitous – it's a standard interface, a foundational piece of hardware integration. And `COMMON_CLK` is becoming increasingly prevalent across various architectures, another standard that's essentially baked in these days. That means `STMMAC_PCI` seems like a solid choice from a dependency perspective, relatively easy to support, I'd say. No immediate red flags there. However, I should take a broader look at the landscape. Hold on a second... what about `DWMAC_INTEL`? Now that I think about it, that's another PCI-based driver. I should analyze it in a similar light to ensure a coherent approach. |
| 30/2 | 2026/07/27 20:10 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/stmicro/stmmac/Kconfig",
"FirstLine": 370,
"LineCount": 30
}Results: {
"Contents": " 370:\t\n 371:\tendif # STMMAC_PLATFORM\n 372:\t\n 373:\tconfig STMMAC_LIBPCI\n 374:\t\ttristate\n 375:\t\thelp\n 376:\t\t This option enables the PCI bus helpers for the stmmac driver.\n 377:\t\n 378:\tconfig DWMAC_INTEL\n 379:\t\ttristate \"Intel GMAC support\"\n 380:\t\tdefault X86\n 381:\t\tdepends on X86 \u0026\u0026 PCI\n 382:\t\tdepends on COMMON_CLK\n 383:\t\tdepends on ACPI\n 384:\t\thelp\n 385:\t\t This selects the Intel platform specific bus support for the\n 386:\t\t stmmac driver. This driver is used for Intel Quark/EHL/TGL.\n 387:\t\n 388:\tconfig DWMAC_LOONGSON\n 389:\t\ttristate \"Loongson PCI DWMAC support\"\n 390:\t\tdefault MACH_LOONGSON64\n 391:\t\tdepends on (MACH_LOONGSON64 || COMPILE_TEST) \u0026\u0026 PCI\n 392:\t\tdepends on COMMON_CLK\n 393:\t\tselect STMMAC_LIBPCI\n 394:\t\thelp\n 395:\t\t This selects the LOONGSON PCI bus support for the stmmac driver,\n 396:\t\t Support for ethernet controller on Loongson-2K1000 SoC and LS7A1000 bridge.\n 397:\t\n 398:\tconfig DWMAC_MOTORCOMM\n 399:\t\ttristate \"Motorcomm PCI DWMAC support\"\n"
} |
| 31/2 | 2026/07/27 20:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 36207 output: 166 thoughts: 1251 Thoughts: **Analysis of the STMMAC Integrated PCS Loopback Functionality** Okay, let's break this down. First, `DWMAC_INTEL` is also a PCI driver, so that's something to keep in mind, even though `STMMAC_PCI` supports specific device data for both `STMMAC` and `STMICRO` with `&stmmac_pci_info`. Since Syzkaller can inject any PCI ID, `STMMAC_PCI` should be sufficient for our purposes. My initial thought is to ensure we have the necessary configurations enabled. We're looking at `STMMAC_ETH`, `STMMAC_PCI`, and, crucially, `STMMAC_SELFTESTS`. A quick check confirms all three. Now, reviewing the patch itself, specifically the `dwmac_integrated_pcs_loopback` function, which modifies the GMAC control register. It's adding loopback support to the integrated PCS. The crucial part is how this function is used within the `stmmac_selftests.c` file. Specifically, `stmmac_selftest_get_pcs`, which checks for either glue driver's PCS or the integrated PCS. Then `stmmac_test_phy_loopback` uses `phylink_pcs_loopback`, and subsequently `stmmac_selftest_run` also uses `phylink_pcs_loopback`. My focus is on these symbols: `phylink_pcs_loopback` and `stmmac_selftest_run`. Although `dwmac_integrated_pcs_loopback` is static, it's executed when `phylink_pcs_loopback` is called. No other exported functions come into play. Let's confirm the configurations again: `STMMAC_ETH`, `STMMAC_PCI`, and `STMMAC_SELFTESTS`, plus `PHYLINK` which is selected by `STMMAC_ETH`, and `PCI`, which is standard. A double check confirms `STMMAC_SELFTESTS` is the precise configuration name. Let's ensure the function names are correct: `void stmmac_selftest_run(struct net_device *dev, struct ethtool_test *etest, u64 *buf)` and `int phylink_pcs_loopback(struct phylink_pcs *pcs, bool enable)`. Verification of the static nature of `stmmac_test_phy_loopback` and `stmmac_selftest_get_pcs` confirms my initial assessment. The key focus symbols remain: `phylink_pcs_loopback` and `stmmac_selftest_run`. The reasoning is pretty straightforward: this patch adds and enables loopback support for the STMMAC integrated PCS and phylink, and since this code is reached via the ethtool self-tests, which are accessible through `SIOCETHTOOL` with the `ETHTOOL_TEST` command, we can trigger the vulnerability by injecting a virtual PCI stmmac device and calling ethtool on it. And the commit message references syz-cluster with the patch, which means it is tested by syzkaller. Therefore, it is definitely reachable, and fuzzing it is definitely worthwhile. |
| 32/2 | 2026/07/27 20:11 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"STMMAC_ETH",
"STMMAC_PCI",
"STMMAC_SELFTESTS"
],
"FocusSymbols": [
"phylink_pcs_loopback",
"stmmac_selftest_run"
],
"Reasoning": "The patch adds loopback support to the stmmac integrated PCS and phylink, which is utilized by the stmmac ethtool selftests. This code is reachable via the SIOCETHTOOL ioctl with the ETHTOOL_TEST command. Syzkaller can trigger this by injecting a virtual PCI stmmac device using syz_pci_device_add and calling ethtool on the resulting netdev.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"STMMAC_ETH",
"STMMAC_PCI",
"STMMAC_SELFTESTS"
],
"FocusSymbols": [
"phylink_pcs_loopback",
"stmmac_selftest_run"
],
"Reasoning": "The patch adds loopback support to the stmmac integrated PCS and phylink, which is utilized by the stmmac ethtool selftests. This code is reachable via the SIOCETHTOOL ioctl with the ETHTOOL_TEST command. Syzkaller can trigger this by injecting a virtual PCI stmmac device using syz_pci_device_add and calling ethtool on the resulting netdev.",
"WorthFuzzing": true
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|