AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/07/11 03:23 flow patch-triage
1m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the mv88e6xxx DSA driver to support embedded arrival timestamps for Marvell 88E6xxx physical switches. This is a hardware-specific feature that requires physical Marvell switch hardware to probe and execute. There is no software emulation for this hardware in QEMU or the kernel, making the modified code paths impossible to reach in a virtualized fuzzing environment.",
  "WorthFuzzing": false
}

1/1 2026/07/11 03:23 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit ed88774fa66207712c584ea33d8522a8e7cc4152\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sat Jul 11 03:23:00 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..c3277c1f3d785b 100644\n--- a/drivers/net/dsa/mv88e6xxx/chip.c\n+++ b/drivers/net/dsa/mv88e6xxx/chip.c\n@@ -28,6 +28,7 @@\n #include \u003clinux/of_mdio.h\u003e\n #include \u003clinux/platform_data/mv88e6xxx.h\u003e\n #include \u003clinux/property.h\u003e\n+#include \u003clinux/ptp_classify.h\u003e\n #include \u003clinux/netdevice.h\u003e\n #include \u003clinux/gpio/consumer.h\u003e\n #include \u003clinux/phylink.h\u003e\n@@ -6370,6 +6371,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.edsa_support = MV88E6XXX_EDSA_SUPPORTED,\n \t\t.ptp_support = true,\n \t\t.ops = \u0026mv88e6341_ops,\n+\t\t.arr_ts_mode = offsetof(struct ptp_header, reserved2),\n \t},\n \n \t[MV88E6350] = {\n@@ -6447,6 +6449,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {\n \t\t.edsa_support = MV88E6XXX_EDSA_SUPPORTED,\n \t\t.ptp_support = true,\n \t\t.ops = \u0026mv88e6352_ops,\n+\t\t.arr_ts_mode = offsetof(struct ptp_header, reserved2),\n \t},\n \t[MV88E6361] = {\n \t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6361,\ndiff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h\nindex e966e7c4cc5dea..b6a90eba81c438 100644\n--- a/drivers/net/dsa/mv88e6xxx/chip.h\n+++ b/drivers/net/dsa/mv88e6xxx/chip.h\n@@ -180,6 +180,14 @@ struct mv88e6xxx_info {\n \t * port 0, 1 means internal PHYs range starts at port 1, etc\n \t */\n \tunsigned int internal_phys_offset;\n+\n+\t/* Arrival Time Stamp Mode (ArrTSMode); see the ArrTSMode encoding in\n+\t * hwtstamp.h. Zero (the default) leaves arrival time stamps in the\n+\t * switch registers; non-zero embeds them in the frame, either appended\n+\t * as a trailer or overwritten at that byte offset past the start of the\n+\t * PTP common header.\n+\t */\n+\tunsigned int arr_ts_mode;\n };\n \n struct mv88e6xxx_atu_entry {\ndiff --git a/drivers/net/dsa/mv88e6xxx/hwtstamp.c b/drivers/net/dsa/mv88e6xxx/hwtstamp.c\nindex 6e6472a3b75ad7..1fbed340757972 100644\n--- a/drivers/net/dsa/mv88e6xxx/hwtstamp.c\n+++ b/drivers/net/dsa/mv88e6xxx/hwtstamp.c\n@@ -15,6 +15,7 @@\n #include \"hwtstamp.h\"\n #include \"ptp.h\"\n #include \u003clinux/ptp_classify.h\u003e\n+#include \u003clinux/unaligned.h\u003e\n \n #define SKB_PTP_TYPE(__skb) (*(unsigned int *)((__skb)-\u003ecb))\n \n@@ -245,6 +246,73 @@ static int seq_match(struct sk_buff *skb, u16 ts_seqid)\n \treturn ts_seqid == ntohs(hdr-\u003esequence_id);\n }\n \n+static bool parse_embedded_ts(unsigned int arr_ts_mode,\n+\t\t\t      struct sk_buff *skb, u64 *ns)\n+{\n+\tstruct ptp_header *hdr;\n+\n+\t*ns = 0;\n+\n+\t/* APPEND means the switch appended the time stamp as a 4-byte trailer\n+\t * (not all switches support this). Any other non-zero value is the byte\n+\t * offset past the start of the PTP common header at which the switch\n+\t * overwrote the time stamp in place (e.g. the reserved header bytes).\n+\t */\n+\tif (arr_ts_mode == MV88E6XXX_PTP_ARR_TS_MODE_APPEND \u0026\u0026 skb-\u003elen \u003e= 4) {\n+\t\tif (skb_linearize(skb))\n+\t\t\treturn false;\n+\n+\t\t*ns = (u64)get_unaligned_be32(skb_tail_pointer(skb) - 4);\n+\t\tif (pskb_trim_rcsum(skb, skb-\u003elen - 4))\n+\t\t\treturn false;\n+\t} else if (arr_ts_mode + 4 \u003c= sizeof(*hdr)) {\n+\t\tif (skb_linearize(skb))\n+\t\t\treturn false;\n+\n+\t\thdr = ptp_parse_header(skb, SKB_PTP_TYPE(skb));\n+\t\tif (!hdr)\n+\t\t\treturn false;\n+\n+\t\t*ns = (u64)get_unaligned_be32((u8 *)hdr + arr_ts_mode);\n+\t\tmemset((u8 *)hdr + arr_ts_mode, 0, 4);\n+\t} else {\n+\t\treturn false;\n+\t}\n+\n+\treturn true;\n+}\n+\n+static void mv88e6xxx_get_rxts_embedded(struct mv88e6xxx_chip *chip,\n+\t\t\t\t\tstruct mv88e6xxx_port_hwtstamp *ps,\n+\t\t\t\t\tstruct sk_buff *skb)\n+{\n+\tstruct sk_buff_head *rxq = \u0026ps-\u003erx_queue;\n+\tstruct skb_shared_hwtstamps *shwt;\n+\tstruct sk_buff_head received;\n+\tunsigned long flags;\n+\tu64 ns;\n+\n+\t__skb_queue_head_init(\u0026received);\n+\t__skb_queue_head(\u0026received, skb);\n+\tspin_lock_irqsave(\u0026rxq-\u003elock, flags);\n+\tskb_queue_splice_tail_init(rxq, \u0026received);\n+\tspin_unlock_irqrestore(\u0026rxq-\u003elock, flags);\n+\n+\tmv88e6xxx_reg_lock(chip);\n+\tskb_queue_walk(\u0026received, skb) {\n+\t\tif (!parse_embedded_ts(chip-\u003einfo-\u003earr_ts_mode, skb, \u0026ns))\n+\t\t\tcontinue;\n+\t\tns = timecounter_cyc2time(\u0026chip-\u003etstamp_tc, ns);\n+\t\tshwt = skb_hwtstamps(skb);\n+\t\tmemset(shwt, 0, sizeof(*shwt));\n+\t\tshwt-\u003ehwtstamp = ns_to_ktime(ns);\n+\t}\n+\tmv88e6xxx_reg_unlock(chip);\n+\n+\twhile ((skb = __skb_dequeue(\u0026received)))\n+\t\tnetif_rx(skb);\n+}\n+\n static void mv88e6xxx_get_rxts(struct mv88e6xxx_chip *chip,\n \t\t\t       struct mv88e6xxx_port_hwtstamp *ps,\n \t\t\t       struct sk_buff *skb, u16 reg,\n@@ -307,8 +375,21 @@ static void mv88e6xxx_rxtstamp_work(struct mv88e6xxx_chip *chip,\n \tconst struct mv88e6xxx_ptp_ops *ptp_ops = chip-\u003einfo-\u003eops-\u003eptp_ops;\n \tstruct sk_buff *skb;\n \n-\tskb = skb_dequeue(\u0026ps-\u003erx_queue);\n+\tif (chip-\u003einfo-\u003earr_ts_mode) {\n+\t\t/* If arr_ts_mode is set, the timestamps are embedded in the\n+\t\t * frames so a register read is not required. We still need a\n+\t\t * work queue rather than processing inline because\n+\t\t * timecounter_cyc2time() takes the global mutex and this\n+\t\t * cannot be called from mv88e6xxx_port_rxtstamp().\n+\t\t */\n+\t\tskb = skb_dequeue(\u0026ps-\u003erx_queue);\n+\t\tif (skb)\n+\t\t\tmv88e6xxx_get_rxts_embedded(chip, ps, skb);\n+\n+\t\treturn;\n+\t}\n \n+\tskb = skb_dequeue(\u0026ps-\u003erx_queue);\n \tif (skb)\n \t\tmv88e6xxx_get_rxts(chip, ps, skb, ptp_ops-\u003earr0_sts_reg,\n \t\t\t\t   \u0026ps-\u003erx_queue);\n@@ -319,9 +400,16 @@ static void mv88e6xxx_rxtstamp_work(struct mv88e6xxx_chip *chip,\n \t\t\t\t   \u0026ps-\u003erx_queue2);\n }\n \n-static int is_pdelay_resp(const struct ptp_header *hdr)\n+static bool is_pdelay_msg(const struct ptp_header *hdr)\n {\n-\treturn (hdr-\u003etsmt \u0026 0xf) == 3;\n+\tswitch (ptp_get_msgtype(hdr, PTP_CLASS_V2)) {\n+\tcase PTP_MSGTYPE_PDELAY_REQ:\n+\t\tfallthrough;\n+\tcase PTP_MSGTYPE_PDELAY_RESP:\n+\t\treturn true;\n+\tdefault:\n+\t\treturn false;\n+\t}\n }\n \n bool mv88e6xxx_port_rxtstamp(struct dsa_switch *ds, int port,\n@@ -343,7 +431,7 @@ bool mv88e6xxx_port_rxtstamp(struct dsa_switch *ds, int port,\n \n \tSKB_PTP_TYPE(skb) = type;\n \n-\tif (is_pdelay_resp(hdr))\n+\tif (!chip-\u003einfo-\u003earr_ts_mode \u0026\u0026 is_pdelay_msg(hdr))\n \t\tskb_queue_tail(\u0026ps-\u003erx_queue2, skb);\n \telse\n \t\tskb_queue_tail(\u0026ps-\u003erx_queue, skb);\n@@ -523,14 +611,37 @@ int mv88e6165_global_enable(struct mv88e6xxx_chip *chip)\n \n int mv88e6352_hwtstamp_port_disable(struct mv88e6xxx_chip *chip, int port)\n {\n-\treturn mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,\n-\t\t\t\t\tMV88E6XXX_PORT_PTP_CFG0_DISABLE_PTP);\n+\tint err;\n+\n+\terr = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,\n+\t\t\t\t       MV88E6XXX_PORT_PTP_CFG0_DISABLE_PTP);\n+\tif (err)\n+\t\treturn err;\n+\n+\terr = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG2, 0);\n+\tif (err)\n+\t\treturn err;\n+\n+\treturn 0;\n }\n \n int mv88e6352_hwtstamp_port_enable(struct mv88e6xxx_chip *chip, int port)\n {\n-\treturn mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,\n-\t\t\t\t\tMV88E6XXX_PORT_PTP_CFG0_DISABLE_TSPEC_MATCH);\n+\tint err;\n+\n+\tif (chip-\u003einfo-\u003earr_ts_mode) {\n+\t\terr = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG2,\n+\t\t\t\t\t       chip-\u003einfo-\u003earr_ts_mode \u003c\u003c 8);\n+\t\tif (err)\n+\t\t\treturn err;\n+\t}\n+\n+\terr = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,\n+\t\t\t\t       MV88E6XXX_PORT_PTP_CFG0_DISABLE_TSPEC_MATCH);\n+\tif (err)\n+\t\treturn err;\n+\n+\treturn 0;\n }\n \n static int mv88e6xxx_hwtstamp_port_setup(struct mv88e6xxx_chip *chip, int port)\n@@ -584,11 +695,14 @@ int mv88e6xxx_hwtstamp_setup(struct mv88e6xxx_chip *chip)\n \tif (err)\n \t\treturn err;\n \n-\t/* Use ARRIVAL1 for peer delay response messages. */\n-\terr = mv88e6xxx_ptp_write(chip, MV88E6XXX_PTP_TS_ARRIVAL_PTR,\n-\t\t\t\t  MV88E6XXX_PTP_MSGTYPE_PDLAY_RES);\n-\tif (err)\n-\t\treturn err;\n+\tif (!chip-\u003einfo-\u003earr_ts_mode) {\n+\t\t/* Use ARRIVAL1 for peer delay messages. */\n+\t\terr = mv88e6xxx_ptp_write(chip, MV88E6XXX_PTP_TS_ARRIVAL_PTR,\n+\t\t\t\t\t  MV88E6XXX_PTP_MSGTYPE_PDLAY_REQ |\n+\t\t\t\t\t  MV88E6XXX_PTP_MSGTYPE_PDLAY_RES);\n+\t\tif (err)\n+\t\t\treturn err;\n+\t}\n \n \t/* 88E6341 devices default to timestamping at the PHY, but this has\n \t * a hardware issue that results in unreliable timestamps. Force\ndiff --git a/drivers/net/dsa/mv88e6xxx/hwtstamp.h b/drivers/net/dsa/mv88e6xxx/hwtstamp.h\nindex c359821d5a6eaa..c25f53923e7689 100644\n--- a/drivers/net/dsa/mv88e6xxx/hwtstamp.h\n+++ b/drivers/net/dsa/mv88e6xxx/hwtstamp.h\n@@ -68,6 +68,20 @@\n #define MV88E6XXX_PORT_PTP_CFG2_DEP_IRQ_EN\t\t0x0002\n #define MV88E6XXX_PORT_PTP_CFG2_ARR_IRQ_EN\t\t0x0001\n \n+/* Arrival Time Stamp Mode (ArrTSMode), CFG2 bits [15:8]: configures how the\n+ * switch embeds the arrival time stamp (PTPArr0Time) into enabled PTP event\n+ * frames.\n+ *   0x00        frame modification disabled (time stamp read from registers)\n+ *   0x01        append the 4-byte time stamp at the end of the frame,\n+ *               growing the frame by four bytes\n+ *   0x04..0xEF  overwrite the 4-byte time stamp in place, that many bytes past\n+ *               the start of the PTP common header, without growing the frame\n+ *               (offsetof(struct ptp_header, reserved2) targets the reserved\n+ *               bytes of the header)\n+ *   others      reserved\n+ */\n+#define MV88E6XXX_PTP_ARR_TS_MODE_APPEND\t\t0x01\n+\n /* Offset 0x03: PTP LED Configuration */\n #define MV88E6XXX_PORT_PTP_LED_CFG\t0x03\n \n"
}

2/1 2026/07/11 03:23 agent patch-evaluator
1m Model:
gemini-3.1-pro-preview

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the mv88e6xxx DSA driver to support embedded arrival timestamps for Marvell 88E6xxx physical switches. This is a hardware-specific feature that requires physical Marvell switch hardware to probe and execute. There is no software emulation for this hardware in QEMU or the kernel, making the modified code paths impossible to reach in a virtualized fuzzing environment.",
  "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 ed88774fa66207712c584ea33d8522a8e7cc4152
Author: syz-cluster <triage@syzkaller.com>
Date:   Sat Jul 11 03:23:00 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..c3277c1f3d785b 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -28,6 +28,7 @@
 #include <linux/of_mdio.h>
 #include <linux/platform_data/mv88e6xxx.h>
 #include <linux/property.h>
+#include <linux/ptp_classify.h>
 #include <linux/netdevice.h>
 #include <linux/gpio/consumer.h>
 #include <linux/phylink.h>
@@ -6370,6 +6371,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
 		.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
 		.ptp_support = true,
 		.ops = &mv88e6341_ops,
+		.arr_ts_mode = offsetof(struct ptp_header, reserved2),
 	},
 
 	[MV88E6350] = {
@@ -6447,6 +6449,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
 		.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
 		.ptp_support = true,
 		.ops = &mv88e6352_ops,
+		.arr_ts_mode = offsetof(struct ptp_header, reserved2),
 	},
 	[MV88E6361] = {
 		.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6361,
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
index e966e7c4cc5dea..b6a90eba81c438 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -180,6 +180,14 @@ struct mv88e6xxx_info {
 	 * port 0, 1 means internal PHYs range starts at port 1, etc
 	 */
 	unsigned int internal_phys_offset;
+
+	/* Arrival Time Stamp Mode (ArrTSMode); see the ArrTSMode encoding in
+	 * hwtstamp.h. Zero (the default) leaves arrival time stamps in the
+	 * switch registers; non-zero embeds them in the frame, either appended
+	 * as a trailer or overwritten at that byte offset past the start of the
+	 * PTP common header.
+	 */
+	unsigned int arr_ts_mode;
 };
 
 struct mv88e6xxx_atu_entry {
diff --git a/drivers/net/dsa/mv88e6xxx/hwtstamp.c b/drivers/net/dsa/mv88e6xxx/hwtstamp.c
index 6e6472a3b75ad7..1fbed340757972 100644
--- a/drivers/net/dsa/mv88e6xxx/hwtstamp.c
+++ b/drivers/net/dsa/mv88e6xxx/hwtstamp.c
@@ -15,6 +15,7 @@
 #include "hwtstamp.h"
 #include "ptp.h"
 #include <linux/ptp_classify.h>
+#include <linux/unaligned.h>
 
 #define SKB_PTP_TYPE(__skb) (*(unsigned int *)((__skb)->cb))
 
@@ -245,6 +246,73 @@ static int seq_match(struct sk_buff *skb, u16 ts_seqid)
 	return ts_seqid == ntohs(hdr->sequence_id);
 }
 
+static bool parse_embedded_ts(unsigned int arr_ts_mode,
+			      struct sk_buff *skb, u64 *ns)
+{
+	struct ptp_header *hdr;
+
+	*ns = 0;
+
+	/* APPEND means the switch appended the time stamp as a 4-byte trailer
+	 * (not all switches support this). Any other non-zero value is the byte
+	 * offset past the start of the PTP common header at which the switch
+	 * overwrote the time stamp in place (e.g. the reserved header bytes).
+	 */
+	if (arr_ts_mode == MV88E6XXX_PTP_ARR_TS_MODE_APPEND && skb->len >= 4) {
+		if (skb_linearize(skb))
+			return false;
+
+		*ns = (u64)get_unaligned_be32(skb_tail_pointer(skb) - 4);
+		if (pskb_trim_rcsum(skb, skb->len - 4))
+			return false;
+	} else if (arr_ts_mode + 4 <= sizeof(*hdr)) {
+		if (skb_linearize(skb))
+			return false;
+
+		hdr = ptp_parse_header(skb, SKB_PTP_TYPE(skb));
+		if (!hdr)
+			return false;
+
+		*ns = (u64)get_unaligned_be32((u8 *)hdr + arr_ts_mode);
+		memset((u8 *)hdr + arr_ts_mode, 0, 4);
+	} else {
+		return false;
+	}
+
+	return true;
+}
+
+static void mv88e6xxx_get_rxts_embedded(struct mv88e6xxx_chip *chip,
+					struct mv88e6xxx_port_hwtstamp *ps,
+					struct sk_buff *skb)
+{
+	struct sk_buff_head *rxq = &ps->rx_queue;
+	struct skb_shared_hwtstamps *shwt;
+	struct sk_buff_head received;
+	unsigned long flags;
+	u64 ns;
+
+	__skb_queue_head_init(&received);
+	__skb_queue_head(&received, skb);
+	spin_lock_irqsave(&rxq->lock, flags);
+	skb_queue_splice_tail_init(rxq, &received);
+	spin_unlock_irqrestore(&rxq->lock, flags);
+
+	mv88e6xxx_reg_lock(chip);
+	skb_queue_walk(&received, skb) {
+		if (!parse_embedded_ts(chip->info->arr_ts_mode, skb, &ns))
+			continue;
+		ns = timecounter_cyc2time(&chip->tstamp_tc, ns);
+		shwt = skb_hwtstamps(skb);
+		memset(shwt, 0, sizeof(*shwt));
+		shwt->hwtstamp = ns_to_ktime(ns);
+	}
+	mv88e6xxx_reg_unlock(chip);
+
+	while ((skb = __skb_dequeue(&received)))
+		netif_rx(skb);
+}
+
 static void mv88e6xxx_get_rxts(struct mv88e6xxx_chip *chip,
 			       struct mv88e6xxx_port_hwtstamp *ps,
 			       struct sk_buff *skb, u16 reg,
@@ -307,8 +375,21 @@ static void mv88e6xxx_rxtstamp_work(struct mv88e6xxx_chip *chip,
 	const struct mv88e6xxx_ptp_ops *ptp_ops = chip->info->ops->ptp_ops;
 	struct sk_buff *skb;
 
-	skb = skb_dequeue(&ps->rx_queue);
+	if (chip->info->arr_ts_mode) {
+		/* If arr_ts_mode is set, the timestamps are embedded in the
+		 * frames so a register read is not required. We still need a
+		 * work queue rather than processing inline because
+		 * timecounter_cyc2time() takes the global mutex and this
+		 * cannot be called from mv88e6xxx_port_rxtstamp().
+		 */
+		skb = skb_dequeue(&ps->rx_queue);
+		if (skb)
+			mv88e6xxx_get_rxts_embedded(chip, ps, skb);
+
+		return;
+	}
 
+	skb = skb_dequeue(&ps->rx_queue);
 	if (skb)
 		mv88e6xxx_get_rxts(chip, ps, skb, ptp_ops->arr0_sts_reg,
 				   &ps->rx_queue);
@@ -319,9 +400,16 @@ static void mv88e6xxx_rxtstamp_work(struct mv88e6xxx_chip *chip,
 				   &ps->rx_queue2);
 }
 
-static int is_pdelay_resp(const struct ptp_header *hdr)
+static bool is_pdelay_msg(const struct ptp_header *hdr)
 {
-	return (hdr->tsmt & 0xf) == 3;
+	switch (ptp_get_msgtype(hdr, PTP_CLASS_V2)) {
+	case PTP_MSGTYPE_PDELAY_REQ:
+		fallthrough;
+	case PTP_MSGTYPE_PDELAY_RESP:
+		return true;
+	default:
+		return false;
+	}
 }
 
 bool mv88e6xxx_port_rxtstamp(struct dsa_switch *ds, int port,
@@ -343,7 +431,7 @@ bool mv88e6xxx_port_rxtstamp(struct dsa_switch *ds, int port,
 
 	SKB_PTP_TYPE(skb) = type;
 
-	if (is_pdelay_resp(hdr))
+	if (!chip->info->arr_ts_mode && is_pdelay_msg(hdr))
 		skb_queue_tail(&ps->rx_queue2, skb);
 	else
 		skb_queue_tail(&ps->rx_queue, skb);
@@ -523,14 +611,37 @@ int mv88e6165_global_enable(struct mv88e6xxx_chip *chip)
 
 int mv88e6352_hwtstamp_port_disable(struct mv88e6xxx_chip *chip, int port)
 {
-	return mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,
-					MV88E6XXX_PORT_PTP_CFG0_DISABLE_PTP);
+	int err;
+
+	err = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,
+				       MV88E6XXX_PORT_PTP_CFG0_DISABLE_PTP);
+	if (err)
+		return err;
+
+	err = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG2, 0);
+	if (err)
+		return err;
+
+	return 0;
 }
 
 int mv88e6352_hwtstamp_port_enable(struct mv88e6xxx_chip *chip, int port)
 {
-	return mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,
-					MV88E6XXX_PORT_PTP_CFG0_DISABLE_TSPEC_MATCH);
+	int err;
+
+	if (chip->info->arr_ts_mode) {
+		err = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG2,
+					       chip->info->arr_ts_mode << 8);
+		if (err)
+			return err;
+	}
+
+	err = mv88e6xxx_port_ptp_write(chip, port, MV88E6XXX_PORT_PTP_CFG0,
+				       MV88E6XXX_PORT_PTP_CFG0_DISABLE_TSPEC_MATCH);
+	if (err)
+		return err;
+
+	return 0;
 }
 
 static int mv88e6xxx_hwtstamp_port_setup(struct mv88e6xxx_chip *chip, int port)
@@ -584,11 +695,14 @@ int mv88e6xxx_hwtstamp_setup(struct mv88e6xxx_chip *chip)
 	if (err)
 		return err;
 
-	/* Use ARRIVAL1 for peer delay response messages. */
-	err = mv88e6xxx_ptp_write(chip, MV88E6XXX_PTP_TS_ARRIVAL_PTR,
-				  MV88E6XXX_PTP_MSGTYPE_PDLAY_RES);
-	if (err)
-		return err;
+	if (!chip->info->arr_ts_mode) {
+		/* Use ARRIVAL1 for peer delay messages. */
+		err = mv88e6xxx_ptp_write(chip, MV88E6XXX_PTP_TS_ARRIVAL_PTR,
+					  MV88E6XXX_PTP_MSGTYPE_PDLAY_REQ |
+					  MV88E6XXX_PTP_MSGTYPE_PDLAY_RES);
+		if (err)
+			return err;
+	}
 
 	/* 88E6341 devices default to timestamping at the PHY, but this has
 	 * a hardware issue that results in unreliable timestamps. Force
diff --git a/drivers/net/dsa/mv88e6xxx/hwtstamp.h b/drivers/net/dsa/mv88e6xxx/hwtstamp.h
index c359821d5a6eaa..c25f53923e7689 100644
--- a/drivers/net/dsa/mv88e6xxx/hwtstamp.h
+++ b/drivers/net/dsa/mv88e6xxx/hwtstamp.h
@@ -68,6 +68,20 @@
 #define MV88E6XXX_PORT_PTP_CFG2_DEP_IRQ_EN		0x0002
 #define MV88E6XXX_PORT_PTP_CFG2_ARR_IRQ_EN		0x0001
 
+/* Arrival Time Stamp Mode (ArrTSMode), CFG2 bits [15:8]: configures how the
+ * switch embeds the arrival time stamp (PTPArr0Time) into enabled PTP event
+ * frames.
+ *   0x00        frame modification disabled (time stamp read from registers)
+ *   0x01        append the 4-byte time stamp at the end of the frame,
+ *               growing the frame by four bytes
+ *   0x04..0xEF  overwrite the 4-byte time stamp in place, that many bytes past
+ *               the start of the PTP common header, without growing the frame
+ *               (offsetof(struct ptp_header, reserved2) targets the reserved
+ *               bytes of the header)
+ *   others      reserved
+ */
+#define MV88E6XXX_PTP_ARR_TS_MODE_APPEND		0x01
+
 /* Offset 0x03: PTP LED Configuration */
 #define MV88E6XXX_PORT_PTP_LED_CFG	0x03
 

3/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 5733
							output: 33
							thoughts: 320
						

Thoughts:
**Analyzing the Marvell 88E6xxx PTP Timestamp Patch**

Okay, so I'm looking at a patch that adds embedded arrival timestamp support for PTP frames on Marvell 88E6xxx switches. It's touching the usual suspects within the `mv88e6xxx` driver – `chip.c`, `chip.h`, `hwtstamp.c`, `hwtstamp.h`. The core of the change seems to be around enabling `arr_ts_mode` for the `MV88E6341` and `MV88E6352` variants within the `mv88e6xxx_table`, along with the new functions `parse_embedded_ts` and `mv88e6xxx_get_rxts_embedded` for parsing that timestamp from the received skb.

My immediate thought is, how testable is this? This is a hardware-specific feature, obviously tied to a DSA switch driver. DSA switches are typically physical hardware. My concern is whether this functionality is reachable in a virtualized environment. Can I actually *use* this code without physically having an 88E6xxx switch? Is there even a software emulator for the `mv88e6xxx` that could be used for testing?

I need to investigate that. Generally, DSA switches communicate via MDIO, which means this probably depends on specific hardware. I'll need to dig into the kernel source and see if there are any hints of emulation or if this driver is strictly designed for physical hardware interactions. Let's start with a kernel search for `mv88e6xxx` to look for anything that points towards virtualization support or emulation.



4/2 2026/07/11 03:23 tool grepper
0m Args:
{
  "Expression": "mv88e6xxx",
  "PathPrefix": "drivers/net/dsa/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 10068 lines.\nUse more precise expression if possible.\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-49-\ndrivers/net/dsa/mv88e6xxx/chip.c:50:static void assert_reg_lock(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-51-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-57-\ndrivers/net/dsa/mv88e6xxx/chip.c:58:int mv88e6xxx_read(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val)\ndrivers/net/dsa/mv88e6xxx/chip.c-59-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-63-\ndrivers/net/dsa/mv88e6xxx/chip.c:64:\terr = mv88e6xxx_smi_read(chip, addr, reg, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-65-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-73-\ndrivers/net/dsa/mv88e6xxx/chip.c:74:int mv88e6xxx_write(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val)\ndrivers/net/dsa/mv88e6xxx/chip.c-75-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-79-\ndrivers/net/dsa/mv88e6xxx/chip.c:80:\terr = mv88e6xxx_smi_write(chip, addr, reg, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-81-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-89-\ndrivers/net/dsa/mv88e6xxx/chip.c:90:int mv88e6xxx_wait_mask(struct mv88e6xxx_chip *chip, int addr, int reg,\ndrivers/net/dsa/mv88e6xxx/chip.c-91-\t\t\tu16 mask, u16 val)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-102-\tfor (i = 0; time_before(jiffies, timeout) || (i \u003c 2); i++) {\ndrivers/net/dsa/mv88e6xxx/chip.c:103:\t\terr = mv88e6xxx_read(chip, addr, reg, \u0026data);\ndrivers/net/dsa/mv88e6xxx/chip.c-104-\t\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-115-\ndrivers/net/dsa/mv88e6xxx/chip.c:116:\terr = mv88e6xxx_read(chip, addr, reg, \u0026data);\ndrivers/net/dsa/mv88e6xxx/chip.c-117-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-126-\ndrivers/net/dsa/mv88e6xxx/chip.c:127:int mv88e6xxx_wait_bit(struct mv88e6xxx_chip *chip, int addr, int reg,\ndrivers/net/dsa/mv88e6xxx/chip.c-128-\t\t       int bit, int val)\ndrivers/net/dsa/mv88e6xxx/chip.c-129-{\ndrivers/net/dsa/mv88e6xxx/chip.c:130:\treturn mv88e6xxx_wait_mask(chip, addr, reg, BIT(bit),\ndrivers/net/dsa/mv88e6xxx/chip.c-131-\t\t\t\t   val ? BIT(bit) : 0x0000);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-133-\ndrivers/net/dsa/mv88e6xxx/chip.c:134:struct mii_bus *mv88e6xxx_default_mdio_bus(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-135-{\ndrivers/net/dsa/mv88e6xxx/chip.c:136:\tstruct mv88e6xxx_mdio_bus *mdio_bus;\ndrivers/net/dsa/mv88e6xxx/chip.c-137-\ndrivers/net/dsa/mv88e6xxx/chip.c-138-\tmdio_bus = list_first_entry_or_null(\u0026chip-\u003emdios,\ndrivers/net/dsa/mv88e6xxx/chip.c:139:\t\t\t\t\t    struct mv88e6xxx_mdio_bus, list);\ndrivers/net/dsa/mv88e6xxx/chip.c-140-\tif (!mdio_bus)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-145-\ndrivers/net/dsa/mv88e6xxx/chip.c:146:static void mv88e6xxx_g1_irq_mask(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-147-{\ndrivers/net/dsa/mv88e6xxx/chip.c:148:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-149-\tunsigned int n = d-\u003ehwirq;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-153-\ndrivers/net/dsa/mv88e6xxx/chip.c:154:static void mv88e6xxx_g1_irq_unmask(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-155-{\ndrivers/net/dsa/mv88e6xxx/chip.c:156:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-157-\tunsigned int n = d-\u003ehwirq;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-161-\ndrivers/net/dsa/mv88e6xxx/chip.c:162:static irqreturn_t mv88e6xxx_g1_irq_thread_work(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-163-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-170-\ndrivers/net/dsa/mv88e6xxx/chip.c:171:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:172:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c:173:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-174-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-187-\ndrivers/net/dsa/mv88e6xxx/chip.c:188:\t\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:189:\t\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026ctl1);\ndrivers/net/dsa/mv88e6xxx/chip.c-190-\t\tif (err)\ndrivers/net/dsa/mv88e6xxx/chip.c-191-\t\t\tgoto unlock;\ndrivers/net/dsa/mv88e6xxx/chip.c:192:\t\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-193-unlock:\ndrivers/net/dsa/mv88e6xxx/chip.c:194:\t\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-195-\t\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-203-\ndrivers/net/dsa/mv88e6xxx/chip.c:204:static irqreturn_t mv88e6xxx_g1_irq_thread_fn(int irq, void *dev_id)\ndrivers/net/dsa/mv88e6xxx/chip.c-205-{\ndrivers/net/dsa/mv88e6xxx/chip.c:206:\tstruct mv88e6xxx_chip *chip = dev_id;\ndrivers/net/dsa/mv88e6xxx/chip.c-207-\ndrivers/net/dsa/mv88e6xxx/chip.c:208:\treturn mv88e6xxx_g1_irq_thread_work(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-209-}\ndrivers/net/dsa/mv88e6xxx/chip.c-210-\ndrivers/net/dsa/mv88e6xxx/chip.c:211:static void mv88e6xxx_g1_irq_bus_lock(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-212-{\ndrivers/net/dsa/mv88e6xxx/chip.c:213:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-214-\ndrivers/net/dsa/mv88e6xxx/chip.c:215:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-216-}\ndrivers/net/dsa/mv88e6xxx/chip.c-217-\ndrivers/net/dsa/mv88e6xxx/chip.c:218:static void mv88e6xxx_g1_irq_bus_sync_unlock(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-219-{\ndrivers/net/dsa/mv88e6xxx/chip.c:220:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-221-\tu16 mask = GENMASK(chip-\u003eg1_irq.nirqs, 0);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-224-\ndrivers/net/dsa/mv88e6xxx/chip.c:225:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-226-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-231-\ndrivers/net/dsa/mv88e6xxx/chip.c:232:\terr = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-233-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-236-out:\ndrivers/net/dsa/mv88e6xxx/chip.c:237:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-238-}\ndrivers/net/dsa/mv88e6xxx/chip.c-239-\ndrivers/net/dsa/mv88e6xxx/chip.c:240:static const struct irq_chip mv88e6xxx_g1_irq_chip = {\ndrivers/net/dsa/mv88e6xxx/chip.c:241:\t.name\t\t\t= \"mv88e6xxx-g1\",\ndrivers/net/dsa/mv88e6xxx/chip.c:242:\t.irq_mask\t\t= mv88e6xxx_g1_irq_mask,\ndrivers/net/dsa/mv88e6xxx/chip.c:243:\t.irq_unmask\t\t= mv88e6xxx_g1_irq_unmask,\ndrivers/net/dsa/mv88e6xxx/chip.c:244:\t.irq_bus_lock\t\t= mv88e6xxx_g1_irq_bus_lock,\ndrivers/net/dsa/mv88e6xxx/chip.c:245:\t.irq_bus_sync_unlock\t= mv88e6xxx_g1_irq_bus_sync_unlock,\ndrivers/net/dsa/mv88e6xxx/chip.c-246-};\ndrivers/net/dsa/mv88e6xxx/chip.c-247-\ndrivers/net/dsa/mv88e6xxx/chip.c:248:static int mv88e6xxx_g1_irq_domain_map(struct irq_domain *d,\ndrivers/net/dsa/mv88e6xxx/chip.c-249-\t\t\t\t       unsigned int irq,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-251-{\ndrivers/net/dsa/mv88e6xxx/chip.c:252:\tstruct mv88e6xxx_chip *chip = d-\u003ehost_data;\ndrivers/net/dsa/mv88e6xxx/chip.c-253-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-260-\ndrivers/net/dsa/mv88e6xxx/chip.c:261:static const struct irq_domain_ops mv88e6xxx_g1_irq_domain_ops = {\ndrivers/net/dsa/mv88e6xxx/chip.c:262:\t.map\t= mv88e6xxx_g1_irq_domain_map,\ndrivers/net/dsa/mv88e6xxx/chip.c-263-\t.xlate\t= irq_domain_xlate_twocell,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-266-/* To be called with reg_lock held */\ndrivers/net/dsa/mv88e6xxx/chip.c:267:static void mv88e6xxx_g1_irq_free_common(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-268-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-271-\ndrivers/net/dsa/mv88e6xxx/chip.c:272:\tmv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-273-\tmask \u0026= ~GENMASK(chip-\u003eg1_irq.nirqs, 0);\ndrivers/net/dsa/mv88e6xxx/chip.c:274:\tmv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-275-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-283-\ndrivers/net/dsa/mv88e6xxx/chip.c:284:static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-285-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-291-\ndrivers/net/dsa/mv88e6xxx/chip.c:292:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:293:\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:294:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-295-}\ndrivers/net/dsa/mv88e6xxx/chip.c-296-\ndrivers/net/dsa/mv88e6xxx/chip.c:297:static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-298-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-304-\t\tNULL, chip-\u003eg1_irq.nirqs, 0,\ndrivers/net/dsa/mv88e6xxx/chip.c:305:\t\t\u0026mv88e6xxx_g1_irq_domain_ops, chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-306-\tif (!chip-\u003eg1_irq.domain)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-311-\ndrivers/net/dsa/mv88e6xxx/chip.c:312:\tchip-\u003eg1_irq.chip = mv88e6xxx_g1_irq_chip;\ndrivers/net/dsa/mv88e6xxx/chip.c-313-\tchip-\u003eg1_irq.masked = ~0;\ndrivers/net/dsa/mv88e6xxx/chip.c-314-\ndrivers/net/dsa/mv88e6xxx/chip.c:315:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-316-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-320-\ndrivers/net/dsa/mv88e6xxx/chip.c:321:\terr = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-322-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-325-\t/* Reading the interrupt status clears (most of) them */\ndrivers/net/dsa/mv88e6xxx/chip.c:326:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-327-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-333-\tmask \u0026= ~GENMASK(chip-\u003eg1_irq.nirqs, 0);\ndrivers/net/dsa/mv88e6xxx/chip.c:334:\tmv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-335-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-346-\ndrivers/net/dsa/mv88e6xxx/chip.c:347:static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-348-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-352-\ndrivers/net/dsa/mv88e6xxx/chip.c:353:\terr = mv88e6xxx_g1_irq_setup_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-354-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-363-\tsnprintf(chip-\u003eirq_name, sizeof(chip-\u003eirq_name),\ndrivers/net/dsa/mv88e6xxx/chip.c:364:\t\t \"mv88e6xxx-%s\", dev_name(chip-\u003edev));\ndrivers/net/dsa/mv88e6xxx/chip.c-365-\ndrivers/net/dsa/mv88e6xxx/chip.c:366:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-367-\terr = request_threaded_irq(chip-\u003eirq, NULL,\ndrivers/net/dsa/mv88e6xxx/chip.c:368:\t\t\t\t   mv88e6xxx_g1_irq_thread_fn,\ndrivers/net/dsa/mv88e6xxx/chip.c-369-\t\t\t\t   IRQF_ONESHOT | IRQF_SHARED,\ndrivers/net/dsa/mv88e6xxx/chip.c-370-\t\t\t\t   chip-\u003eirq_name, chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:371:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-372-\tif (err)\ndrivers/net/dsa/mv88e6xxx/chip.c:373:\t\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-374-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-377-\ndrivers/net/dsa/mv88e6xxx/chip.c:378:static void mv88e6xxx_irq_poll(struct kthread_work *work)\ndrivers/net/dsa/mv88e6xxx/chip.c-379-{\ndrivers/net/dsa/mv88e6xxx/chip.c:380:\tstruct mv88e6xxx_chip *chip = container_of(work,\ndrivers/net/dsa/mv88e6xxx/chip.c:381:\t\t\t\t\t\t   struct mv88e6xxx_chip,\ndrivers/net/dsa/mv88e6xxx/chip.c-382-\t\t\t\t\t\t   irq_poll_work.work);\ndrivers/net/dsa/mv88e6xxx/chip.c:383:\tmv88e6xxx_g1_irq_thread_work(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-384-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-388-\ndrivers/net/dsa/mv88e6xxx/chip.c:389:static int mv88e6xxx_irq_poll_setup(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-390-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-392-\ndrivers/net/dsa/mv88e6xxx/chip.c:393:\terr = mv88e6xxx_g1_irq_setup_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-394-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-397-\tkthread_init_delayed_work(\u0026chip-\u003eirq_poll_work,\ndrivers/net/dsa/mv88e6xxx/chip.c:398:\t\t\t\t  mv88e6xxx_irq_poll);\ndrivers/net/dsa/mv88e6xxx/chip.c-399-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-409-\ndrivers/net/dsa/mv88e6xxx/chip.c:410:static void mv88e6xxx_irq_poll_free(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-411-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-414-\ndrivers/net/dsa/mv88e6xxx/chip.c:415:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:416:\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:417:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-418-}\ndrivers/net/dsa/mv88e6xxx/chip.c-419-\ndrivers/net/dsa/mv88e6xxx/chip.c:420:static int mv88e6xxx_port_config_interface(struct mv88e6xxx_chip *chip,\ndrivers/net/dsa/mv88e6xxx/chip.c-421-\t\t\t\t\t   int port, phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-441-\ndrivers/net/dsa/mv88e6xxx/chip.c:442:static int mv88e6xxx_port_setup_mac(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-443-\t\t\t\t    int link, int speed, int duplex, int pause,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-468-\ndrivers/net/dsa/mv88e6xxx/chip.c:469:\terr = mv88e6xxx_port_config_interface(chip, port, mode);\ndrivers/net/dsa/mv88e6xxx/chip.c-470-restore_link:\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-476-\ndrivers/net/dsa/mv88e6xxx/chip.c:477:static int mv88e6xxx_phy_is_internal(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-478-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-483-\ndrivers/net/dsa/mv88e6xxx/chip.c:484:static int mv88e6xxx_port_ppu_updates(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-485-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-492-\tif (chip-\u003einfo-\u003efamily == MV88E6XXX_FAMILY_6250)\ndrivers/net/dsa/mv88e6xxx/chip.c:493:\t\treturn mv88e6xxx_phy_is_internal(chip, port);\ndrivers/net/dsa/mv88e6xxx/chip.c-494-\ndrivers/net/dsa/mv88e6xxx/chip.c:495:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-496-\tif (err) {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=506=static const u8 mv88e6185_phy_interface_modes[] = {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-515-\ndrivers/net/dsa/mv88e6xxx/chip.c:516:static void mv88e6095_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-517-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-522-\ndrivers/net/dsa/mv88e6xxx/chip.c:523:\tif (mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c-524-\t\t__set_bit(PHY_INTERFACE_MODE_MII, config-\u003esupported_interfaces);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-534-\ndrivers/net/dsa/mv88e6xxx/chip.c:535:static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-536-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-548-\ndrivers/net/dsa/mv88e6xxx/chip.c:549:static const u8 mv88e6xxx_phy_interface_modes[] = {\ndrivers/net/dsa/mv88e6xxx/chip.c-550-\t[MV88E6XXX_PORT_STS_CMODE_MII_PHY]\t= PHY_INTERFACE_MODE_REVMII,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-563-\ndrivers/net/dsa/mv88e6xxx/chip.c:564:static void mv88e6xxx_translate_cmode(u8 cmode, unsigned long *supported)\ndrivers/net/dsa/mv88e6xxx/chip.c-565-{\ndrivers/net/dsa/mv88e6xxx/chip.c:566:\tif (cmode \u003c ARRAY_SIZE(mv88e6xxx_phy_interface_modes) \u0026\u0026\ndrivers/net/dsa/mv88e6xxx/chip.c:567:\t    mv88e6xxx_phy_interface_modes[cmode])\ndrivers/net/dsa/mv88e6xxx/chip.c:568:\t\t__set_bit(mv88e6xxx_phy_interface_modes[cmode], supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-569-\telse if (cmode == MV88E6XXX_PORT_STS_CMODE_RGMII)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=573=static void\ndrivers/net/dsa/mv88e6xxx/chip.c:574:mv88e6250_setup_supported_interfaces(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-575-\t\t\t\t     struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-580-\ndrivers/net/dsa/mv88e6xxx/chip.c:581:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-582-\tif (err) {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-622-\ndrivers/net/dsa/mv88e6xxx/chip.c:623:static void mv88e6250_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-624-\t\t\t\t       struct phylink_config *config)\ndrivers/net/dsa/mv88e6xxx/chip.c-625-{\ndrivers/net/dsa/mv88e6xxx/chip.c:626:\tif (!mv88e6xxx_phy_is_internal(chip, port))\ndrivers/net/dsa/mv88e6xxx/chip.c-627-\t\tmv88e6250_setup_supported_interfaces(chip, port, config);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-631-\ndrivers/net/dsa/mv88e6xxx/chip.c:632:static void mv88e6351_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-633-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-637-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:638:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-639-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-643-\ndrivers/net/dsa/mv88e6xxx/chip.c:644:static int mv88e63xx_get_port_serdes_cmode(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-645-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-648-\ndrivers/net/dsa/mv88e6xxx/chip.c:649:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-650-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-657-\tval = reg \u0026 ~MV88E6XXX_PORT_STS_PHY_DETECT;\ndrivers/net/dsa/mv88e6xxx/chip.c:658:\terr = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_STS, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-659-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-661-\ndrivers/net/dsa/mv88e6xxx/chip.c:662:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026val);\ndrivers/net/dsa/mv88e6xxx/chip.c-663-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-666-\t/* Restore PHY_DETECT value */\ndrivers/net/dsa/mv88e6xxx/chip.c:667:\terr = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_STS, reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-668-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-673-\ndrivers/net/dsa/mv88e6xxx/chip.c:674:static void mv88e6352_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-675-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-680-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:681:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-682-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-696-\t\telse\ndrivers/net/dsa/mv88e6xxx/chip.c:697:\t\t\tmv88e6xxx_translate_cmode(cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-698-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-700-\ndrivers/net/dsa/mv88e6xxx/chip.c:701:static void mv88e632x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-702-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-707-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:708:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-709-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-719-\t\telse\ndrivers/net/dsa/mv88e6xxx/chip.c:720:\t\t\tmv88e6xxx_translate_cmode(cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-721-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-723-\ndrivers/net/dsa/mv88e6xxx/chip.c:724:static void mv88e6341_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-725-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-729-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:730:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-731-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-745-\ndrivers/net/dsa/mv88e6xxx/chip.c:746:static void mv88e6390_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-747-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-751-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:752:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-753-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-767-\ndrivers/net/dsa/mv88e6xxx/chip.c:768:static void mv88e6390x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-769-\t\t\t\t\tstruct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-802-\ndrivers/net/dsa/mv88e6xxx/chip.c:803:static void mv88e6393x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-804-\t\t\t\t\tstruct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-811-\ndrivers/net/dsa/mv88e6xxx/chip.c:812:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-813-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-846-\ndrivers/net/dsa/mv88e6xxx/chip.c:847:static void mv88e6xxx_get_caps(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-848-\t\t\t       struct phylink_config *config)\ndrivers/net/dsa/mv88e6xxx/chip.c-849-{\ndrivers/net/dsa/mv88e6xxx/chip.c:850:\tstruct mv88e6xxx_chip *chip = ds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-851-\ndrivers/net/dsa/mv88e6xxx/chip.c:852:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-853-\tchip-\u003einfo-\u003eops-\u003ephylink_get_caps(chip, port, config);\ndrivers/net/dsa/mv88e6xxx/chip.c:854:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-855-\ndrivers/net/dsa/mv88e6xxx/chip.c:856:\tif (mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c-857-\t\t__set_bit(PHY_INTERFACE_MODE_INTERNAL,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=865=static struct phylink_pcs *\ndrivers/net/dsa/mv88e6xxx/chip.c:866:mv88e6xxx_mac_select_pcs(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-867-\t\t\t phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-869-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:870:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-871-\tstruct phylink_pcs *pcs = NULL;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-879-\ndrivers/net/dsa/mv88e6xxx/chip.c:880:static int mv88e6xxx_mac_prepare(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-881-\t\t\t\t unsigned int mode, phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-883-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:884:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-885-\tint port = dp-\u003eindex;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-894-\t    chip-\u003einfo-\u003eops-\u003eport_set_link) {\ndrivers/net/dsa/mv88e6xxx/chip.c:895:\t\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-896-\t\terr = chip-\u003einfo-\u003eops-\u003eport_set_link(chip, port,\ndrivers/net/dsa/mv88e6xxx/chip.c-897-\t\t\t\t\t\t     LINK_FORCED_DOWN);\ndrivers/net/dsa/mv88e6xxx/chip.c:898:\t\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-899-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-903-\ndrivers/net/dsa/mv88e6xxx/chip.c:904:static void mv88e6xxx_mac_config(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-905-\t\t\t\t unsigned int mode,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-908-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:909:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-910-\tint port = dp-\u003eindex;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-912-\ndrivers/net/dsa/mv88e6xxx/chip.c:913:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-914-\ndrivers/net/dsa/mv88e6xxx/chip.c:915:\tif (mode != MLO_AN_PHY || !mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c:916:\t\terr = mv88e6xxx_port_config_interface(chip, port,\ndrivers/net/dsa/mv88e6xxx/chip.c-917-\t\t\t\t\t\t      state-\u003einterface);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-922-err_unlock:\ndrivers/net/dsa/mv88e6xxx/chip.c:923:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-924-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-928-\ndrivers/net/dsa/mv88e6xxx/chip.c:929:static int mv88e6xxx_mac_finish(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-930-\t\t\t\tunsigned int mode, phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-932-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:933:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-934-\tint port = dp-\u003eindex;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-942-\t */\ndrivers/net/dsa/mv88e6xxx/chip.c:943:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-944-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-947-\t      chip-\u003eports[port].interface != interface) ||\ndrivers/net/dsa/mv88e6xxx/chip.c:948:\t     (mode == MLO_AN_PHY \u0026\u0026 mv88e6xxx_port_ppu_updates(chip, port))))\ndrivers/net/dsa/mv88e6xxx/chip.c-949-\t\terr = chip-\u003einfo-\u003eops-\u003eport_set_link(chip, port, LINK_UNFORCED);\ndrivers/net/dsa/mv88e6xxx/chip.c-950-\ndrivers/net/dsa/mv88e6xxx/chip.c:951:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-952-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-957-\ndrivers/net/dsa/mv88e6xxx/chip.c:958:static void mv88e6xxx_mac_link_down(struct phylink_config *config,\n\n"
}

5/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 20932
							output: 40
							thoughts: 425
						

Thoughts:
**Analyzing the Marvell 88E6xxx Switch Driver**

Okay, so I need to figure out if this Marvell 88E6xxx switch driver is testable without the actual hardware. My first instinct is to see if there's any QEMU emulation or software emulation available for the 88E6xxx series. I'll need to dig into the QEMU source code, maybe search for "mv88e6," or see if I can even trigger this code path within syzkaller.

Hmm, syzkaller itself doesn't have physical hardware, obviously. But sometimes it can probe drivers, especially if they use things like platform devices, or are instantiated through netlink or sysfs. Wait, DSA switches, aren't they usually instantiated through device tree or platform data? So, can I instantiate it via device tree in syzkaller? Syzkaller doesn't generally modify the device tree dynamically unless there's a pseudo-device or overlay mechanism involved, but I know it *does* have some device tree overlay support, or maybe it just can't reach this particular device.

Hold on a second, look at this! Syzkaller *found* a patch and applied it! The commit message says "syz-cluster: applied patch under review". So, that suggests syzkaller is either actively testing it or it's reviewing a patch submitted to a mailing list.

But, based on the prompt, it looks like this code is for paths that can't be reached in virtualized environments like GCE or QEMU, even with software-emulated hardware. If it touches core kernel logic, drivers, or architectures, I'm supposed to use search tools to verify if it can be executed. Then I would return `WorthFuzzing=true`.

Given that this is a hardware-specific driver, the Marvell 88E6xxx switch, and that there's no software emulation for it in the kernel or QEMU, it's probably impossible to reach. So I'd better double check if there's *any* software emulation for mv88e6xxx within the kernel itself.



6/2 2026/07/11 03:23 tool grepper
0m Args:
{
  "Expression": "mv88e6xxx",
  "PathPrefix": "drivers/net/dsa/mv88e6xxx/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 10055 lines.\nUse more precise expression if possible.\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-49-\ndrivers/net/dsa/mv88e6xxx/chip.c:50:static void assert_reg_lock(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-51-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-57-\ndrivers/net/dsa/mv88e6xxx/chip.c:58:int mv88e6xxx_read(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val)\ndrivers/net/dsa/mv88e6xxx/chip.c-59-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-63-\ndrivers/net/dsa/mv88e6xxx/chip.c:64:\terr = mv88e6xxx_smi_read(chip, addr, reg, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-65-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-73-\ndrivers/net/dsa/mv88e6xxx/chip.c:74:int mv88e6xxx_write(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val)\ndrivers/net/dsa/mv88e6xxx/chip.c-75-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-79-\ndrivers/net/dsa/mv88e6xxx/chip.c:80:\terr = mv88e6xxx_smi_write(chip, addr, reg, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-81-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-89-\ndrivers/net/dsa/mv88e6xxx/chip.c:90:int mv88e6xxx_wait_mask(struct mv88e6xxx_chip *chip, int addr, int reg,\ndrivers/net/dsa/mv88e6xxx/chip.c-91-\t\t\tu16 mask, u16 val)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-102-\tfor (i = 0; time_before(jiffies, timeout) || (i \u003c 2); i++) {\ndrivers/net/dsa/mv88e6xxx/chip.c:103:\t\terr = mv88e6xxx_read(chip, addr, reg, \u0026data);\ndrivers/net/dsa/mv88e6xxx/chip.c-104-\t\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-115-\ndrivers/net/dsa/mv88e6xxx/chip.c:116:\terr = mv88e6xxx_read(chip, addr, reg, \u0026data);\ndrivers/net/dsa/mv88e6xxx/chip.c-117-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-126-\ndrivers/net/dsa/mv88e6xxx/chip.c:127:int mv88e6xxx_wait_bit(struct mv88e6xxx_chip *chip, int addr, int reg,\ndrivers/net/dsa/mv88e6xxx/chip.c-128-\t\t       int bit, int val)\ndrivers/net/dsa/mv88e6xxx/chip.c-129-{\ndrivers/net/dsa/mv88e6xxx/chip.c:130:\treturn mv88e6xxx_wait_mask(chip, addr, reg, BIT(bit),\ndrivers/net/dsa/mv88e6xxx/chip.c-131-\t\t\t\t   val ? BIT(bit) : 0x0000);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-133-\ndrivers/net/dsa/mv88e6xxx/chip.c:134:struct mii_bus *mv88e6xxx_default_mdio_bus(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-135-{\ndrivers/net/dsa/mv88e6xxx/chip.c:136:\tstruct mv88e6xxx_mdio_bus *mdio_bus;\ndrivers/net/dsa/mv88e6xxx/chip.c-137-\ndrivers/net/dsa/mv88e6xxx/chip.c-138-\tmdio_bus = list_first_entry_or_null(\u0026chip-\u003emdios,\ndrivers/net/dsa/mv88e6xxx/chip.c:139:\t\t\t\t\t    struct mv88e6xxx_mdio_bus, list);\ndrivers/net/dsa/mv88e6xxx/chip.c-140-\tif (!mdio_bus)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-145-\ndrivers/net/dsa/mv88e6xxx/chip.c:146:static void mv88e6xxx_g1_irq_mask(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-147-{\ndrivers/net/dsa/mv88e6xxx/chip.c:148:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-149-\tunsigned int n = d-\u003ehwirq;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-153-\ndrivers/net/dsa/mv88e6xxx/chip.c:154:static void mv88e6xxx_g1_irq_unmask(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-155-{\ndrivers/net/dsa/mv88e6xxx/chip.c:156:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-157-\tunsigned int n = d-\u003ehwirq;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-161-\ndrivers/net/dsa/mv88e6xxx/chip.c:162:static irqreturn_t mv88e6xxx_g1_irq_thread_work(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-163-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-170-\ndrivers/net/dsa/mv88e6xxx/chip.c:171:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:172:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c:173:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-174-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-187-\ndrivers/net/dsa/mv88e6xxx/chip.c:188:\t\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:189:\t\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026ctl1);\ndrivers/net/dsa/mv88e6xxx/chip.c-190-\t\tif (err)\ndrivers/net/dsa/mv88e6xxx/chip.c-191-\t\t\tgoto unlock;\ndrivers/net/dsa/mv88e6xxx/chip.c:192:\t\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-193-unlock:\ndrivers/net/dsa/mv88e6xxx/chip.c:194:\t\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-195-\t\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-203-\ndrivers/net/dsa/mv88e6xxx/chip.c:204:static irqreturn_t mv88e6xxx_g1_irq_thread_fn(int irq, void *dev_id)\ndrivers/net/dsa/mv88e6xxx/chip.c-205-{\ndrivers/net/dsa/mv88e6xxx/chip.c:206:\tstruct mv88e6xxx_chip *chip = dev_id;\ndrivers/net/dsa/mv88e6xxx/chip.c-207-\ndrivers/net/dsa/mv88e6xxx/chip.c:208:\treturn mv88e6xxx_g1_irq_thread_work(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-209-}\ndrivers/net/dsa/mv88e6xxx/chip.c-210-\ndrivers/net/dsa/mv88e6xxx/chip.c:211:static void mv88e6xxx_g1_irq_bus_lock(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-212-{\ndrivers/net/dsa/mv88e6xxx/chip.c:213:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-214-\ndrivers/net/dsa/mv88e6xxx/chip.c:215:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-216-}\ndrivers/net/dsa/mv88e6xxx/chip.c-217-\ndrivers/net/dsa/mv88e6xxx/chip.c:218:static void mv88e6xxx_g1_irq_bus_sync_unlock(struct irq_data *d)\ndrivers/net/dsa/mv88e6xxx/chip.c-219-{\ndrivers/net/dsa/mv88e6xxx/chip.c:220:\tstruct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);\ndrivers/net/dsa/mv88e6xxx/chip.c-221-\tu16 mask = GENMASK(chip-\u003eg1_irq.nirqs, 0);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-224-\ndrivers/net/dsa/mv88e6xxx/chip.c:225:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-226-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-231-\ndrivers/net/dsa/mv88e6xxx/chip.c:232:\terr = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-233-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-236-out:\ndrivers/net/dsa/mv88e6xxx/chip.c:237:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-238-}\ndrivers/net/dsa/mv88e6xxx/chip.c-239-\ndrivers/net/dsa/mv88e6xxx/chip.c:240:static const struct irq_chip mv88e6xxx_g1_irq_chip = {\ndrivers/net/dsa/mv88e6xxx/chip.c:241:\t.name\t\t\t= \"mv88e6xxx-g1\",\ndrivers/net/dsa/mv88e6xxx/chip.c:242:\t.irq_mask\t\t= mv88e6xxx_g1_irq_mask,\ndrivers/net/dsa/mv88e6xxx/chip.c:243:\t.irq_unmask\t\t= mv88e6xxx_g1_irq_unmask,\ndrivers/net/dsa/mv88e6xxx/chip.c:244:\t.irq_bus_lock\t\t= mv88e6xxx_g1_irq_bus_lock,\ndrivers/net/dsa/mv88e6xxx/chip.c:245:\t.irq_bus_sync_unlock\t= mv88e6xxx_g1_irq_bus_sync_unlock,\ndrivers/net/dsa/mv88e6xxx/chip.c-246-};\ndrivers/net/dsa/mv88e6xxx/chip.c-247-\ndrivers/net/dsa/mv88e6xxx/chip.c:248:static int mv88e6xxx_g1_irq_domain_map(struct irq_domain *d,\ndrivers/net/dsa/mv88e6xxx/chip.c-249-\t\t\t\t       unsigned int irq,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-251-{\ndrivers/net/dsa/mv88e6xxx/chip.c:252:\tstruct mv88e6xxx_chip *chip = d-\u003ehost_data;\ndrivers/net/dsa/mv88e6xxx/chip.c-253-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-260-\ndrivers/net/dsa/mv88e6xxx/chip.c:261:static const struct irq_domain_ops mv88e6xxx_g1_irq_domain_ops = {\ndrivers/net/dsa/mv88e6xxx/chip.c:262:\t.map\t= mv88e6xxx_g1_irq_domain_map,\ndrivers/net/dsa/mv88e6xxx/chip.c-263-\t.xlate\t= irq_domain_xlate_twocell,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-266-/* To be called with reg_lock held */\ndrivers/net/dsa/mv88e6xxx/chip.c:267:static void mv88e6xxx_g1_irq_free_common(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-268-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-271-\ndrivers/net/dsa/mv88e6xxx/chip.c:272:\tmv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-273-\tmask \u0026= ~GENMASK(chip-\u003eg1_irq.nirqs, 0);\ndrivers/net/dsa/mv88e6xxx/chip.c:274:\tmv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-275-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-283-\ndrivers/net/dsa/mv88e6xxx/chip.c:284:static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-285-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-291-\ndrivers/net/dsa/mv88e6xxx/chip.c:292:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:293:\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:294:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-295-}\ndrivers/net/dsa/mv88e6xxx/chip.c-296-\ndrivers/net/dsa/mv88e6xxx/chip.c:297:static int mv88e6xxx_g1_irq_setup_common(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-298-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-304-\t\tNULL, chip-\u003eg1_irq.nirqs, 0,\ndrivers/net/dsa/mv88e6xxx/chip.c:305:\t\t\u0026mv88e6xxx_g1_irq_domain_ops, chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-306-\tif (!chip-\u003eg1_irq.domain)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-311-\ndrivers/net/dsa/mv88e6xxx/chip.c:312:\tchip-\u003eg1_irq.chip = mv88e6xxx_g1_irq_chip;\ndrivers/net/dsa/mv88e6xxx/chip.c-313-\tchip-\u003eg1_irq.masked = ~0;\ndrivers/net/dsa/mv88e6xxx/chip.c-314-\ndrivers/net/dsa/mv88e6xxx/chip.c:315:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, \u0026mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-316-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-320-\ndrivers/net/dsa/mv88e6xxx/chip.c:321:\terr = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-322-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-325-\t/* Reading the interrupt status clears (most of) them */\ndrivers/net/dsa/mv88e6xxx/chip.c:326:\terr = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-327-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-333-\tmask \u0026= ~GENMASK(chip-\u003eg1_irq.nirqs, 0);\ndrivers/net/dsa/mv88e6xxx/chip.c:334:\tmv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask);\ndrivers/net/dsa/mv88e6xxx/chip.c-335-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-346-\ndrivers/net/dsa/mv88e6xxx/chip.c:347:static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-348-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-352-\ndrivers/net/dsa/mv88e6xxx/chip.c:353:\terr = mv88e6xxx_g1_irq_setup_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-354-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-363-\tsnprintf(chip-\u003eirq_name, sizeof(chip-\u003eirq_name),\ndrivers/net/dsa/mv88e6xxx/chip.c:364:\t\t \"mv88e6xxx-%s\", dev_name(chip-\u003edev));\ndrivers/net/dsa/mv88e6xxx/chip.c-365-\ndrivers/net/dsa/mv88e6xxx/chip.c:366:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-367-\terr = request_threaded_irq(chip-\u003eirq, NULL,\ndrivers/net/dsa/mv88e6xxx/chip.c:368:\t\t\t\t   mv88e6xxx_g1_irq_thread_fn,\ndrivers/net/dsa/mv88e6xxx/chip.c-369-\t\t\t\t   IRQF_ONESHOT | IRQF_SHARED,\ndrivers/net/dsa/mv88e6xxx/chip.c-370-\t\t\t\t   chip-\u003eirq_name, chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:371:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-372-\tif (err)\ndrivers/net/dsa/mv88e6xxx/chip.c:373:\t\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-374-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-377-\ndrivers/net/dsa/mv88e6xxx/chip.c:378:static void mv88e6xxx_irq_poll(struct kthread_work *work)\ndrivers/net/dsa/mv88e6xxx/chip.c-379-{\ndrivers/net/dsa/mv88e6xxx/chip.c:380:\tstruct mv88e6xxx_chip *chip = container_of(work,\ndrivers/net/dsa/mv88e6xxx/chip.c:381:\t\t\t\t\t\t   struct mv88e6xxx_chip,\ndrivers/net/dsa/mv88e6xxx/chip.c-382-\t\t\t\t\t\t   irq_poll_work.work);\ndrivers/net/dsa/mv88e6xxx/chip.c:383:\tmv88e6xxx_g1_irq_thread_work(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-384-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-388-\ndrivers/net/dsa/mv88e6xxx/chip.c:389:static int mv88e6xxx_irq_poll_setup(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-390-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-392-\ndrivers/net/dsa/mv88e6xxx/chip.c:393:\terr = mv88e6xxx_g1_irq_setup_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-394-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-397-\tkthread_init_delayed_work(\u0026chip-\u003eirq_poll_work,\ndrivers/net/dsa/mv88e6xxx/chip.c:398:\t\t\t\t  mv88e6xxx_irq_poll);\ndrivers/net/dsa/mv88e6xxx/chip.c-399-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-409-\ndrivers/net/dsa/mv88e6xxx/chip.c:410:static void mv88e6xxx_irq_poll_free(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-411-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-414-\ndrivers/net/dsa/mv88e6xxx/chip.c:415:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:416:\tmv88e6xxx_g1_irq_free_common(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:417:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-418-}\ndrivers/net/dsa/mv88e6xxx/chip.c-419-\ndrivers/net/dsa/mv88e6xxx/chip.c:420:static int mv88e6xxx_port_config_interface(struct mv88e6xxx_chip *chip,\ndrivers/net/dsa/mv88e6xxx/chip.c-421-\t\t\t\t\t   int port, phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-441-\ndrivers/net/dsa/mv88e6xxx/chip.c:442:static int mv88e6xxx_port_setup_mac(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-443-\t\t\t\t    int link, int speed, int duplex, int pause,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-468-\ndrivers/net/dsa/mv88e6xxx/chip.c:469:\terr = mv88e6xxx_port_config_interface(chip, port, mode);\ndrivers/net/dsa/mv88e6xxx/chip.c-470-restore_link:\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-476-\ndrivers/net/dsa/mv88e6xxx/chip.c:477:static int mv88e6xxx_phy_is_internal(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-478-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-483-\ndrivers/net/dsa/mv88e6xxx/chip.c:484:static int mv88e6xxx_port_ppu_updates(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-485-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-492-\tif (chip-\u003einfo-\u003efamily == MV88E6XXX_FAMILY_6250)\ndrivers/net/dsa/mv88e6xxx/chip.c:493:\t\treturn mv88e6xxx_phy_is_internal(chip, port);\ndrivers/net/dsa/mv88e6xxx/chip.c-494-\ndrivers/net/dsa/mv88e6xxx/chip.c:495:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-496-\tif (err) {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=506=static const u8 mv88e6185_phy_interface_modes[] = {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-515-\ndrivers/net/dsa/mv88e6xxx/chip.c:516:static void mv88e6095_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-517-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-522-\ndrivers/net/dsa/mv88e6xxx/chip.c:523:\tif (mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c-524-\t\t__set_bit(PHY_INTERFACE_MODE_MII, config-\u003esupported_interfaces);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-534-\ndrivers/net/dsa/mv88e6xxx/chip.c:535:static void mv88e6185_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-536-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-548-\ndrivers/net/dsa/mv88e6xxx/chip.c:549:static const u8 mv88e6xxx_phy_interface_modes[] = {\ndrivers/net/dsa/mv88e6xxx/chip.c-550-\t[MV88E6XXX_PORT_STS_CMODE_MII_PHY]\t= PHY_INTERFACE_MODE_REVMII,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-563-\ndrivers/net/dsa/mv88e6xxx/chip.c:564:static void mv88e6xxx_translate_cmode(u8 cmode, unsigned long *supported)\ndrivers/net/dsa/mv88e6xxx/chip.c-565-{\ndrivers/net/dsa/mv88e6xxx/chip.c:566:\tif (cmode \u003c ARRAY_SIZE(mv88e6xxx_phy_interface_modes) \u0026\u0026\ndrivers/net/dsa/mv88e6xxx/chip.c:567:\t    mv88e6xxx_phy_interface_modes[cmode])\ndrivers/net/dsa/mv88e6xxx/chip.c:568:\t\t__set_bit(mv88e6xxx_phy_interface_modes[cmode], supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-569-\telse if (cmode == MV88E6XXX_PORT_STS_CMODE_RGMII)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=573=static void\ndrivers/net/dsa/mv88e6xxx/chip.c:574:mv88e6250_setup_supported_interfaces(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-575-\t\t\t\t     struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-580-\ndrivers/net/dsa/mv88e6xxx/chip.c:581:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-582-\tif (err) {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-622-\ndrivers/net/dsa/mv88e6xxx/chip.c:623:static void mv88e6250_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-624-\t\t\t\t       struct phylink_config *config)\ndrivers/net/dsa/mv88e6xxx/chip.c-625-{\ndrivers/net/dsa/mv88e6xxx/chip.c:626:\tif (!mv88e6xxx_phy_is_internal(chip, port))\ndrivers/net/dsa/mv88e6xxx/chip.c-627-\t\tmv88e6250_setup_supported_interfaces(chip, port, config);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-631-\ndrivers/net/dsa/mv88e6xxx/chip.c:632:static void mv88e6351_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-633-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-637-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:638:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-639-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-643-\ndrivers/net/dsa/mv88e6xxx/chip.c:644:static int mv88e63xx_get_port_serdes_cmode(struct mv88e6xxx_chip *chip, int port)\ndrivers/net/dsa/mv88e6xxx/chip.c-645-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-648-\ndrivers/net/dsa/mv88e6xxx/chip.c:649:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-650-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-657-\tval = reg \u0026 ~MV88E6XXX_PORT_STS_PHY_DETECT;\ndrivers/net/dsa/mv88e6xxx/chip.c:658:\terr = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_STS, val);\ndrivers/net/dsa/mv88e6xxx/chip.c-659-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-661-\ndrivers/net/dsa/mv88e6xxx/chip.c:662:\terr = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, \u0026val);\ndrivers/net/dsa/mv88e6xxx/chip.c-663-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-666-\t/* Restore PHY_DETECT value */\ndrivers/net/dsa/mv88e6xxx/chip.c:667:\terr = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_STS, reg);\ndrivers/net/dsa/mv88e6xxx/chip.c-668-\tif (err)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-673-\ndrivers/net/dsa/mv88e6xxx/chip.c:674:static void mv88e6352_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-675-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-680-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:681:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-682-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-696-\t\telse\ndrivers/net/dsa/mv88e6xxx/chip.c:697:\t\t\tmv88e6xxx_translate_cmode(cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-698-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-700-\ndrivers/net/dsa/mv88e6xxx/chip.c:701:static void mv88e632x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-702-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-707-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:708:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-709-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-719-\t\telse\ndrivers/net/dsa/mv88e6xxx/chip.c:720:\t\t\tmv88e6xxx_translate_cmode(cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-721-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-723-\ndrivers/net/dsa/mv88e6xxx/chip.c:724:static void mv88e6341_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-725-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-729-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:730:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-731-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-745-\ndrivers/net/dsa/mv88e6xxx/chip.c:746:static void mv88e6390_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-747-\t\t\t\t       struct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-751-\t/* Translate the default cmode */\ndrivers/net/dsa/mv88e6xxx/chip.c:752:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-753-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-767-\ndrivers/net/dsa/mv88e6xxx/chip.c:768:static void mv88e6390x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-769-\t\t\t\t\tstruct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-802-\ndrivers/net/dsa/mv88e6xxx/chip.c:803:static void mv88e6393x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-804-\t\t\t\t\tstruct phylink_config *config)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-811-\ndrivers/net/dsa/mv88e6xxx/chip.c:812:\tmv88e6xxx_translate_cmode(chip-\u003eports[port].cmode, supported);\ndrivers/net/dsa/mv88e6xxx/chip.c-813-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-846-\ndrivers/net/dsa/mv88e6xxx/chip.c:847:static void mv88e6xxx_get_caps(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/chip.c-848-\t\t\t       struct phylink_config *config)\ndrivers/net/dsa/mv88e6xxx/chip.c-849-{\ndrivers/net/dsa/mv88e6xxx/chip.c:850:\tstruct mv88e6xxx_chip *chip = ds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-851-\ndrivers/net/dsa/mv88e6xxx/chip.c:852:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-853-\tchip-\u003einfo-\u003eops-\u003ephylink_get_caps(chip, port, config);\ndrivers/net/dsa/mv88e6xxx/chip.c:854:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-855-\ndrivers/net/dsa/mv88e6xxx/chip.c:856:\tif (mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c-857-\t\t__set_bit(PHY_INTERFACE_MODE_INTERNAL,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=865=static struct phylink_pcs *\ndrivers/net/dsa/mv88e6xxx/chip.c:866:mv88e6xxx_mac_select_pcs(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-867-\t\t\t phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-869-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:870:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-871-\tstruct phylink_pcs *pcs = NULL;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-879-\ndrivers/net/dsa/mv88e6xxx/chip.c:880:static int mv88e6xxx_mac_prepare(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-881-\t\t\t\t unsigned int mode, phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-883-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:884:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-885-\tint port = dp-\u003eindex;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-894-\t    chip-\u003einfo-\u003eops-\u003eport_set_link) {\ndrivers/net/dsa/mv88e6xxx/chip.c:895:\t\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-896-\t\terr = chip-\u003einfo-\u003eops-\u003eport_set_link(chip, port,\ndrivers/net/dsa/mv88e6xxx/chip.c-897-\t\t\t\t\t\t     LINK_FORCED_DOWN);\ndrivers/net/dsa/mv88e6xxx/chip.c:898:\t\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-899-\t}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-903-\ndrivers/net/dsa/mv88e6xxx/chip.c:904:static void mv88e6xxx_mac_config(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-905-\t\t\t\t unsigned int mode,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-908-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:909:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-910-\tint port = dp-\u003eindex;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-912-\ndrivers/net/dsa/mv88e6xxx/chip.c:913:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-914-\ndrivers/net/dsa/mv88e6xxx/chip.c:915:\tif (mode != MLO_AN_PHY || !mv88e6xxx_phy_is_internal(chip, port)) {\ndrivers/net/dsa/mv88e6xxx/chip.c:916:\t\terr = mv88e6xxx_port_config_interface(chip, port,\ndrivers/net/dsa/mv88e6xxx/chip.c-917-\t\t\t\t\t\t      state-\u003einterface);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-922-err_unlock:\ndrivers/net/dsa/mv88e6xxx/chip.c:923:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-924-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-928-\ndrivers/net/dsa/mv88e6xxx/chip.c:929:static int mv88e6xxx_mac_finish(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-930-\t\t\t\tunsigned int mode, phy_interface_t interface)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-932-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:933:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c-934-\tint port = dp-\u003eindex;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-942-\t */\ndrivers/net/dsa/mv88e6xxx/chip.c:943:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-944-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-947-\t      chip-\u003eports[port].interface != interface) ||\ndrivers/net/dsa/mv88e6xxx/chip.c:948:\t     (mode == MLO_AN_PHY \u0026\u0026 mv88e6xxx_port_ppu_updates(chip, port))))\ndrivers/net/dsa/mv88e6xxx/chip.c-949-\t\terr = chip-\u003einfo-\u003eops-\u003eport_set_link(chip, port, LINK_UNFORCED);\ndrivers/net/dsa/mv88e6xxx/chip.c-950-\ndrivers/net/dsa/mv88e6xxx/chip.c:951:\tmv88e6xxx_reg_unlock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-952-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-957-\ndrivers/net/dsa/mv88e6xxx/chip.c:958:static void mv88e6xxx_mac_link_down(struct phylink_config *config,\ndrivers/net/dsa/mv88e6xxx/chip.c-959-\t\t\t\t    unsigned int mode,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-962-\tstruct dsa_port *dp = dsa_phylink_to_port(config);\ndrivers/net/dsa/mv88e6xxx/chip.c:963:\tstruct mv88e6xxx_chip *chip = dp-\u003eds-\u003epriv;\ndrivers/net/dsa/mv88e6xxx/chip.c:964:\tconst struct mv88e6xxx_ops *ops;\ndrivers/net/dsa/mv88e6xxx/chip.c-965-\tint port = dp-\u003eindex;\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-969-\ndrivers/net/dsa/mv88e6xxx/chip.c:970:\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-971-\t/* Force the link down if we know the port may not be automatically\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-973-\t */\ndrivers/net/dsa/mv88e6xxx/chip.c:974:\tif ((!mv88e6xxx_port_ppu_updates(chip, port) ||\n\n"
}

7/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 36441
							output: 40
							thoughts: 682
						

Thoughts:
**Unreachable Code Analysis: mv88e6xxx Driver**

Okay, so I'm looking at this `mv88e6xxx` driver, which uses MDIO for communication, right? My initial thought is, can syzkaller fuzz this? I know syzkaller doesn't have a dedicated MDIO fuzzer like `syz_mdio` directly, but sometimes it can instantiate things through device tree if overlays are an option, or maybe even fuzz the netlink interface to DSA. But the more I think about it, the driver won't even *probe* if the hardware isn't present. And if it doesn't probe, the code is fundamentally unreachable in a virtualized environment.

My next step is to see if there's any software emulation for the Marvell 88E6xxx in QEMU. A quick search confirms my suspicion: there's nothing obvious. Syzkaller is likely blocked. I have to accept the limitations for testing this kind of hardware. It is probably unreachable.

Wait, the prompt reminds me that the target code needs to be reachable in a virtual environment. DSA drivers are for physical switches, so it's a no-go for plain emulation. I start to wonder if there's a mock or dummy DSA driver, or some way to probe `mv88e6xxx` through a software MDIO bus. I found `dsa_loop`, which is a mock DSA driver, but not for the specific target. The syzkaller does not have a fake MDIO bus fuzzer either.

I consider if the target is enabled in the `defconfig` or syzkaller config, since syzkaller often enables a lot of things. But if the hardware isn't present, the driver still won't probe.

Then I get a glimmer of hope: what if the patch touches `mv88e6xxx_get_rxts_embedded`, which is called from `mv88e6xxx_rxtstamp_work`? This is a workqueue. Okay, but if the device never probes, this workqueue is never queued, so it's still unreachable in a virtualized setup. It's a dead end.

I do a final check, trying to remember if there's *any* possible way to force-probe `mv88e6xxx` in QEMU, maybe by creating a platform device. But ultimately I'm out of luck. The driver registers an MDIO driver. No dice. WorthFuzzing=false.



8/2 2026/07/11 03:23 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "module_mdio_driver",
  "PathPrefix": "drivers/net/dsa/mv88e6xxx/"
}

Results:
{
  "error": "no matches"
}

9/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 37717
							output: 38
							thoughts: 8
						

Thoughts:
Okay, I'm ready. Here's my attempt to summarize the prompt's instructions, rendered as a first-person thought process assuming expertise in the field:

**Assessing the Task: A Meta-Cognitive Loop**

Right, let's unpack this. The request essentially hands me a text snippet and asks me to distill its essence, not just into a simple summary, but into a simulated thought process. The key is in the framing: I'm to channel the internal monologue *as if* the thoughts were my own. This isn't just regurgitation; it's interpretive simulation. I need to internalize the text's core ideas, assess the implicit connections, and then articulate that understanding as a stream-of-consciousness, *expert* level thought. The level of complexity will be determined by the provided source and its contextual relation to my expertise. So, the output isn't simply a paraphrase, it's a re-imagining of the information as an internal, reasoned, reflective process, fit for a subject matter expert. The 'expert' facet requires a certain level of depth, nuance and ability to infer implications and engage in critical thinking. The 'fulsome' requirement sets a certain expected level of detail, so that is another point to remember. The prompt's opening phrase – “Let's see how it registers” – is interesting. It indicates a degree of self-assessment is key. I'm not just *doing* the summary, I'm reflecting on *how* that summary is formed and conveyed. This demands a recursive, meta-cognitive approach, or an awareness of my own cognitive processes.



10/2 2026/07/11 03:23 tool grepper
0m Args:
{
  "Expression": "module_.*driver",
  "PathPrefix": "drivers/net/dsa/mv88e6xxx/"
}

Results:
{
  "Output": "drivers/net/dsa/mv88e6xxx/chip.c=7524=static struct mdio_driver mv88e6xxx_driver = {\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-7534-\ndrivers/net/dsa/mv88e6xxx/chip.c:7535:mdio_module_driver(mv88e6xxx_driver);\ndrivers/net/dsa/mv88e6xxx/chip.c-7536-\n"
}

11/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 38247
							output: 42
							thoughts: 142
						

Thoughts:
**MDIO Driver Investigation**

Okay, so this is hitting me as an MDIO driver – that much is clear. The key question is, how do I actually *probe* this thing in a Syzkaller context? To probe an MDIO driver, I need both an MDIO bus and a device *on* that bus, right? And, crucially, the device needs to have a matching ID.

Now, can Syzkaller *create* an MDIO device? I know it can handle platform devices, and it can do I2C devices, perhaps through something like `i2c-stub` or similar. But MDIO? That's the rub. Is there anything like `mdio-mock` or `mdio-gpio` available? I need to explore the options.

Even if I *can* create an MDIO device, there's another hurdle. Does Syzkaller have the smarts to emulate the Marvell switch registers that this driver's going to be looking at? The driver's going to read the switch ID from those registers during the probe. If that ID doesn't jive with what it expects, probe's going to fail. That's a deal breaker.

Alright, time to dig in and examine the probe function itself. I need to understand exactly what's going on there. Let's see what we're working with here.



12/2 2026/07/11 03:23 tool grepper
0m Args:
{
  "Expression": "mv88e6xxx_probe",
  "PathPrefix": "drivers/net/dsa/mv88e6xxx/"
}

Results:
{
  "Output": "drivers/net/dsa/mv88e6xxx/chip.c=7314=static SIMPLE_DEV_PM_OPS(mv88e6xxx_pm_ops, mv88e6xxx_suspend, mv88e6xxx_resume);\ndrivers/net/dsa/mv88e6xxx/chip.c-7315-\ndrivers/net/dsa/mv88e6xxx/chip.c:7316:static int mv88e6xxx_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/mv88e6xxx/chip.c-7317-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=7524=static struct mdio_driver mv88e6xxx_driver = {\ndrivers/net/dsa/mv88e6xxx/chip.c:7525:\t.probe\t= mv88e6xxx_probe,\ndrivers/net/dsa/mv88e6xxx/chip.c-7526-\t.remove = mv88e6xxx_remove,\n"
}

13/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 39010
							output: 47
							thoughts: 17
						

Thoughts:
Okay, let's dive into this. Here's my understanding, presented as my own mental processing:

**Analyzing the `mv88e6xxx_probe` Function**

Alright, I'm going to take a look at what this `mv88e6xxx_probe` function is doing. Let's break down its responsibilities within the larger context of the system. I expect it's the core of the Marvell 88E6xxx Ethernet switch driver's initialization. I'll be looking for resource allocation, hardware probing and configuration, driver registration with the kernel, and the overall setup of the switch. My focus will be to understand its overall logic flow, any potential areas of concern, and how it interacts with the hardware and the network stack. I'll be particularly interested in how it handles error conditions and what mechanisms it employs for recovery or graceful degradation. I should be able to quickly grasp its role, given my experience.



14/2 2026/07/11 03:23 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/mv88e6xxx/chip.c",
  "FirstLine": 7316,
  "LineCount": 100
}

Results:
{
  "Contents": "7316:\tstatic int mv88e6xxx_probe(struct mdio_device *mdiodev)\n7317:\t{\n7318:\t\tstruct dsa_mv88e6xxx_pdata *pdata = mdiodev-\u003edev.platform_data;\n7319:\t\tconst struct mv88e6xxx_info *compat_info = NULL;\n7320:\t\tstruct device *dev = \u0026mdiodev-\u003edev;\n7321:\t\tstruct device_node *np = dev-\u003eof_node;\n7322:\t\tstruct mv88e6xxx_chip *chip;\n7323:\t\tint port;\n7324:\t\tint err;\n7325:\t\n7326:\t\tif (!np \u0026\u0026 !pdata)\n7327:\t\t\treturn -EINVAL;\n7328:\t\n7329:\t\tif (np)\n7330:\t\t\tcompat_info = of_device_get_match_data(dev);\n7331:\t\n7332:\t\tif (pdata) {\n7333:\t\t\tcompat_info = pdata_device_get_match_data(dev);\n7334:\t\n7335:\t\t\tif (!pdata-\u003enetdev)\n7336:\t\t\t\treturn -EINVAL;\n7337:\t\n7338:\t\t\tfor (port = 0; port \u003c DSA_MAX_PORTS; port++) {\n7339:\t\t\t\tif (!(pdata-\u003eenabled_ports \u0026 (1 \u003c\u003c port)))\n7340:\t\t\t\t\tcontinue;\n7341:\t\t\t\tif (strcmp(pdata-\u003ecd.port_names[port], \"cpu\"))\n7342:\t\t\t\t\tcontinue;\n7343:\t\t\t\tpdata-\u003ecd.netdev[port] = \u0026pdata-\u003enetdev-\u003edev;\n7344:\t\t\t\tbreak;\n7345:\t\t\t}\n7346:\t\t}\n7347:\t\n7348:\t\tif (!compat_info)\n7349:\t\t\treturn -EINVAL;\n7350:\t\n7351:\t\tchip = mv88e6xxx_alloc_chip(dev);\n7352:\t\tif (!chip) {\n7353:\t\t\terr = -ENOMEM;\n7354:\t\t\tgoto out;\n7355:\t\t}\n7356:\t\n7357:\t\tchip-\u003einfo = compat_info;\n7358:\t\n7359:\t\tchip-\u003ereset = devm_gpiod_get_optional(dev, \"reset\", GPIOD_OUT_LOW);\n7360:\t\tif (IS_ERR(chip-\u003ereset)) {\n7361:\t\t\terr = PTR_ERR(chip-\u003ereset);\n7362:\t\t\tgoto out;\n7363:\t\t}\n7364:\t\tif (chip-\u003ereset)\n7365:\t\t\tusleep_range(10000, 20000);\n7366:\t\n7367:\t\t/* Detect if the device is configured in single chip addressing mode,\n7368:\t\t * otherwise continue with address specific smi init/detection.\n7369:\t\t */\n7370:\t\terr = mv88e6xxx_single_chip_detect(chip, mdiodev);\n7371:\t\tif (err) {\n7372:\t\t\terr = mv88e6xxx_smi_init(chip, mdiodev-\u003ebus, mdiodev-\u003eaddr);\n7373:\t\t\tif (err)\n7374:\t\t\t\tgoto out;\n7375:\t\n7376:\t\t\terr = mv88e6xxx_detect(chip);\n7377:\t\t\tif (err)\n7378:\t\t\t\tgoto out;\n7379:\t\t}\n7380:\t\n7381:\t\tif (chip-\u003einfo-\u003eedsa_support == MV88E6XXX_EDSA_SUPPORTED)\n7382:\t\t\tchip-\u003etag_protocol = DSA_TAG_PROTO_EDSA;\n7383:\t\telse\n7384:\t\t\tchip-\u003etag_protocol = DSA_TAG_PROTO_DSA;\n7385:\t\n7386:\t\tmv88e6xxx_phy_init(chip);\n7387:\t\n7388:\t\tif (chip-\u003einfo-\u003eops-\u003eget_eeprom) {\n7389:\t\t\tif (np)\n7390:\t\t\t\tof_property_read_u32(np, \"eeprom-length\",\n7391:\t\t\t\t\t\t     \u0026chip-\u003eeeprom_len);\n7392:\t\t\telse\n7393:\t\t\t\tchip-\u003eeeprom_len = pdata-\u003eeeprom_len;\n7394:\t\t}\n7395:\t\n7396:\t\tmv88e6xxx_reg_lock(chip);\n7397:\t\terr = mv88e6xxx_switch_reset(chip);\n7398:\t\tmv88e6xxx_reg_unlock(chip);\n7399:\t\tif (err)\n7400:\t\t\tgoto out_phy;\n7401:\t\n7402:\t\tif (np) {\n7403:\t\t\tchip-\u003eirq = of_irq_get(np, 0);\n7404:\t\t\tif (chip-\u003eirq == -EPROBE_DEFER) {\n7405:\t\t\t\terr = chip-\u003eirq;\n7406:\t\t\t\tgoto out_phy;\n7407:\t\t\t}\n7408:\t\t}\n7409:\t\n7410:\t\tif (pdata)\n7411:\t\t\tchip-\u003eirq = pdata-\u003eirq;\n7412:\t\n7413:\t\t/* Has to be performed before the MDIO bus is created, because\n7414:\t\t * the PHYs will link their interrupts to these interrupt\n7415:\t\t * controllers\n"
}

15/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 40755
							output: 47
							thoughts: 23
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Analyzing the mv88e6xxx Driver Initialization**

Okay, so the code's jumping into `mv88e6xxx_detect(chip)`. I need to figure out what that routine's up to. My first assumption is that it's the device detection function. It's likely probing the hardware, identifying the specific Marvell switch variant, and perhaps confirming its presence and basic configuration. I'll need to dig into the `mv88e6xxx_detect()` implementation itself to see the exact probing sequence, what registers it's checking, and how it handles different chip revisions or families. It's probably the entry point for the switch driver initialization. I expect to find some I2C or MDIO transaction calls in there as it communicates to the device.



16/2 2026/07/11 03:23 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/mv88e6xxx/chip.c",
  "FirstLine": 7220,
  "LineCount": 100
}

Results:
{
  "Contents": "7220:\t\t.port_mst_state_set\t= mv88e6xxx_port_mst_state_set,\n7221:\t\t.port_fast_age\t\t= mv88e6xxx_port_fast_age,\n7222:\t\t.port_vlan_fast_age\t= mv88e6xxx_port_vlan_fast_age,\n7223:\t\t.port_vlan_filtering\t= mv88e6xxx_port_vlan_filtering,\n7224:\t\t.port_vlan_add\t\t= mv88e6xxx_port_vlan_add,\n7225:\t\t.port_vlan_del\t\t= mv88e6xxx_port_vlan_del,\n7226:\t\t.vlan_msti_set\t\t= mv88e6xxx_vlan_msti_set,\n7227:\t\t.port_fdb_add\t\t= mv88e6xxx_port_fdb_add,\n7228:\t\t.port_fdb_del\t\t= mv88e6xxx_port_fdb_del,\n7229:\t\t.port_fdb_dump\t\t= mv88e6xxx_port_fdb_dump,\n7230:\t\t.port_mdb_add\t\t= mv88e6xxx_port_mdb_add,\n7231:\t\t.port_mdb_del\t\t= mv88e6xxx_port_mdb_del,\n7232:\t\t.port_mirror_add\t= mv88e6xxx_port_mirror_add,\n7233:\t\t.port_mirror_del\t= mv88e6xxx_port_mirror_del,\n7234:\t\t.crosschip_bridge_join\t= mv88e6xxx_crosschip_bridge_join,\n7235:\t\t.crosschip_bridge_leave\t= mv88e6xxx_crosschip_bridge_leave,\n7236:\t\t.port_hwtstamp_set\t= mv88e6xxx_port_hwtstamp_set,\n7237:\t\t.port_hwtstamp_get\t= mv88e6xxx_port_hwtstamp_get,\n7238:\t\t.port_txtstamp\t\t= mv88e6xxx_port_txtstamp,\n7239:\t\t.port_rxtstamp\t\t= mv88e6xxx_port_rxtstamp,\n7240:\t\t.cls_flower_add\t\t= mv88e6xxx_cls_flower_add,\n7241:\t\t.cls_flower_del         = mv88e6xxx_cls_flower_del,\n7242:\t\t.get_ts_info\t\t= mv88e6xxx_get_ts_info,\n7243:\t\t.devlink_param_get\t= mv88e6xxx_devlink_param_get,\n7244:\t\t.devlink_param_set\t= mv88e6xxx_devlink_param_set,\n7245:\t\t.devlink_info_get\t= mv88e6xxx_devlink_info_get,\n7246:\t\t.port_lag_change\t= mv88e6xxx_port_lag_change,\n7247:\t\t.port_lag_join\t\t= mv88e6xxx_port_lag_join,\n7248:\t\t.port_lag_leave\t\t= mv88e6xxx_port_lag_leave,\n7249:\t\t.crosschip_lag_change\t= mv88e6xxx_crosschip_lag_change,\n7250:\t\t.crosschip_lag_join\t= mv88e6xxx_crosschip_lag_join,\n7251:\t\t.crosschip_lag_leave\t= mv88e6xxx_crosschip_lag_leave,\n7252:\t};\n7253:\t\n7254:\tstatic int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip)\n7255:\t{\n7256:\t\tstruct device *dev = chip-\u003edev;\n7257:\t\tstruct dsa_switch *ds;\n7258:\t\n7259:\t\tds = devm_kzalloc(dev, sizeof(*ds), GFP_KERNEL);\n7260:\t\tif (!ds)\n7261:\t\t\treturn -ENOMEM;\n7262:\t\n7263:\t\tds-\u003edev = dev;\n7264:\t\tds-\u003enum_ports = mv88e6xxx_num_ports(chip);\n7265:\t\tds-\u003epriv = chip;\n7266:\t\tds-\u003edev = dev;\n7267:\t\tds-\u003eops = \u0026mv88e6xxx_switch_ops;\n7268:\t\tds-\u003ephylink_mac_ops = \u0026mv88e6xxx_phylink_mac_ops;\n7269:\t\tds-\u003eageing_time_min = chip-\u003einfo-\u003eage_time_coeff;\n7270:\t\tds-\u003eageing_time_max = chip-\u003einfo-\u003eage_time_coeff * U8_MAX;\n7271:\t\n7272:\t\t/* Some chips support up to 32, but that requires enabling the\n7273:\t\t * 5-bit port mode, which we do not support. 640k^W16 ought to\n7274:\t\t * be enough for anyone.\n7275:\t\t */\n7276:\t\tds-\u003enum_lag_ids = mv88e6xxx_has_lag(chip) ? 16 : 0;\n7277:\t\n7278:\t\tdev_set_drvdata(dev, ds);\n7279:\t\n7280:\t\treturn dsa_register_switch(ds);\n7281:\t}\n7282:\t\n7283:\tstatic void mv88e6xxx_unregister_switch(struct mv88e6xxx_chip *chip)\n7284:\t{\n7285:\t\tdsa_unregister_switch(chip-\u003eds);\n7286:\t}\n7287:\t\n7288:\tstatic const void *pdata_device_get_match_data(struct device *dev)\n7289:\t{\n7290:\t\tconst struct of_device_id *matches = dev-\u003edriver-\u003eof_match_table;\n7291:\t\tconst struct dsa_mv88e6xxx_pdata *pdata = dev-\u003eplatform_data;\n7292:\t\n7293:\t\tfor (; matches-\u003ename[0] || matches-\u003etype[0] || matches-\u003ecompatible[0];\n7294:\t\t     matches++) {\n7295:\t\t\tif (!strcmp(pdata-\u003ecompatible, matches-\u003ecompatible))\n7296:\t\t\t\treturn matches-\u003edata;\n7297:\t\t}\n7298:\t\treturn NULL;\n7299:\t}\n7300:\t\n7301:\t/* There is no suspend to RAM support at DSA level yet, the switch configuration\n7302:\t * would be lost after a power cycle so prevent it to be suspended.\n7303:\t */\n7304:\tstatic int __maybe_unused mv88e6xxx_suspend(struct device *dev)\n7305:\t{\n7306:\t\treturn -EOPNOTSUPP;\n7307:\t}\n7308:\t\n7309:\tstatic int __maybe_unused mv88e6xxx_resume(struct device *dev)\n7310:\t{\n7311:\t\treturn 0;\n7312:\t}\n7313:\t\n7314:\tstatic SIMPLE_DEV_PM_OPS(mv88e6xxx_pm_ops, mv88e6xxx_suspend, mv88e6xxx_resume);\n7315:\t\n7316:\tstatic int mv88e6xxx_probe(struct mdio_device *mdiodev)\n7317:\t{\n7318:\t\tstruct dsa_mv88e6xxx_pdata *pdata = mdiodev-\u003edev.platform_data;\n7319:\t\tconst struct mv88e6xxx_info *compat_info = NULL;\n"
}

17/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 43079
							output: 47
							thoughts: 339
						

Thoughts:
**Analyzing the Accessibility of the `mv88e6xxx` Driver for Fuzzing**

Okay, so I'm looking at this probe function and it needs either a device tree node or platform data. Syzkaller can inject device tree nodes, right? But is that a standard thing? I don't think it's the default. Hang on, Syzkaller *did* apply that patch... I need to consider that.

But this prompt... it's saying to focus on reachable code in virtualized environments. It mentions environments like GCE or QEMU. Can I actually reach `mv88e6xxx` in QEMU? No, QEMU doesn't emulate the Marvell 88E6xxx switches. Is there a mock driver I could use to emulate it? Nope.

Hmm... is there some backdoor way to instantiate this thing? Can I use `i2c` or `mdio` from userspace? Can userspace even create an MDIO device via `sysfs`? No, that's not how it works. The MDIO bus driver usually instantiates these based on DT or some scan. It scans, finds the device, and then it creates the device.

But without the actual hardware...the scan won't find anything. Right. That's a problem. Wait a minute! The `mv88e6xxx_detect` function. It *reads* the switch ID directly from the hardware registers. If it doesn't match a valid ID, it fails immediately. So, let's go check out this `mv88e6xxx_detect` function. That seems to be the critical piece.



18/2 2026/07/11 03:23 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/mv88e6xxx/chip.c",
  "FirstLine": 7000,
  "LineCount": 100
}

Results:
{
  "Contents": "7000:\t\tstruct mv88e6xxx_chip *chip = ds-\u003epriv;\n7001:\t\tunsigned int id, num_tx;\n7002:\t\tstruct dsa_port *dp;\n7003:\t\tstruct dsa_lag *lag;\n7004:\t\tint i, err, nth;\n7005:\t\tu16 mask[8];\n7006:\t\tu16 ivec;\n7007:\t\n7008:\t\t/* Assume no port is a member of any LAG. */\n7009:\t\tivec = BIT(mv88e6xxx_num_ports(chip)) - 1;\n7010:\t\n7011:\t\t/* Disable all masks for ports that _are_ members of a LAG. */\n7012:\t\tdsa_switch_for_each_port(dp, ds) {\n7013:\t\t\tif (!dp-\u003elag)\n7014:\t\t\t\tcontinue;\n7015:\t\n7016:\t\t\tivec \u0026= ~BIT(dp-\u003eindex);\n7017:\t\t}\n7018:\t\n7019:\t\tfor (i = 0; i \u003c 8; i++)\n7020:\t\t\tmask[i] = ivec;\n7021:\t\n7022:\t\t/* Enable the correct subset of masks for all LAG ports that\n7023:\t\t * are in the Tx set.\n7024:\t\t */\n7025:\t\tdsa_lags_foreach_id(id, ds-\u003edst) {\n7026:\t\t\tlag = dsa_lag_by_id(ds-\u003edst, id);\n7027:\t\t\tif (!lag)\n7028:\t\t\t\tcontinue;\n7029:\t\n7030:\t\t\tnum_tx = 0;\n7031:\t\t\tdsa_lag_foreach_port(dp, ds-\u003edst, lag) {\n7032:\t\t\t\tif (dp-\u003elag_tx_enabled)\n7033:\t\t\t\t\tnum_tx++;\n7034:\t\t\t}\n7035:\t\n7036:\t\t\tif (!num_tx)\n7037:\t\t\t\tcontinue;\n7038:\t\n7039:\t\t\tnth = 0;\n7040:\t\t\tdsa_lag_foreach_port(dp, ds-\u003edst, lag) {\n7041:\t\t\t\tif (!dp-\u003elag_tx_enabled)\n7042:\t\t\t\t\tcontinue;\n7043:\t\n7044:\t\t\t\tif (dp-\u003eds == ds)\n7045:\t\t\t\t\tmv88e6xxx_lag_set_port_mask(mask, dp-\u003eindex,\n7046:\t\t\t\t\t\t\t\t    num_tx, nth);\n7047:\t\n7048:\t\t\t\tnth++;\n7049:\t\t\t}\n7050:\t\t}\n7051:\t\n7052:\t\tfor (i = 0; i \u003c 8; i++) {\n7053:\t\t\terr = mv88e6xxx_g2_trunk_mask_write(chip, i, true, mask[i]);\n7054:\t\t\tif (err)\n7055:\t\t\t\treturn err;\n7056:\t\t}\n7057:\t\n7058:\t\treturn 0;\n7059:\t}\n7060:\t\n7061:\tstatic int mv88e6xxx_lag_sync_masks_map(struct dsa_switch *ds,\n7062:\t\t\t\t\t\tstruct dsa_lag lag)\n7063:\t{\n7064:\t\tint err;\n7065:\t\n7066:\t\terr = mv88e6xxx_lag_sync_masks(ds);\n7067:\t\n7068:\t\tif (!err)\n7069:\t\t\terr = mv88e6xxx_lag_sync_map(ds, lag);\n7070:\t\n7071:\t\treturn err;\n7072:\t}\n7073:\t\n7074:\tstatic int mv88e6xxx_port_lag_change(struct dsa_switch *ds, int port)\n7075:\t{\n7076:\t\tstruct mv88e6xxx_chip *chip = ds-\u003epriv;\n7077:\t\tint err;\n7078:\t\n7079:\t\tmv88e6xxx_reg_lock(chip);\n7080:\t\terr = mv88e6xxx_lag_sync_masks(ds);\n7081:\t\tmv88e6xxx_reg_unlock(chip);\n7082:\t\treturn err;\n7083:\t}\n7084:\t\n7085:\tstatic int mv88e6xxx_port_lag_join(struct dsa_switch *ds, int port,\n7086:\t\t\t\t\t   struct dsa_lag lag,\n7087:\t\t\t\t\t   struct netdev_lag_upper_info *info,\n7088:\t\t\t\t\t   struct netlink_ext_ack *extack)\n7089:\t{\n7090:\t\tstruct mv88e6xxx_chip *chip = ds-\u003epriv;\n7091:\t\tint err, id;\n7092:\t\n7093:\t\tif (!mv88e6xxx_lag_can_offload(ds, lag, info, extack))\n7094:\t\t\treturn -EOPNOTSUPP;\n7095:\t\n7096:\t\t/* DSA LAG IDs are one-based */\n7097:\t\tid = lag.id - 1;\n7098:\t\n7099:\t\tmv88e6xxx_reg_lock(chip);\n"
}

19/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 45257
							output: 42
							thoughts: 17
						

Thoughts:
Okay, here's my thought process summarized in the first person, assuming I'm an expert in this field:

**Direct Approach to Identification**

Right, let's cut through the fluff and go straight for the jugular. Instead of dancing around the issue, let's target the core function we're after. My gut feeling is that `mv88e6xxx_detect` is the key to identifying the Marvell Ethernet switch family in question. It's usually the most direct path. We'll bypass any preliminary checks and jump directly into searching for it. No need to overthink it; let's see what comes up.



20/2 2026/07/11 03:23 tool grepper
0m Args:
{
  "Expression": "mv88e6xxx_detect",
  "PathPrefix": "drivers/net/dsa/mv88e6xxx/"
}

Results:
{
  "Output": "drivers/net/dsa/mv88e6xxx/chip.c=6564=static const struct mv88e6xxx_info *mv88e6xxx_lookup_info(unsigned int prod_num)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6574-\ndrivers/net/dsa/mv88e6xxx/chip.c:6575:static int mv88e6xxx_detect(struct mv88e6xxx_chip *chip)\ndrivers/net/dsa/mv88e6xxx/chip.c-6576-{\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=6604=static int mv88e6xxx_single_chip_detect(struct mv88e6xxx_chip *chip,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6626-\ndrivers/net/dsa/mv88e6xxx/chip.c:6627:\treturn mv88e6xxx_detect(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-6628-}\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=7316=static int mv88e6xxx_probe(struct mdio_device *mdiodev)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-7375-\ndrivers/net/dsa/mv88e6xxx/chip.c:7376:\t\terr = mv88e6xxx_detect(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c-7377-\t\tif (err)\n"
}

21/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 45895
							output: 46
							thoughts: 14
						

Thoughts:
Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person:

**Initial Assessment: Diving into `mv88e6xxx_detect`**

Alright, let's get down to business. My immediate thought is, "Okay, we're looking at `mv88e6xxx_detect` – likely a detection routine for a Marvell Ethernet PHY." I'm mentally parsing that filename: `mv88e6xxx` immediately screams "Marvell, 88E6xxx family," and the trailing `_detect` almost certainly indicates an initialization or enumeration phase. I expect this code to handle the initial probing of the PHY chip, identification, and potentially some basic configuration or capability discovery. I'm already formulating a mental checklist: What's the target hardware? What are the typical register addresses I should be expecting? What methods of detection – perhaps I2C, MDIO, or some other interface – are they using? I want to see how robust their detection strategy is: are they just checking a single register for a specific value, or are they taking a more sophisticated, multi-stage approach, maybe checking for particular PHY IDs or revision numbers? I'm anticipating some potentially tricky interaction with MDIO bus timing, especially if this is being run on a platform with non-optimal drivers. Let's see how they handle that. My focus is going to be on the robustness of the implementation. I'm expecting that I'll need to double check the details of MDIO commands and that it is compatible with the version I am supporting. Time to dig in and see if this detection is the right way to approach what I am doing, or if it needs to be updated.



22/2 2026/07/11 03:23 tool read-file
0m Args:
{
  "File": "drivers/net/dsa/mv88e6xxx/chip.c",
  "FirstLine": 6575,
  "LineCount": 50
}

Results:
{
  "Contents": "6575:\tstatic int mv88e6xxx_detect(struct mv88e6xxx_chip *chip)\n6576:\t{\n6577:\t\tconst struct mv88e6xxx_info *info;\n6578:\t\tunsigned int prod_num, rev;\n6579:\t\tu16 id;\n6580:\t\tint err;\n6581:\t\n6582:\t\tmv88e6xxx_reg_lock(chip);\n6583:\t\terr = mv88e6xxx_port_read(chip, 0, MV88E6XXX_PORT_SWITCH_ID, \u0026id);\n6584:\t\tmv88e6xxx_reg_unlock(chip);\n6585:\t\tif (err)\n6586:\t\t\treturn err;\n6587:\t\n6588:\t\tprod_num = id \u0026 MV88E6XXX_PORT_SWITCH_ID_PROD_MASK;\n6589:\t\trev = id \u0026 MV88E6XXX_PORT_SWITCH_ID_REV_MASK;\n6590:\t\n6591:\t\tinfo = mv88e6xxx_lookup_info(prod_num);\n6592:\t\tif (!info)\n6593:\t\t\treturn -ENODEV;\n6594:\t\n6595:\t\t/* Update the compatible info with the probed one */\n6596:\t\tchip-\u003einfo = info;\n6597:\t\n6598:\t\tdev_info(chip-\u003edev, \"switch 0x%x detected: %s, revision %u\\n\",\n6599:\t\t\t chip-\u003einfo-\u003eprod_num, chip-\u003einfo-\u003ename, rev);\n6600:\t\n6601:\t\treturn 0;\n6602:\t}\n6603:\t\n6604:\tstatic int mv88e6xxx_single_chip_detect(struct mv88e6xxx_chip *chip,\n6605:\t\t\t\t\t\tstruct mdio_device *mdiodev)\n6606:\t{\n6607:\t\tint err;\n6608:\t\n6609:\t\t/* dual_chip takes precedence over single/multi-chip modes */\n6610:\t\tif (chip-\u003einfo-\u003edual_chip)\n6611:\t\t\treturn -EINVAL;\n6612:\t\n6613:\t\t/* If the mdio addr is 16 indicating the first port address of a switch\n6614:\t\t * (e.g. mv88e6*41) in single chip addressing mode the device may be\n6615:\t\t * configured in single chip addressing mode. Setup the smi access as\n6616:\t\t * single chip addressing mode and attempt to detect the model of the\n6617:\t\t * switch, if this fails the device is not configured in single chip\n6618:\t\t * addressing mode.\n6619:\t\t */\n6620:\t\tif (mdiodev-\u003eaddr != 16)\n6621:\t\t\treturn -EINVAL;\n6622:\t\n6623:\t\terr = mv88e6xxx_smi_init(chip, mdiodev-\u003ebus, 0);\n6624:\t\tif (err)\n"
}

23/2 2026/07/11 03:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 47142
							output: 32
							thoughts: 287
						

Thoughts:
**Analyzing the Fuzzing Potential**

Okay, so I'm looking at this driver and it's grabbing `MV88E6XXX_PORT_SWITCH_ID` from port 0. If that ID doesn't jive with a known product number, it's tossing back an `-ENODEV` error. Right off the bat, I know that since there's no software emulation of this specific switch, probing this in a virtual environment like GCE or QEMU is a guaranteed fail.

But hold on a second... what if, *hypothetically*, someone had set up a mock MDIO bus that actually *did* return a valid ID? That would change things, wouldn't it? The question then becomes, does syzkaller have a specific mock for `mv88e6xxx`? I highly doubt it; it doesn't usually go that granular.

Ah, but the prompt. Let me re-read it... "Code paths that are impossible to reach in virtualized environments... If it modifies reachable core kernel logic... return WorthFuzzing=true." This scenario is, without a doubt, impossible to reach. So I should be returning `WorthFuzzing=false`.

Just to be absolutely sure, let me double-check. I'm going to search the kernel code for `MV88E6XXX_PORT_SWITCH_ID`. I want to see if *anything* even remotely looks like a software emulation or mock implementation. I'll search with my code search tools to double-check.



24/2 2026/07/11 03:24 tool grepper
0m Args:
{
  "Expression": "MV88E6XXX_PORT_SWITCH_ID",
  "PathPrefix": ""
}

Results:
{
  "Output": "drivers/net/dsa/mv88e6xxx/chip.c=803=static void mv88e6393x_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-807-\tbool is_6191x =\ndrivers/net/dsa/mv88e6xxx/chip.c:808:\t\tchip-\u003einfo-\u003eprod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6191X;\ndrivers/net/dsa/mv88e6xxx/chip.c-809-\tbool is_6361 =\ndrivers/net/dsa/mv88e6xxx/chip.c:810:\t\tchip-\u003einfo-\u003eprod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6361;\ndrivers/net/dsa/mv88e6xxx/chip.c-811-\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=3752=static const u16 family_prod_id_table[] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:3753:\t[MV88E6XXX_FAMILY_6341] = MV88E6XXX_PORT_SWITCH_ID_PROD_6341,\ndrivers/net/dsa/mv88e6xxx/chip.c:3754:\t[MV88E6XXX_FAMILY_6390] = MV88E6XXX_PORT_SWITCH_ID_PROD_6390,\ndrivers/net/dsa/mv88e6xxx/chip.c:3755:\t[MV88E6XXX_FAMILY_6393] = MV88E6XXX_PORT_SWITCH_ID_PROD_6393X,\ndrivers/net/dsa/mv88e6xxx/chip.c-3756-};\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=5699=static const struct mv88e6xxx_info mv88e6xxx_table[] = {\ndrivers/net/dsa/mv88e6xxx/chip.c-5700-\t[MV88E6020] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5701:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6020,\ndrivers/net/dsa/mv88e6xxx/chip.c-5702-\t\t.family = MV88E6XXX_FAMILY_6250,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5725-\t[MV88E6071] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5726:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6071,\ndrivers/net/dsa/mv88e6xxx/chip.c-5727-\t\t.family = MV88E6XXX_FAMILY_6250,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5746-\t[MV88E6085] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5747:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6085,\ndrivers/net/dsa/mv88e6xxx/chip.c-5748-\t\t.family = MV88E6XXX_FAMILY_6097,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5770-\t[MV88E6095] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5771:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6095,\ndrivers/net/dsa/mv88e6xxx/chip.c-5772-\t\t.family = MV88E6XXX_FAMILY_6095,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5791-\t[MV88E6097] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5792:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6097,\ndrivers/net/dsa/mv88e6xxx/chip.c-5793-\t\t.family = MV88E6XXX_FAMILY_6097,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5816-\t[MV88E6123] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5817:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6123,\ndrivers/net/dsa/mv88e6xxx/chip.c-5818-\t\t.family = MV88E6XXX_FAMILY_6165,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5841-\t[MV88E6131] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5842:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6131,\ndrivers/net/dsa/mv88e6xxx/chip.c-5843-\t\t.family = MV88E6XXX_FAMILY_6185,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5862-\t[MV88E6141] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5863:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6141,\ndrivers/net/dsa/mv88e6xxx/chip.c-5864-\t\t.family = MV88E6XXX_FAMILY_6341,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5888-\t[MV88E6161] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5889:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6161,\ndrivers/net/dsa/mv88e6xxx/chip.c-5890-\t\t.family = MV88E6XXX_FAMILY_6165,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5914-\t[MV88E6165] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5915:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6165,\ndrivers/net/dsa/mv88e6xxx/chip.c-5916-\t\t.family = MV88E6XXX_FAMILY_6165,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5939-\t[MV88E6171] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5940:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6171,\ndrivers/net/dsa/mv88e6xxx/chip.c-5941-\t\t.family = MV88E6XXX_FAMILY_6351,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5964-\t[MV88E6172] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5965:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6172,\ndrivers/net/dsa/mv88e6xxx/chip.c-5966-\t\t.family = MV88E6XXX_FAMILY_6352,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-5990-\t[MV88E6175] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:5991:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6175,\ndrivers/net/dsa/mv88e6xxx/chip.c-5992-\t\t.family = MV88E6XXX_FAMILY_6351,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6015-\t[MV88E6176] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6016:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6176,\ndrivers/net/dsa/mv88e6xxx/chip.c-6017-\t\t.family = MV88E6XXX_FAMILY_6352,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6041-\t[MV88E6185] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6042:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6185,\ndrivers/net/dsa/mv88e6xxx/chip.c-6043-\t\t.family = MV88E6XXX_FAMILY_6185,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6063-\t[MV88E6190] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6064:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6190,\ndrivers/net/dsa/mv88e6xxx/chip.c-6065-\t\t.family = MV88E6XXX_FAMILY_6390,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6088-\t[MV88E6190X] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6089:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6190X,\ndrivers/net/dsa/mv88e6xxx/chip.c-6090-\t\t.family = MV88E6XXX_FAMILY_6390,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6113-\t[MV88E6191] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6114:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6191,\ndrivers/net/dsa/mv88e6xxx/chip.c-6115-\t\t.family = MV88E6XXX_FAMILY_6390,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6138-\t[MV88E6191X] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6139:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6191X,\ndrivers/net/dsa/mv88e6xxx/chip.c-6140-\t\t.family = MV88E6XXX_FAMILY_6393,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6163-\t[MV88E6193X] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6164:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6193X,\ndrivers/net/dsa/mv88e6xxx/chip.c-6165-\t\t.family = MV88E6XXX_FAMILY_6393,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6190-\t[MV88E6220] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6191:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6220,\ndrivers/net/dsa/mv88e6xxx/chip.c-6192-\t\t.family = MV88E6XXX_FAMILY_6250,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6217-\t[MV88E6240] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6218:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6240,\ndrivers/net/dsa/mv88e6xxx/chip.c-6219-\t\t.family = MV88E6XXX_FAMILY_6352,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6244-\t[MV88E6250] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6245:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6250,\ndrivers/net/dsa/mv88e6xxx/chip.c-6246-\t\t.family = MV88E6XXX_FAMILY_6250,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6266-\t[MV88E6290] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6267:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6290,\ndrivers/net/dsa/mv88e6xxx/chip.c-6268-\t\t.family = MV88E6XXX_FAMILY_6390,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6293-\t[MV88E6320] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6294:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6320,\ndrivers/net/dsa/mv88e6xxx/chip.c-6295-\t\t.family = MV88E6XXX_FAMILY_6320,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6321-\t[MV88E6321] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6322:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6321,\ndrivers/net/dsa/mv88e6xxx/chip.c-6323-\t\t.family = MV88E6XXX_FAMILY_6320,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6349-\t[MV88E6341] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6350:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6341,\ndrivers/net/dsa/mv88e6xxx/chip.c-6351-\t\t.family = MV88E6XXX_FAMILY_6341,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6377-\t[MV88E6350] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6378:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6350,\ndrivers/net/dsa/mv88e6xxx/chip.c-6379-\t\t.family = MV88E6XXX_FAMILY_6351,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6402-\t[MV88E6351] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6403:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6351,\ndrivers/net/dsa/mv88e6xxx/chip.c-6404-\t\t.family = MV88E6XXX_FAMILY_6351,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6427-\t[MV88E6352] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6428:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6352,\ndrivers/net/dsa/mv88e6xxx/chip.c-6429-\t\t.family = MV88E6XXX_FAMILY_6352,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6454-\t[MV88E6361] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6455:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6361,\ndrivers/net/dsa/mv88e6xxx/chip.c-6456-\t\t.family = MV88E6XXX_FAMILY_6393,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6481-\t[MV88E6390] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6482:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6390,\ndrivers/net/dsa/mv88e6xxx/chip.c-6483-\t\t.family = MV88E6XXX_FAMILY_6390,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6509-\t[MV88E6390X] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6510:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6390X,\ndrivers/net/dsa/mv88e6xxx/chip.c-6511-\t\t.family = MV88E6XXX_FAMILY_6390,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6536-\t[MV88E6393X] = {\ndrivers/net/dsa/mv88e6xxx/chip.c:6537:\t\t.prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6393X,\ndrivers/net/dsa/mv88e6xxx/chip.c-6538-\t\t.family = MV88E6XXX_FAMILY_6393,\n--\ndrivers/net/dsa/mv88e6xxx/chip.c=6575=static int mv88e6xxx_detect(struct mv88e6xxx_chip *chip)\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6582-\tmv88e6xxx_reg_lock(chip);\ndrivers/net/dsa/mv88e6xxx/chip.c:6583:\terr = mv88e6xxx_port_read(chip, 0, MV88E6XXX_PORT_SWITCH_ID, \u0026id);\ndrivers/net/dsa/mv88e6xxx/chip.c-6584-\tmv88e6xxx_reg_unlock(chip);\n--\ndrivers/net/dsa/mv88e6xxx/chip.c-6587-\ndrivers/net/dsa/mv88e6xxx/chip.c:6588:\tprod_num = id \u0026 MV88E6XXX_PORT_SWITCH_ID_PROD_MASK;\ndrivers/net/dsa/mv88e6xxx/chip.c:6589:\trev = id \u0026 MV88E6XXX_PORT_SWITCH_ID_REV_MASK;\ndrivers/net/dsa/mv88e6xxx/chip.c-6590-\n--\ndrivers/net/dsa/mv88e6xxx/pcs-639x.c=549=static int mv88e6390_pcs_init(struct mv88e6xxx_chip *chip, int port)\n--\ndrivers/net/dsa/mv88e6xxx/pcs-639x.c-569-\ndrivers/net/dsa/mv88e6xxx/pcs-639x.c:570:\tif (chip-\u003einfo-\u003eprod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6190X ||\ndrivers/net/dsa/mv88e6xxx/pcs-639x.c:571:\t    chip-\u003einfo-\u003eprod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6390X)\ndrivers/net/dsa/mv88e6xxx/pcs-639x.c-572-\t\tmpcs-\u003eerratum_3_14 = true;\n--\ndrivers/net/dsa/mv88e6xxx/port.c=411=int mv88e6393x_port_set_speed_duplex(struct mv88e6xxx_chip *chip, int port,\n--\ndrivers/net/dsa/mv88e6xxx/port.c-416-\ndrivers/net/dsa/mv88e6xxx/port.c:417:\tif (chip-\u003einfo-\u003eprod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6361 \u0026\u0026\ndrivers/net/dsa/mv88e6xxx/port.c-418-\t    speed \u003e 2500)\n--\ndrivers/net/dsa/mv88e6xxx/port.h-126-/* Offset 0x03: Switch Identifier Register */\ndrivers/net/dsa/mv88e6xxx/port.h:127:#define MV88E6XXX_PORT_SWITCH_ID\t\t0x03\ndrivers/net/dsa/mv88e6xxx/port.h:128:#define MV88E6XXX_PORT_SWITCH_ID_PROD_MASK\t0xfff0\ndrivers/net/dsa/mv88e6xxx/port.h:129:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6020\t0x0200\ndrivers/net/dsa/mv88e6xxx/port.h:130:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6071\t0x0710\ndrivers/net/dsa/mv88e6xxx/port.h:131:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6085\t0x04a0\ndrivers/net/dsa/mv88e6xxx/port.h:132:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6095\t0x0950\ndrivers/net/dsa/mv88e6xxx/port.h:133:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6097\t0x0990\ndrivers/net/dsa/mv88e6xxx/port.h:134:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6190X\t0x0a00\ndrivers/net/dsa/mv88e6xxx/port.h:135:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6390X\t0x0a10\ndrivers/net/dsa/mv88e6xxx/port.h:136:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6131\t0x1060\ndrivers/net/dsa/mv88e6xxx/port.h:137:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6320\t0x1150\ndrivers/net/dsa/mv88e6xxx/port.h:138:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6123\t0x1210\ndrivers/net/dsa/mv88e6xxx/port.h:139:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6161\t0x1610\ndrivers/net/dsa/mv88e6xxx/port.h:140:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6165\t0x1650\ndrivers/net/dsa/mv88e6xxx/port.h:141:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6171\t0x1710\ndrivers/net/dsa/mv88e6xxx/port.h:142:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6172\t0x1720\ndrivers/net/dsa/mv88e6xxx/port.h:143:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6175\t0x1750\ndrivers/net/dsa/mv88e6xxx/port.h:144:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6176\t0x1760\ndrivers/net/dsa/mv88e6xxx/port.h:145:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6190\t0x1900\ndrivers/net/dsa/mv88e6xxx/port.h:146:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6191\t0x1910\ndrivers/net/dsa/mv88e6xxx/port.h:147:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6191X\t0x1920\ndrivers/net/dsa/mv88e6xxx/port.h:148:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6193X\t0x1930\ndrivers/net/dsa/mv88e6xxx/port.h:149:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6185\t0x1a70\ndrivers/net/dsa/mv88e6xxx/port.h:150:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6220\t0x2200\ndrivers/net/dsa/mv88e6xxx/port.h:151:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6240\t0x2400\ndrivers/net/dsa/mv88e6xxx/port.h:152:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6250\t0x2500\ndrivers/net/dsa/mv88e6xxx/port.h:153:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6361\t0x2610\ndrivers/net/dsa/mv88e6xxx/port.h:154:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6290\t0x2900\ndrivers/net/dsa/mv88e6xxx/port.h:155:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6321\t0x3100\ndrivers/net/dsa/mv88e6xxx/port.h:156:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6141\t0x3400\ndrivers/net/dsa/mv88e6xxx/port.h:157:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6341\t0x3410\ndrivers/net/dsa/mv88e6xxx/port.h:158:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6352\t0x3520\ndrivers/net/dsa/mv88e6xxx/port.h:159:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6350\t0x3710\ndrivers/net/dsa/mv88e6xxx/port.h:160:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6351\t0x3750\ndrivers/net/dsa/mv88e6xxx/port.h:161:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6390\t0x3900\ndrivers/net/dsa/mv88e6xxx/port.h:162:#define MV88E6XXX_PORT_SWITCH_ID_PROD_6393X\t0x3930\ndrivers/net/dsa/mv88e6xxx/port.h:163:#define MV88E6XXX_PORT_SWITCH_ID_REV_MASK\t0x000f\ndrivers/net/dsa/mv88e6xxx/port.h-164-\n"
}

25/2 2026/07/11 03:24 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 55542
							output: 24
							thoughts: 381
						

Thoughts:
**My Assessment of the Patch's Worthiness for Fuzzing**

Okay, so there's no mock driver within the kernel itself that could simulate the Marvell switch, which is the first thing I checked. But then I remember Syzkaller *did* apply a patch related to this, right? Okay, so that's interesting. I know Syzkaller throws patches around to test them, but if the fuzzer can't *actually* get to the code, it'll just report zero coverage for that patch.

Right, the prompt is explicit about this: I need to flag it as "WorthFuzzing=false" if the patch involves code paths that are inherently impossible to reach in virtualized setups like GCE or QEMU, even with software-emulated hardware. This is a driver specifically for a *physical* Marvell switch, so I'm thinking I've found my answer. Since there's no software emulation available, this is *definitely* going to be impossible to reach in a virtualized environment.

Just to be sure, I’ll take a quick look to confirm how the `mv88e6xxx_get_rxts_embedded` function is called. Right, it's called from `mv88e6xxx_rxtstamp_work`. That work is initialized in `mv88e6xxx_hwtstamp_port_setup`. That, in turn, is called from `mv88e6xxx_port_hwtstamp_set`, which is called from `dsa_port_hwtstamp_set`, and *that* is called from `dsa_slave_ioctl` with the `SIOCSHWTSTAMP` ioctl. It's a chain, but it requires the switch to be registered and probed.

Okay, here's the deal: Without the physical hardware present, `mv88e6xxx_detect` *will* fail. The probe will fail. The switch won't register, and the network devices aren't created. The code is *completely* unreachable in a virtualized environment.

Now, wait a second... is there a mock MDIO bus in the kernel somewhere? Gotta check that real quick. Let's see if the `mdio-mock` driver exists.



26/2 2026/07/11 03:24 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "mdio.*mock",
  "PathPrefix": ""
}

Results:
{
  "error": "no matches"
}

27/2 2026/07/11 03:24 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 56451
							output: 30
							thoughts: 706
						

Thoughts:
**Unreachable Code Analysis**

Okay, let's break this down. My initial thought was to see if we could somehow trigger the code path in question, `parse_embedded_ts`, using a dummy device or some clever trickery. My intuition was to check if we could leverage something like `mdio-gpio`, but the driver, `mv88e6xxx`, explicitly reads `MV88E6XXX_PORT_SWITCH_ID` via MDIO. If that read returns a nonsensical value, the device detection fails. Unless there's a way to inject arbitrary MDIO responses in a testing environment like QEMU or syzkaller.

Syzkaller, my go-to fuzzing tool, doesn't have an MDIO fuzzer. It handles other interfaces like USB, PCI, and I2C (potentially through `i2c-stub`), but MDIO is absent. I briefly considered if the driver could be instantiated through I2C, but it's an MDIO driver, so that's a dead end.

My next step was to trace how we might *possibly* reach `parse_embedded_ts`. It's a static function buried within `drivers/net/dsa/mv88e6xxx/hwtstamp.c`. The call chain is very specific: `mv88e6xxx_get_rxts_embedded` -> `mv88e6xxx_rxtstamp_work` -> workqueue. In short, it's tightly coupled to the `mv88e6xxx` driver.

Now, let's consider the emulation landscape. Does QEMU, the virtual machine I often work with, provide emulation for Marvell switches? I know QEMU supports things like `rocker` switches, but does it cover the `mv88e6xxx` specifically? A quick mental search confirms that QEMU doesn't emulate `mv88e6xxx`. Even if it did, syzkaller typically doesn't run with that type of hardware emulation enabled. It's configured with standard hardware emulated like `e1000`, `virtio-net`, and `veth`.

So, considering all of this, this code is *unreachable* in syzkaller.

Let me revisit the prompt criteria. It states that "Return WorthFuzzing=false if the patch only contains... code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware". This perfectly matches the situation. The patch modifies hardware-specific driver (`mv88e6xxx`) for which no usable software emulation exists.

Just to be absolutely certain, I'll quickly check for a generic DSA mock that *might* use this code. I'll search through `tools/testing/` and `drivers/net/dsa/`, but the code resides in `drivers/net/dsa/mv88e6xxx/`, which is clearly and specifically for Marvell 88E6xxx switches.

Finally, I'll explore the possibility of probing `mv88e6xxx` through a software platform device that mocks the MDIO responses. I'll search for `mv88e6xxx` within `tools/testing/` or `drivers/net/dsa/` to uncover a potential mock.

So, in summary, based on the lack of emulation and the driver's tight hardware dependency, this code path is unreachable, and thus not worth fuzzing for this analysis.



28/2 2026/07/11 03:24 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "mv88e6xxx",
  "PathPrefix": "tools/testing/"
}

Results:
{
  "error": "no matches"
}

29/2 2026/07/11 03:24 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 57955
							output: 31
							thoughts: 13
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Immediate Assessment: No Simulated Environment Needed**

Alright, that's clear. The initial directive – there's no need for a "mock" or simulated environment. We can work directly with the actual system or data. This implies a level of confidence in the underlying infrastructure or a need for a production-level perspective right away.

The subsequent thought, "What about `dsa_loop`?" suggests a shift in focus. It indicates an immediate consideration of a specific component or function, perhaps as a potential point of investigation or operational aspect of the project. I'd need more context to understand the exact role and relevance of `dsa_loop` to the larger objective. Is it a critical path element? A known potential bottleneck? Or a specific area where this team is focusing our attention? The question implies that a specific module is considered for a reason, and there is a specific implication for the project depending on its behavior.



30/2 2026/07/11 03:24 tool grepper
0m Args:
{
  "Expression": "dsa_loop",
  "PathPrefix": "drivers/net/dsa/"
}

Results:
{
  "Output": "drivers/net/dsa/Makefile=3=bcm-sf2-objs\t\t\t:= bcm_sf2.o bcm_sf2_cfp.o\ndrivers/net/dsa/Makefile:4:obj-$(CONFIG_NET_DSA_LOOP)\t+= dsa_loop.o\ndrivers/net/dsa/Makefile-5-obj-$(CONFIG_NET_DSA_KS8995) \t+= ks8995.o\n--\ndrivers/net/dsa/dsa_loop.c-24-\ndrivers/net/dsa/dsa_loop.c:25:struct dsa_loop_vlan {\ndrivers/net/dsa/dsa_loop.c-26-\tu16 members;\n--\ndrivers/net/dsa/dsa_loop.c-29-\ndrivers/net/dsa/dsa_loop.c:30:struct dsa_loop_mib_entry {\ndrivers/net/dsa/dsa_loop.c-31-\tchar name[ETH_GSTRING_LEN];\n--\ndrivers/net/dsa/dsa_loop.c-34-\ndrivers/net/dsa/dsa_loop.c:35:enum dsa_loop_mib_counters {\ndrivers/net/dsa/dsa_loop.c-36-\tDSA_LOOP_PHY_READ_OK,\n--\ndrivers/net/dsa/dsa_loop.c-42-\ndrivers/net/dsa/dsa_loop.c:43:struct dsa_loop_port {\ndrivers/net/dsa/dsa_loop.c:44:\tstruct dsa_loop_mib_entry mib[__DSA_LOOP_CNT_MAX];\ndrivers/net/dsa/dsa_loop.c-45-\tu16 pvid;\n--\ndrivers/net/dsa/dsa_loop.c-48-\ndrivers/net/dsa/dsa_loop.c:49:struct dsa_loop_priv {\ndrivers/net/dsa/dsa_loop.c-50-\tstruct mii_bus\t*bus;\ndrivers/net/dsa/dsa_loop.c-51-\tunsigned int\tport_base;\ndrivers/net/dsa/dsa_loop.c:52:\tstruct dsa_loop_vlan vlans[VLAN_N_VID];\ndrivers/net/dsa/dsa_loop.c-53-\tstruct net_device *netdev;\ndrivers/net/dsa/dsa_loop.c:54:\tstruct dsa_loop_port ports[DSA_MAX_PORTS];\ndrivers/net/dsa/dsa_loop.c-55-};\ndrivers/net/dsa/dsa_loop.c-56-\ndrivers/net/dsa/dsa_loop.c:57:struct dsa_loop_pdata {\ndrivers/net/dsa/dsa_loop.c-58-\t/* Must be first, such that dsa_register_switch() can access this\n--\ndrivers/net/dsa/dsa_loop.c-66-\ndrivers/net/dsa/dsa_loop.c:67:static struct dsa_loop_mib_entry dsa_loop_mibs[] = {\ndrivers/net/dsa/dsa_loop.c-68-\t[DSA_LOOP_PHY_READ_OK]\t= { \"phy_read_ok\", },\n--\ndrivers/net/dsa/dsa_loop.c=75=static struct mdio_device *switch_mdiodev;\ndrivers/net/dsa/dsa_loop.c-76-\ndrivers/net/dsa/dsa_loop.c:77:enum dsa_loop_devlink_resource_id {\ndrivers/net/dsa/dsa_loop.c-78-\tDSA_LOOP_DEVLINK_PARAM_ID_NONE,  /* DEVLINK_RESOURCE_ID_PARENT_TOP */\n--\ndrivers/net/dsa/dsa_loop.c-81-\ndrivers/net/dsa/dsa_loop.c:82:static u64 dsa_loop_devlink_vtu_get(void *priv)\ndrivers/net/dsa/dsa_loop.c-83-{\ndrivers/net/dsa/dsa_loop.c:84:\tstruct dsa_loop_priv *ps = priv;\ndrivers/net/dsa/dsa_loop.c-85-\tunsigned int i, count = 0;\ndrivers/net/dsa/dsa_loop.c:86:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-87-\n--\ndrivers/net/dsa/dsa_loop.c-96-\ndrivers/net/dsa/dsa_loop.c:97:static int dsa_loop_setup_devlink_resources(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-98-{\ndrivers/net/dsa/dsa_loop.c-99-\tstruct devlink_resource_size_params size_params;\ndrivers/net/dsa/dsa_loop.c:100:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-101-\tint err;\n--\ndrivers/net/dsa/dsa_loop.c-115-\t\t\t\t\t      DSA_LOOP_DEVLINK_PARAM_ID_VTU,\ndrivers/net/dsa/dsa_loop.c:116:\t\t\t\t\t      dsa_loop_devlink_vtu_get, ps);\ndrivers/net/dsa/dsa_loop.c-117-\n--\ndrivers/net/dsa/dsa_loop.c-124-\ndrivers/net/dsa/dsa_loop.c:125:static enum dsa_tag_protocol dsa_loop_get_protocol(struct dsa_switch *ds,\ndrivers/net/dsa/dsa_loop.c-126-\t\t\t\t\t\t   int port,\n--\ndrivers/net/dsa/dsa_loop.c-133-\ndrivers/net/dsa/dsa_loop.c:134:static int dsa_loop_setup(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-135-{\ndrivers/net/dsa/dsa_loop.c:136:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-137-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-139-\tfor (i = 0; i \u003c ds-\u003enum_ports; i++)\ndrivers/net/dsa/dsa_loop.c:140:\t\tmemcpy(ps-\u003eports[i].mib, dsa_loop_mibs,\ndrivers/net/dsa/dsa_loop.c:141:\t\t       sizeof(dsa_loop_mibs));\ndrivers/net/dsa/dsa_loop.c-142-\n--\ndrivers/net/dsa/dsa_loop.c-144-\ndrivers/net/dsa/dsa_loop.c:145:\treturn dsa_loop_setup_devlink_resources(ds);\ndrivers/net/dsa/dsa_loop.c-146-}\ndrivers/net/dsa/dsa_loop.c-147-\ndrivers/net/dsa/dsa_loop.c:148:static void dsa_loop_teardown(struct dsa_switch *ds)\ndrivers/net/dsa/dsa_loop.c-149-{\n--\ndrivers/net/dsa/dsa_loop.c-152-\ndrivers/net/dsa/dsa_loop.c:153:static int dsa_loop_get_sset_count(struct dsa_switch *ds, int port, int sset)\ndrivers/net/dsa/dsa_loop.c-154-{\n--\ndrivers/net/dsa/dsa_loop.c-160-\ndrivers/net/dsa/dsa_loop.c:161:static void dsa_loop_get_strings(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-162-\t\t\t\t u32 stringset, uint8_t *data)\ndrivers/net/dsa/dsa_loop.c-163-{\ndrivers/net/dsa/dsa_loop.c:164:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-165-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-173-\ndrivers/net/dsa/dsa_loop.c:174:static void dsa_loop_get_ethtool_stats(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-175-\t\t\t\t       uint64_t *data)\ndrivers/net/dsa/dsa_loop.c-176-{\ndrivers/net/dsa/dsa_loop.c:177:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-178-\tunsigned int i;\n--\ndrivers/net/dsa/dsa_loop.c-183-\ndrivers/net/dsa/dsa_loop.c:184:static int dsa_loop_phy_read(struct dsa_switch *ds, int port, int regnum)\ndrivers/net/dsa/dsa_loop.c-185-{\ndrivers/net/dsa/dsa_loop.c:186:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-187-\tstruct mii_bus *bus = ps-\u003ebus;\n--\ndrivers/net/dsa/dsa_loop.c-198-\ndrivers/net/dsa/dsa_loop.c:199:static int dsa_loop_phy_write(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-200-\t\t\t      int regnum, u16 value)\ndrivers/net/dsa/dsa_loop.c-201-{\ndrivers/net/dsa/dsa_loop.c:202:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-203-\tstruct mii_bus *bus = ps-\u003ebus;\n--\ndrivers/net/dsa/dsa_loop.c-214-\ndrivers/net/dsa/dsa_loop.c:215:static int dsa_loop_port_bridge_join(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-216-\t\t\t\t     struct dsa_bridge bridge,\n--\ndrivers/net/dsa/dsa_loop.c-225-\ndrivers/net/dsa/dsa_loop.c:226:static void dsa_loop_port_bridge_leave(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-227-\t\t\t\t       struct dsa_bridge bridge)\n--\ndrivers/net/dsa/dsa_loop.c-232-\ndrivers/net/dsa/dsa_loop.c:233:static void dsa_loop_port_stp_state_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-234-\t\t\t\t\tu8 state)\n--\ndrivers/net/dsa/dsa_loop.c-239-\ndrivers/net/dsa/dsa_loop.c:240:static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-241-\t\t\t\t\tbool vlan_filtering,\n--\ndrivers/net/dsa/dsa_loop.c-249-\ndrivers/net/dsa/dsa_loop.c:250:static int dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-251-\t\t\t\t  const struct switchdev_obj_port_vlan *vlan,\n--\ndrivers/net/dsa/dsa_loop.c-255-\tbool pvid = vlan-\u003eflags \u0026 BRIDGE_VLAN_INFO_PVID;\ndrivers/net/dsa/dsa_loop.c:256:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-257-\tstruct mii_bus *bus = ps-\u003ebus;\ndrivers/net/dsa/dsa_loop.c:258:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-259-\n--\ndrivers/net/dsa/dsa_loop.c-282-\ndrivers/net/dsa/dsa_loop.c:283:static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-284-\t\t\t\t  const struct switchdev_obj_port_vlan *vlan)\n--\ndrivers/net/dsa/dsa_loop.c-286-\tbool untagged = vlan-\u003eflags \u0026 BRIDGE_VLAN_INFO_UNTAGGED;\ndrivers/net/dsa/dsa_loop.c:287:\tstruct dsa_loop_priv *ps = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-288-\tu16 pvid = ps-\u003eports[port].pvid;\ndrivers/net/dsa/dsa_loop.c-289-\tstruct mii_bus *bus = ps-\u003ebus;\ndrivers/net/dsa/dsa_loop.c:290:\tstruct dsa_loop_vlan *vl;\ndrivers/net/dsa/dsa_loop.c-291-\n--\ndrivers/net/dsa/dsa_loop.c-310-\ndrivers/net/dsa/dsa_loop.c:311:static int dsa_loop_port_change_mtu(struct dsa_switch *ds, int port,\ndrivers/net/dsa/dsa_loop.c-312-\t\t\t\t    int new_mtu)\ndrivers/net/dsa/dsa_loop.c-313-{\ndrivers/net/dsa/dsa_loop.c:314:\tstruct dsa_loop_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/dsa_loop.c-315-\n--\ndrivers/net/dsa/dsa_loop.c-320-\ndrivers/net/dsa/dsa_loop.c:321:static int dsa_loop_port_max_mtu(struct dsa_switch *ds, int port)\ndrivers/net/dsa/dsa_loop.c-322-{\n--\ndrivers/net/dsa/dsa_loop.c-325-\ndrivers/net/dsa/dsa_loop.c:326:static void dsa_loop_phylink_get_caps(struct dsa_switch *dsa, int port,\ndrivers/net/dsa/dsa_loop.c-327-\t\t\t\t      struct phylink_config *config)\n--\ndrivers/net/dsa/dsa_loop.c-333-\ndrivers/net/dsa/dsa_loop.c:334:static const struct dsa_switch_ops dsa_loop_driver = {\ndrivers/net/dsa/dsa_loop.c:335:\t.get_tag_protocol\t= dsa_loop_get_protocol,\ndrivers/net/dsa/dsa_loop.c:336:\t.setup\t\t\t= dsa_loop_setup,\ndrivers/net/dsa/dsa_loop.c:337:\t.teardown\t\t= dsa_loop_teardown,\ndrivers/net/dsa/dsa_loop.c:338:\t.get_strings\t\t= dsa_loop_get_strings,\ndrivers/net/dsa/dsa_loop.c:339:\t.get_ethtool_stats\t= dsa_loop_get_ethtool_stats,\ndrivers/net/dsa/dsa_loop.c:340:\t.get_sset_count\t\t= dsa_loop_get_sset_count,\ndrivers/net/dsa/dsa_loop.c:341:\t.get_ethtool_phy_stats\t= dsa_loop_get_ethtool_stats,\ndrivers/net/dsa/dsa_loop.c:342:\t.phy_read\t\t= dsa_loop_phy_read,\ndrivers/net/dsa/dsa_loop.c:343:\t.phy_write\t\t= dsa_loop_phy_write,\ndrivers/net/dsa/dsa_loop.c:344:\t.port_bridge_join\t= dsa_loop_port_bridge_join,\ndrivers/net/dsa/dsa_loop.c:345:\t.port_bridge_leave\t= dsa_loop_port_bridge_leave,\ndrivers/net/dsa/dsa_loop.c:346:\t.port_stp_state_set\t= dsa_loop_port_stp_state_set,\ndrivers/net/dsa/dsa_loop.c:347:\t.port_vlan_filtering\t= dsa_loop_port_vlan_filtering,\ndrivers/net/dsa/dsa_loop.c:348:\t.port_vlan_add\t\t= dsa_loop_port_vlan_add,\ndrivers/net/dsa/dsa_loop.c:349:\t.port_vlan_del\t\t= dsa_loop_port_vlan_del,\ndrivers/net/dsa/dsa_loop.c:350:\t.port_change_mtu\t= dsa_loop_port_change_mtu,\ndrivers/net/dsa/dsa_loop.c:351:\t.port_max_mtu\t\t= dsa_loop_port_max_mtu,\ndrivers/net/dsa/dsa_loop.c:352:\t.phylink_get_caps\t= dsa_loop_phylink_get_caps,\ndrivers/net/dsa/dsa_loop.c-353-};\ndrivers/net/dsa/dsa_loop.c-354-\ndrivers/net/dsa/dsa_loop.c:355:static int dsa_loop_drv_probe(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-356-{\ndrivers/net/dsa/dsa_loop.c:357:\tstruct dsa_loop_pdata *pdata = mdiodev-\u003edev.platform_data;\ndrivers/net/dsa/dsa_loop.c:358:\tstruct dsa_loop_priv *ps;\ndrivers/net/dsa/dsa_loop.c-359-\tstruct dsa_switch *ds;\n--\ndrivers/net/dsa/dsa_loop.c-382-\tds-\u003edev = \u0026mdiodev-\u003edev;\ndrivers/net/dsa/dsa_loop.c:383:\tds-\u003eops = \u0026dsa_loop_driver;\ndrivers/net/dsa/dsa_loop.c-384-\tds-\u003epriv = ps;\n--\ndrivers/net/dsa/dsa_loop.c-396-\ndrivers/net/dsa/dsa_loop.c:397:static void dsa_loop_drv_remove(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-398-{\ndrivers/net/dsa/dsa_loop.c-399-\tstruct dsa_switch *ds = dev_get_drvdata(\u0026mdiodev-\u003edev);\ndrivers/net/dsa/dsa_loop.c:400:\tstruct dsa_loop_priv *ps;\ndrivers/net/dsa/dsa_loop.c-401-\n--\ndrivers/net/dsa/dsa_loop.c-410-\ndrivers/net/dsa/dsa_loop.c:411:static void dsa_loop_drv_shutdown(struct mdio_device *mdiodev)\ndrivers/net/dsa/dsa_loop.c-412-{\n--\ndrivers/net/dsa/dsa_loop.c-422-\ndrivers/net/dsa/dsa_loop.c:423:static struct mdio_driver dsa_loop_drv = {\ndrivers/net/dsa/dsa_loop.c-424-\t.mdiodrv.driver\t= {\n--\ndrivers/net/dsa/dsa_loop.c-426-\t},\ndrivers/net/dsa/dsa_loop.c:427:\t.probe\t= dsa_loop_drv_probe,\ndrivers/net/dsa/dsa_loop.c:428:\t.remove\t= dsa_loop_drv_remove,\ndrivers/net/dsa/dsa_loop.c:429:\t.shutdown = dsa_loop_drv_shutdown,\ndrivers/net/dsa/dsa_loop.c-430-};\ndrivers/net/dsa/dsa_loop.c-431-\ndrivers/net/dsa/dsa_loop.c:432:static int dsa_loop_bus_match(struct device *dev,\ndrivers/net/dsa/dsa_loop.c-433-\t\t\t      const struct device_driver *drv)\ndrivers/net/dsa/dsa_loop.c-434-{\ndrivers/net/dsa/dsa_loop.c:435:\treturn drv == \u0026dsa_loop_drv.mdiodrv.driver;\ndrivers/net/dsa/dsa_loop.c-436-}\ndrivers/net/dsa/dsa_loop.c-437-\ndrivers/net/dsa/dsa_loop.c:438:static void dsa_loop_phydevs_unregister(void)\ndrivers/net/dsa/dsa_loop.c-439-{\n--\ndrivers/net/dsa/dsa_loop.c-445-\ndrivers/net/dsa/dsa_loop.c:446:static int __init dsa_loop_create_switch_mdiodev(void)\ndrivers/net/dsa/dsa_loop.c-447-{\ndrivers/net/dsa/dsa_loop.c:448:\tstatic struct dsa_loop_pdata dsa_loop_pdata = {\ndrivers/net/dsa/dsa_loop.c-449-\t\t.cd = {\n--\ndrivers/net/dsa/dsa_loop.c-470-\ndrivers/net/dsa/dsa_loop.c:471:\tswitch_mdiodev-\u003ebus_match = dsa_loop_bus_match;\ndrivers/net/dsa/dsa_loop.c:472:\tswitch_mdiodev-\u003edev.platform_data = \u0026dsa_loop_pdata;\ndrivers/net/dsa/dsa_loop.c-473-\n--\ndrivers/net/dsa/dsa_loop.c-481-\ndrivers/net/dsa/dsa_loop.c:482:static int __init dsa_loop_init(void)\ndrivers/net/dsa/dsa_loop.c-483-{\n--\ndrivers/net/dsa/dsa_loop.c-486-\ndrivers/net/dsa/dsa_loop.c:487:\tret = dsa_loop_create_switch_mdiodev();\ndrivers/net/dsa/dsa_loop.c-488-\tif (ret)\n--\ndrivers/net/dsa/dsa_loop.c-493-\ndrivers/net/dsa/dsa_loop.c:494:\tret = mdio_driver_register(\u0026dsa_loop_drv);\ndrivers/net/dsa/dsa_loop.c-495-\tif (ret) {\ndrivers/net/dsa/dsa_loop.c:496:\t\tdsa_loop_phydevs_unregister();\ndrivers/net/dsa/dsa_loop.c-497-\t\tmdio_device_remove(switch_mdiodev);\n--\ndrivers/net/dsa/dsa_loop.c-502-}\ndrivers/net/dsa/dsa_loop.c:503:module_init(dsa_loop_init);\ndrivers/net/dsa/dsa_loop.c-504-\ndrivers/net/dsa/dsa_loop.c:505:static void __exit dsa_loop_exit(void)\ndrivers/net/dsa/dsa_loop.c-506-{\ndrivers/net/dsa/dsa_loop.c:507:\tmdio_driver_unregister(\u0026dsa_loop_drv);\ndrivers/net/dsa/dsa_loop.c:508:\tdsa_loop_phydevs_unregister();\ndrivers/net/dsa/dsa_loop.c-509-\tmdio_device_remove(switch_mdiodev);\n--\ndrivers/net/dsa/dsa_loop.c-511-}\ndrivers/net/dsa/dsa_loop.c:512:module_exit(dsa_loop_exit);\ndrivers/net/dsa/dsa_loop.c-513-\n"
}

31/2 2026/07/11 03:24 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 64751
							output: 111
							thoughts: 215
						

Thoughts:
**Assessing the Fuzzability of `dsa_loop`**

Okay, so I've taken a look at this `dsa_loop` mock driver, and it's immediately clear that it doesn't interact with the `mv88e6xxx` hardware. That's the key indicator here. Since `mv88e6xxx` is a driver specific to the Marvell 88E6xxx switches, and we're operating within the constraints of syzkaller, which is a virtualized environment, this hardware is simply inaccessible.

Therefore, my assessment is that this code isn't fuzzable in this context. I will mark it as `WorthFuzzing=false`. The rationale is straightforward: the modified code relates to a hardware-specific driver, which cannot be probed or exercised within a virtualized setup without the actual physical hardware.

Just to be absolutely certain, let me quickly double-check that there aren't any other related files in play. Ah, yes, there are a few: `drivers/net/dsa/mv88e6xxx/chip.c`, `drivers/net/dsa/mv88e6xxx/chip.h`, `drivers/net/dsa/mv88e6xxx/hwtstamp.c`, and `drivers/net/dsa/mv88e6xxx/hwtstamp.h`. And they're all firmly within the `mv88e6xxx` directory.

Yup, that confirms it. I am completely confident in my original evaluation. We can safely exclude this from the fuzzing target list.



32/2 2026/07/11 03:24 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the mv88e6xxx DSA driver to support embedded arrival timestamps for Marvell 88E6xxx physical switches. This is a hardware-specific feature that requires physical Marvell switch hardware to probe and execute. There is no software emulation for this hardware in QEMU or the kernel, making the modified code paths impossible to reach in a virtualized fuzzing environment.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the mv88e6xxx DSA driver to support embedded arrival timestamps for Marvell 88E6xxx physical switches. This is a hardware-specific feature that requires physical Marvell switch hardware to probe and execute. There is no software emulation for this hardware in QEMU or the kernel, making the modified code paths impossible to reach in a virtualized fuzzing environment.",
  "WorthFuzzing": false
}

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)