| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/15 07:44 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the mv88e6xxx DSA switch driver, which is a hardware-specific driver for Marvell 88E6xxx physical switches. Since there is no software emulation for this hardware in QEMU or the kernel, and the driver requires a device tree node to probe, the modified code is unreachable in virtualized environments and cannot be fuzzed.",
"WorthFuzzing": false
} |
| 1/1 | 2026/07/15 07:44 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit e1dbebd64579bc015704b3be0e864d5c2d1b5253\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Jul 15 07:44:45 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c\nindex 80b877c74513d6..6faae74de04a9b 100644\n--- a/drivers/net/dsa/mv88e6xxx/chip.c\n+++ b/drivers/net/dsa/mv88e6xxx/chip.c\n@@ -2523,7 +2523,7 @@ static int mv88e6xxx_port_add_broadcast(struct mv88e6xxx_chip *chip, int port,\n \treturn mv88e6xxx_port_db_load_purge(chip, port, broadcast, vid, state);\n }\n \n-static int mv88e6xxx_broadcast_setup(struct mv88e6xxx_chip *chip, u16 vid)\n+int mv88e6xxx_broadcast_setup(struct mv88e6xxx_chip *chip, u16 vid)\n {\n \tint port;\n \tint err;\n@@ -5747,6 +5747,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6097,\n \t\t.name = \"Marvell 88E6085\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 10,\n \t\t.num_internal_phys = 5,\n@@ -5792,6 +5793,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6097,\n \t\t.name = \"Marvell 88E6097/88E6097F\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 11,\n \t\t.num_internal_phys = 8,\n@@ -5817,6 +5819,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6165,\n \t\t.name = \"Marvell 88E6123\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 1024,\n \t\t.num_ports = 3,\n \t\t.num_internal_phys = 5,\n@@ -5863,6 +5866,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6341,\n \t\t.name = \"Marvell 88E6141\",\n \t\t.num_databases = 256,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 2048,\n \t\t.num_ports = 6,\n \t\t.num_internal_phys = 5,\n@@ -5889,6 +5893,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6165,\n \t\t.name = \"Marvell 88E6161\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 1024,\n \t\t.num_ports = 6,\n \t\t.num_internal_phys = 5,\n@@ -5915,6 +5920,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6165,\n \t\t.name = \"Marvell 88E6165\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 6,\n \t\t.num_internal_phys = 0,\n@@ -5940,6 +5946,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6351,\n \t\t.name = \"Marvell 88E6171\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -5965,6 +5972,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6352,\n \t\t.name = \"Marvell 88E6172\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -5991,6 +5999,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6351,\n \t\t.name = \"Marvell 88E6175\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -6016,6 +6025,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6352,\n \t\t.name = \"Marvell 88E6176\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -6064,6 +6074,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6390,\n \t\t.name = \"Marvell 88E6190\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 16384,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 9,\n@@ -6089,6 +6100,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6390,\n \t\t.name = \"Marvell 88E6190X\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 16384,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 9,\n@@ -6114,6 +6126,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6390,\n \t\t.name = \"Marvell 88E6191\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 16384,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 9,\n@@ -6139,6 +6152,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6393,\n \t\t.name = \"Marvell 88E6191X\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 8,\n \t\t.internal_phys_offset = 1,\n@@ -6164,6 +6178,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6393,\n \t\t.name = \"Marvell 88E6193X\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 8,\n \t\t.num_tcam_entries = 256,\n@@ -6218,6 +6233,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6352,\n \t\t.name = \"Marvell 88E6240\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -6267,6 +6283,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6390,\n \t\t.name = \"Marvell 88E6290\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 9,\n \t\t.num_gpio = 16,\n@@ -6294,6 +6311,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6320,\n \t\t.name = \"Marvell 88E6320\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 2,\n@@ -6322,6 +6340,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6320,\n \t\t.name = \"Marvell 88E6321\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 2,\n@@ -6350,6 +6369,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6341,\n \t\t.name = \"Marvell 88E6341\",\n \t\t.num_databases = 256,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 2048,\n \t\t.num_internal_phys = 5,\n \t\t.num_ports = 6,\n@@ -6377,6 +6397,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6351,\n \t\t.name = \"Marvell 88E6350\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -6402,6 +6423,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6351,\n \t\t.name = \"Marvell 88E6351\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -6427,6 +6449,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6352,\n \t\t.name = \"Marvell 88E6352\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 8192,\n \t\t.num_ports = 7,\n \t\t.num_internal_phys = 5,\n@@ -6453,6 +6476,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6393,\n \t\t.name = \"Marvell 88E6361\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 16384,\n \t\t.num_ports = 11,\n \t\t/* Ports 1, 2 and 8 are not routed */\n@@ -6480,6 +6504,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6390,\n \t\t.name = \"Marvell 88E6390\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 16384,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 9,\n@@ -6508,6 +6533,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6390,\n \t\t.name = \"Marvell 88E6390X\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_macs = 16384,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 9,\n@@ -6535,6 +6561,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.family = MV88E6XXX_FAMILY_6393,\n \t\t.name = \"Marvell 88E6393X\",\n \t\t.num_databases = 4096,\n+\t\t.atu_fid_reg = true,\n \t\t.num_ports = 11,\t/* 10 + Z80 */\n \t\t.num_internal_phys = 8,\n \t\t.num_tcam_entries = 256,\ndiff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h\nindex e966e7c4cc5dea..abbb446b73456e 100644\n--- a/drivers/net/dsa/mv88e6xxx/chip.h\n+++ b/drivers/net/dsa/mv88e6xxx/chip.h\n@@ -176,6 +176,9 @@ struct mv88e6xxx_info {\n \t/* Supports PTP */\n \tbool ptp_support;\n \n+\t/* Has a dedicated ATU FID register. */\n+\tbool atu_fid_reg;\n+\n \t/* Internal PHY start index. 0 means that internal PHYs range starts at\n \t * port 0, 1 means internal PHYs range starts at port 1, etc\n \t */\n@@ -890,4 +893,6 @@ int mv88e6xxx_vtu_walk(struct mv88e6xxx_chip *chip,\n \t\t\t\t void *priv),\n \t\t void *priv);\n \n+int mv88e6xxx_broadcast_setup(struct mv88e6xxx_chip *chip, u16 vid);\n+\n #endif /* _MV88E6XXX_CHIP_H */\ndiff --git a/drivers/net/dsa/mv88e6xxx/devlink.c b/drivers/net/dsa/mv88e6xxx/devlink.c\nindex 6f034841883c6f..5168335f52289c 100644\n--- a/drivers/net/dsa/mv88e6xxx/devlink.c\n+++ b/drivers/net/dsa/mv88e6xxx/devlink.c\n@@ -61,6 +61,12 @@ int mv88e6xxx_devlink_param_set(struct dsa_switch *ds, u32 id,\n \tswitch (id) {\n \tcase MV88E6XXX_DEVLINK_PARAM_ID_ATU_HASH:\n \t\terr = mv88e6xxx_atu_set_hash(chip, ctx-\u003eval.vu8);\n+\t\tif (err)\n+\t\t\tbreak;\n+\t\terr = mv88e6xxx_g1_atu_flush(chip, 0, true);\n+\t\tif (err)\n+\t\t\tbreak;\n+\t\terr = mv88e6xxx_broadcast_setup(chip, 0);\n \t\tbreak;\n \tdefault:\n \t\terr = -EOPNOTSUPP;\ndiff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c\nindex c47f068f56b32a..6bee943c83575d 100644\n--- a/drivers/net/dsa/mv88e6xxx/global1_atu.c\n+++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c\n@@ -135,7 +135,7 @@ static int mv88e6xxx_g1_atu_op(struct mv88e6xxx_chip *chip, u16 fid, u16 op)\n \tint err;\n \n \t/* FID bits are dispatched all around gradually as more are supported */\n-\tif (mv88e6xxx_num_databases(chip) \u003e 256) {\n+\tif (chip-\u003einfo-\u003eatu_fid_reg) {\n \t\terr = mv88e6xxx_g1_atu_fid_write(chip, fid);\n \t\tif (err)\n \t\t\treturn err;\n@@ -179,7 +179,7 @@ static int mv88e6xxx_g1_atu_fid_read(struct mv88e6xxx_chip *chip, u16 *fid)\n \tu16 val = 0, upper = 0, op = 0;\n \tint err = -EOPNOTSUPP;\n \n-\tif (mv88e6xxx_num_databases(chip) \u003e 256) {\n+\tif (chip-\u003einfo-\u003eatu_fid_reg) {\n \t\terr = mv88e6xxx_g1_read(chip, MV88E6352_G1_ATU_FID, \u0026val);\n \t\tval \u0026= 0xfff;\n \t\tif (err)\n@@ -239,7 +239,7 @@ static int mv88e6xxx_g1_atu_data_write(struct mv88e6xxx_chip *chip,\n \t\tif (entry-\u003etrunk)\n \t\t\tdata |= MV88E6XXX_G1_ATU_DATA_TRUNK;\n \n-\t\tdata |= (entry-\u003eportvec \u0026 mv88e6xxx_port_mask(chip)) \u003c\u003c 4;\n+\t\tdata |= entry-\u003eportvec \u003c\u003c 4;\n \t}\n \n \treturn mv88e6xxx_g1_write(chip, MV88E6XXX_G1_ATU_DATA, data);\n@@ -326,6 +326,11 @@ int mv88e6xxx_g1_atu_loadpurge(struct mv88e6xxx_chip *chip, u16 fid,\n \tif (err)\n \t\treturn err;\n \n+\t/* Mask portvec to a chip's real ports so they cannot spill into\n+\t * adjacent ATU Data register fields.\n+\t */\n+\tentry-\u003eportvec \u0026= mv88e6xxx_port_mask(chip);\n+\n \terr = mv88e6xxx_g1_atu_data_write(chip, entry);\n \tif (err)\n \t\treturn err;\n"
} |
| 2/1 | 2026/07/15 07:44 | agent | patch-evaluator |
2mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the mv88e6xxx DSA switch driver, which is a hardware-specific driver for Marvell 88E6xxx physical switches. Since there is no software emulation for this hardware in QEMU or the kernel, and the driver requires a device tree node to probe, the modified code is unreachable in virtualized environments and cannot be fuzzed.",
"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). 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. 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. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. 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 e1dbebd64579bc015704b3be0e864d5c2d1b5253
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Jul 15 07:44:45 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 80b877c74513d6..6faae74de04a9b 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2523,7 +2523,7 @@ static int mv88e6xxx_port_add_broadcast(struct mv88e6xxx_chip *chip, int port,
return mv88e6xxx_port_db_load_purge(chip, port, broadcast, vid, state);
}
-static int mv88e6xxx_broadcast_setup(struct mv88e6xxx_chip *chip, u16 vid)
+int mv88e6xxx_broadcast_setup(struct mv88e6xxx_chip *chip, u16 vid)
{
int port;
int err;
@@ -5747,6 +5747,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6097,
.name = "Marvell 88E6085",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 10,
.num_internal_phys = 5,
@@ -5792,6 +5793,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6097,
.name = "Marvell 88E6097/88E6097F",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 11,
.num_internal_phys = 8,
@@ -5817,6 +5819,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6165,
.name = "Marvell 88E6123",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 1024,
.num_ports = 3,
.num_internal_phys = 5,
@@ -5863,6 +5866,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6341,
.name = "Marvell 88E6141",
.num_databases = 256,
+ .atu_fid_reg = true,
.num_macs = 2048,
.num_ports = 6,
.num_internal_phys = 5,
@@ -5889,6 +5893,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6165,
.name = "Marvell 88E6161",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 1024,
.num_ports = 6,
.num_internal_phys = 5,
@@ -5915,6 +5920,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6165,
.name = "Marvell 88E6165",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 6,
.num_internal_phys = 0,
@@ -5940,6 +5946,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6351,
.name = "Marvell 88E6171",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -5965,6 +5972,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6352,
.name = "Marvell 88E6172",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -5991,6 +5999,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6351,
.name = "Marvell 88E6175",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -6016,6 +6025,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6352,
.name = "Marvell 88E6176",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -6064,6 +6074,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6390,
.name = "Marvell 88E6190",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 16384,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 9,
@@ -6089,6 +6100,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6390,
.name = "Marvell 88E6190X",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 16384,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 9,
@@ -6114,6 +6126,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6390,
.name = "Marvell 88E6191",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 16384,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 9,
@@ -6139,6 +6152,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6393,
.name = "Marvell 88E6191X",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 8,
.internal_phys_offset = 1,
@@ -6164,6 +6178,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6393,
.name = "Marvell 88E6193X",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 8,
.num_tcam_entries = 256,
@@ -6218,6 +6233,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6352,
.name = "Marvell 88E6240",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -6267,6 +6283,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6390,
.name = "Marvell 88E6290",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 9,
.num_gpio = 16,
@@ -6294,6 +6311,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6320,
.name = "Marvell 88E6320",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 2,
@@ -6322,6 +6340,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6320,
.name = "Marvell 88E6321",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 2,
@@ -6350,6 +6369,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6341,
.name = "Marvell 88E6341",
.num_databases = 256,
+ .atu_fid_reg = true,
.num_macs = 2048,
.num_internal_phys = 5,
.num_ports = 6,
@@ -6377,6 +6397,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6351,
.name = "Marvell 88E6350",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -6402,6 +6423,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6351,
.name = "Marvell 88E6351",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -6427,6 +6449,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6352,
.name = "Marvell 88E6352",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 8192,
.num_ports = 7,
.num_internal_phys = 5,
@@ -6453,6 +6476,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6393,
.name = "Marvell 88E6361",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 16384,
.num_ports = 11,
/* Ports 1, 2 and 8 are not routed */
@@ -6480,6 +6504,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6390,
.name = "Marvell 88E6390",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 16384,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 9,
@@ -6508,6 +6533,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6390,
.name = "Marvell 88E6390X",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_macs = 16384,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 9,
@@ -6535,6 +6561,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.family = MV88E6XXX_FAMILY_6393,
.name = "Marvell 88E6393X",
.num_databases = 4096,
+ .atu_fid_reg = true,
.num_ports = 11, /* 10 + Z80 */
.num_internal_phys = 8,
.num_tcam_entries = 256,
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
index e966e7c4cc5dea..abbb446b73456e 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -176,6 +176,9 @@ struct mv88e6xxx_info {
/* Supports PTP */
bool ptp_support;
+ /* Has a dedicated ATU FID register. */
+ bool atu_fid_reg;
+
/* Internal PHY start index. 0 means that internal PHYs range starts at
* port 0, 1 means internal PHYs range starts at port 1, etc
*/
@@ -890,4 +893,6 @@ int mv88e6xxx_vtu_walk(struct mv88e6xxx_chip *chip,
void *priv),
void *priv);
+int mv88e6xxx_broadcast_setup(struct mv88e6xxx_chip *chip, u16 vid);
+
#endif /* _MV88E6XXX_CHIP_H */
diff --git a/drivers/net/dsa/mv88e6xxx/devlink.c b/drivers/net/dsa/mv88e6xxx/devlink.c
index 6f034841883c6f..5168335f52289c 100644
--- a/drivers/net/dsa/mv88e6xxx/devlink.c
+++ b/drivers/net/dsa/mv88e6xxx/devlink.c
@@ -61,6 +61,12 @@ int mv88e6xxx_devlink_param_set(struct dsa_switch *ds, u32 id,
switch (id) {
case MV88E6XXX_DEVLINK_PARAM_ID_ATU_HASH:
err = mv88e6xxx_atu_set_hash(chip, ctx->val.vu8);
+ if (err)
+ break;
+ err = mv88e6xxx_g1_atu_flush(chip, 0, true);
+ if (err)
+ break;
+ err = mv88e6xxx_broadcast_setup(chip, 0);
break;
default:
err = -EOPNOTSUPP;
diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c
index c47f068f56b32a..6bee943c83575d 100644
--- a/drivers/net/dsa/mv88e6xxx/global1_atu.c
+++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c
@@ -135,7 +135,7 @@ static int mv88e6xxx_g1_atu_op(struct mv88e6xxx_chip *chip, u16 fid, u16 op)
int err;
/* FID bits are dispatched all around gradually as more are supported */
- if (mv88e6xxx_num_databases(chip) > 256) {
+ if (chip->info->atu_fid_reg) {
err = mv88e6xxx_g1_atu_fid_write(chip, fid);
if (err)
return err;
@@ -179,7 +179,7 @@ static int mv88e6xxx_g1_atu_fid_read(struct mv88e6xxx_chip *chip, u16 *fid)
u16 val = 0, upper = 0, op = 0;
int err = -EOPNOTSUPP;
- if (mv88e6xxx_num_databases(chip) > 256) {
+ if (chip->info->atu_fid_reg) {
err = mv88e6xxx_g1_read(chip, MV88E6352_G1_ATU_FID, &val);
val &= 0xfff;
if (err)
@@ -239,7 +239,7 @@ static int mv88e6xxx_g1_atu_data_write(struct mv88e6xxx_chip *chip,
if (entry->trunk)
data |= MV88E6XXX_G1_ATU_DATA_TRUNK;
- data |= (entry->portvec & mv88e6xxx_port_mask(chip)) << 4;
+ data |= entry->portvec << 4;
}
return mv88e6xxx_g1_write(chip, MV88E6XXX_G1_ATU_DATA, data);
@@ -326,6 +326,11 @@ int mv88e6xxx_g1_atu_loadpurge(struct mv88e6xxx_chip *chip, u16 fid,
if (err)
return err;
+ /* Mask portvec to a chip's real ports so they cannot spill into
+ * adjacent ATU Data register fields.
+ */
+ entry->portvec &= mv88e6xxx_port_mask(chip);
+
err = mv88e6xxx_g1_atu_data_write(chip, entry);
if (err)
return err;
|
| 3/2 | 2026/07/15 07:44 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 7305 output: 26 thoughts: 653 Thoughts: **Analyzing a Patch to the `mv88e6xxx` DSA Driver** Okay, so I'm looking at this patch for the `mv88e6xxx` DSA driver. First glance, it seems to be a functional change, tweaking the ATU (Address Translation Unit) hash setting logic through devlink and also fixing some issues related to the ATU FID register access and portvec masking. That's good, but my immediate question is always about reachability, especially for a driver like this. Specifically, what's been changed? Let me break it down: The patch exposes `mv88e6xxx_broadcast_setup` by removing `static` and adding it to `chip.h`. It also introduces a boolean flag `atu_fid_reg` to `struct mv88e6xxx_info` and sets it for a bunch of Marvell switch chips in `mv88e6xxx_table`. Then, when the `MV88E6XXX_DEVLINK_PARAM_ID_ATU_HASH` parameter is set, the patch now flushes the ATU using `mv88e6xxx_g1_atu_flush` and calls `mv88e6xxx_broadcast_setup(chip, 0)`. Further, in the `mv88e6xxx_g1_atu_op` and `mv88e6xxx_g1_atu_fid_read` functions, it replaces that check using `mv88e6xxx_num_databases(chip) > 256` with `chip->info->atu_fid_reg`. It also changes portvec masking in `mv88e6xxx_g1_atu_data_write` and adds a portvec mask in `mv88e6xxx_g1_atu_loadpurge`. Alright, since this driver is for the Marvell 88E6xxx switch, it's hardware-specific. This is a DSA (Distributed Switch Architecture) driver, so it should be probed through the device tree or the MDIO bus. My concern now is about fuzzing. Can I get at this in a virtualized environment? DSA drivers, especially those interacting with I2C/MDIO-connected hardware, are typically not reachable unless there's an emulator or a virtual driver instantiation. The question becomes, is there any emulation for the Marvell 88E6xxx, or some kind of software instantiation mechanism? Syzkaller *can* sometimes inject MDIO devices or use dummy devices, but generally, these hardware-specific drivers, without proper emulation are inaccessible. Hmm... I recall syzkaller *doesn't* have a generic MDIO fuzzer. So, the chances of immediate reachability are slim. But, I need to check if `mv88e6xxx` can be probed at all. I need to get some more info on how this thing is actually instantiated. I should search for `mv88e6xxx` within the kernel to understand its probing mechanism and dependency chain. |
| 4/2 | 2026/07/15 07:44 | tool | grepper |
0mArgs:{
"Expression": "mv88e6xxx",
"PathPrefix": ""
}Results: {
"Output": "\nFull output is too long, showing 500 out of 10123 lines.\nUse more precise expression if possible.\n\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml-3----\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml:4:$id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml#\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml-5-$schema: http://devicetree.org/meta-schemas/core.yaml#\n--\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml=19=properties:\n--\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml-94- compatible:\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml:95: const: marvell,mv88e6xxx-mdio-external\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml-96-\n--\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml=109=examples:\n--\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml-240- mdio-external {\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml:241: compatible = \"marvell,mv88e6xxx-mdio-external\";\nDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml-242- #address-cells = \u003c1\u003e;\n--\nDocumentation/devicetree/bindings/net/marvell,mvusb.yaml=12=description: |+\n--\nDocumentation/devicetree/bindings/net/marvell,mvusb.yaml-18- having a device tree representation of the device. But in order to use it with\nDocumentation/devicetree/bindings/net/marvell,mvusb.yaml:19: the mv88e6xxx driver, you need a device tree node in which to place the switch\nDocumentation/devicetree/bindings/net/marvell,mvusb.yaml-20- definition.\n--\nDocumentation/networking/devlink/index.rst=77=parameters, info versions, and other features it supports.\n--\nDocumentation/networking/devlink/index.rst-95- mlxsw\nDocumentation/networking/devlink/index.rst:96: mv88e6xxx\nDocumentation/networking/devlink/index.rst-97- netdevsim\n--\nDocumentation/networking/devlink/mv88e6xxx.rst-3-=========================\nDocumentation/networking/devlink/mv88e6xxx.rst:4:mv88e6xxx devlink support\nDocumentation/networking/devlink/mv88e6xxx.rst-5-=========================\nDocumentation/networking/devlink/mv88e6xxx.rst-6-\nDocumentation/networking/devlink/mv88e6xxx.rst:7:This document describes the devlink features implemented by the ``mv88e6xxx``\nDocumentation/networking/devlink/mv88e6xxx.rst-8-device driver.\n--\nDocumentation/networking/devlink/mv88e6xxx.rst=10=Parameters\n--\nDocumentation/networking/devlink/mv88e6xxx.rst-12-\nDocumentation/networking/devlink/mv88e6xxx.rst:13:The ``mv88e6xxx`` driver implements the following driver-specific parameters.\nDocumentation/networking/devlink/mv88e6xxx.rst-14-\n--\nMAINTAINERS=15595=F:\tDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6060.yaml\nMAINTAINERS:15596:F:\tDocumentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml\nMAINTAINERS:15597:F:\tDocumentation/networking/devlink/mv88e6xxx.rst\nMAINTAINERS:15598:F:\tdrivers/net/dsa/mv88e6xxx/\nMAINTAINERS:15599:F:\tinclude/linux/dsa/mv88e6xxx.h\nMAINTAINERS:15600:F:\tinclude/linux/platform_data/mv88e6xxx.h\nMAINTAINERS-15601-\n--\narch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts=127=\t\tmdio-external {\narch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts:128:\t\t\tcompatible = \"marvell,mv88e6xxx-mdio-external\";\narch/arm/boot/dts/marvell/armada-381-netgear-gs110emx.dts-129-\t\t\t#address-cells = \u003c1\u003e;\n--\narch/arm/boot/dts/nxp/vf/vf610-zii-ssmb-dtu.dts=170=\t\t\tmdio-external {\narch/arm/boot/dts/nxp/vf/vf610-zii-ssmb-dtu.dts:171:\t\t\t\tcompatible = \"marvell,mv88e6xxx-mdio-external\";\narch/arm/boot/dts/nxp/vf/vf610-zii-ssmb-dtu.dts-172-\t\t\t\t#address-cells = \u003c1\u003e;\n--\narch/arm64/boot/dts/marvell/cn9130-cf-pro.dts=292=\t\t\tswitch0phy4: ethernet-phy@4 {\n--\narch/arm64/boot/dts/marvell/cn9130-cf-pro.dts-302-\t\t * mdio-external {\narch/arm64/boot/dts/marvell/cn9130-cf-pro.dts:303:\t\t *\tcompatible = \"marvell,mv88e6xxx-mdio-external\";\narch/arm64/boot/dts/marvell/cn9130-cf-pro.dts-304-\t\t *\t#address-cells = \u003c1\u003e;\n--\ndrivers/net/dsa/Kconfig=73=source \"drivers/net/dsa/microchip/Kconfig\"\ndrivers/net/dsa/Kconfig-74-\ndrivers/net/dsa/Kconfig:75:source \"drivers/net/dsa/mv88e6xxx/Kconfig\"\ndrivers/net/dsa/Kconfig-76-\n--\ndrivers/net/dsa/Makefile=21=obj-y\t\t\t\t+= microchip/\ndrivers/net/dsa/Makefile:22:obj-y\t\t\t\t+= mv88e6xxx/\ndrivers/net/dsa/Makefile-23-obj-y\t\t\t\t+= mxl862xx/\n--\ndrivers/net/dsa/mv88e6060.h-5- *\ndrivers/net/dsa/mv88e6060.h:6: * Based on mv88e6xxx.h\ndrivers/net/dsa/mv88e6060.h-7- * Copyright (c) 2008 Marvell Semiconductor\n--\ndrivers/net/dsa/mv88e6xxx/Makefile-1-# SPDX-License-Identifier: GPL-2.0\ndrivers/net/dsa/mv88e6xxx/Makefile:2:obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o\ndrivers/net/dsa/mv88e6xxx/Makefile:3:mv88e6xxx-objs := chip.o\ndrivers/net/dsa/mv88e6xxx/Makefile:4:mv88e6xxx-objs += devlink.o\ndrivers/net/dsa/mv88e6xxx/Makefile:5:mv88e6xxx-objs += global1.o\ndrivers/net/dsa/mv88e6xxx/Makefile:6:mv88e6xxx-objs += global1_atu.o\ndrivers/net/dsa/mv88e6xxx/Makefile:7:mv88e6xxx-objs += global1_vtu.o\ndrivers/net/dsa/mv88e6xxx/Makefile:8:mv88e6xxx-objs += global2.o\ndrivers/net/dsa/mv88e6xxx/Makefile:9:mv88e6xxx-objs += global2_avb.o\ndrivers/net/dsa/mv88e6xxx/Makefile:10:mv88e6xxx-objs += global2_scratch.o\ndrivers/net/dsa/mv88e6xxx/Makefile:11:mv88e6xxx-$(CONFIG_NET_DSA_MV88E6XXX_PTP) += hwtstamp.o\ndrivers/net/dsa/mv88e6xxx/Makefile:12:mv88e6xxx-$(CONFIG_NET_DSA_MV88E6XXX_LEDS) += leds.o\ndrivers/net/dsa/mv88e6xxx/Makefile:13:mv88e6xxx-objs += pcs-6185.o\ndrivers/net/dsa/mv88e6xxx/Makefile:14:mv88e6xxx-objs += pcs-6352.o\ndrivers/net/dsa/mv88e6xxx/Makefile:15:mv88e6xxx-objs += pcs-639x.o\ndrivers/net/dsa/mv88e6xxx/Makefile:16:mv88e6xxx-objs += phy.o\ndrivers/net/dsa/mv88e6xxx/Makefile:17:mv88e6xxx-objs += port.o\ndrivers/net/dsa/mv88e6xxx/Makefile:18:mv88e6xxx-objs += port_hidden.o\ndrivers/net/dsa/mv88e6xxx/Makefile:19:mv88e6xxx-$(CONFIG_NET_DSA_MV88E6XXX_PTP) += ptp.o\ndrivers/net/dsa/mv88e6xxx/Makefile:20:mv88e6xxx-objs += serdes.o\ndrivers/net/dsa/mv88e6xxx/Makefile:21:mv88e6xxx-objs += smi.o\ndrivers/net/dsa/mv88e6xxx/Makefile:22:mv88e6xxx-objs += switchdev.o\ndrivers/net/dsa/mv88e6xxx/Makefile:23:mv88e6xxx-objs += trace.o\ndrivers/net/dsa/mv88e6xxx/Makefile:24:mv88e6xxx-objs += tcflower.o\ndrivers/net/dsa/mv88e6xxx/Makefile:25:mv88e6xxx-objs += tcam.o\ndrivers/net/dsa/mv88e6xxx/Makefile-26-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-14-#include \u003clinux/delay.h\u003e\ndrivers/net/dsa/mv88e6xxx/chip.c:15:#include \u003clinux/dsa/mv88e6xxx.h\u003e\ndrivers/net/dsa/mv88e6xxx/chip.c-16-#include \u003clinux/etherdevice.h\u003e\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-28-#include \u003clinux/of_mdio.h\u003e\ndrivers/net/dsa/mv88e6xxx/chip.c:29:#include \u003clinux/platform_data/mv88e6xxx.h\u003e\ndrivers/net/dsa/mv88e6xxx/chip.c-30-#include \u003clinux/property.h\u003e\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-48-\ndrivers/net/dsa/mv88e6xxx/chip.c:49:static void assert_reg_lock(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-50-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-56-\ndrivers/net/dsa/mv88e6xxx/chip.c:57:int mv88e6xxx_read(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val)\ndrivers/net/dsa/mv88e6xxx/chip.c-58-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-62-\ndrivers/net/dsa/mv88e6xxx/chip.c:63:\terr = mv88e6xxx_smi_read(chip, addr, reg, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-64-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-72-\ndrivers/net/dsa/mv88e6xxx/chip.c:73:int mv88e6xxx_write(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val)\ndrivers/net/dsa/mv88e6xxx/chip.c-74-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-78-\ndrivers/net/dsa/mv88e6xxx/chip.c:79:\terr = mv88e6xxx_smi_write(chip, addr, reg, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-80-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-88-\ndrivers/net/dsa/mv88e6xxx/chip.c:89:int mv88e6xxx_wait_mask(struct mv88e6xxx_chip *chip, int addr, int reg,\ndrivers/net/dsa/mv88e6xxx/chip.c-90-\t\t\tu16 mask, u16 val)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-101-\tfor (i = 0; time_before(jiffies, timeout) || (i \u003c 2); i++) {\ndrivers/net/dsa/mv88e6xxx/chip.c:102:\t\terr = mv88e6xxx_read(chip, addr, reg, \u0026data);\ndrivers/net/dsa/mv88e6xxx/chip.c-103-\t\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-114-\ndrivers/net/dsa/mv88e6xxx/chip.c:115:\terr = mv88e6xxx_read(chip, addr, reg, \u0026data);\ndrivers/net/dsa/mv88e6xxx/chip.c-116-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-125-\ndrivers/net/dsa/mv88e6xxx/chip.c:126:int mv88e6xxx_wait_bit(struct mv88e6xxx_chip *chip, int addr, int reg,\ndrivers/net/dsa/mv88e6xxx/chip.c-127-\t\t int bit, int val)\ndrivers/net/dsa/mv88e6xxx/chip.c-128-{\ndrivers/net/dsa/mv88e6xxx/chip.c:129:\treturn mv88e6xxx_wait_mask(chip, addr, reg, BIT(bit),\ndrivers/net/dsa/mv88e6xxx/chip.c-130-\t\t\t\t val ? BIT(bit) : 0x0000);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-132-\ndrivers/net/dsa/mv88e6xxx/chip.c:133:struct mii_bus *mv88e6xxx_default_mdio_bus(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-134-{\ndrivers/net/dsa/mv88e6xxx/chip.c:135:\tstruct mv88e6xxx_mdio_bus *mdio_bus;\ndrivers/net/dsa/mv88e6xxx/chip.c-136-\ndrivers/net/dsa/mv88e6xxx/chip.c-137-\tmdio_bus = list_first_entry_or_null(\u0026chip-\u003emdios,\ndrivers/net/dsa/mv88e6xxx/chip.c:138:\t\t\t\t\t struct mv88e6xxx_mdio_bus, list);\ndrivers/net/dsa/mv88e6xxx/chip.c-139-\tif (!mdio_bus)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-144-\ndrivers/net/dsa/mv88e6xxx/chip.c:145:static void mv88e6xxx_g1_irq_mask(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-146-{\ndrivers/net/dsa/mv88e6xxx/chip.c:147:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-148-\tunsigned int n = d-\u003ehwirq;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-152-\ndrivers/net/dsa/mv88e6xxx/chip.c:153:static void mv88e6xxx_g1_irq_unmask(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-154-{\ndrivers/net/dsa/mv88e6xxx/chip.c:155:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-156-\tunsigned int n = d-\u003ehwirq;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-160-\ndrivers/net/dsa/mv88e6xxx/chip.c:161:static irqreturn_t mv88e6xxx_g1_irq_thread_work(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-162-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-169-\ndrivers/net/dsa/mv88e6xxx/chip.c:170:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:171:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c:172:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-173-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-186-\ndrivers/net/dsa/mv88e6xxx/chip.c:187:\t\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:188:\t\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026ctl1);\ndrivers/net/dsa/mv88e6xxx/chip.c-189-\t\tif (err)\ndrivers/net/dsa/mv88e6xxx/chip.c-190-\t\t\tgoto unlock;\ndrivers/net/dsa/mv88e6xxx/chip.c:191:\t\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-192-unlock:\ndrivers/net/dsa/mv88e6xxx/chip.c:193:\t\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-194-\t\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-202-\ndrivers/net/dsa/mv88e6xxx/chip.c:203:static irqreturn_t mv88e6xxx_g1_irq_thread_fn(int irq, void *dev_id)\ndrivers/net/dsa/mv88e6xxx/chip.c-204-{\ndrivers/net/dsa/mv88e6xxx/chip.c:205:\tstruct mv88e6xxx_chip *chip = dev_id;\ndrivers/net/dsa/mv88e6xxx/chip.c-206-\ndrivers/net/dsa/mv88e6xxx/chip.c:207:\treturn mv88e6xxx_g1_irq_thread_work(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-208-}\ndrivers/net/dsa/mv88e6xxx/chip.c-209-\ndrivers/net/dsa/mv88e6xxx/chip.c:210:static void mv88e6xxx_g1_irq_bus_lock(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-211-{\ndrivers/net/dsa/mv88e6xxx/chip.c:212:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-213-\ndrivers/net/dsa/mv88e6xxx/chip.c:214:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-215-}\ndrivers/net/dsa/mv88e6xxx/chip.c-216-\ndrivers/net/dsa/mv88e6xxx/chip.c:217:static void mv88e6xxx_g1_irq_bus_sync_unlock(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-218-{\ndrivers/net/dsa/mv88e6xxx/chip.c:219:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-220-\tu16 mask = GENMASK(chip-\u003eg1_irq.nirqs, 0);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-223-\ndrivers/net/dsa/mv88e6xxx/chip.c:224:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-225-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-230-\ndrivers/net/dsa/mv88e6xxx/chip.c:231:\terr = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-232-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-235-out:\ndrivers/net/dsa/mv88e6xxx/chip.c:236:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-237-}\ndrivers/net/dsa/mv88e6xxx/chip.c-238-\ndrivers/net/dsa/mv88e6xxx/chip.c:239:static const struct irq_chip mv88e6xxx_g1_irq_chip = {\ndrivers/net/dsa/mv88e6xxx/chip.c:240:\t.name\t\t\t= \"mv88e6xxx-g1\",\ndrivers/net/dsa/mv88e6xxx/chip.c:241:\t.irq_mask\t\t= mv88e6xxx_g1_irq_mask,\ndrivers/net/dsa/mv88e6xxx/chip.c:242:\t.irq_unmask\t\t= mv88e6xxx_g1_irq_unmask,\ndrivers/net/dsa/mv88e6xxx/chip.c:243:\t.irq_bus_lock\t\t= mv88e6xxx_g1_irq_bus_lock,\ndrivers/net/dsa/mv88e6xxx/chip.c:244:\t.irq_bus_sync_unlock\t= mv88e6xxx_g1_irq_bus_sync_unlock,\ndrivers/net/dsa/mv88e6xxx/chip.c-245-};\ndrivers/net/dsa/mv88e6xxx/chip.c-246-\ndrivers/net/dsa/mv88e6xxx/chip.c:247:static int mv88e6xxx_g1_irq_domain_map(struct irq_domain *d,\ndrivers/net/dsa/mv88e6xxx/chip.c-248-\t\t\t\t unsigned int irq,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-250-{\ndrivers/net/dsa/mv88e6xxx/chip.c:251:\tstruct mv88e6xxx_chip *chip = d-\u003ehost_data;\ndrivers/net/dsa/mv88e6xxx/chip.c-252-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-259-\ndrivers/net/dsa/mv88e6xxx/chip.c:260:static const struct irq_domain_ops mv88e6xxx_g1_irq_domain_ops = {\ndrivers/net/dsa/mv88e6xxx/chip.c:261:\t.map\t= mv88e6xxx_g1_irq_domain_map,\ndrivers/net/dsa/mv88e6xxx/chip.c-262-\t.xlate\t= irq_domain_xlate_twocell,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-265-/* To be called with reg_lock held */\ndrivers/net/dsa/mv88e6xxx/chip.c:266:static void mv88e6xxx_g1_irq_free_common(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-267-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-270-\ndrivers/net/dsa/mv88e6xxx/chip.c:271:\tmv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-272-\tmask \u0026= ~GENMASK(chip-\u003eg1_irq.nirqs, 0);\ndrivers/net/dsa/mv88e6xxx/chip.c:273:\tmv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-274-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-282-\ndrivers/net/dsa/mv88e6xxx/chip.c:283:static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-284-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-290-\ndrivers/net/dsa/mv88e6xxx/chip.c:291:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:292:\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:293:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-294-}\ndrivers/net/dsa/mv88e6xxx/chip.c-295-\ndrivers/net/dsa/mv88e6xxx/chip.c:296:static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-297-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-303-\t\tNULL, chip-\u003eg1_irq.nirqs, 0,\ndrivers/net/dsa/mv88e6xxx/chip.c:304:\t\t\u0026mv88e6xxx_g1_irq_domain_ops, chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-305-\tif (!chip-\u003eg1_irq.domain)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-310-\ndrivers/net/dsa/mv88e6xxx/chip.c:311:\tchip-\u003eg1_irq.chip = mv88e6xxx_g1_irq_chip;\ndrivers/net/dsa/mv88e6xxx/chip.c-312-\tchip-\u003eg1_irq.masked = ~0;\ndrivers/net/dsa/mv88e6xxx/chip.c-313-\ndrivers/net/dsa/mv88e6xxx/chip.c:314:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-315-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-319-\ndrivers/net/dsa/mv88e6xxx/chip.c:320:\terr = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-321-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-324-\t/* Reading the interrupt status clears (most of) them */\ndrivers/net/dsa/mv88e6xxx/chip.c:325:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-326-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-332-\tmask \u0026= ~GENMASK(chip-\u003eg1_irq.nirqs, 0);\ndrivers/net/dsa/mv88e6xxx/chip.c:333:\tmv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-334-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-345-\ndrivers/net/dsa/mv88e6xxx/chip.c:346:static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-347-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-351-\ndrivers/net/dsa/mv88e6xxx/chip.c:352:\terr = mv88e6xxx_g1_irq_setup_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-353-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-362-\tsnprintf(chip-\u003eirq_name, sizeof(chip-\u003eirq_name),\ndrivers/net/dsa/mv88e6xxx/chip.c:363:\t\t \"mv88e6xxx-%s\", dev_name(chip-\u003edev));\ndrivers/net/dsa/mv88e6xxx/chip.c-364-\ndrivers/net/dsa/mv88e6xxx/chip.c:365:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-366-\terr = request_threaded_irq(chip-\u003eirq, NULL,\ndrivers/net/dsa/mv88e6xxx/chip.c:367:\t\t\t\t mv88e6xxx_g1_irq_thread_fn,\ndrivers/net/dsa/mv88e6xxx/chip.c-368-\t\t\t\t IRQF_ONESHOT | IRQF_SHARED,\ndrivers/net/dsa/mv88e6xxx/chip.c-369-\t\t\t\t chip-\u003eirq_name, chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:370:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-371-\tif (err)\ndrivers/net/dsa/mv88e6xxx/chip.c:372:\t\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-373-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-376-\ndrivers/net/dsa/mv88e6xxx/chip.c:377:static void mv88e6xxx_irq_poll(struct kthread_work *work)\ndrivers/net/dsa/mv88e6xxx/chip.c-378-{\ndrivers/net/dsa/mv88e6xxx/chip.c:379:\tstruct mv88e6xxx_chip *chip = container_of(work,\ndrivers/net/dsa/mv88e6xxx/chip.c:380:\t\t\t\t\t\t struct mv88e6xxx_chip,\ndrivers/net/dsa/mv88e6xxx/chip.c-381-\t\t\t\t\t\t irq_poll_work.work);\ndrivers/net/dsa/mv88e6xxx/chip.c:382:\tmv88e6xxx_g1_irq_thread_work(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-383-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-387-\ndrivers/net/dsa/mv88e6xxx/chip.c:388:static int mv88e6xxx_irq_poll_setup(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-389-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-391-\ndrivers/net/dsa/mv88e6xxx/chip.c:392:\terr = mv88e6xxx_g1_irq_setup_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-393-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-396-\tkthread_init_delayed_work(\u0026chip-\u003eirq_poll_work,\ndrivers/net/dsa/mv88e6xxx/chip.c:397:\t\t\t\t mv88e6xxx_irq_poll);\ndrivers/net/dsa/mv88e6xxx/chip.c-398-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-408-\ndrivers/net/dsa/mv88e6xxx/chip.c:409:static void mv88e6xxx_irq_poll_free(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-410-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-413-\ndrivers/net/dsa/mv88e6xxx/chip.c:414:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:415:\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:416:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-417-}\ndrivers/net/dsa/mv88e6xxx/chip.c-418-\ndrivers/net/dsa/mv88e6xxx/chip.c:419:static int mv88e6xxx_port_config_interface(struct mv88e6xxx_chip *chip,\ndrivers/net/dsa/mv88e6xxx/chip.c-420-\t\t\t\t\t int port, phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-440-\ndrivers/net/dsa/mv88e6xxx/chip.c:441:static int mv88e6xxx_port_setup_mac(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-442-\t\t\t\t int link, int speed, int duplex, int pause,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-467-\ndrivers/net/dsa/mv88e6xxx/chip.c:468:\terr = mv88e6xxx_port_config_interface(chip, port, mode);\ndrivers/net/dsa/mv88e6xxx/chip.c-469-restore_link:\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-475-\ndrivers/net/dsa/mv88e6xxx/chip.c:476:static int mv88e6xxx_phy_is_internal(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-477-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-482-\ndrivers/net/dsa/mv88e6xxx/chip.c:483:static int mv88e6xxx_port_ppu_updates(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-484-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-491-\tif (chip-\u003einfo-\u003efamily == MV88E6XXX_FAMILY_6250)\ndrivers/net/dsa/mv88e6xxx/chip.c:492:\t\treturn mv88e6xxx_phy_is_internal(chip, port);\ndrivers/net/dsa/mv88e6xxx/chip.c-493-\ndrivers/net/dsa/mv88e6xxx/chip.c:494:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-495-\tif (err) {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=505=static const u8 mv88e6185_phy_interface_modes[] = {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-514-\ndrivers/net/dsa/mv88e6xxx/chip.c:515:static void mv88e6095_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-516-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-521-\ndrivers/net/dsa/mv88e6xxx/chip.c:522:\tif (mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c-523-\t\t__set_bit(PHY_INTERFACE_MODE_MII, config-\u003esupported_interfaces);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-533-\ndrivers/net/dsa/mv88e6xxx/chip.c:534:static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-535-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-547-\ndrivers/net/dsa/mv88e6xxx/chip.c:548:static const u8 mv88e6xxx_phy_interface_modes[] = {\ndrivers/net/dsa/mv88e6xxx/chip.c-549-\t[MV88E6XXX_PORT_STS_CMODE_MII_PHY]\t= PHY_INTERFACE_MODE_REVMII,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-562-\ndrivers/net/dsa/mv88e6xxx/chip.c:563:static void mv88e6xxx_translate_cmode(u8 cmode, unsigned long *supported)\ndrivers/net/dsa/mv88e6xxx/chip.c-564-{\ndrivers/net/dsa/mv88e6xxx/chip.c:565:\tif (cmode \u003c ARRAY_SIZE(mv88e6xxx_phy_interface_modes) \u0026\u0026\ndrivers/net/dsa/mv88e6xxx/chip.c:566:\t mv88e6xxx_phy_interface_modes[cmode])\ndrivers/net/dsa/mv88e6xxx/chip.c:567:\t\t__set_bit(mv88e6xxx_phy_interface_modes[cmode], supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-568-\telse if (cmode == MV88E6XXX_PORT_STS_CMODE_RGMII)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=572=static void\ndrivers/net/dsa/mv88e6xxx/chip.c:573:mv88e6250_setup_supported_interfaces(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-574-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-579-\ndrivers/net/dsa/mv88e6xxx/chip.c:580:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-581-\tif (err) {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-621-\ndrivers/net/dsa/mv88e6xxx/chip.c:622:static void mv88e6250_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-623-\t\t\t\t struct phylink_config *config)\ndrivers/net/dsa/mv88e6xxx/chip.c-624-{\ndrivers/net/dsa/mv88e6xxx/chip.c:625:\tif (!mv88e6xxx_phy_is_internal(chip, port))\ndrivers/net/dsa/mv88e6xxx/chip.c-626-\t\tmv88e6250_setup_supported_interfaces(chip, port, config);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-630-\ndrivers/net/dsa/mv88e6xxx/chip.c:631:static void mv88e6351_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-632-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-636-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:637:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-638-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-642-\ndrivers/net/dsa/mv88e6xxx/chip.c:643:static int mv88e63xx_get_port_serdes_cmode(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-644-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-647-\ndrivers/net/dsa/mv88e6xxx/chip.c:648:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-649-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-656-\tval = reg \u0026 ~MV88E6XXX_PORT_STS_PHY_DETECT;\ndrivers/net/dsa/mv88e6xxx/chip.c:657:\terr = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_STS, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-658-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-660-\ndrivers/net/dsa/mv88e6xxx/chip.c:661:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026val);\ndrivers/net/dsa/mv88e6xxx/chip.c-662-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-665-\t/* Restore PHY_DETECT value */\ndrivers/net/dsa/mv88e6xxx/chip.c:666:\terr = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_STS, reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-667-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-672-\ndrivers/net/dsa/mv88e6xxx/chip.c:673:static void mv88e6352_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-674-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-679-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:680:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-681-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-695-\t\telse\ndrivers/net/dsa/mv88e6xxx/chip.c:696:\t\t\tmv88e6xxx_translate_cmode(cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-697-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-699-\ndrivers/net/dsa/mv88e6xxx/chip.c:700:static void mv88e632x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-701-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-706-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:707:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-708-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-718-\t\telse\ndrivers/net/dsa/mv88e6xxx/chip.c:719:\t\t\tmv88e6xxx_translate_cmode(cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-720-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-722-\ndrivers/net/dsa/mv88e6xxx/chip.c:723:static void mv88e6341_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-724-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-728-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:729:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-730-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-744-\ndrivers/net/dsa/mv88e6xxx/chip.c:745:static void mv88e6390_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-746-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-750-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:751:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-752-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-766-\ndrivers/net/dsa/mv88e6xxx/chip.c:767:static void mv88e6390x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-768-\t\t\t\t\tstruct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-801-\ndrivers/net/dsa/mv88e6xxx/chip.c:802:static void mv88e6393x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-803-\t\t\t\t\tstruct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-810-\ndrivers/net/dsa/mv88e6xxx/chip.c:811:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-812-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-845-\ndrivers/net/dsa/mv88e6xxx/chip.c:846:static void mv88e6xxx_get_caps(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-847-\t\t\t struct phylink_config *config)\ndrivers/net/dsa/mv88e6xxx/chip.c-848-{\ndrivers/net/dsa/mv88e6xxx/chip.c:849:\tstruct mv88e6xxx_chip *chip = ds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-850-\ndrivers/net/dsa/mv88e6xxx/chip.c:851:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-852-\tchip-\u003einfo-\u003eops-\u003ephylink_get_caps(chip, port, config);\ndrivers/net/dsa/mv88e6xxx/chip.c:853:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-854-\ndrivers/net/dsa/mv88e6xxx/chip.c:855:\tif (mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c-856-\t\t__set_bit(PHY_INTERFACE_MODE_INTERNAL,\n--\n\n"
} |
| 5/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 22958 output: 32 thoughts: 488 Thoughts: **Analyzing the Marvell 88E6xxx DSA Switch Driver in a Fuzzing Context** Okay, so I'm looking at `drivers/net/dsa/mv88e6xxx/chip.c`, a DSA switch driver. The immediate question is, can I even get this instantiated within a QEMU environment? Device tree setup would be the natural approach, but does QEMU even *emulate* the Marvell 88E6xxx switch? No, that's not something QEMU provides, so that avenue is closed. I started thinking about syzkaller's MDIO injection capabilities, maybe there's an MDIO injection option? Nope, it doesn't directly support that. Syzkaller does have `syz_usb_connect` for USB device emulation though, but there wouldn't be a USB to MDIO bridge for that to apply to this driver. Since `mv88e6xxx` is an MDIO device, USB is a dead end. Then I saw the author of the patch is "syz-cluster <triage@syzkaller.com>". That’s a huge clue, since syzkaller is responsible for the code it finds. This means syzkaller likely found a bug, or is fuzzing this code! But how? My mind raced. Is there some virtual MDIO driver or clever mechanism syzkaller uses? I considered devlink, as it's accessible via netlink and I could possibly instantiate a `mv88e6xxx` device that way. But no, devlink configures *existing* devices, not create them. I started to think, *is* the driver instantiated via some other means? I looked for any dummy or software-emulated DSA switch. Then, wait! I remembered the commit message! It says "syz-cluster: applied patch under review". Aha! That means I'm reviewing a patch that the syzkaller infrastructure is *testing*. It doesn't mean syzkaller *found* a bug, it means the patch is being assessed by syzkaller. So, if QEMU *doesn't* emulate this device (which I confirmed), then the code is probably unreachable. I need to make sure QEMU emulates `mv88e6xxx`. I don't have the QEMU source right now to search, so I need to check the kernel itself to see if the driver is instantiated in software. I will look for any software instantiation of `mv88e6xxx`. |
| 6/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "platform_device_register.*mv88e6xxx",
"PathPrefix": ""
}Results: {
"error": "no matches"
} |
| 7/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 24034 output: 26 thoughts: 85 Thoughts: **Investigating Userspace Control of MV88E6XXX MDIO Access** Okay, let's dive into this. My initial thought is to see if there's a way, a direct path, to trigger an `mdio` device registration for the `mv88e6xxx` from userspace within the kernel. Typically, I'd expect MDIO devices, like this switch, to be registered much lower down, either through the device tree or the board files. It's the standard practice. Hmm, no obvious userspace trigger... Wait, there's `dsa_loop`. Right, that's a software-emulated DSA switch, a useful debugging tool. Could there be an emulated `mv88e6xxx` implementation, something that `dsa_loop` might provide or interact with? That could be an interesting avenue to explore for potential userspace control, even if it's indirect. I need to check if this emulation exists. This could be useful to explore. |
| 8/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "mdio_board_info",
"PathPrefix": ""
}Results: {
"error": "no matches"
} |
| 9/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 24373 output: 28 thoughts: 33 Thoughts: Here's my thought process, as if I were considering this myself: **MDIO Device Registration - A Quick Refresher** Okay, so I'm dealing with MDIO devices here, and I need to figure out how they're being registered in this code. My gut feeling tells me `mdio_board_info` is probably the key structure for this. It's a common pattern, especially with board-specific information. Now, if `mdio_board_info` is indeed involved in registration, then there's likely a corresponding registration function, something like, well, I'd bet on `mdio_register_board_info`. Let's confirm that hypothesis. A quick search for `mdio_register_board_info` should give me a good starting point. That should immediately lead me to the relevant registration code. That's my next step. |
| 10/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "mdio_register_board_info",
"PathPrefix": ""
}Results: {
"error": "no matches"
} |
| 11/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 24635 output: 29 thoughts: 15 Thoughts: Here's my thought process, as if I were considering this myself: **Considering MDIO Bus Registration** Hmm, I'm trying to figure out the right function here...wait a second. Could it be `mdiobus_register_board_info`? That function, if I recall correctly, is the one that allows me to register board-specific MDIO bus information. That sounds like a strong candidate, based on what I need to do. I need to register information about the MDIO bus for the particular hardware platform I'm targeting, right? I'll need to double check the specifics of the arguments it expects and ensure I have all the necessary data to feed it, but the name is promising. I should go look up its documentation to be certain. |
| 12/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "mdiobus_register_board_info",
"PathPrefix": ""
}Results: {
"error": "no matches"
} |
| 13/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 24855 output: 40 thoughts: 16 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Probing the `mv88e6xxx` Switch: A Quick Dive** Alright, so the initial thought is straightforward: let's get a handle on how this `mv88e6xxx` switch is being probed. I'm already envisioning the likely areas to investigate – the device tree bindings, kernel driver initialization routines, and the general sequence of events during system startup. Specifically, I'm thinking about the standard methods – the `of_match_table` or similar mechanisms used to identify and attach the appropriate driver to the hardware. I want to quickly understand the entry points, the probing function's structure, and any potential quirks. I'm hoping it's well-structured and follows industry best practices, but experience has taught me to be prepared for anything. This quick probe will help me determine the core flow and what information or hooks I might need to consider for any future modifications or integration work. |
| 14/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "module_mdio_driver",
"PathPrefix": "drivers/net/dsa/mv88e6xxx/"
}Results: {
"error": "no matches"
} |
| 15/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 25136 output: 39 thoughts: 30 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Diving into the MV88E6XXX Probe Function** Alright, let's get down to brass tacks. I'm thinking I need to refresh my memory on how this MV88E6XXX driver handles initialization. The best place to start, as always, is with the probe function. I'll go straight to `drivers/net/dsa/mv88e6xxx/chip.c`. That's where I expect to find the meat of the initial device setup. I want to see how the driver interacts with the hardware during the early stages – the device ID checks, resource allocation, PHY configuration, and potentially any register initialization it performs. I’m particularly interested in how they're handling any potential errata and workaround implementation for this specific family of switches. Hopefully the code is well-commented so I don’t have to spend too long reverse engineering what they were thinking. Let's see what gems we can unearth. |
| 16/2 | 2026/07/15 07:45 | tool | grepper |
0mArgs:{
"Expression": "_probe",
"PathPrefix": "drivers/net/dsa/mv88e6xxx/chip.c"
}Results: {
"Output": "drivers/net/dsa/mv88e6xxx/chip.c=7338=static SIMPLE_DEV_PM_OPS(mv88e6xxx_pm_ops, mv88e6xxx_suspend, mv88e6xxx_resume);\ndrivers/net/dsa/mv88e6xxx/chip.c-7339-\ndrivers/net/dsa/mv88e6xxx/chip.c:7340:static int mv88e6xxx_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/mv88e6xxx/chip.c-7341-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=7548=static struct mdio_driver mv88e6xxx_driver = {\ndrivers/net/dsa/mv88e6xxx/chip.c:7549:\t.probe\t= mv88e6xxx_probe,\ndrivers/net/dsa/mv88e6xxx/chip.c-7550-\t.remove = mv88e6xxx_remove,\n"
} |
| 17/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 25711 output: 35 thoughts: 129 Thoughts: **MDIO Device Creation Inquiry** Okay, so I'm looking at this `mdio_driver` and the question immediately pops into my head: can we conjure an `mdio_device` from userspace? My intuition is leaning towards "no" – I don't recall seeing a generic mechanism for that, which is odd if I think about other busses. Wait, hold on. What about the I2C bus? The I2C bus *does* allow userspace device creation, doesn't it, through the `/sys/bus/i2c/devices/i2c-*/new_device` interface? This makes me wonder if a similar trick exists for MDIO. Is there a `/sys/bus/mdio_bus/devices/` directory where we could potentially find a `new_device` entry? That would be fantastic! The real question is, does the MDIO bus *even support* such a feature? Let me go poke around and see if I can find an answer. |
| 18/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "new_device",
"PathPrefix": "drivers/net/phy/mdio_bus.c"
}Results: {
"error": "no matches"
} |
| 19/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 26103 output: 39 thoughts: 160 Thoughts: **MDIO Device Instantiation Dilemma** Okay, so I'm facing a wall here. MDIO devices, from what I understand, can't be spun up directly from userspace. That’s a significant hurdle. Now, hold on, I seem to recall something about syzkaller and device tree overlays. The idea flickered - could I potentially leverage that for some level of control? But, that memory needs refining. Does syzkaller *actually* provide device tree overlay injection, provided `CONFIG_OF_OVERLAY` is enabled? I'm almost certain its mainline lacks that capability. Dammit. Alright, pivot. Is there some convoluted bus path I'm overlooking? Maybe the MDIO driver can be reached indirectly? No, no, it's strictly MDIO. That avenue is closed. I'm hitting a dead end here. Is there *any* way to touch this code? This feels increasingly difficult to fuzz. If, in any virtualized context (GCE, QEMU, the usual suspects), this particular driver is completely unreachable, then honestly, I'm wasting resources on a fuzzing target that's unachievable. Time to admit defeat and set `WorthFuzzing=false`. I’m also going to check, just to be sure, if any software emulation of `mv88e6xxx` lives in the kernel. Maybe there's a back door. |
| 20/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "mv88e6xxx",
"PathPrefix": "drivers/net/dsa/dsa_loop.c"
}Results: {
"error": "no matches"
} |
| 21/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 26617 output: 34 thoughts: 20 Thoughts: Okay, here's my summary, presented as a stream of thought: **Netdevsim and My Hardware Emulation Needs** Hmm, I'm thinking about network device simulation again. Specifically, I'm wondering if `netdevsim` could be a viable option for emulating a specific Marvell switch – the `mv88e6xxx` series. I've been tackling this kind of challenge before and I know the landscape pretty well. I need a robust and flexible environment for testing. `netdevsim` is a good starting point, providing the core framework for representing virtual network devices. But does it go far enough? Does it offer the level of *specific* detail required to accurately replicate the behavior of that particular Marvell chipset? I need to dig deeper. I'll need to check the documentation, see what features are implemented, and probably dive into the source code to get a real handle on its capabilities. It’s an interesting question to consider if it has been done before. Ultimately, I'm trying to decide if I can use it as a foundation or if I need to build a more custom solution. The devil, as always, is in the details, especially in hardware emulation! |
| 22/2 | 2026/07/15 07:45 | tool | grepper |
0mError:no matches Args: {
"Expression": "mv88e6xxx",
"PathPrefix": "drivers/net/netdevsim/"
}Results: {
"error": "no matches"
} |
| 23/2 | 2026/07/15 07:45 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 26937 output: 25 thoughts: 393 Thoughts: **My Assessment of the Fuzzability** Okay, my initial instinct was correct. This driver (`mv88e6xxx`) is strictly for Marvell 88E6xxx physical hardware switches. It's a low-level driver, so my understanding is that it relies on direct interaction with the hardware. Since QEMU, and virtualization in general like Google Compute Engine, doesn't emulate this specific hardware – and there's no equivalent kernel-level software emulation – the code is fundamentally unreachable in a fuzzer like syzkaller. Therefore, my initial assessment stands: `WorthFuzzing=false`. Let me just quickly re-examine the patch. Okay, it's touching `drivers/net/dsa/mv88e6xxx/chip.c`, `chip.h`, `devlink.c`, and `global1_atu.c`. All within the `drivers/net/dsa/mv88e6xxx/` directory, which confirms it's the Marvell 88E6xxx DSA switch driver. Nothing here suggests an alternative path, confirming my initial assessment. The core issue is the hardware dependency – it can't be fuzzed in a virtualized environment. The reasoning should be clear: it modifies the Marvell 88E6xxx DSA switch driver, requiring physical hardware, and there's no software emulation available to bridge the gap for fuzzer utilization. Just to be absolutely certain, let me dig a little deeper, I need to check for a possible pathway. Could it potentially be exposed via a PCI device? No. MDIO, that's what I thought. USB? Hold on, wait. The documentation `Documentation/devicetree/bindings/net/marvell,mvusb.yaml` mentions using the `mv88e6xxx` driver with a device tree node for switch definition. Could there be a USB-to-MDIO bridge? It implies the possibility. It looks like it mentions `marvell,mvusb`, which is something to look into. |
| 24/2 | 2026/07/15 07:46 | tool | grepper |
0mArgs:{
"Expression": "marvell,mvusb",
"PathPrefix": ""
}Results: {
"Output": "Documentation/devicetree/bindings/net/marvell,mvusb.yaml-3----\nDocumentation/devicetree/bindings/net/marvell,mvusb.yaml:4:$id: http://devicetree.org/schemas/net/marvell,mvusb.yaml#\nDocumentation/devicetree/bindings/net/marvell,mvusb.yaml-5-$schema: http://devicetree.org/meta-schemas/core.yaml#\n--\nMAINTAINERS=15774=S:\tMaintained\nMAINTAINERS:15775:F:\tDocumentation/devicetree/bindings/net/marvell,mvusb.yaml\nMAINTAINERS-15776-F:\tdrivers/net/mdio/mdio-mvusb.c\n"
} |
| 25/2 | 2026/07/15 07:46 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 27990 output: 36 thoughts: 33 Thoughts: Here's my analysis of the provided snippet, as though it were my train of thought: **Diving into the MDIO USB Driver** Okay, so we're looking at the Marvell USB MDIO driver, specifically `drivers/net/mdio/mdio-mvusb.c`. This suggests we're dealing with a USB-connected MDIO controller, likely for interfacing with PHYs within a networking context. I need to understand how the USB communication is handled at this level, how it translates MDIO commands, and what specific Marvell silicon this driver targets. I expect to see the USB descriptors, endpoint configurations, and the core MDIO transaction logic. I'll be looking for any device-specific quirks or optimizations Marvell might have implemented in their USB interface for this. |
| 26/2 | 2026/07/15 07:46 | tool | grepper |
0mArgs:{
"Expression": "mvusb",
"PathPrefix": "drivers/net/mdio/mdio-mvusb.c"
}Results: {
"Output": "drivers/net/mdio/mdio-mvusb.c-10-\ndrivers/net/mdio/mdio-mvusb.c:11:static const struct usb_device_id mvusb_mdio_table[] = {\ndrivers/net/mdio/mdio-mvusb.c-12-\t{ USB_DEVICE(USB_MARVELL_VID, 0x1fa4) },\n--\ndrivers/net/mdio/mdio-mvusb.c-15-};\ndrivers/net/mdio/mdio-mvusb.c:16:MODULE_DEVICE_TABLE(usb, mvusb_mdio_table);\ndrivers/net/mdio/mdio-mvusb.c-17-\ndrivers/net/mdio/mdio-mvusb.c=18=enum {\n--\ndrivers/net/mdio/mdio-mvusb.c-24-\ndrivers/net/mdio/mdio-mvusb.c:25:struct mvusb_mdio {\ndrivers/net/mdio/mdio-mvusb.c-26-\tstruct usb_device *udev;\n--\ndrivers/net/mdio/mdio-mvusb.c-31-\ndrivers/net/mdio/mdio-mvusb.c:32:static int mvusb_mdio_read(struct mii_bus *mdio, int dev, int reg)\ndrivers/net/mdio/mdio-mvusb.c-33-{\ndrivers/net/mdio/mdio-mvusb.c:34:\tstruct mvusb_mdio *mvusb = mdio-\u003epriv;\ndrivers/net/mdio/mdio-mvusb.c-35-\tint err, alen;\ndrivers/net/mdio/mdio-mvusb.c-36-\ndrivers/net/mdio/mdio-mvusb.c:37:\tmvusb-\u003ebuf[MVUSB_CMD_ADDR] = cpu_to_le16(0xa400 | (dev \u003c\u003c 5) | reg);\ndrivers/net/mdio/mdio-mvusb.c-38-\ndrivers/net/mdio/mdio-mvusb.c:39:\terr = usb_bulk_msg(mvusb-\u003eudev, usb_sndbulkpipe(mvusb-\u003eudev, 2),\ndrivers/net/mdio/mdio-mvusb.c:40:\t\t\t mvusb-\u003ebuf, 6, \u0026alen, 100);\ndrivers/net/mdio/mdio-mvusb.c-41-\tif (err)\n--\ndrivers/net/mdio/mdio-mvusb.c-43-\ndrivers/net/mdio/mdio-mvusb.c:44:\terr = usb_bulk_msg(mvusb-\u003eudev, usb_rcvbulkpipe(mvusb-\u003eudev, 6),\ndrivers/net/mdio/mdio-mvusb.c:45:\t\t\t \u0026mvusb-\u003ebuf[MVUSB_CMD_VAL], 2, \u0026alen, 100);\ndrivers/net/mdio/mdio-mvusb.c-46-\tif (err)\n--\ndrivers/net/mdio/mdio-mvusb.c-48-\ndrivers/net/mdio/mdio-mvusb.c:49:\treturn le16_to_cpu(mvusb-\u003ebuf[MVUSB_CMD_VAL]);\ndrivers/net/mdio/mdio-mvusb.c-50-}\ndrivers/net/mdio/mdio-mvusb.c-51-\ndrivers/net/mdio/mdio-mvusb.c:52:static int mvusb_mdio_write(struct mii_bus *mdio, int dev, int reg, u16 val)\ndrivers/net/mdio/mdio-mvusb.c-53-{\ndrivers/net/mdio/mdio-mvusb.c:54:\tstruct mvusb_mdio *mvusb = mdio-\u003epriv;\ndrivers/net/mdio/mdio-mvusb.c-55-\tint alen;\ndrivers/net/mdio/mdio-mvusb.c-56-\ndrivers/net/mdio/mdio-mvusb.c:57:\tmvusb-\u003ebuf[MVUSB_CMD_ADDR] = cpu_to_le16(0x8000 | (dev \u003c\u003c 5) | reg);\ndrivers/net/mdio/mdio-mvusb.c:58:\tmvusb-\u003ebuf[MVUSB_CMD_VAL] = cpu_to_le16(val);\ndrivers/net/mdio/mdio-mvusb.c-59-\ndrivers/net/mdio/mdio-mvusb.c:60:\treturn usb_bulk_msg(mvusb-\u003eudev, usb_sndbulkpipe(mvusb-\u003eudev, 2),\ndrivers/net/mdio/mdio-mvusb.c:61:\t\t\t mvusb-\u003ebuf, 8, \u0026alen, 100);\ndrivers/net/mdio/mdio-mvusb.c-62-}\ndrivers/net/mdio/mdio-mvusb.c-63-\ndrivers/net/mdio/mdio-mvusb.c:64:static int mvusb_mdio_probe(struct usb_interface *interface,\ndrivers/net/mdio/mdio-mvusb.c-65-\t\t\t const struct usb_device_id *id)\n--\ndrivers/net/mdio/mdio-mvusb.c-67-\tstruct device *dev = \u0026interface-\u003edev;\ndrivers/net/mdio/mdio-mvusb.c:68:\tstruct mvusb_mdio *mvusb;\ndrivers/net/mdio/mdio-mvusb.c-69-\tstruct mii_bus *mdio;\ndrivers/net/mdio/mdio-mvusb.c-70-\ndrivers/net/mdio/mdio-mvusb.c:71:\tmdio = devm_mdiobus_alloc_size(dev, sizeof(*mvusb));\ndrivers/net/mdio/mdio-mvusb.c-72-\tif (!mdio)\n--\ndrivers/net/mdio/mdio-mvusb.c-74-\ndrivers/net/mdio/mdio-mvusb.c:75:\tmvusb = mdio-\u003epriv;\ndrivers/net/mdio/mdio-mvusb.c:76:\tmvusb-\u003emdio = mdio;\ndrivers/net/mdio/mdio-mvusb.c:77:\tmvusb-\u003eudev = interface_to_usbdev(interface);\ndrivers/net/mdio/mdio-mvusb.c-78-\ndrivers/net/mdio/mdio-mvusb.c-79-\t/* Reversed from USB PCAPs, no idea what these mean. */\ndrivers/net/mdio/mdio-mvusb.c:80:\tmvusb-\u003ebuf[MVUSB_CMD_PREAMBLE0] = cpu_to_le16(0xe800);\ndrivers/net/mdio/mdio-mvusb.c:81:\tmvusb-\u003ebuf[MVUSB_CMD_PREAMBLE1] = cpu_to_le16(0x0001);\ndrivers/net/mdio/mdio-mvusb.c-82-\ndrivers/net/mdio/mdio-mvusb.c:83:\tsnprintf(mdio-\u003eid, MII_BUS_ID_SIZE, \"mvusb-%s\", dev_name(dev));\ndrivers/net/mdio/mdio-mvusb.c-84-\tmdio-\u003ename = mdio-\u003eid;\ndrivers/net/mdio/mdio-mvusb.c-85-\tmdio-\u003eparent = dev;\ndrivers/net/mdio/mdio-mvusb.c:86:\tmdio-\u003eread = mvusb_mdio_read;\ndrivers/net/mdio/mdio-mvusb.c:87:\tmdio-\u003ewrite = mvusb_mdio_write;\ndrivers/net/mdio/mdio-mvusb.c-88-\ndrivers/net/mdio/mdio-mvusb.c:89:\tusb_set_intfdata(interface, mvusb);\ndrivers/net/mdio/mdio-mvusb.c-90-\n--\ndrivers/net/mdio/mdio-mvusb.c-93-\ndrivers/net/mdio/mdio-mvusb.c:94:static void mvusb_mdio_disconnect(struct usb_interface *interface)\ndrivers/net/mdio/mdio-mvusb.c-95-{\ndrivers/net/mdio/mdio-mvusb.c:96:\tstruct mvusb_mdio *mvusb = usb_get_intfdata(interface);\ndrivers/net/mdio/mdio-mvusb.c-97-\ndrivers/net/mdio/mdio-mvusb.c:98:\tmdiobus_unregister(mvusb-\u003emdio);\ndrivers/net/mdio/mdio-mvusb.c-99-\tusb_set_intfdata(interface, NULL);\n--\ndrivers/net/mdio/mdio-mvusb.c-101-\ndrivers/net/mdio/mdio-mvusb.c:102:static struct usb_driver mvusb_mdio_driver = {\ndrivers/net/mdio/mdio-mvusb.c:103:\t.name = \"mvusb_mdio\",\ndrivers/net/mdio/mdio-mvusb.c:104:\t.id_table = mvusb_mdio_table,\ndrivers/net/mdio/mdio-mvusb.c:105:\t.probe = mvusb_mdio_probe,\ndrivers/net/mdio/mdio-mvusb.c:106:\t.disconnect = mvusb_mdio_disconnect,\ndrivers/net/mdio/mdio-mvusb.c-107-};\ndrivers/net/mdio/mdio-mvusb.c-108-\ndrivers/net/mdio/mdio-mvusb.c:109:module_usb_driver(mvusb_mdio_driver);\ndrivers/net/mdio/mdio-mvusb.c-110-\n"
} |
| 27/2 | 2026/07/15 07:46 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 30725 output: 43 thoughts: 259 Thoughts: **My Analysis of the `mdio-mvusb.c` Driver and Potential Syzkaller Interaction** Okay, so I'm looking at `mdio-mvusb.c`, and it's a USB driver that's responsible for registering an MDIO bus. Interesting. Now, I know Syzkaller can emulate USB devices using `syz_usb_connect`. The immediate implication is that if Syzkaller fires up this USB device, it should register an MDIO bus. But, a critical question immediately jumps to mind: Does this MDIO bus registration automatically trigger a probe of the `mv88e6xxx` driver? My experience tells me that typically, MDIO devices are probed based on device tree nodes or board-specific information. So, just registering the USB device, creating the MDIO bus, is unlikely to populate it with any devices, unless they are specifically enumerated. Then I remembered that MDIO buses have a scanning capability for PHYs, that is devices in the address range 0-31. Now, does `mdiobus_register` actually perform this scan? Yes! Looking closer, `__mdiobus_register` calls `mdiobus_scan` for all addresses if the `phy_mask` doesn't exclude them. So, at least there *is* a mechanism for detecting devices. My next line of thought is that `mv88e6xxx` is an MDIO driver. How does it get bound? Is it through a direct match on a PHY ID? I need to check `drivers/net/dsa/mv88e6xxx/chip.c` and hunt down `mdio_device_id` or some other binding logic. That's the key to understanding if this entire setup will work as expected with Syzkaller. |
| 28/2 | 2026/07/15 07:46 | tool | grepper |
0mError:no matches Args: {
"Expression": "mdio_device_id",
"PathPrefix": "drivers/net/dsa/mv88e6xxx/chip.c"
}Results: {
"error": "no matches"
} |
| 29/2 | 2026/07/15 07:46 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 31424 output: 47 thoughts: 24 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Focusing on the Core of the Issue** Alright, time to get to the root of this. Based on what I've seen so far, and the general architecture, my immediate instinct is to zero in on a few critical areas within the `chip.c` file. Specifically, I need to check the implementations related to either `of_device_id` or `mdio_driver`. One of these is *highly* likely to contain the key to understanding the device initialization and communication flow, which is where my suspicion lies for the current issue I'm debugging. These are often the places where the driver identifies the specific hardware it's talking to and sets up the necessary interface for managing the device. Let's see what's actually going on in there. |
| 30/2 | 2026/07/15 07:46 | tool | grepper |
0mArgs:{
"Expression": "mv88e6xxx_of_match",
"PathPrefix": "drivers/net/dsa/mv88e6xxx/chip.c"
}Results: {
"Output": "drivers/net/dsa/mv88e6xxx/chip.c=7518=static void mv88e6xxx_shutdown(struct mdio_device *mdiodev)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-7529-\ndrivers/net/dsa/mv88e6xxx/chip.c:7530:static const struct of_device_id mv88e6xxx_of_match[] = {\ndrivers/net/dsa/mv88e6xxx/chip.c-7531-\t{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-7545-\ndrivers/net/dsa/mv88e6xxx/chip.c:7546:MODULE_DEVICE_TABLE(of, mv88e6xxx_of_match);\ndrivers/net/dsa/mv88e6xxx/chip.c-7547-\ndrivers/net/dsa/mv88e6xxx/chip.c=7548=static struct mdio_driver mv88e6xxx_driver = {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-7553-\t\t.name = \"mv88e6085\",\ndrivers/net/dsa/mv88e6xxx/chip.c:7554:\t\t.of_match_table = mv88e6xxx_of_match,\ndrivers/net/dsa/mv88e6xxx/chip.c-7555-\t\t.pm = \u0026mv88e6xxx_pm_ops,\n"
} |
| 31/2 | 2026/07/15 07:46 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 32087 output: 42 thoughts: 106 Thoughts: **Analyzing the Device Binding Mechanism** Okay, so I'm looking at this driver, and the key thing that jumps out is the fact that it *only* has an `of_match_table`. That's a pretty strong indicator. It means the driver is specifically designed to bind exclusively to devices that are instantiated through the device tree. That's a critical piece of information. If syzkaller is going to emulate a USB device, the MDIO bus *will* be created, of course. But the real problem is that, without a corresponding device tree node for the MDIO bus itself and, crucially, for its child devices, the `mv88e6xxx` driver simply won't bind. The whole thing hinges on that device tree description. It's like the driver needs a birth certificate, and the device tree provides it. Hang on a second… I need to consider all the angles here. Is *this* the only way this driver gets attached to hardware? Let me double-check. I need to rule out anything else, any sneaky `platform_data` structures, any other match tables that might have been missed. We're looking for alternative binding methods. Gotta cover all my bases. |
| 32/2 | 2026/07/15 07:46 | tool | grepper |
0mArgs:{
"Expression": "MODULE_DEVICE_TABLE",
"PathPrefix": "drivers/net/dsa/mv88e6xxx/chip.c"
}Results: {
"Output": "drivers/net/dsa/mv88e6xxx/chip.c=7530=static const struct of_device_id mv88e6xxx_of_match[] = {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-7545-\ndrivers/net/dsa/mv88e6xxx/chip.c:7546:MODULE_DEVICE_TABLE(of, mv88e6xxx_of_match);\ndrivers/net/dsa/mv88e6xxx/chip.c-7547-\n"
} |
| 33/2 | 2026/07/15 07:46 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 32641 output: 26 thoughts: 490 Thoughts: **Analyzing the Reachability of `mv88e6xxx` Code with Syzkaller** Okay, so I'm looking at this patch and trying to figure out if syzkaller can actually reach the code it's touching. The first thing that jumps out is that it's using `of_match_table`, which means this driver is *strictly* device tree node dependent. Syzkaller, in its standard configuration, doesn't inject device tree nodes. It usually runs on QEMU x86_64 or ARM64 with something like the `virt` machine, which, as I recall, definitely doesn't have an `mv88e6xxx` node in its device tree. So, standard fuzzing isn't going to get us there. Wait, though… what if syzkaller *is* running on a board that *does* have this device tree node? That's a possibility, but unlikely for the standard configurations. Alright, what other angles are there? Could it be instantiated through some legacy board file mechanism? Hmm, no. I remember checking – it's an MDIO driver, and `mdio_board_info` isn't used anywhere in the kernel for `mv88e6xxx`. So that's a dead end. Wait a second… this patch might have been applied by `syz-cluster` just because it was part of a larger series, or because syzbot automatically tests everything sent to mailing lists like netdev. Syzbot is pretty aggressive – it'll apply, compile, and fuzz any patch it sees. It doesn't actually *care* if the code is reachable, it just does its best. So, the fact that syzbot applied it doesn't mean it can be fuzzed. Right, so to make sure, let me double check if there's *another* way to get to `mv88e6xxx_broadcast_setup`. It's called from `mv88e6xxx_devlink_param_set`, which is called when devlink parameters are being set, so that's registered in `mv88e6xxx_devlink_params_register`. Okay, that registration is called from `mv88e6xxx_setup_devlink_params`, which is *itself* called from `mv88e6xxx_probe`. So, the entire chain hinges on `mv88e6xxx_probe` being called. If `mv88e6xxx_probe` never gets called, the devlink parameters aren't registered, and everything down the line is unreachable. Now the million-dollar question: Is there *any* chance `mv88e6xxx_probe` actually gets called? I need to check the kernel for any `mdio_device_register` or some similar function that would create an `mv88e6xxx` device. Let me check the kernel sources... |
| 34/2 | 2026/07/15 07:46 | tool | grepper |
0mArgs:{
"Expression": "mdio_device_register",
"PathPrefix": ""
}Results: {
"Output": "drivers/net/dsa/dsa_loop.c=446=static int __init dsa_loop_create_switch_mdiodev(void)\n--\ndrivers/net/dsa/dsa_loop.c-473-\ndrivers/net/dsa/dsa_loop.c:474:\tret = mdio_device_register(switch_mdiodev);\ndrivers/net/dsa/dsa_loop.c-475-\tif (ret)\n--\ndrivers/net/mdio/of_mdio.c=52=static int of_mdiobus_register_device(struct mii_bus *mdio,\n--\ndrivers/net/mdio/of_mdio.c-68-\t/* All data is now stored in the mdiodev struct; register it. */\ndrivers/net/mdio/of_mdio.c:69:\trc = mdio_device_register(mdiodev);\ndrivers/net/mdio/of_mdio.c-70-\tif (rc) {\n--\ndrivers/net/pcs/pcs-xpcs-plat.c=337=static int xpcs_plat_init_dev(struct dw_xpcs_plat *pxpcs)\n--\ndrivers/net/pcs/pcs-xpcs-plat.c-356-\ndrivers/net/pcs/pcs-xpcs-plat.c:357:\tret = mdio_device_register(mdiodev);\ndrivers/net/pcs/pcs-xpcs-plat.c-358-\tif (ret) {\n--\ndrivers/net/phy/air_en8811h.c=1074=static int an8811hb_probe(struct phy_device *phydev)\n--\ndrivers/net/phy/air_en8811h.c-1097-\ndrivers/net/phy/air_en8811h.c:1098:\tret = mdio_device_register(mdiodev);\ndrivers/net/phy/air_en8811h.c-1099-\tif (ret)\n--\ndrivers/net/phy/mdio_device.c-27-/**\ndrivers/net/phy/mdio_device.c:28: * mdio_device_register_reset - Read and initialize the reset properties of\ndrivers/net/phy/mdio_device.c-29- *\t\t\t\tan mdio device\n--\ndrivers/net/phy/mdio_device.c-33- */\ndrivers/net/phy/mdio_device.c:34:static int mdio_device_register_reset(struct mdio_device *mdiodev)\ndrivers/net/phy/mdio_device.c-35-{\n--\ndrivers/net/phy/mdio_device.c=144=EXPORT_SYMBOL(mdio_device_create);\n--\ndrivers/net/phy/mdio_device.c-146-/**\ndrivers/net/phy/mdio_device.c:147: * mdio_device_register - Register the mdio device on the MDIO bus\ndrivers/net/phy/mdio_device.c-148- * @mdiodev: mdio_device structure to be added to the MDIO bus\n--\ndrivers/net/phy/mdio_device.c-151- */\ndrivers/net/phy/mdio_device.c:152:int mdio_device_register(struct mdio_device *mdiodev)\ndrivers/net/phy/mdio_device.c-153-{\n--\ndrivers/net/phy/mdio_device.c-173-}\ndrivers/net/phy/mdio_device.c:174:EXPORT_SYMBOL(mdio_device_register);\ndrivers/net/phy/mdio_device.c-175-\n--\ndrivers/net/phy/mdio_device.c-181- * This doesn't free the mdio_device itself, it merely reverses the effects\ndrivers/net/phy/mdio_device.c:182: * of mdio_device_register(). Use mdio_device_free() to free the device\ndrivers/net/phy/mdio_device.c-183- * after calling this function.\n--\ndrivers/net/phy/mdio_device.c=192=int mdiobus_register_device(struct mdio_device *mdiodev)\n--\ndrivers/net/phy/mdio_device.c-199-\tif (mdiodev-\u003eflags \u0026 MDIO_DEVICE_FLAG_PHY) {\ndrivers/net/phy/mdio_device.c:200:\t\terr = mdio_device_register_reset(mdiodev);\ndrivers/net/phy/mdio_device.c-201-\t\tif (err)\n--\ninclude/linux/mdio.h=90=struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr);\ninclude/linux/mdio.h:91:int mdio_device_register(struct mdio_device *mdiodev);\ninclude/linux/mdio.h-92-void mdio_device_remove(struct mdio_device *mdiodev);\n"
} |
| 35/2 | 2026/07/15 07:46 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 35069 output: 37 thoughts: 33 Thoughts: Okay, here's my interpretation of those thoughts, presented as a summary: **Digging into the `dsa_loop.c` Module** Alright, so `dsa_loop.c` is where things are getting interesting. My initial hunch was correct; it looks like this is where a `mdiodev` switch is actually *created*. That's a key piece of the puzzle I was looking for. Now, the next logical step is to dive deeper. I need to understand the fundamental purpose of `dsa_loop.c` and specifically, what this `mdiodev` switch is. Let's start by dissecting the code within this file. The documentation should be pretty clear, but let's assume the worst, and I might need to trace the variables, or at least search for the related functions to understand its functionality. |
| 36/2 | 2026/07/15 07:46 | tool | grepper |
0mArgs:{
"Expression": "dsa_loop",
"PathPrefix": "drivers/net/dsa/dsa_loop.c"
}Results: {
"Output": "drivers/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"
} |
| 37/2 | 2026/07/15 07:46 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 41754 output: 108 thoughts: 355 Thoughts: **My Assessment: This Patch is Not Fuzzable in Virtualized Environments** Okay, let me break this down. I've been looking at this `dsa_loop.c` file, and it's clear that it's a software-emulated DSA switch, but it doesn't try to emulate any specific hardware like the `mv88e6xxx`. It creates its own MDIO device and registers its own driver, `dsa_loop_drv`, totally independent of the Marvell chip. So, based on that, the `mv88e6xxx` driver isn't going to be reachable through `dsa_loop`. I also checked `dsa_loop_bdinfo.c` which registers a fixed PHY, but again, this doesn't offer us a path to emulate or reach the Marvell chip. Furthermore, I have verified there's no other software emulation of `mv88e6xxx` within this context. Therefore, the critical conclusion is that the `mv88e6xxx` driver is simply unreachable in virtualized environments like QEMU or Google Compute Engine. This means we can't fuzz it. Let me formulate the reasoning for the record: "The patch modifies the `mv88e6xxx` DSA switch driver, which is a hardware-specific driver for Marvell 88E6xxx physical switches. Since there is no software emulation for this hardware in QEMU or the kernel, and the driver requires a device tree node to probe, the modified code is unreachable in virtualized environments and cannot be fuzzed." Just to be absolutely sure, I checked the `syzkaller` configurations. While it's common to see `CONFIG_NET_DSA_MV88E6XXX=y` enabled, without the actual hardware or emulation, the driver just sits there, and its probe function never gets executed. This further solidifies the conclusion. I'm confident in my assessment. I'm going to set the results to `WorthFuzzing=false` with the reasoning I've stated. |
| 38/2 | 2026/07/15 07:46 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the mv88e6xxx DSA switch driver, which is a hardware-specific driver for Marvell 88E6xxx physical switches. Since there is no software emulation for this hardware in QEMU or the kernel, and the driver requires a device tree node to probe, the modified code is unreachable in virtualized environments and cannot be fuzzed.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the mv88e6xxx DSA switch driver, which is a hardware-specific driver for Marvell 88E6xxx physical switches. Since there is no software emulation for this hardware in QEMU or the kernel, and the driver requires a device tree node to probe, the modified code is unreachable in virtualized environments and cannot be fuzzed.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|