| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/02 15:04 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies the Motorcomm YT9215/YT9218 DSA ethernet switch driver (drivers/net/dsa/yt921x.c). This driver requires physical switch hardware connected over MDIO which is not emulated in virtualized environments like QEMU or GCE, making the modified code unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/02 15:04 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit b31e57768fa29c2dfeae69e815c2665a06727de3\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Sep 2 15:04:28 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/dsa/yt921x.c b/drivers/net/dsa/yt921x.c\nindex 159b16606f6ca..9bea42b61847d 100644\n--- a/drivers/net/dsa/yt921x.c\n+++ b/drivers/net/dsa/yt921x.c\n@@ -151,6 +151,8 @@ static const struct yt921x_info yt921x_infos[] = {\n \t{}\n };\n \n+static const struct yt92xx_series_info yt92xx_series_info_table[];\n+\n #define YT921X_NAME\t\"yt921x\"\n \n #define YT921X_VID_UNWARE\t4095\n@@ -563,7 +565,7 @@ static int yt921x_mbus_int_read(struct mii_bus *mbus, int port, int reg)\n \tu16 val;\n \tint res;\n \n-\tif (port \u003e= YT921X_PORT_NUM)\n+\tif (port \u003e= priv-\u003eseries_info-\u003emax_ports)\n \t\treturn U16_MAX;\n \n \tmutex_lock(\u0026priv-\u003ereg_lock);\n@@ -581,7 +583,7 @@ yt921x_mbus_int_write(struct mii_bus *mbus, int port, int reg, u16 data)\n \tstruct yt921x_priv *priv = mbus-\u003epriv;\n \tint res;\n \n-\tif (port \u003e= YT921X_PORT_NUM)\n+\tif (port \u003e= priv-\u003eseries_info-\u003emax_ports)\n \t\treturn -ENODEV;\n \n \tmutex_lock(\u0026priv-\u003ereg_lock);\n@@ -596,6 +598,7 @@ yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)\n {\n \tstruct device *dev = to_device(priv);\n \tstruct mii_bus *mbus;\n+\tu32 max_port;\n \tint res;\n \n \tmbus = devm_mdiobus_alloc(dev);\n@@ -608,7 +611,8 @@ yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)\n \tmbus-\u003eread = yt921x_mbus_int_read;\n \tmbus-\u003ewrite = yt921x_mbus_int_write;\n \tmbus-\u003eparent = dev;\n-\tmbus-\u003ephy_mask = (u32)~GENMASK(YT921X_PORT_NUM - 1, 0);\n+\tmax_port = priv-\u003eseries_info-\u003emax_ports;\n+\tmbus-\u003ephy_mask = (u32)~GENMASK(max_port - 1, 0);\n \n \tres = devm_of_mdiobus_register(dev, mbus, mnp);\n \tif (res)\n@@ -4430,8 +4434,36 @@ static int yt921x_edata_read(struct yt921x_priv *priv, u8 addr, u8 *valp)\n \treturn yt921x_edata_read_cont(priv, addr, valp);\n }\n \n+static const struct yt92xx_series_info yt92xx_series_info_table[] = {\n+\t[YT921X] = {\n+\t\t.chip_mode = YT921X,\n+\t\t.max_ports = YT921X_PORT_NUM,\n+\t\t.num_lag_ids = YT921X_LAG_NUM,\n+\t\t.ageing_time_min = 1 * 5000,\n+\t\t.ageing_time_max = U16_MAX * 5000,\n+\t\t.dscp_prio_mapping_is_global = true,\n+\t\t.assisted_learning_on_cpu_port = true,\n+\t},\n+};\n+\n+static const struct yt92xx_series_info *yt92xx_series_lookup_info(u32 major)\n+{\n+\tenum chip_mode mode = YT_MAX;\n+\tint i;\n+\n+\tif (major == YT9215_MAJOR || major == YT9218_MAJOR)\n+\t\tmode = YT921X;\n+\n+\tfor (i = 0; i \u003c ARRAY_SIZE(yt92xx_series_info_table); ++i)\n+\t\tif (yt92xx_series_info_table[i].chip_mode == mode)\n+\t\t\treturn \u0026yt92xx_series_info_table[i];\n+\n+\treturn NULL;\n+}\n+\n static int yt921x_chip_detect(struct yt921x_priv *priv)\n {\n+\tconst struct yt92xx_series_info *series_info;\n \tstruct device *dev = to_device(priv);\n \tconst struct yt921x_info *info;\n \tu8 extmode;\n@@ -4447,6 +4479,11 @@ static int yt921x_chip_detect(struct yt921x_priv *priv)\n \n \tmajor = FIELD_GET(YT921X_CHIP_ID_MAJOR, chipid);\n \n+\tseries_info = yt92xx_series_lookup_info(major);\n+\tif (!series_info)\n+\t\treturn -ENODEV;\n+\tpriv-\u003eseries_info = series_info;\n+\n \tfor (info = yt921x_infos; info-\u003ename; info++)\n \t\tif (info-\u003emajor == major)\n \t\t\tbreak;\n@@ -4740,6 +4777,20 @@ static int yt921x_chip_setup(struct yt921x_priv *priv)\n \treturn 0;\n }\n \n+static void yt92xx_register_switch(struct dsa_switch *ds)\n+{\n+\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\n+\n+\tds-\u003eassisted_learning_on_cpu_port =\n+\t\tpriv-\u003eseries_info-\u003eassisted_learning_on_cpu_port;\n+\tds-\u003edscp_prio_mapping_is_global =\n+\t\tpriv-\u003eseries_info-\u003edscp_prio_mapping_is_global;\n+\tds-\u003eageing_time_min = priv-\u003eseries_info-\u003eageing_time_min;\n+\tds-\u003eageing_time_max = priv-\u003eseries_info-\u003eageing_time_max;\n+\tds-\u003enum_lag_ids = priv-\u003eseries_info-\u003enum_lag_ids;\n+\tds-\u003enum_ports = priv-\u003eseries_info-\u003emax_ports;\n+}\n+\n static int yt921x_dsa_setup(struct dsa_switch *ds)\n {\n \tstruct yt921x_priv *priv = to_yt921x_priv(ds);\n@@ -4786,6 +4837,8 @@ static int yt921x_dsa_setup(struct dsa_switch *ds)\n \tif (res)\n \t\treturn res;\n \n+\tyt92xx_register_switch(ds);\n+\n \treturn 0;\n }\n \n@@ -4913,11 +4966,16 @@ static void yt921x_mdio_remove(struct mdio_device *mdiodev)\n \n static int yt921x_mdio_probe(struct mdio_device *mdiodev)\n {\n+\tconst struct yt92xx_series_info *compat_info = NULL;\n \tstruct device *dev = \u0026mdiodev-\u003edev;\n \tstruct yt921x_reg_mdio *mdio;\n \tstruct yt921x_priv *priv;\n \tstruct dsa_switch *ds;\n \n+\tcompat_info = of_device_get_match_data(dev);\n+\tif (!compat_info)\n+\t\treturn -EINVAL;\n+\n \tpriv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);\n \tif (!priv)\n \t\treturn -ENOMEM;\n@@ -4932,6 +4990,7 @@ static int yt921x_mdio_probe(struct mdio_device *mdiodev)\n \n \tmutex_init(\u0026priv-\u003ereg_lock);\n \n+\tpriv-\u003eseries_info = compat_info;\n \tpriv-\u003ereg_ops = \u0026yt921x_reg_ops_mdio;\n \tpriv-\u003ereg_ctx = mdio;\n \n@@ -4944,15 +5003,9 @@ static int yt921x_mdio_probe(struct mdio_device *mdiodev)\n \n \tds = \u0026priv-\u003eds;\n \tds-\u003edev = dev;\n-\tds-\u003eassisted_learning_on_cpu_port = true;\n-\tds-\u003edscp_prio_mapping_is_global = true;\n \tds-\u003epriv = priv;\n \tds-\u003eops = \u0026yt921x_dsa_switch_ops;\n-\tds-\u003eageing_time_min = 1 * 5000;\n-\tds-\u003eageing_time_max = U16_MAX * 5000;\n \tds-\u003ephylink_mac_ops = \u0026yt921x_phylink_mac_ops;\n-\tds-\u003enum_lag_ids = YT921X_LAG_NUM;\n-\tds-\u003enum_ports = YT921X_PORT_NUM;\n \n \tmdiodev_set_drvdata(mdiodev, priv);\n \n@@ -4960,8 +5013,11 @@ static int yt921x_mdio_probe(struct mdio_device *mdiodev)\n }\n \n static const struct of_device_id yt921x_of_match[] = {\n-\t{ .compatible = \"motorcomm,yt9215\" },\n-\t{}\n+\t{\n+\t\t.compatible = \"motorcomm,yt9215\",\n+\t\t.data = \u0026yt92xx_series_info_table[YT921X],\n+\t},\n+\t{ /* sentinel */ },\n };\n MODULE_DEVICE_TABLE(of, yt921x_of_match);\n \ndiff --git a/drivers/net/dsa/yt921x.h b/drivers/net/dsa/yt921x.h\nindex 5f3b99e189c41..cc8223ea5f299 100644\n--- a/drivers/net/dsa/yt921x.h\n+++ b/drivers/net/dsa/yt921x.h\n@@ -945,9 +945,25 @@ struct yt921x_reg_ops {\n \tint (*write)(void *context, u32 reg, u32 val);\n };\n \n+enum chip_mode {\n+\tYT921X,\n+\tYT_MAX,\n+};\n+\n+struct yt92xx_series_info {\n+\tenum chip_mode chip_mode;\n+\tunsigned int max_ports;\n+\tunsigned int num_lag_ids;\n+\tunsigned int ageing_time_min;\n+\tunsigned int ageing_time_max;\n+\tu32 dscp_prio_mapping_is_global;\n+\tu32 assisted_learning_on_cpu_port;\n+};\n+\n struct yt921x_priv {\n \tstruct dsa_switch ds;\n \n+\tconst struct yt92xx_series_info *series_info;\n \tconst struct yt921x_info *info;\n \tunsigned int meter_slot_ns;\n \tunsigned int port_shape_slot_ns;\n"
} |
| 2/1 | 2026/09/02 15:04 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Motorcomm YT9215/YT9218 DSA ethernet switch driver (drivers/net/dsa/yt921x.c). This driver requires physical switch hardware connected over MDIO which is not emulated in virtualized environments like QEMU or GCE, making the modified code unreachable for fuzzing.",
"WorthFuzzing": false
}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 b31e57768fa29c2dfeae69e815c2665a06727de3
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Sep 2 15:04:28 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/dsa/yt921x.c b/drivers/net/dsa/yt921x.c
index 159b16606f6ca..9bea42b61847d 100644
--- a/drivers/net/dsa/yt921x.c
+++ b/drivers/net/dsa/yt921x.c
@@ -151,6 +151,8 @@ static const struct yt921x_info yt921x_infos[] = {
{}
};
+static const struct yt92xx_series_info yt92xx_series_info_table[];
+
#define YT921X_NAME "yt921x"
#define YT921X_VID_UNWARE 4095
@@ -563,7 +565,7 @@ static int yt921x_mbus_int_read(struct mii_bus *mbus, int port, int reg)
u16 val;
int res;
- if (port >= YT921X_PORT_NUM)
+ if (port >= priv->series_info->max_ports)
return U16_MAX;
mutex_lock(&priv->reg_lock);
@@ -581,7 +583,7 @@ yt921x_mbus_int_write(struct mii_bus *mbus, int port, int reg, u16 data)
struct yt921x_priv *priv = mbus->priv;
int res;
- if (port >= YT921X_PORT_NUM)
+ if (port >= priv->series_info->max_ports)
return -ENODEV;
mutex_lock(&priv->reg_lock);
@@ -596,6 +598,7 @@ yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)
{
struct device *dev = to_device(priv);
struct mii_bus *mbus;
+ u32 max_port;
int res;
mbus = devm_mdiobus_alloc(dev);
@@ -608,7 +611,8 @@ yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)
mbus->read = yt921x_mbus_int_read;
mbus->write = yt921x_mbus_int_write;
mbus->parent = dev;
- mbus->phy_mask = (u32)~GENMASK(YT921X_PORT_NUM - 1, 0);
+ max_port = priv->series_info->max_ports;
+ mbus->phy_mask = (u32)~GENMASK(max_port - 1, 0);
res = devm_of_mdiobus_register(dev, mbus, mnp);
if (res)
@@ -4430,8 +4434,36 @@ static int yt921x_edata_read(struct yt921x_priv *priv, u8 addr, u8 *valp)
return yt921x_edata_read_cont(priv, addr, valp);
}
+static const struct yt92xx_series_info yt92xx_series_info_table[] = {
+ [YT921X] = {
+ .chip_mode = YT921X,
+ .max_ports = YT921X_PORT_NUM,
+ .num_lag_ids = YT921X_LAG_NUM,
+ .ageing_time_min = 1 * 5000,
+ .ageing_time_max = U16_MAX * 5000,
+ .dscp_prio_mapping_is_global = true,
+ .assisted_learning_on_cpu_port = true,
+ },
+};
+
+static const struct yt92xx_series_info *yt92xx_series_lookup_info(u32 major)
+{
+ enum chip_mode mode = YT_MAX;
+ int i;
+
+ if (major == YT9215_MAJOR || major == YT9218_MAJOR)
+ mode = YT921X;
+
+ for (i = 0; i < ARRAY_SIZE(yt92xx_series_info_table); ++i)
+ if (yt92xx_series_info_table[i].chip_mode == mode)
+ return &yt92xx_series_info_table[i];
+
+ return NULL;
+}
+
static int yt921x_chip_detect(struct yt921x_priv *priv)
{
+ const struct yt92xx_series_info *series_info;
struct device *dev = to_device(priv);
const struct yt921x_info *info;
u8 extmode;
@@ -4447,6 +4479,11 @@ static int yt921x_chip_detect(struct yt921x_priv *priv)
major = FIELD_GET(YT921X_CHIP_ID_MAJOR, chipid);
+ series_info = yt92xx_series_lookup_info(major);
+ if (!series_info)
+ return -ENODEV;
+ priv->series_info = series_info;
+
for (info = yt921x_infos; info->name; info++)
if (info->major == major)
break;
@@ -4740,6 +4777,20 @@ static int yt921x_chip_setup(struct yt921x_priv *priv)
return 0;
}
+static void yt92xx_register_switch(struct dsa_switch *ds)
+{
+ struct yt921x_priv *priv = to_yt921x_priv(ds);
+
+ ds->assisted_learning_on_cpu_port =
+ priv->series_info->assisted_learning_on_cpu_port;
+ ds->dscp_prio_mapping_is_global =
+ priv->series_info->dscp_prio_mapping_is_global;
+ ds->ageing_time_min = priv->series_info->ageing_time_min;
+ ds->ageing_time_max = priv->series_info->ageing_time_max;
+ ds->num_lag_ids = priv->series_info->num_lag_ids;
+ ds->num_ports = priv->series_info->max_ports;
+}
+
static int yt921x_dsa_setup(struct dsa_switch *ds)
{
struct yt921x_priv *priv = to_yt921x_priv(ds);
@@ -4786,6 +4837,8 @@ static int yt921x_dsa_setup(struct dsa_switch *ds)
if (res)
return res;
+ yt92xx_register_switch(ds);
+
return 0;
}
@@ -4913,11 +4966,16 @@ static void yt921x_mdio_remove(struct mdio_device *mdiodev)
static int yt921x_mdio_probe(struct mdio_device *mdiodev)
{
+ const struct yt92xx_series_info *compat_info = NULL;
struct device *dev = &mdiodev->dev;
struct yt921x_reg_mdio *mdio;
struct yt921x_priv *priv;
struct dsa_switch *ds;
+ compat_info = of_device_get_match_data(dev);
+ if (!compat_info)
+ return -EINVAL;
+
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
@@ -4932,6 +4990,7 @@ static int yt921x_mdio_probe(struct mdio_device *mdiodev)
mutex_init(&priv->reg_lock);
+ priv->series_info = compat_info;
priv->reg_ops = &yt921x_reg_ops_mdio;
priv->reg_ctx = mdio;
@@ -4944,15 +5003,9 @@ static int yt921x_mdio_probe(struct mdio_device *mdiodev)
ds = &priv->ds;
ds->dev = dev;
- ds->assisted_learning_on_cpu_port = true;
- ds->dscp_prio_mapping_is_global = true;
ds->priv = priv;
ds->ops = &yt921x_dsa_switch_ops;
- ds->ageing_time_min = 1 * 5000;
- ds->ageing_time_max = U16_MAX * 5000;
ds->phylink_mac_ops = &yt921x_phylink_mac_ops;
- ds->num_lag_ids = YT921X_LAG_NUM;
- ds->num_ports = YT921X_PORT_NUM;
mdiodev_set_drvdata(mdiodev, priv);
@@ -4960,8 +5013,11 @@ static int yt921x_mdio_probe(struct mdio_device *mdiodev)
}
static const struct of_device_id yt921x_of_match[] = {
- { .compatible = "motorcomm,yt9215" },
- {}
+ {
+ .compatible = "motorcomm,yt9215",
+ .data = &yt92xx_series_info_table[YT921X],
+ },
+ { /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, yt921x_of_match);
diff --git a/drivers/net/dsa/yt921x.h b/drivers/net/dsa/yt921x.h
index 5f3b99e189c41..cc8223ea5f299 100644
--- a/drivers/net/dsa/yt921x.h
+++ b/drivers/net/dsa/yt921x.h
@@ -945,9 +945,25 @@ struct yt921x_reg_ops {
int (*write)(void *context, u32 reg, u32 val);
};
+enum chip_mode {
+ YT921X,
+ YT_MAX,
+};
+
+struct yt92xx_series_info {
+ enum chip_mode chip_mode;
+ unsigned int max_ports;
+ unsigned int num_lag_ids;
+ unsigned int ageing_time_min;
+ unsigned int ageing_time_max;
+ u32 dscp_prio_mapping_is_global;
+ u32 assisted_learning_on_cpu_port;
+};
+
struct yt921x_priv {
struct dsa_switch ds;
+ const struct yt92xx_series_info *series_info;
const struct yt921x_info *info;
unsigned int meter_slot_ns;
unsigned int port_shape_slot_ns;
|
| 3/2 | 2026/09/02 15:04 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4857 output: 31 thoughts: 90 Thoughts: **Analyzing the Patch for Fuzzing Potential** Okay, let's get down to brass tacks. This patch—is it a good candidate for some fuzzing love? First things first, what's being touched? Ah, `drivers/net/dsa/yt921x.c` and `drivers/net/dsa/yt921x.h`. Right, that means a network driver, specifically dealing with `yt921x`. Now, the important question: what *kind* of driver is this, really? Is it a hardware abstraction layer, a protocol implementation, a data path handler? I need a deeper understanding to judge its fuzzing potential effectively. Time to consult the Kconfig and dive into the driver details. Grepping or a quick `read-file` will hopefully give me the context I need. I'm looking for entry points, data flows, and potential areas susceptible to unexpected inputs or misconfigurations. Then I can determine if this is worth the effort to set up fuzzing and how to best approach it. |
| 4/2 | 2026/09/02 15:04 | tool | grepper |
0mArgs:{
"Expression": "yt921x",
"PathPrefix": "drivers/net/dsa"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 2266 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/Makefile=17=obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o\ndrivers/net/dsa/Makefile:18:obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o\ndrivers/net/dsa/Makefile-19-obj-y\t\t\t\t+= b53/\n--\ndrivers/net/dsa/yt921x.c-28-\ndrivers/net/dsa/yt921x.c:29:#include \"yt921x.h\"\ndrivers/net/dsa/yt921x.c-30-\ndrivers/net/dsa/yt921x.c:31:struct yt921x_mib_desc {\ndrivers/net/dsa/yt921x.c-32-\tunsigned int size;\n--\ndrivers/net/dsa/yt921x.c-39-\ndrivers/net/dsa/yt921x.c:40:/* Must agree with yt921x_mib\ndrivers/net/dsa/yt921x.c-41- *\n--\ndrivers/net/dsa/yt921x.c-45- */\ndrivers/net/dsa/yt921x.c:46:static const struct yt921x_mib_desc yt921x_mib_descs[] = {\ndrivers/net/dsa/yt921x.c-47-\tMIB_DESC(1, YT921X_MIB_DATA_RX_BROADCAST, NULL),\n--\ndrivers/net/dsa/yt921x.c-97-\ndrivers/net/dsa/yt921x.c:98:struct yt921x_info {\ndrivers/net/dsa/yt921x.c-99-\tconst char *name;\n--\ndrivers/net/dsa/yt921x.c-105-\tu16 internal_mask;\ndrivers/net/dsa/yt921x.c:106:\t/* TODO: see comments in yt921x_dsa_phylink_get_caps() */\ndrivers/net/dsa/yt921x.c-107-\tu16 external_mask;\n--\ndrivers/net/dsa/yt921x.c-114-\ndrivers/net/dsa/yt921x.c:115:static const struct yt921x_info yt921x_infos[] = {\ndrivers/net/dsa/yt921x.c-116-\t{\n--\ndrivers/net/dsa/yt921x.c=154=static const struct yt92xx_series_info yt92xx_series_info_table[];\ndrivers/net/dsa/yt921x.c-155-\ndrivers/net/dsa/yt921x.c:156:#define YT921X_NAME\t\"yt921x\"\ndrivers/net/dsa/yt921x.c-157-\n--\ndrivers/net/dsa/yt921x.c-170-\ndrivers/net/dsa/yt921x.c:171:struct yt921x_reg_mdio {\ndrivers/net/dsa/yt921x.c-172-\tstruct mii_bus *bus;\n--\ndrivers/net/dsa/yt921x.c-187-\ndrivers/net/dsa/yt921x.c:188:#define to_yt921x_priv(_ds) container_of_const(_ds, struct yt921x_priv, ds)\ndrivers/net/dsa/yt921x.c-189-#define to_device(priv) ((priv)-\u003eds.dev)\n--\ndrivers/net/dsa/yt921x.c=196=static u32 ethaddr_lo2_to_u32(const unsigned char *addr)\n--\ndrivers/net/dsa/yt921x.c-200-\ndrivers/net/dsa/yt921x.c:201:static int yt921x_reg_read(struct yt921x_priv *priv, u32 reg, u32 *valp)\ndrivers/net/dsa/yt921x.c-202-{\n--\ndrivers/net/dsa/yt921x.c-207-\ndrivers/net/dsa/yt921x.c:208:static int yt921x_reg_write(struct yt921x_priv *priv, u32 reg, u32 val)\ndrivers/net/dsa/yt921x.c-209-{\n--\ndrivers/net/dsa/yt921x.c=215=static int\ndrivers/net/dsa/yt921x.c:216:yt921x_reg_wait(struct yt921x_priv *priv, u32 reg, u32 mask, u32 *valp)\ndrivers/net/dsa/yt921x.c-217-{\n--\ndrivers/net/dsa/yt921x.c-221-\ndrivers/net/dsa/yt921x.c:222:\tret = read_poll_timeout(yt921x_reg_read, res,\ndrivers/net/dsa/yt921x.c-223-\t\t\t\tres || (val \u0026 mask) == *valp,\n--\ndrivers/net/dsa/yt921x.c=235=static int\ndrivers/net/dsa/yt921x.c:236:yt921x_reg_update_bits(struct yt921x_priv *priv, u32 reg, u32 mask, u32 val)\ndrivers/net/dsa/yt921x.c-237-{\n--\ndrivers/net/dsa/yt921x.c-241-\ndrivers/net/dsa/yt921x.c:242:\tres = yt921x_reg_read(priv, reg, \u0026v);\ndrivers/net/dsa/yt921x.c-243-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-251-\ndrivers/net/dsa/yt921x.c:252:\treturn yt921x_reg_write(priv, reg, u);\ndrivers/net/dsa/yt921x.c-253-}\ndrivers/net/dsa/yt921x.c-254-\ndrivers/net/dsa/yt921x.c:255:static int yt921x_reg_set_bits(struct yt921x_priv *priv, u32 reg, u32 mask)\ndrivers/net/dsa/yt921x.c-256-{\ndrivers/net/dsa/yt921x.c:257:\treturn yt921x_reg_update_bits(priv, reg, 0, mask);\ndrivers/net/dsa/yt921x.c-258-}\ndrivers/net/dsa/yt921x.c-259-\ndrivers/net/dsa/yt921x.c:260:static int yt921x_reg_clear_bits(struct yt921x_priv *priv, u32 reg, u32 mask)\ndrivers/net/dsa/yt921x.c-261-{\ndrivers/net/dsa/yt921x.c:262:\treturn yt921x_reg_update_bits(priv, reg, mask, 0);\ndrivers/net/dsa/yt921x.c-263-}\n--\ndrivers/net/dsa/yt921x.c=265=static int\ndrivers/net/dsa/yt921x.c:266:yt921x_reg_toggle_bits(struct yt921x_priv *priv, u32 reg, u32 mask, bool set)\ndrivers/net/dsa/yt921x.c-267-{\ndrivers/net/dsa/yt921x.c:268:\treturn yt921x_reg_update_bits(priv, reg, mask, !set ? 0 : mask);\ndrivers/net/dsa/yt921x.c-269-}\n--\ndrivers/net/dsa/yt921x.c=287=static int\ndrivers/net/dsa/yt921x.c:288:yt921x_regs_read(struct yt921x_priv *priv, u32 reg, u32 *vals,\ndrivers/net/dsa/yt921x.c-289-\t\t unsigned int num_regs)\n--\ndrivers/net/dsa/yt921x.c-293-\tfor (unsigned int i = 0; i \u003c num_regs; i++) {\ndrivers/net/dsa/yt921x.c:294:\t\tres = yt921x_reg_read(priv, reg + 4 * i, \u0026vals[i]);\ndrivers/net/dsa/yt921x.c-295-\t\tif (res)\n--\ndrivers/net/dsa/yt921x.c=302=static int\ndrivers/net/dsa/yt921x.c:303:yt921x_regs_write(struct yt921x_priv *priv, u32 reg, const u32 *vals,\ndrivers/net/dsa/yt921x.c-304-\t\t unsigned int num_regs)\n--\ndrivers/net/dsa/yt921x.c-308-\tfor (unsigned int i = 0; i \u003c num_regs; i++) {\ndrivers/net/dsa/yt921x.c:309:\t\tres = yt921x_reg_write(priv, reg + 4 * i, vals[i]);\ndrivers/net/dsa/yt921x.c-310-\t\tif (res)\n--\ndrivers/net/dsa/yt921x.c=317=static int\ndrivers/net/dsa/yt921x.c:318:yt921x_regs_update_bits(struct yt921x_priv *priv, u32 reg, const u32 *masks,\ndrivers/net/dsa/yt921x.c-319-\t\t\tconst u32 *vals, unsigned int num_regs)\n--\ndrivers/net/dsa/yt921x.c-326-\ndrivers/net/dsa/yt921x.c:327:\tres = yt921x_regs_read(priv, reg, vs, num_regs);\ndrivers/net/dsa/yt921x.c-328-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-344-\ndrivers/net/dsa/yt921x.c:345:\treturn yt921x_regs_write(priv, reg, vs, num_regs);\ndrivers/net/dsa/yt921x.c-346-}\n--\ndrivers/net/dsa/yt921x.c=348=static int\ndrivers/net/dsa/yt921x.c:349:yt921x_regs_clear_bits(struct yt921x_priv *priv, u32 reg, const u32 *masks,\ndrivers/net/dsa/yt921x.c-350-\t\t unsigned int num_regs)\n--\ndrivers/net/dsa/yt921x.c-357-\ndrivers/net/dsa/yt921x.c:358:\tres = yt921x_regs_read(priv, reg, vs, num_regs);\ndrivers/net/dsa/yt921x.c-359-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-374-\ndrivers/net/dsa/yt921x.c:375:\treturn yt921x_regs_write(priv, reg, vs, num_regs);\ndrivers/net/dsa/yt921x.c-376-}\n--\ndrivers/net/dsa/yt921x.c=378=static int\ndrivers/net/dsa/yt921x.c:379:yt921x_reg64_write(struct yt921x_priv *priv, u32 reg, const u32 *vals)\ndrivers/net/dsa/yt921x.c-380-{\ndrivers/net/dsa/yt921x.c:381:\treturn yt921x_regs_write(priv, reg, vals, 2);\ndrivers/net/dsa/yt921x.c-382-}\n--\ndrivers/net/dsa/yt921x.c=384=static int\ndrivers/net/dsa/yt921x.c:385:yt921x_reg64_update_bits(struct yt921x_priv *priv, u32 reg, const u32 *masks,\ndrivers/net/dsa/yt921x.c-386-\t\t\t const u32 *vals)\ndrivers/net/dsa/yt921x.c-387-{\ndrivers/net/dsa/yt921x.c:388:\treturn yt921x_regs_update_bits(priv, reg, masks, vals, 2);\ndrivers/net/dsa/yt921x.c-389-}\n--\ndrivers/net/dsa/yt921x.c=391=static int\ndrivers/net/dsa/yt921x.c:392:yt921x_reg64_clear_bits(struct yt921x_priv *priv, u32 reg, const u32 *masks)\ndrivers/net/dsa/yt921x.c-393-{\ndrivers/net/dsa/yt921x.c:394:\treturn yt921x_regs_clear_bits(priv, reg, masks, 2);\ndrivers/net/dsa/yt921x.c-395-}\n--\ndrivers/net/dsa/yt921x.c=397=static int\ndrivers/net/dsa/yt921x.c:398:yt921x_reg96_write(struct yt921x_priv *priv, u32 reg, const u32 *vals)\ndrivers/net/dsa/yt921x.c-399-{\ndrivers/net/dsa/yt921x.c:400:\treturn yt921x_regs_write(priv, reg, vals, 3);\ndrivers/net/dsa/yt921x.c-401-}\ndrivers/net/dsa/yt921x.c-402-\ndrivers/net/dsa/yt921x.c:403:static int yt921x_reg_mdio_read(void *context, u32 reg, u32 *valp)\ndrivers/net/dsa/yt921x.c-404-{\ndrivers/net/dsa/yt921x.c:405:\tstruct yt921x_reg_mdio *mdio = context;\ndrivers/net/dsa/yt921x.c-406-\tstruct mii_bus *bus = mdio-\u003ebus;\n--\ndrivers/net/dsa/yt921x.c-443-\ndrivers/net/dsa/yt921x.c:444:static int yt921x_reg_mdio_write(void *context, u32 reg, u32 val)\ndrivers/net/dsa/yt921x.c-445-{\ndrivers/net/dsa/yt921x.c:446:\tstruct yt921x_reg_mdio *mdio = context;\ndrivers/net/dsa/yt921x.c-447-\tstruct mii_bus *bus = mdio-\u003ebus;\n--\ndrivers/net/dsa/yt921x.c-479-\ndrivers/net/dsa/yt921x.c:480:static const struct yt921x_reg_ops yt921x_reg_ops_mdio = {\ndrivers/net/dsa/yt921x.c:481:\t.read = yt921x_reg_mdio_read,\ndrivers/net/dsa/yt921x.c:482:\t.write = yt921x_reg_mdio_write,\ndrivers/net/dsa/yt921x.c-483-};\n--\ndrivers/net/dsa/yt921x.c-486-\ndrivers/net/dsa/yt921x.c:487:static int yt921x_intif_wait(struct yt921x_priv *priv)\ndrivers/net/dsa/yt921x.c-488-{\n--\ndrivers/net/dsa/yt921x.c-490-\ndrivers/net/dsa/yt921x.c:491:\treturn yt921x_reg_wait(priv, YT921X_INT_MBUS_OP, YT921X_MBUS_OP_START,\ndrivers/net/dsa/yt921x.c-492-\t\t\t \u0026val);\n--\ndrivers/net/dsa/yt921x.c=495=static int\ndrivers/net/dsa/yt921x.c:496:yt921x_intif_read(struct yt921x_priv *priv, int port, int reg, u16 *valp)\ndrivers/net/dsa/yt921x.c-497-{\n--\ndrivers/net/dsa/yt921x.c-503-\ndrivers/net/dsa/yt921x.c:504:\tres = yt921x_intif_wait(priv);\ndrivers/net/dsa/yt921x.c-505-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-511-\t YT921X_MBUS_CTRL_READ;\ndrivers/net/dsa/yt921x.c:512:\tres = yt921x_reg_update_bits(priv, YT921X_INT_MBUS_CTRL, mask, ctrl);\ndrivers/net/dsa/yt921x.c-513-\tif (res)\ndrivers/net/dsa/yt921x.c-514-\t\treturn res;\ndrivers/net/dsa/yt921x.c:515:\tres = yt921x_reg_write(priv, YT921X_INT_MBUS_OP, YT921X_MBUS_OP_START);\ndrivers/net/dsa/yt921x.c-516-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-518-\ndrivers/net/dsa/yt921x.c:519:\tres = yt921x_intif_wait(priv);\ndrivers/net/dsa/yt921x.c-520-\tif (res)\ndrivers/net/dsa/yt921x.c-521-\t\treturn res;\ndrivers/net/dsa/yt921x.c:522:\tres = yt921x_reg_read(priv, YT921X_INT_MBUS_DIN, \u0026val);\ndrivers/net/dsa/yt921x.c-523-\tif (res)\n--\ndrivers/net/dsa/yt921x.c=534=static int\ndrivers/net/dsa/yt921x.c:535:yt921x_intif_write(struct yt921x_priv *priv, int port, int reg, u16 val)\ndrivers/net/dsa/yt921x.c-536-{\n--\ndrivers/net/dsa/yt921x.c-540-\ndrivers/net/dsa/yt921x.c:541:\tres = yt921x_intif_wait(priv);\ndrivers/net/dsa/yt921x.c-542-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-548-\t YT921X_MBUS_CTRL_WRITE;\ndrivers/net/dsa/yt921x.c:549:\tres = yt921x_reg_update_bits(priv, YT921X_INT_MBUS_CTRL, mask, ctrl);\ndrivers/net/dsa/yt921x.c-550-\tif (res)\ndrivers/net/dsa/yt921x.c-551-\t\treturn res;\ndrivers/net/dsa/yt921x.c:552:\tres = yt921x_reg_write(priv, YT921X_INT_MBUS_DOUT, val);\ndrivers/net/dsa/yt921x.c-553-\tif (res)\ndrivers/net/dsa/yt921x.c-554-\t\treturn res;\ndrivers/net/dsa/yt921x.c:555:\tres = yt921x_reg_write(priv, YT921X_INT_MBUS_OP, YT921X_MBUS_OP_START);\ndrivers/net/dsa/yt921x.c-556-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-558-\ndrivers/net/dsa/yt921x.c:559:\treturn yt921x_intif_wait(priv);\ndrivers/net/dsa/yt921x.c-560-}\ndrivers/net/dsa/yt921x.c-561-\ndrivers/net/dsa/yt921x.c:562:static int yt921x_mbus_int_read(struct mii_bus *mbus, int port, int reg)\ndrivers/net/dsa/yt921x.c-563-{\ndrivers/net/dsa/yt921x.c:564:\tstruct yt921x_priv *priv = mbus-\u003epriv;\ndrivers/net/dsa/yt921x.c-565-\tu16 val;\n--\ndrivers/net/dsa/yt921x.c-571-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:572:\tres = yt921x_intif_read(priv, port, reg, \u0026val);\ndrivers/net/dsa/yt921x.c-573-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c=580=static int\ndrivers/net/dsa/yt921x.c:581:yt921x_mbus_int_write(struct mii_bus *mbus, int port, int reg, u16 data)\ndrivers/net/dsa/yt921x.c-582-{\ndrivers/net/dsa/yt921x.c:583:\tstruct yt921x_priv *priv = mbus-\u003epriv;\ndrivers/net/dsa/yt921x.c-584-\tint res;\n--\ndrivers/net/dsa/yt921x.c-589-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:590:\tres = yt921x_intif_write(priv, port, reg, data);\ndrivers/net/dsa/yt921x.c-591-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c=596=static int\ndrivers/net/dsa/yt921x.c:597:yt921x_mbus_int_init(struct yt921x_priv *priv, struct device_node *mnp)\ndrivers/net/dsa/yt921x.c-598-{\n--\ndrivers/net/dsa/yt921x.c-610-\tmbus-\u003epriv = priv;\ndrivers/net/dsa/yt921x.c:611:\tmbus-\u003eread = yt921x_mbus_int_read;\ndrivers/net/dsa/yt921x.c:612:\tmbus-\u003ewrite = yt921x_mbus_int_write;\ndrivers/net/dsa/yt921x.c-613-\tmbus-\u003eparent = dev;\n--\ndrivers/net/dsa/yt921x.c-625-\ndrivers/net/dsa/yt921x.c:626:static int yt921x_extif_wait(struct yt921x_priv *priv)\ndrivers/net/dsa/yt921x.c-627-{\n--\ndrivers/net/dsa/yt921x.c-629-\ndrivers/net/dsa/yt921x.c:630:\treturn yt921x_reg_wait(priv, YT921X_EXT_MBUS_OP, YT921X_MBUS_OP_START,\ndrivers/net/dsa/yt921x.c-631-\t\t\t \u0026val);\n--\ndrivers/net/dsa/yt921x.c=634=static int\ndrivers/net/dsa/yt921x.c:635:yt921x_extif_read(struct yt921x_priv *priv, int port, int reg, u16 *valp)\ndrivers/net/dsa/yt921x.c-636-{\n--\ndrivers/net/dsa/yt921x.c-642-\ndrivers/net/dsa/yt921x.c:643:\tres = yt921x_extif_wait(priv);\ndrivers/net/dsa/yt921x.c-644-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-650-\t YT921X_MBUS_CTRL_TYPE_C22 | YT921X_MBUS_CTRL_READ;\ndrivers/net/dsa/yt921x.c:651:\tres = yt921x_reg_update_bits(priv, YT921X_EXT_MBUS_CTRL, mask, ctrl);\ndrivers/net/dsa/yt921x.c-652-\tif (res)\ndrivers/net/dsa/yt921x.c-653-\t\treturn res;\ndrivers/net/dsa/yt921x.c:654:\tres = yt921x_reg_write(priv, YT921X_EXT_MBUS_OP, YT921X_MBUS_OP_START);\ndrivers/net/dsa/yt921x.c-655-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-657-\ndrivers/net/dsa/yt921x.c:658:\tres = yt921x_extif_wait(priv);\ndrivers/net/dsa/yt921x.c-659-\tif (res)\ndrivers/net/dsa/yt921x.c-660-\t\treturn res;\ndrivers/net/dsa/yt921x.c:661:\tres = yt921x_reg_read(priv, YT921X_EXT_MBUS_DIN, \u0026val);\ndrivers/net/dsa/yt921x.c-662-\tif (res)\n--\ndrivers/net/dsa/yt921x.c=673=static int\ndrivers/net/dsa/yt921x.c:674:yt921x_extif_write(struct yt921x_priv *priv, int port, int reg, u16 val)\ndrivers/net/dsa/yt921x.c-675-{\n--\ndrivers/net/dsa/yt921x.c-679-\ndrivers/net/dsa/yt921x.c:680:\tres = yt921x_extif_wait(priv);\ndrivers/net/dsa/yt921x.c-681-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-687-\t YT921X_MBUS_CTRL_TYPE_C22 | YT921X_MBUS_CTRL_WRITE;\ndrivers/net/dsa/yt921x.c:688:\tres = yt921x_reg_update_bits(priv, YT921X_EXT_MBUS_CTRL, mask, ctrl);\ndrivers/net/dsa/yt921x.c-689-\tif (res)\ndrivers/net/dsa/yt921x.c-690-\t\treturn res;\ndrivers/net/dsa/yt921x.c:691:\tres = yt921x_reg_write(priv, YT921X_EXT_MBUS_DOUT, val);\ndrivers/net/dsa/yt921x.c-692-\tif (res)\ndrivers/net/dsa/yt921x.c-693-\t\treturn res;\ndrivers/net/dsa/yt921x.c:694:\tres = yt921x_reg_write(priv, YT921X_EXT_MBUS_OP, YT921X_MBUS_OP_START);\ndrivers/net/dsa/yt921x.c-695-\tif (res)\n--\ndrivers/net/dsa/yt921x.c-697-\ndrivers/net/dsa/yt921x.c:698:\treturn yt921x_extif_wait(priv);\ndrivers/net/dsa/yt921x.c-699-}\ndrivers/net/dsa/yt921x.c-700-\ndrivers/net/dsa/yt921x.c:701:static int yt921x_mbus_ext_read(struct mii_bus *mbus, int port, int reg)\ndrivers/net/dsa/yt921x.c-702-{\ndrivers/net/dsa/yt921x.c:703:\tstruct yt921x_priv *priv = mbus-\u003epriv;\ndrivers/net/dsa/yt921x.c-704-\tu16 val;\n--\ndrivers/net/dsa/yt921x.c-707-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:708:\tres = yt921x_extif_read(priv, port, reg, \u0026val);\ndrivers/net/dsa/yt921x.c-709-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c=716=static int\ndrivers/net/dsa/yt921x.c:717:yt921x_mbus_ext_write(struct mii_bus *mbus, int port, int reg, u16 data)\ndrivers/net/dsa/yt921x.c-718-{\ndrivers/net/dsa/yt921x.c:719:\tstruct yt921x_priv *priv = mbus-\u003epriv;\ndrivers/net/dsa/yt921x.c-720-\tint res;\n--\ndrivers/net/dsa/yt921x.c-722-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:723:\tres = yt921x_extif_write(priv, port, reg, data);\ndrivers/net/dsa/yt921x.c-724-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c=729=static int\ndrivers/net/dsa/yt921x.c:730:yt921x_mbus_ext_init(struct yt921x_priv *priv, struct device_node *mnp)\ndrivers/net/dsa/yt921x.c-731-{\n--\ndrivers/net/dsa/yt921x.c-743-\t/* TODO: c45? */\ndrivers/net/dsa/yt921x.c:744:\tmbus-\u003eread = yt921x_mbus_ext_read;\ndrivers/net/dsa/yt921x.c:745:\tmbus-\u003ewrite = yt921x_mbus_ext_write;\ndrivers/net/dsa/yt921x.c-746-\tmbus-\u003eparent = dev;\n--\ndrivers/net/dsa/yt921x.c-757-/* Read and handle overflow of 32bit MIBs. MIB buffer must be zeroed before. */\ndrivers/net/dsa/yt921x.c:758:static int yt921x_read_mib(struct yt921x_priv *priv, int port)\ndrivers/net/dsa/yt921x.c-759-{\ndrivers/net/dsa/yt921x.c:760:\tstruct yt921x_port *pp = \u0026priv-\u003eports[port];\ndrivers/net/dsa/yt921x.c-761-\tstruct device *dev = to_device(priv);\ndrivers/net/dsa/yt921x.c:762:\tstruct yt921x_mib *mib = \u0026pp-\u003emib;\ndrivers/net/dsa/yt921x.c-763-\tint res = 0;\ndrivers/net/dsa/yt921x.c-764-\ndrivers/net/dsa/yt921x.c:765:\t/* Reading of yt921x_port::mib is not protected by a lock and it's vain\ndrivers/net/dsa/yt921x.c-766-\t * to keep its consistency, since we have to read registers one by one\n--\ndrivers/net/dsa/yt921x.c-772-\ndrivers/net/dsa/yt921x.c:773:\tfor (size_t i = 0; i \u003c ARRAY_SIZE(yt921x_mib_descs); i++) {\ndrivers/net/dsa/yt921x.c:774:\t\tconst struct yt921x_mib_desc *desc = \u0026yt921x_mib_descs[i];\ndrivers/net/dsa/yt921x.c-775-\t\tu32 reg = YT921X_MIBn_DATA0(port) + desc-\u003eoffset;\n--\ndrivers/net/dsa/yt921x.c-779-\ndrivers/net/dsa/yt921x.c:780:\t\tres = yt921x_reg_read(priv, reg, \u0026val0);\ndrivers/net/dsa/yt921x.c-781-\t\tif (res)\n--\ndrivers/net/dsa/yt921x.c-792-\ndrivers/net/dsa/yt921x.c:793:\t\t\tres = yt921x_reg_read(priv, reg + 4, \u0026val1);\ndrivers/net/dsa/yt921x.c-794-\t\t\tif (res)\n--\ndrivers/net/dsa/yt921x.c-816-\ndrivers/net/dsa/yt921x.c:817:static void yt921x_poll_mib(struct work_struct *work)\ndrivers/net/dsa/yt921x.c-818-{\ndrivers/net/dsa/yt921x.c:819:\tstruct yt921x_port *pp = container_of_const(work, struct yt921x_port,\ndrivers/net/dsa/yt921x.c-820-\t\t\t\t\t\t mib_read.work);\ndrivers/net/dsa/yt921x.c:821:\tstruct yt921x_priv *priv = (void *)(pp - pp-\u003eindex) -\ndrivers/net/dsa/yt921x.c:822:\t\t\t\t offsetof(struct yt921x_priv, ports);\ndrivers/net/dsa/yt921x.c-823-\tunsigned long delay = YT921X_STATS_INTERVAL_JIFFIES;\n--\ndrivers/net/dsa/yt921x.c-827-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:828:\tres = yt921x_read_mib(priv, port);\ndrivers/net/dsa/yt921x.c-829-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c=836=static void\ndrivers/net/dsa/yt921x.c:837:yt921x_dsa_get_strings(struct dsa_switch *ds, int port, u32 stringset,\ndrivers/net/dsa/yt921x.c-838-\t\t uint8_t *data)\n--\ndrivers/net/dsa/yt921x.c-842-\ndrivers/net/dsa/yt921x.c:843:\tfor (size_t i = 0; i \u003c ARRAY_SIZE(yt921x_mib_descs); i++) {\ndrivers/net/dsa/yt921x.c:844:\t\tconst struct yt921x_mib_desc *desc = \u0026yt921x_mib_descs[i];\ndrivers/net/dsa/yt921x.c-845-\n--\ndrivers/net/dsa/yt921x.c=851=static void\ndrivers/net/dsa/yt921x.c:852:yt921x_dsa_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)\ndrivers/net/dsa/yt921x.c-853-{\ndrivers/net/dsa/yt921x.c:854:\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\ndrivers/net/dsa/yt921x.c:855:\tstruct yt921x_port *pp = \u0026priv-\u003eports[port];\ndrivers/net/dsa/yt921x.c:856:\tstruct yt921x_mib *mib = \u0026pp-\u003emib;\ndrivers/net/dsa/yt921x.c-857-\tsize_t j;\n--\ndrivers/net/dsa/yt921x.c-859-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:860:\tyt921x_read_mib(priv, port);\ndrivers/net/dsa/yt921x.c-861-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c-863-\tj = 0;\ndrivers/net/dsa/yt921x.c:864:\tfor (size_t i = 0; i \u003c ARRAY_SIZE(yt921x_mib_descs); i++) {\ndrivers/net/dsa/yt921x.c:865:\t\tconst struct yt921x_mib_desc *desc = \u0026yt921x_mib_descs[i];\ndrivers/net/dsa/yt921x.c-866-\n--\ndrivers/net/dsa/yt921x.c-874-\ndrivers/net/dsa/yt921x.c:875:static int yt921x_dsa_get_sset_count(struct dsa_switch *ds, int port, int sset)\ndrivers/net/dsa/yt921x.c-876-{\n--\ndrivers/net/dsa/yt921x.c-881-\ndrivers/net/dsa/yt921x.c:882:\tfor (size_t i = 0; i \u003c ARRAY_SIZE(yt921x_mib_descs); i++) {\ndrivers/net/dsa/yt921x.c:883:\t\tconst struct yt921x_mib_desc *desc = \u0026yt921x_mib_descs[i];\ndrivers/net/dsa/yt921x.c-884-\n--\ndrivers/net/dsa/yt921x.c=892=static void\ndrivers/net/dsa/yt921x.c:893:yt921x_dsa_get_eth_mac_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/yt921x.c-894-\t\t\t struct ethtool_eth_mac_stats *mac_stats)\ndrivers/net/dsa/yt921x.c-895-{\ndrivers/net/dsa/yt921x.c:896:\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\ndrivers/net/dsa/yt921x.c:897:\tstruct yt921x_port *pp = \u0026priv-\u003eports[port];\ndrivers/net/dsa/yt921x.c:898:\tstruct yt921x_mib *mib = \u0026pp-\u003emib;\ndrivers/net/dsa/yt921x.c-899-\ndrivers/net/dsa/yt921x.c-900-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:901:\tyt921x_read_mib(priv, port);\ndrivers/net/dsa/yt921x.c-902-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c=928=static void\ndrivers/net/dsa/yt921x.c:929:yt921x_dsa_get_eth_ctrl_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/yt921x.c-930-\t\t\t struct ethtool_eth_ctrl_stats *ctrl_stats)\ndrivers/net/dsa/yt921x.c-931-{\ndrivers/net/dsa/yt921x.c:932:\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\ndrivers/net/dsa/yt921x.c:933:\tstruct yt921x_port *pp = \u0026priv-\u003eports[port];\ndrivers/net/dsa/yt921x.c:934:\tstruct yt921x_mib *mib = \u0026pp-\u003emib;\ndrivers/net/dsa/yt921x.c-935-\ndrivers/net/dsa/yt921x.c-936-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:937:\tyt921x_read_mib(priv, port);\ndrivers/net/dsa/yt921x.c-938-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c-944-\ndrivers/net/dsa/yt921x.c:945:static const struct ethtool_rmon_hist_range yt921x_rmon_ranges[] = {\ndrivers/net/dsa/yt921x.c-946-\t{ 0, 64 },\n--\ndrivers/net/dsa/yt921x.c=956=static void\ndrivers/net/dsa/yt921x.c:957:yt921x_dsa_get_rmon_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/yt921x.c-958-\t\t\t struct ethtool_rmon_stats *rmon_stats,\n--\ndrivers/net/dsa/yt921x.c-960-{\ndrivers/net/dsa/yt921x.c:961:\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\ndrivers/net/dsa/yt921x.c:962:\tstruct yt921x_port *pp = \u0026priv-\u003eports[port];\ndrivers/net/dsa/yt921x.c:963:\tstruct yt921x_mib *mib = \u0026pp-\u003emib;\ndrivers/net/dsa/yt921x.c-964-\ndrivers/net/dsa/yt921x.c-965-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:966:\tyt921x_read_mib(priv, port);\ndrivers/net/dsa/yt921x.c-967-\tmutex_unlock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c-968-\ndrivers/net/dsa/yt921x.c:969:\t*ranges = yt921x_rmon_ranges;\ndrivers/net/dsa/yt921x.c-970-\n--\ndrivers/net/dsa/yt921x.c=993=static void\ndrivers/net/dsa/yt921x.c:994:yt921x_dsa_get_stats64(struct dsa_switch *ds, int port,\ndrivers/net/dsa/yt921x.c-995-\t\t struct rtnl_link_stats64 *stats)\ndrivers/net/dsa/yt921x.c-996-{\ndrivers/net/dsa/yt921x.c:997:\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\ndrivers/net/dsa/yt921x.c:998:\tstruct yt921x_port *pp = \u0026priv-\u003eports[port];\ndrivers/net/dsa/yt921x.c:999:\tstruct yt921x_mib *mib = \u0026pp-\u003emib;\ndrivers/net/dsa/yt921x.c-1000-\n--\ndrivers/net/dsa/yt921x.c=1029=static void\ndrivers/net/dsa/yt921x.c:1030:yt921x_dsa_get_pause_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/yt921x.c-1031-\t\t\t struct ethtool_pause_stats *pause_stats)\ndrivers/net/dsa/yt921x.c-1032-{\ndrivers/net/dsa/yt921x.c:1033:\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\ndrivers/net/dsa/yt921x.c:1034:\tstruct yt921x_port *pp = \u0026priv-\u003eports[port];\ndrivers/net/dsa/yt921x.c:1035:\tstruct yt921x_mib *mib = \u0026pp-\u003emib;\ndrivers/net/dsa/yt921x.c-1036-\ndrivers/net/dsa/yt921x.c-1037-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:1038:\tyt921x_read_mib(priv, port);\ndrivers/net/dsa/yt921x.c-1039-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c=1045=static int\ndrivers/net/dsa/yt921x.c:1046:yt921x_set_eee(struct yt921x_priv *priv, int port, struct ethtool_keee *e)\ndrivers/net/dsa/yt921x.c-1047-{\n--\ndrivers/net/dsa/yt921x.c-1059-\tif (!!new_mask != !!priv-\u003eeee_ports_mask) {\ndrivers/net/dsa/yt921x.c:1060:\t\tres = yt921x_reg_toggle_bits(priv, YT921X_PON_STRAP_FUNC,\ndrivers/net/dsa/yt921x.c-1061-\t\t\t\t\t YT921X_PON_STRAP_EEE, !!new_mask);\n--\ndrivers/net/dsa/yt921x.c-1063-\t\t\treturn res;\ndrivers/net/dsa/yt921x.c:1064:\t\tres = yt921x_reg_toggle_bits(priv, YT921X_PON_STRAP_VAL,\ndrivers/net/dsa/yt921x.c-1065-\t\t\t\t\t YT921X_PON_STRAP_EEE, !!new_mask);\n--\ndrivers/net/dsa/yt921x.c-1072-\t/* Enable / disable port EEE */\ndrivers/net/dsa/yt921x.c:1073:\tres = yt921x_reg_toggle_bits(priv, YT921X_EEE_CTRL,\ndrivers/net/dsa/yt921x.c-1074-\t\t\t\t YT921X_EEE_CTRL_ENn(port), enable);\n--\ndrivers/net/dsa/yt921x.c-1076-\t\treturn res;\ndrivers/net/dsa/yt921x.c:1077:\tres = yt921x_reg_toggle_bits(priv, YT921X_EEEn_VAL(port),\ndrivers/net/dsa/yt921x.c-1078-\t\t\t\t YT921X_EEE_VAL_DATA, enable);\n--\ndrivers/net/dsa/yt921x.c=1085=static int\ndrivers/net/dsa/yt921x.c:1086:yt921x_dsa_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)\ndrivers/net/dsa/yt921x.c-1087-{\ndrivers/net/dsa/yt921x.c:1088:\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\ndrivers/net/dsa/yt921x.c-1089-\tint res;\n--\ndrivers/net/dsa/yt921x.c-1091-\tmutex_lock(\u0026priv-\u003ereg_lock);\ndrivers/net/dsa/yt921x.c:1092:\tres = yt921x_set_eee(priv, port, e);\ndrivers/net/dsa/yt921x.c-1093-\tmutex_unlock(\u0026priv-\u003ereg_lock);\n--\ndrivers/net/dsa/yt921x.c-1097-\ndrivers/net/dsa/yt921x.c:1098:static int yt921x_mtu_fetch(struct yt921x_priv *priv, int port)\n\n"
} |
| 5/2 | 2026/09/02 15:04 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 18745 output: 35 thoughts: 17 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the NET_DSA_YT921X Kconfig** Okay, so I'm looking at the `Kconfig` for `NET_DSA_YT921X`. My initial thought is to quickly determine what's being configured here. Is it a module, built-in, or part of a larger, more complex subsystem? I need to understand its dependencies. Are there any prerequisites I need to be aware of? Are we talking about a simple switch or something more involved, maybe with MACsec or VLAN features baked in? I'll be paying close attention to the `depends on` statements. I'll mentally map out the conditional compilation paths. If there are nested `if` statements, I need to break down the logic and understand the implication of each choice. I will have a look at any help texts; they usually provide context. Are there any default settings? And how are these defaults chosen, is it a value defined elsewhere, or based on hardware? Furthermore, I'll be keeping an eye out for any tristate settings, especially if there are module choices. This is where the decisions can get more complex, especially during build time. Also, is this new, or an existing device? If it's existing, I need to understand its relationship to the current kernel infrastructure. |
| 6/2 | 2026/09/02 15:04 | tool | grepper |
0mArgs:{
"Expression": "NET_DSA_YT921X",
"PathPrefix": "drivers/net/dsa"
}Results: {
"Output": "drivers/net/dsa/Kconfig=163=config NET_DSA_VITESSE_VSC73XX_PLATFORM\n--\ndrivers/net/dsa/Kconfig-171-\ndrivers/net/dsa/Kconfig:172:config NET_DSA_YT921X\ndrivers/net/dsa/Kconfig-173-\ttristate \"Motorcomm YT9215 ethernet switch chip support\"\n--\ndrivers/net/dsa/Makefile=17=obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o\ndrivers/net/dsa/Makefile:18:obj-$(CONFIG_NET_DSA_YT921X) += yt921x.o\ndrivers/net/dsa/Makefile-19-obj-y\t\t\t\t+= b53/\n"
} |
| 7/2 | 2026/09/02 15:04 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 19315 output: 37 thoughts: 19 Thoughts: Here's my summary, as though I'm reading and thinking about the Kconfig: **Deep Dive into `NET_DSA_YT921X` Kconfig** Okay, let's get down to brass tacks. I'm seeing `NET_DSA_YT921X`, which tells me we're looking at the configuration options for the YT921X Ethernet switch driver within the Distributed Switch Architecture (DSA) framework. My immediate thought is, "What are the dependencies? What hardware does this specifically target?" I need to understand its relationship to the broader DSA ecosystem. Is it a core driver, a platform-specific variant, or something more specialized? I'm scanning for the usual suspects: `depends on`, `select`, `help`, and any `default` values that might give me a clue about the default behavior and common configurations. I'll be looking for any hints about the underlying PHY (Physical Layer) it supports, the CPU interface (SPI, I2C, MDIO), and any specific board or chipset constraints. Are there any conditional dependencies? Are there conflicts that might come into play with other DSA drivers or network components? I'm also curious about any symbols this driver might `select`. What functionality is being pulled in? Does it involve specific DSA features like VLAN tagging, port mirroring, or traffic shaping? I'm going to quickly check for `bool`, `tristate`, or `int` variables. Furthermore, let me see if there are any *obvious* pitfalls, or gotchas, which should be highlighted with `help` text. Alright, time to dig in and unravel the Kconfig puzzle. Let’s see what goodies it holds! |
| 8/2 | 2026/09/02 15:04 | tool | read-file |
0mArgs:{
"File": "drivers/net/dsa/Kconfig",
"FirstLine": 165,
"LineCount": 30
}Results: {
"Contents": " 165:\t\tdepends on HAS_IOMEM\n 166:\t\tselect NET_DSA_VITESSE_VSC73XX\n 167:\t\thelp\n 168:\t\t This enables support for the Vitesse VSC7385, VSC7388, VSC7395\n 169:\t\t and VSC7398 SparX integrated ethernet switches, connected over\n 170:\t\t a CPU-attached address bus and work in memory-mapped I/O mode.\n 171:\t\n 172:\tconfig NET_DSA_YT921X\n 173:\t\ttristate \"Motorcomm YT9215 ethernet switch chip support\"\n 174:\t\tselect NET_DSA_TAG_YT921X\n 175:\t\tselect NET_IEEE8021Q_HELPERS if DCB\n 176:\t\thelp\n 177:\t\t This enables support for the Motorcomm YT9215 ethernet switch\n 178:\t\t chip.\n 179:\tendmenu\n"
} |
| 9/2 | 2026/09/02 15:04 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 20008 output: 46 thoughts: 71 Thoughts: Here's my summary, as though I'm thinking through this process: **Diving into the `yt921x` Implementation** Okay, so I need to understand how this `yt921x` is brought to life and, more importantly, how it's *used*. My immediate questions are: is this something that needs dedicated physical hardware, or is it a software abstraction? I can't assume anything at this point. Next, I'm going to want to know how it identifies itself to the system. Where does it fit into the broader system architecture? Is it using MDIO, platform-specific resources, or one of the more common interfaces like SPI or I2C? I'll need to figure out how it’s communicating and registering itself with the controlling devices. My usual starting point, when I'm reverse-engineering or coming up to speed on a module like this, is to immediately look at the end of the file. Let's see if the end of `yt921x.c` gives me any insights into how it's initialized and brought into service. Often, the end of the file holds the key entry points. |
| 10/2 | 2026/09/02 15:04 | tool | grepper |
0mArgs:{
"Expression": "module_mdio_driver|module_init|probe",
"PathPrefix": "drivers/net/dsa/yt921x.c"
}Results: {
"Output": "drivers/net/dsa/yt921x.c=4935=static void yt921x_mdio_remove(struct mdio_device *mdiodev)\n--\ndrivers/net/dsa/yt921x.c-4966-\ndrivers/net/dsa/yt921x.c:4967:static int yt921x_mdio_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/yt921x.c-4968-{\n--\ndrivers/net/dsa/yt921x.c=5024=static struct mdio_driver yt921x_mdio_driver = {\ndrivers/net/dsa/yt921x.c:5025:\t.probe = yt921x_mdio_probe,\ndrivers/net/dsa/yt921x.c-5026-\t.remove = yt921x_mdio_remove,\n"
} |
| 11/2 | 2026/09/02 15:04 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 20632 output: 43 thoughts: 497 Thoughts: **Analyzing the Reachability of `yt921x_mdio_driver` for Fuzzing**
Okay, so I'm looking at `yt921x_mdio_driver`, which, as the name suggests, is an MDIO driver. My initial question is: can MDIO devices or DSA switches, in general, be instantiated without the need for actual physical hardware? Or, are they strictly hardware-dependent? I need to figure this out in the context of fuzzing.
Let's see, what does the prompt say to filter out? Okay, it wants me to return `WorthFuzzing=false` if the patch has certain characteristics. It mentions unreachable code paths in virtualized environments like GCE or QEMU, even with software emulation. It also lists vendor-specific drivers for things like PCIe switches, SmartNICs, and GPUs, which require real PCIe hardware. Finally, it notes `.remove`, `.shutdown`, or `pci_unregister_driver` callbacks.
So, the core question is, can I reach the MDIO bus and switch driver in standard QEMU or even other virtual environments used for syzkaller, or GCE? Or is this impossible to instantiate an MDIO switch or an MDIO device via Device Tree in these settings?
I need to explore how MDIO devices are actually instantiated. Can they be created using things like `mdio-gpio`, `mdio-bitbang`, `mock-mdio`, or even through netlink, sysfs, DT overlays, etc.? Are there virtual or software methods? I should double-check other DSA switches or MDIO drivers in the syzkaller fuzzing or kernel guidelines to look for patterns.
Thinking about DSA, how does it actually work? DSA switches are *typically* instantiated using Device Tree (`of_device_get_match_data`) or platform data, and I need to determine if this can be emulated.
Looking at `yt921x_mdio_probe`, I see a critical section:
```c
compat_info = of_device_get_match_data(dev);
if (!compat_info)
return -EINVAL;
...
res = yt921x_chip_detect(priv);
```
So, this driver appears to rely on Device Tree! But does the `yt921x_chip_detect` function require physical hardware to detect chips? I must read the code in `drivers/net/dsa/yt921x.c`, specifically from lines 4965 to 5035 of `yt921x_mdio_probe` to understand this process and if it is dependent on hardware.
|
| 12/2 | 2026/09/02 15:05 | tool | read-file |
0mArgs:{
"File": "drivers/net/dsa/yt921x.c",
"FirstLine": 4965,
"LineCount": 70
}Results: {
"Contents": "4965:\t}\n4966:\t\n4967:\tstatic int yt921x_mdio_probe(struct mdio_device *mdiodev)\n4968:\t{\n4969:\t\tconst struct yt92xx_series_info *compat_info = NULL;\n4970:\t\tstruct device *dev = \u0026mdiodev-\u003edev;\n4971:\t\tstruct yt921x_reg_mdio *mdio;\n4972:\t\tstruct yt921x_priv *priv;\n4973:\t\tstruct dsa_switch *ds;\n4974:\t\n4975:\t\tcompat_info = of_device_get_match_data(dev);\n4976:\t\tif (!compat_info)\n4977:\t\t\treturn -EINVAL;\n4978:\t\n4979:\t\tpriv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);\n4980:\t\tif (!priv)\n4981:\t\t\treturn -ENOMEM;\n4982:\t\n4983:\t\tmdio = devm_kzalloc(dev, sizeof(*mdio), GFP_KERNEL);\n4984:\t\tif (!mdio)\n4985:\t\t\treturn -ENOMEM;\n4986:\t\n4987:\t\tmdio-\u003ebus = mdiodev-\u003ebus;\n4988:\t\tmdio-\u003eaddr = mdiodev-\u003eaddr;\n4989:\t\tmdio-\u003eswitchid = 0;\n4990:\t\n4991:\t\tmutex_init(\u0026priv-\u003ereg_lock);\n4992:\t\n4993:\t\tpriv-\u003eseries_info = compat_info;\n4994:\t\tpriv-\u003ereg_ops = \u0026yt921x_reg_ops_mdio;\n4995:\t\tpriv-\u003ereg_ctx = mdio;\n4996:\t\n4997:\t\tfor (size_t i = 0; i \u003c ARRAY_SIZE(priv-\u003eports); i++) {\n4998:\t\t\tstruct yt921x_port *pp = \u0026priv-\u003eports[i];\n4999:\t\n5000:\t\t\tpp-\u003eindex = i;\n5001:\t\t\tINIT_DELAYED_WORK(\u0026pp-\u003emib_read, yt921x_poll_mib);\n5002:\t\t}\n5003:\t\n5004:\t\tds = \u0026priv-\u003eds;\n5005:\t\tds-\u003edev = dev;\n5006:\t\tds-\u003epriv = priv;\n5007:\t\tds-\u003eops = \u0026yt921x_dsa_switch_ops;\n5008:\t\tds-\u003ephylink_mac_ops = \u0026yt921x_phylink_mac_ops;\n5009:\t\n5010:\t\tmdiodev_set_drvdata(mdiodev, priv);\n5011:\t\n5012:\t\treturn dsa_register_switch(ds);\n5013:\t}\n5014:\t\n5015:\tstatic const struct of_device_id yt921x_of_match[] = {\n5016:\t\t{\n5017:\t\t\t.compatible = \"motorcomm,yt9215\",\n5018:\t\t\t.data = \u0026yt92xx_series_info_table[YT921X],\n5019:\t\t},\n5020:\t\t{ /* sentinel */ },\n5021:\t};\n5022:\tMODULE_DEVICE_TABLE(of, yt921x_of_match);\n5023:\t\n5024:\tstatic struct mdio_driver yt921x_mdio_driver = {\n5025:\t\t.probe = yt921x_mdio_probe,\n5026:\t\t.remove = yt921x_mdio_remove,\n5027:\t\t.shutdown = yt921x_mdio_shutdown,\n5028:\t\t.mdiodrv.driver = {\n5029:\t\t\t.name = YT921X_NAME,\n5030:\t\t\t.of_match_table = yt921x_of_match,\n5031:\t\t},\n5032:\t};\n5033:\t\n5034:\tmdio_module_driver(yt921x_mdio_driver);\n"
} |
| 13/2 | 2026/09/02 15:05 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 22860 output: 43 thoughts: 94 Thoughts: **Analyzing the Yt921x MDIO Probe Process** Okay, let's break this down. First, `yt921x_mdio_probe` registers the switch with `dsa_register_switch(ds)`. That's the expected initialization. Ah, but *during* `dsa_register_switch(ds)`, the DSA switch setup actually *runs* `ds->ops->setup(ds)`. And that… that calls `yt921x_dsa_setup(ds)`. So, that's where the *real* configuration happens. I'm going to want to take a closer look at `yt921x_dsa_setup`. That's where the meat of the switch's initialization is going to be. Time to see what's happening in there. |
| 14/2 | 2026/09/02 15:05 | tool | read-file |
0mArgs:{
"File": "drivers/net/dsa/yt921x.c",
"FirstLine": 4790,
"LineCount": 60
}Results: {
"Contents": "4790:\t\tds-\u003enum_lag_ids = priv-\u003eseries_info-\u003enum_lag_ids;\n4791:\t\tds-\u003enum_ports = priv-\u003eseries_info-\u003emax_ports;\n4792:\t}\n4793:\t\n4794:\tstatic int yt921x_dsa_setup(struct dsa_switch *ds)\n4795:\t{\n4796:\t\tstruct yt921x_priv *priv = to_yt921x_priv(ds);\n4797:\t\tstruct device *dev = to_device(priv);\n4798:\t\tstruct device_node *np = dev-\u003eof_node;\n4799:\t\tstruct device_node *child;\n4800:\t\tint res;\n4801:\t\n4802:\t\tmutex_lock(\u0026priv-\u003ereg_lock);\n4803:\t\tres = yt921x_chip_reset(priv);\n4804:\t\tmutex_unlock(\u0026priv-\u003ereg_lock);\n4805:\t\n4806:\t\tif (res)\n4807:\t\t\treturn res;\n4808:\t\n4809:\t\t/* Register the internal mdio bus. Nodes for internal ports should have\n4810:\t\t * proper phy-handle pointing to their PHYs. Not enabling the internal\n4811:\t\t * bus is possible, though pretty wired, if internal ports are not used.\n4812:\t\t */\n4813:\t\tchild = of_get_child_by_name(np, \"mdio\");\n4814:\t\tif (child) {\n4815:\t\t\tres = yt921x_mbus_int_init(priv, child);\n4816:\t\t\tof_node_put(child);\n4817:\t\t\tif (res)\n4818:\t\t\t\treturn res;\n4819:\t\t}\n4820:\t\n4821:\t\t/* External mdio bus is optional */\n4822:\t\tchild = of_get_child_by_name(np, \"mdio-external\");\n4823:\t\tif (child) {\n4824:\t\t\tres = yt921x_mbus_ext_init(priv, child);\n4825:\t\t\tof_node_put(child);\n4826:\t\t\tif (res)\n4827:\t\t\t\treturn res;\n4828:\t\n4829:\t\t\tdev_err(dev, \"Untested external mdio bus\\n\");\n4830:\t\t\treturn -ENODEV;\n4831:\t\t}\n4832:\t\n4833:\t\tmutex_lock(\u0026priv-\u003ereg_lock);\n4834:\t\tres = yt921x_chip_setup(priv);\n4835:\t\tmutex_unlock(\u0026priv-\u003ereg_lock);\n4836:\t\n4837:\t\tif (res)\n4838:\t\t\treturn res;\n4839:\t\n4840:\t\tyt92xx_register_switch(ds);\n4841:\t\n4842:\t\treturn 0;\n4843:\t}\n4844:\t\n4845:\tstatic const struct phylink_mac_ops yt921x_phylink_mac_ops = {\n4846:\t\t.mac_link_down\t= yt921x_phylink_mac_link_down,\n4847:\t\t.mac_link_up\t= yt921x_phylink_mac_link_up,\n4848:\t\t.mac_config\t= yt921x_phylink_mac_config,\n4849:\t};\n"
} |
| 15/2 | 2026/09/02 15:05 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 24106 output: 30 thoughts: 545 Thoughts: **My Assessment of the Fuzzing Worthiness of NET_DSA_YT921X** Okay, let's break this down. My initial question is whether `NET_DSA_YT921X` – specifically, this `yt921x` driver – is even *reachable* within a QEMU or GCE environment. I know that `yt921x` relies on the Motorcomm YT9215 ethernet switch chip and its MDIO interface (`mdio_driver`). The crucial question is: Does QEMU even *emulate* that specific chip, or its MDIO registers? And the quick answer is *no*. QEMU doesn't emulate the YT9215. Alright, back to the rules. I need to see if this change falls under one of the exemptions for "WorthFuzzing=false." The relevant ones are modifications to unreachable code paths in virtualized environments. That includes specific hardware that QEMU doesn't emulate. This *could* apply. But I have to be sure. My next line of thought is to verify whether MDIO ethernet switch drivers (DSA drivers) in general *can* be reached or instantiated in QEMU/GCE. This is the key question. I need to figure out if there is some kind of mock or emulation for mdio/DSA, or if these are universally considered hardware drivers that are unreachable. I need to look for examples in the kernel itself, or in syzkaller. Are DSA drivers tested, or fuzzed on QEMU? And then... *aha!* There's `drivers/net/dsa/dsa_loop.c`. That's a software loopback DSA switch, *specifically* designed for testing the DSA core! That implies it's *possible* to test and, therefore, fuzz some DSA drivers in QEMU. This is promising. I need to take a closer look at `dsa_loop.c` to see how it works and determine if `NET_DSA_YT921X` can be adapted or tested in a similar fashion. |
| 16/2 | 2026/09/02 15:05 | tool | grepper |
0mArgs:{
"Expression": "dsa_loop",
"PathPrefix": "drivers/net/dsa"
}Results: {
"Output": "drivers/net/dsa/Makefile=3=bcm-sf2-objs\t\t\t:= bcm_sf2.o bcm_sf2_cfp.o\ndrivers/net/dsa/Makefile:4:obj-$(CONFIG_NET_DSA_LOOP)\t+= dsa_loop.o\ndrivers/net/dsa/Makefile-5-obj-$(CONFIG_NET_DSA_KS8995) \t+= ks8995.o\n--\ndrivers/net/dsa/dsa_loop.c-24-\ndrivers/net/dsa/dsa_loop.c:25:struct dsa_loop_vlan {\ndrivers/net/dsa/dsa_loop.c-26-\tu16 members;\n--\ndrivers/net/dsa/dsa_loop.c-29-\ndrivers/net/dsa/dsa_loop.c:30:struct dsa_loop_mib_entry {\ndrivers/net/dsa/dsa_loop.c-31-\tchar name[ETH_GSTRING_LEN];\n--\ndrivers/net/dsa/dsa_loop.c-34-\ndrivers/net/dsa/dsa_loop.c:35:enum dsa_loop_mib_counters {\ndrivers/net/dsa/dsa_loop.c-36-\tDSA_LOOP_PHY_READ_OK,\n--\ndrivers/net/dsa/dsa_loop.c-42-\ndrivers/net/dsa/dsa_loop.c:43:struct dsa_loop_port {\ndrivers/net/dsa/dsa_loop.c:44:\tstruct dsa_loop_mib_entry mib[__DSA_LOOP_CNT_MAX];\ndrivers/net/dsa/dsa_loop.c-45-\tu16 pvid;\n--\ndrivers/net/dsa/dsa_loop.c-48-\ndrivers/net/dsa/dsa_loop.c:49:struct dsa_loop_priv {\ndrivers/net/dsa/dsa_loop.c-50-\tstruct mii_bus\t*bus;\ndrivers/net/dsa/dsa_loop.c-51-\tunsigned int\tport_base;\ndrivers/net/dsa/dsa_loop.c:52:\tstruct dsa_loop_vlan vlans[VLAN_N_VID];\ndrivers/net/dsa/dsa_loop.c-53-\tstruct net_device *netdev;\ndrivers/net/dsa/dsa_loop.c:54:\tstruct dsa_loop_port ports[DSA_MAX_PORTS];\ndrivers/net/dsa/dsa_loop.c-55-};\ndrivers/net/dsa/dsa_loop.c-56-\ndrivers/net/dsa/dsa_loop.c:57:struct dsa_loop_pdata {\ndrivers/net/dsa/dsa_loop.c-58-\t/* Must be first, such that dsa_register_switch() can access this\n--\ndrivers/net/dsa/dsa_loop.c-66-\ndrivers/net/dsa/dsa_loop.c:67:static struct dsa_loop_mib_entry dsa_loop_mibs[] = {\ndrivers/net/dsa/dsa_loop.c-68-\t[DSA_LOOP_PHY_READ_OK]\t= { \"phy_read_ok\", },\n--\ndrivers/net/dsa/dsa_loop.c=75=static struct mdio_device *switch_mdiodev;\ndrivers/net/dsa/dsa_loop.c-76-\ndrivers/net/dsa/dsa_loop.c:77:enum dsa_loop_devlink_resource_id {\ndrivers/net/dsa/dsa_loop.c-78-\tDSA_LOOP_DEVLINK_PARAM_ID_NONE, /* DEVLINK_RESOURCE_ID_PARENT_TOP */\n--\ndrivers/net/dsa/dsa_loop.c-81-\ndrivers/net/dsa/dsa_loop.c:82:static u64 dsa_loop_devlink_vtu_get(void *priv)\ndrivers/net/dsa/dsa_loop.c-83-{\ndrivers/net/dsa/dsa_loop.c:84:\tstruct dsa_loop_priv *ps = priv;\ndrivers/net/dsa/dsa_loop.c-85-\tunsigned int i, count = 0;\ndrivers/net/dsa/dsa_loop.c:86:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-87-\n--\ndrivers/net/dsa/dsa_loop.c-96-\ndrivers/net/dsa/dsa_loop.c:97:static int dsa_loop_setup_devlink_resources(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-98-{\ndrivers/net/dsa/dsa_loop.c-99-\tstruct devlink_resource_size_params size_params;\ndrivers/net/dsa/dsa_loop.c:100:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-101-\tint err;\n--\ndrivers/net/dsa/dsa_loop.c-115-\t\t\t\t\t DSA_LOOP_DEVLINK_PARAM_ID_VTU,\ndrivers/net/dsa/dsa_loop.c:116:\t\t\t\t\t dsa_loop_devlink_vtu_get, ps);\ndrivers/net/dsa/dsa_loop.c-117-\n--\ndrivers/net/dsa/dsa_loop.c-124-\ndrivers/net/dsa/dsa_loop.c:125:static enum dsa_tag_protocol dsa_loop_get_protocol(struct dsa_switch *ds,\ndrivers/net/dsa/dsa_loop.c-126-\t\t\t\t\t\t int port,\n--\ndrivers/net/dsa/dsa_loop.c-133-\ndrivers/net/dsa/dsa_loop.c:134:static int dsa_loop_setup(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-135-{\ndrivers/net/dsa/dsa_loop.c:136:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-137-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-139-\tfor (i = 0; i \u003c ds-\u003enum_ports; i++)\ndrivers/net/dsa/dsa_loop.c:140:\t\tmemcpy(ps-\u003eports[i].mib, dsa_loop_mibs,\ndrivers/net/dsa/dsa_loop.c:141:\t\t sizeof(dsa_loop_mibs));\ndrivers/net/dsa/dsa_loop.c-142-\n--\ndrivers/net/dsa/dsa_loop.c-144-\ndrivers/net/dsa/dsa_loop.c:145:\treturn dsa_loop_setup_devlink_resources(ds);\ndrivers/net/dsa/dsa_loop.c-146-}\ndrivers/net/dsa/dsa_loop.c-147-\ndrivers/net/dsa/dsa_loop.c:148:static void dsa_loop_teardown(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-149-{\n--\ndrivers/net/dsa/dsa_loop.c-152-\ndrivers/net/dsa/dsa_loop.c:153:static int dsa_loop_get_sset_count(struct dsa_switch *ds, int port, int sset)\ndrivers/net/dsa/dsa_loop.c-154-{\n--\ndrivers/net/dsa/dsa_loop.c-160-\ndrivers/net/dsa/dsa_loop.c:161:static void dsa_loop_get_strings(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-162-\t\t\t\t u32 stringset, uint8_t *data)\ndrivers/net/dsa/dsa_loop.c-163-{\ndrivers/net/dsa/dsa_loop.c:164:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-165-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-173-\ndrivers/net/dsa/dsa_loop.c:174:static void dsa_loop_get_ethtool_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-175-\t\t\t\t uint64_t *data)\ndrivers/net/dsa/dsa_loop.c-176-{\ndrivers/net/dsa/dsa_loop.c:177:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-178-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-183-\ndrivers/net/dsa/dsa_loop.c:184:static int dsa_loop_phy_read(struct dsa_switch *ds, int port, int regnum)\ndrivers/net/dsa/dsa_loop.c-185-{\ndrivers/net/dsa/dsa_loop.c:186:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-187-\tstruct mii_bus *bus = ps-\u003ebus;\n--\ndrivers/net/dsa/dsa_loop.c-198-\ndrivers/net/dsa/dsa_loop.c:199:static int dsa_loop_phy_write(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-200-\t\t\t int regnum, u16 value)\ndrivers/net/dsa/dsa_loop.c-201-{\ndrivers/net/dsa/dsa_loop.c:202:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-203-\tstruct mii_bus *bus = ps-\u003ebus;\n--\ndrivers/net/dsa/dsa_loop.c-214-\ndrivers/net/dsa/dsa_loop.c:215:static int dsa_loop_port_bridge_join(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-216-\t\t\t\t struct dsa_bridge bridge,\n--\ndrivers/net/dsa/dsa_loop.c-225-\ndrivers/net/dsa/dsa_loop.c:226:static void dsa_loop_port_bridge_leave(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-227-\t\t\t\t struct dsa_bridge bridge)\n--\ndrivers/net/dsa/dsa_loop.c-232-\ndrivers/net/dsa/dsa_loop.c:233:static void dsa_loop_port_stp_state_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-234-\t\t\t\t\tu8 state)\n--\ndrivers/net/dsa/dsa_loop.c-239-\ndrivers/net/dsa/dsa_loop.c:240:static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-241-\t\t\t\t\tbool vlan_filtering,\n--\ndrivers/net/dsa/dsa_loop.c-249-\ndrivers/net/dsa/dsa_loop.c:250:static int dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-251-\t\t\t\t const struct switchdev_obj_port_vlan *vlan,\n--\ndrivers/net/dsa/dsa_loop.c-255-\tbool pvid = vlan-\u003eflags \u0026 BRIDGE_VLAN_INFO_PVID;\ndrivers/net/dsa/dsa_loop.c:256:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-257-\tstruct mii_bus *bus = ps-\u003ebus;\ndrivers/net/dsa/dsa_loop.c:258:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-259-\n--\ndrivers/net/dsa/dsa_loop.c-282-\ndrivers/net/dsa/dsa_loop.c:283:static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-284-\t\t\t\t const struct switchdev_obj_port_vlan *vlan)\n--\ndrivers/net/dsa/dsa_loop.c-286-\tbool untagged = vlan-\u003eflags \u0026 BRIDGE_VLAN_INFO_UNTAGGED;\ndrivers/net/dsa/dsa_loop.c:287:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-288-\tu16 pvid = ps-\u003eports[port].pvid;\ndrivers/net/dsa/dsa_loop.c-289-\tstruct mii_bus *bus = ps-\u003ebus;\ndrivers/net/dsa/dsa_loop.c:290:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-291-\n--\ndrivers/net/dsa/dsa_loop.c-310-\ndrivers/net/dsa/dsa_loop.c:311:static int dsa_loop_port_change_mtu(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-312-\t\t\t\t int new_mtu)\ndrivers/net/dsa/dsa_loop.c-313-{\ndrivers/net/dsa/dsa_loop.c:314:\tstruct dsa_loop_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-315-\n--\ndrivers/net/dsa/dsa_loop.c-320-\ndrivers/net/dsa/dsa_loop.c:321:static int dsa_loop_port_max_mtu(struct dsa_switch *ds, int port)\ndrivers/net/dsa/dsa_loop.c-322-{\n--\ndrivers/net/dsa/dsa_loop.c-325-\ndrivers/net/dsa/dsa_loop.c:326:static void dsa_loop_phylink_get_caps(struct dsa_switch *dsa, int port,\ndrivers/net/dsa/dsa_loop.c-327-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/dsa_loop.c-333-\ndrivers/net/dsa/dsa_loop.c:334:static const struct dsa_switch_ops dsa_loop_driver = {\ndrivers/net/dsa/dsa_loop.c:335:\t.get_tag_protocol\t= dsa_loop_get_protocol,\ndrivers/net/dsa/dsa_loop.c:336:\t.setup\t\t\t= dsa_loop_setup,\ndrivers/net/dsa/dsa_loop.c:337:\t.teardown\t\t= dsa_loop_teardown,\ndrivers/net/dsa/dsa_loop.c:338:\t.get_strings\t\t= dsa_loop_get_strings,\ndrivers/net/dsa/dsa_loop.c:339:\t.get_ethtool_stats\t= dsa_loop_get_ethtool_stats,\ndrivers/net/dsa/dsa_loop.c:340:\t.get_sset_count\t\t= dsa_loop_get_sset_count,\ndrivers/net/dsa/dsa_loop.c:341:\t.get_ethtool_phy_stats\t= dsa_loop_get_ethtool_stats,\ndrivers/net/dsa/dsa_loop.c:342:\t.phy_read\t\t= dsa_loop_phy_read,\ndrivers/net/dsa/dsa_loop.c:343:\t.phy_write\t\t= dsa_loop_phy_write,\ndrivers/net/dsa/dsa_loop.c:344:\t.port_bridge_join\t= dsa_loop_port_bridge_join,\ndrivers/net/dsa/dsa_loop.c:345:\t.port_bridge_leave\t= dsa_loop_port_bridge_leave,\ndrivers/net/dsa/dsa_loop.c:346:\t.port_stp_state_set\t= dsa_loop_port_stp_state_set,\ndrivers/net/dsa/dsa_loop.c:347:\t.port_vlan_filtering\t= dsa_loop_port_vlan_filtering,\ndrivers/net/dsa/dsa_loop.c:348:\t.port_vlan_add\t\t= dsa_loop_port_vlan_add,\ndrivers/net/dsa/dsa_loop.c:349:\t.port_vlan_del\t\t= dsa_loop_port_vlan_del,\ndrivers/net/dsa/dsa_loop.c:350:\t.port_change_mtu\t= dsa_loop_port_change_mtu,\ndrivers/net/dsa/dsa_loop.c:351:\t.port_max_mtu\t\t= dsa_loop_port_max_mtu,\ndrivers/net/dsa/dsa_loop.c:352:\t.phylink_get_caps\t= dsa_loop_phylink_get_caps,\ndrivers/net/dsa/dsa_loop.c-353-};\ndrivers/net/dsa/dsa_loop.c-354-\ndrivers/net/dsa/dsa_loop.c:355:static int dsa_loop_drv_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-356-{\ndrivers/net/dsa/dsa_loop.c:357:\tstruct dsa_loop_pdata *pdata = mdiodev-\u003edev.platform_data;\ndrivers/net/dsa/dsa_loop.c:358:\tstruct dsa_loop_priv *ps;\ndrivers/net/dsa/dsa_loop.c-359-\tstruct dsa_switch *ds;\n--\ndrivers/net/dsa/dsa_loop.c-382-\tds-\u003edev = \u0026mdiodev-\u003edev;\ndrivers/net/dsa/dsa_loop.c:383:\tds-\u003eops = \u0026dsa_loop_driver;\ndrivers/net/dsa/dsa_loop.c-384-\tds-\u003epriv = ps;\n--\ndrivers/net/dsa/dsa_loop.c-396-\ndrivers/net/dsa/dsa_loop.c:397:static void dsa_loop_drv_remove(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-398-{\ndrivers/net/dsa/dsa_loop.c-399-\tstruct dsa_switch *ds = dev_get_drvdata(\u0026mdiodev-\u003edev);\ndrivers/net/dsa/dsa_loop.c:400:\tstruct dsa_loop_priv *ps;\ndrivers/net/dsa/dsa_loop.c-401-\n--\ndrivers/net/dsa/dsa_loop.c-410-\ndrivers/net/dsa/dsa_loop.c:411:static void dsa_loop_drv_shutdown(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-412-{\n--\ndrivers/net/dsa/dsa_loop.c-422-\ndrivers/net/dsa/dsa_loop.c:423:static struct mdio_driver dsa_loop_drv = {\ndrivers/net/dsa/dsa_loop.c-424-\t.mdiodrv.driver\t= {\n--\ndrivers/net/dsa/dsa_loop.c-426-\t},\ndrivers/net/dsa/dsa_loop.c:427:\t.probe\t= dsa_loop_drv_probe,\ndrivers/net/dsa/dsa_loop.c:428:\t.remove\t= dsa_loop_drv_remove,\ndrivers/net/dsa/dsa_loop.c:429:\t.shutdown = dsa_loop_drv_shutdown,\ndrivers/net/dsa/dsa_loop.c-430-};\ndrivers/net/dsa/dsa_loop.c-431-\ndrivers/net/dsa/dsa_loop.c:432:static int dsa_loop_bus_match(struct device *dev,\ndrivers/net/dsa/dsa_loop.c-433-\t\t\t const struct device_driver *drv)\ndrivers/net/dsa/dsa_loop.c-434-{\ndrivers/net/dsa/dsa_loop.c:435:\treturn drv == \u0026dsa_loop_drv.mdiodrv.driver;\ndrivers/net/dsa/dsa_loop.c-436-}\ndrivers/net/dsa/dsa_loop.c-437-\ndrivers/net/dsa/dsa_loop.c:438:static void dsa_loop_phydevs_unregister(void)\ndrivers/net/dsa/dsa_loop.c-439-{\n--\ndrivers/net/dsa/dsa_loop.c-445-\ndrivers/net/dsa/dsa_loop.c:446:static int __init dsa_loop_create_switch_mdiodev(void)\ndrivers/net/dsa/dsa_loop.c-447-{\ndrivers/net/dsa/dsa_loop.c:448:\tstatic struct dsa_loop_pdata dsa_loop_pdata = {\ndrivers/net/dsa/dsa_loop.c-449-\t\t.cd = {\n--\ndrivers/net/dsa/dsa_loop.c-470-\ndrivers/net/dsa/dsa_loop.c:471:\tswitch_mdiodev-\u003ebus_match = dsa_loop_bus_match;\ndrivers/net/dsa/dsa_loop.c:472:\tswitch_mdiodev-\u003edev.platform_data = \u0026dsa_loop_pdata;\ndrivers/net/dsa/dsa_loop.c-473-\n--\ndrivers/net/dsa/dsa_loop.c-481-\ndrivers/net/dsa/dsa_loop.c:482:static int __init dsa_loop_init(void)\ndrivers/net/dsa/dsa_loop.c-483-{\n--\ndrivers/net/dsa/dsa_loop.c-486-\ndrivers/net/dsa/dsa_loop.c:487:\tret = dsa_loop_create_switch_mdiodev();\ndrivers/net/dsa/dsa_loop.c-488-\tif (ret)\n--\ndrivers/net/dsa/dsa_loop.c-493-\ndrivers/net/dsa/dsa_loop.c:494:\tret = mdio_driver_register(\u0026dsa_loop_drv);\ndrivers/net/dsa/dsa_loop.c-495-\tif (ret) {\ndrivers/net/dsa/dsa_loop.c:496:\t\tdsa_loop_phydevs_unregister();\ndrivers/net/dsa/dsa_loop.c-497-\t\tmdio_device_remove(switch_mdiodev);\n--\ndrivers/net/dsa/dsa_loop.c-502-}\ndrivers/net/dsa/dsa_loop.c:503:module_init(dsa_loop_init);\ndrivers/net/dsa/dsa_loop.c-504-\ndrivers/net/dsa/dsa_loop.c:505:static void __exit dsa_loop_exit(void)\ndrivers/net/dsa/dsa_loop.c-506-{\ndrivers/net/dsa/dsa_loop.c:507:\tmdio_driver_unregister(\u0026dsa_loop_drv);\ndrivers/net/dsa/dsa_loop.c:508:\tdsa_loop_phydevs_unregister();\ndrivers/net/dsa/dsa_loop.c-509-\tmdio_device_remove(switch_mdiodev);\n--\ndrivers/net/dsa/dsa_loop.c-511-}\ndrivers/net/dsa/dsa_loop.c:512:module_exit(dsa_loop_exit);\ndrivers/net/dsa/dsa_loop.c-513-\n"
} |
| 17/2 | 2026/09/02 15:05 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 31672 output: 104 thoughts: 855 Thoughts: **Analysis of the WorthFuzzing Evaluation** Okay, let's break this down. I'm looking at this patch and immediately the difference between `dsa_loop.c` and `yt921x.c` jumps out at me. The `dsa_loop.c` file is clearly set up for *mock* MDIO device interaction, specifically designed to test the DSA core. It doesn't require any actual hardware. On the other hand, `yt921x.c` is a *hardware-specific* driver for the Motorcomm YT9215 ethernet switch chip. This is where things get interesting. I see that it's going to hit the `YT921X_CHIP_ID` register, and needs to be able to read back the `YT921X_CHIP_ID_MAJOR` field to identify the chip's series. The probe function is going to fail without that physical chip present, matching the device with the "motorcomm,yt9215" OF compatible string. Now, considering the instructions. The critical bit is: "Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware". That's what I need to focus on. Since the `yt921x` driver *explicitly* requires the real hardware, and QEMU doesn't emulate that specific Motorcomm chip, this code path is unreachable in any typical virtualized environment. The driver expects the physical hardware to respond to MDIO register reads, a requirement that cannot be satisfied in a QEMU instance. Let's do a quick double-check: the diff is *only* modifying `drivers/net/dsa/yt921x.c` and `drivers/net/dsa/yt921x.h`. The driver is definitely for the Motorcomm YT9215/YT9218 hardware. I am confident in saying that there's no software emulation of this hardware available for standard QEMU / GCE instances, making this patch clearly fall under the exclusion criteria. Therefore, `WorthFuzzing` should be `false`. I'll set the other parameters appropriately. The final reasoning to be recorded should concisely explain that `yt921x` is a driver that requires the Motorcomm hardware and is not emulated. |
| 18/2 | 2026/09/02 15:05 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the Motorcomm YT9215/YT9218 DSA ethernet switch driver (drivers/net/dsa/yt921x.c). This driver requires physical switch hardware connected over MDIO which is not emulated in virtualized environments like QEMU or GCE, making the modified code unreachable for fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Motorcomm YT9215/YT9218 DSA ethernet switch driver (drivers/net/dsa/yt921x.c). This driver requires physical switch hardware connected over MDIO which is not emulated in virtualized environments like QEMU or GCE, making the modified code unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 19/1 | 2026/09/02 15:05 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|