AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/06/27 01:29 flow patch-triage
1m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the oa_tc6 library (OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI), which is only used by the lan865x SPI Ethernet driver. Since SPI devices cannot be dynamically instantiated from userspace in standard virtualized environments (unlike USB via vhci or Wi-Fi via mac80211_hwsim), the lan865x driver will never probe. Consequently, the modified code is completely unreachable in environments like QEMU or GCE.",
  "WorthFuzzing": false
}

1/1 2026/06/27 01:29 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 45a229429007de3b5a25a77b81a105f2b8204d88\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sat Jun 27 01:29:29 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c\nindex 0727d53345a33b..c59daa032e70a1 100644\n--- a/drivers/net/ethernet/oa_tc6.c\n+++ b/drivers/net/ethernet/oa_tc6.c\n@@ -672,10 +672,16 @@ static void oa_tc6_cleanup_ongoing_tx_skb(struct oa_tc6 *tc6)\n \n static void oa_tc6_cleanup_waiting_tx_skb(struct oa_tc6 *tc6)\n {\n-\tif (tc6-\u003ewaiting_tx_skb) {\n+\tstruct sk_buff *skb;\n+\n+\tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\n+\tskb = tc6-\u003ewaiting_tx_skb;\n+\ttc6-\u003ewaiting_tx_skb = NULL;\n+\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n+\n+\tif (skb) {\n \t\ttc6-\u003enetdev-\u003estats.tx_dropped++;\n-\t\tkfree_skb(tc6-\u003ewaiting_tx_skb);\n-\t\ttc6-\u003ewaiting_tx_skb = NULL;\n+\t\tkfree_skb(skb);\n \t}\n }\n \n@@ -686,6 +692,12 @@ static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)\n \toa_tc6_cleanup_waiting_tx_skb(tc6);\n }\n \n+static void oa_tc6_look_for_new_frame(struct oa_tc6 *tc6)\n+{\n+\ttc6-\u003erx_buf_overflow = true;\n+\toa_tc6_cleanup_ongoing_rx_skb(tc6);\n+}\n+\n /* If the failure is at SPI interface level, masking and clearing\n  * the interrupt of the device won't work. Since SPI interrupt is\n  * disabled, it should stop the repeated interrupts.\n@@ -723,8 +735,7 @@ static int oa_tc6_process_extended_status(struct oa_tc6 *tc6)\n \t}\n \n \tif (FIELD_GET(STATUS0_RX_BUFFER_OVERFLOW_ERROR, value)) {\n-\t\ttc6-\u003erx_buf_overflow = true;\n-\t\toa_tc6_cleanup_ongoing_rx_skb(tc6);\n+\t\toa_tc6_look_for_new_frame(tc6);\n \t\tnet_err_ratelimited(\"%s: Receive buffer overflow error\\n\",\n \t\t\t\t    tc6-\u003enetdev-\u003ename);\n \t\treturn -EAGAIN;\n@@ -805,13 +816,35 @@ static void oa_tc6_submit_rx_skb(struct oa_tc6 *tc6)\n \ttc6-\u003erx_skb = NULL;\n }\n \n-static void oa_tc6_update_rx_skb(struct oa_tc6 *tc6, u8 *payload, u8 length)\n+/* On oversubscribed traffic condition, particularly with overwhelming rx\n+ * buffer overflow errors, there could be data chunk loss. If tail + length\n+ * goes beyond end pointer, that is an indication that the data chunk with\n+ * end_valid bit is lost. Time to look for a data chunk with start_valid bit.\n+ *\n+ * If rx_skb is NULL, it is time to start looking for data chunk with\n+ * start_bit.\n+ */\n+static int oa_tc6_update_rx_skb(struct oa_tc6 *tc6, u8 *payload, u8 length)\n {\n+\tif (!tc6-\u003erx_skb ||\n+\t    (tc6-\u003erx_skb-\u003etail + length) \u003e tc6-\u003erx_skb-\u003eend) {\n+\t\toa_tc6_look_for_new_frame(tc6);\n+\t\treturn -EAGAIN;\n+\t}\n+\n \tmemcpy(skb_put(tc6-\u003erx_skb, length), payload, length);\n+\treturn 0;\n }\n \n+/* On overwhelming rx buffer overflow errors, due to data chunk loss, it is\n+ * possible that we get two data chunks with start_valid bit set, without\n+ * end_valid bit set in between. In this case, rx_skb would have a valid\n+ * buffer pointer. We should release, if a valid pointer is found before\n+ * allocating a new one.\n+ */\n static int oa_tc6_allocate_rx_skb(struct oa_tc6 *tc6)\n {\n+\toa_tc6_cleanup_ongoing_rx_skb(tc6);\n \ttc6-\u003erx_skb = netdev_alloc_skb_ip_align(tc6-\u003enetdev, tc6-\u003enetdev-\u003emtu +\n \t\t\t\t\t\tETH_HLEN + ETH_FCS_LEN);\n \tif (!tc6-\u003erx_skb) {\n@@ -831,7 +864,9 @@ static int oa_tc6_prcs_complete_rx_frame(struct oa_tc6 *tc6, u8 *payload,\n \tif (ret)\n \t\treturn ret;\n \n-\toa_tc6_update_rx_skb(tc6, payload, size);\n+\tret = oa_tc6_update_rx_skb(tc6, payload, size);\n+\tif (ret)\n+\t\treturn ret;\n \n \toa_tc6_submit_rx_skb(tc6);\n \n@@ -846,22 +881,24 @@ static int oa_tc6_prcs_rx_frame_start(struct oa_tc6 *tc6, u8 *payload, u16 size)\n \tif (ret)\n \t\treturn ret;\n \n-\toa_tc6_update_rx_skb(tc6, payload, size);\n-\n-\treturn 0;\n+\treturn oa_tc6_update_rx_skb(tc6, payload, size);\n }\n \n-static void oa_tc6_prcs_rx_frame_end(struct oa_tc6 *tc6, u8 *payload, u16 size)\n+static int oa_tc6_prcs_rx_frame_end(struct oa_tc6 *tc6, u8 *payload, u16 size)\n {\n-\toa_tc6_update_rx_skb(tc6, payload, size);\n+\tint ret;\n \n-\toa_tc6_submit_rx_skb(tc6);\n+\tret = oa_tc6_update_rx_skb(tc6, payload, size);\n+\tif (!ret)\n+\t\toa_tc6_submit_rx_skb(tc6);\n+\treturn ret;\n }\n \n-static void oa_tc6_prcs_ongoing_rx_frame(struct oa_tc6 *tc6, u8 *payload,\n-\t\t\t\t\t u32 footer)\n+static int oa_tc6_prcs_ongoing_rx_frame(struct oa_tc6 *tc6, u8 *payload,\n+\t\t\t\t\tu32 footer)\n {\n-\toa_tc6_update_rx_skb(tc6, payload, OA_TC6_CHUNK_PAYLOAD_SIZE);\n+\treturn oa_tc6_update_rx_skb(tc6, payload,\n+\t\t\t\t    OA_TC6_CHUNK_PAYLOAD_SIZE);\n }\n \n static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,\n@@ -874,6 +911,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,\n \tbool start_valid = FIELD_GET(OA_TC6_DATA_FOOTER_START_VALID, footer);\n \tbool end_valid = FIELD_GET(OA_TC6_DATA_FOOTER_END_VALID, footer);\n \tu16 size;\n+\tint ret;\n \n \t/* Restart the new rx frame after receiving rx buffer overflow error */\n \tif (start_valid \u0026\u0026 tc6-\u003erx_buf_overflow)\n@@ -901,8 +939,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,\n \t/* Process the chunk with only rx frame end */\n \tif (end_valid \u0026\u0026 !start_valid) {\n \t\tsize = end_byte_offset + 1;\n-\t\toa_tc6_prcs_rx_frame_end(tc6, data, size);\n-\t\treturn 0;\n+\t\treturn oa_tc6_prcs_rx_frame_end(tc6, data, size);\n \t}\n \n \t/* Process the chunk with previous rx frame end and next rx frame\n@@ -915,7 +952,9 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,\n \t\t */\n \t\tif (tc6-\u003erx_skb) {\n \t\t\tsize = end_byte_offset + 1;\n-\t\t\toa_tc6_prcs_rx_frame_end(tc6, data, size);\n+\t\t\tret = oa_tc6_prcs_rx_frame_end(tc6, data, size);\n+\t\t\tif (ret)\n+\t\t\t\treturn ret;\n \t\t}\n \t\tsize = OA_TC6_CHUNK_PAYLOAD_SIZE - start_byte_offset;\n \t\treturn oa_tc6_prcs_rx_frame_start(tc6,\n@@ -924,9 +963,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,\n \t}\n \n \t/* Process the chunk with ongoing rx frame data */\n-\toa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);\n-\n-\treturn 0;\n+\treturn oa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);\n }\n \n static u32 oa_tc6_get_rx_chunk_footer(struct oa_tc6 *tc6, u16 footer_offset)\n@@ -1250,11 +1287,6 @@ EXPORT_SYMBOL_GPL(oa_tc6_zero_align_receive_frame_enable);\n  */\n netdev_tx_t oa_tc6_start_xmit(struct oa_tc6 *tc6, struct sk_buff *skb)\n {\n-\tif (tc6-\u003edisable_traffic || tc6-\u003ewaiting_tx_skb) {\n-\t\tnetif_stop_queue(tc6-\u003enetdev);\n-\t\treturn NETDEV_TX_BUSY;\n-\t}\n-\n \tif (skb_linearize(skb)) {\n \t\tdev_kfree_skb_any(skb);\n \t\ttc6-\u003enetdev-\u003estats.tx_dropped++;\n@@ -1262,6 +1294,11 @@ netdev_tx_t oa_tc6_start_xmit(struct oa_tc6 *tc6, struct sk_buff *skb)\n \t}\n \n \tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\n+\tif (tc6-\u003edisable_traffic || tc6-\u003ewaiting_tx_skb) {\n+\t\tnetif_stop_queue(tc6-\u003enetdev);\n+\t\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n+\t\treturn NETDEV_TX_BUSY;\n+\t}\n \ttc6-\u003ewaiting_tx_skb = skb;\n \tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n \n"
}

2/1 2026/06/27 01:29 agent patch-evaluator
1m Model:
gemini-3.1-pro-preview

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the oa_tc6 library (OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI), which is only used by the lan865x SPI Ethernet driver. Since SPI devices cannot be dynamically instantiated from userspace in standard virtualized environments (unlike USB via vhci or Wi-Fi via mac80211_hwsim), the lan865x driver will never probe. Consequently, the modified code is completely unreachable in environments like QEMU or GCE.",
  "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 45a229429007de3b5a25a77b81a105f2b8204d88
Author: syz-cluster <triage@syzkaller.com>
Date:   Sat Jun 27 01:29:29 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
index 0727d53345a33b..c59daa032e70a1 100644
--- a/drivers/net/ethernet/oa_tc6.c
+++ b/drivers/net/ethernet/oa_tc6.c
@@ -672,10 +672,16 @@ static void oa_tc6_cleanup_ongoing_tx_skb(struct oa_tc6 *tc6)
 
 static void oa_tc6_cleanup_waiting_tx_skb(struct oa_tc6 *tc6)
 {
-	if (tc6->waiting_tx_skb) {
+	struct sk_buff *skb;
+
+	spin_lock_bh(&tc6->tx_skb_lock);
+	skb = tc6->waiting_tx_skb;
+	tc6->waiting_tx_skb = NULL;
+	spin_unlock_bh(&tc6->tx_skb_lock);
+
+	if (skb) {
 		tc6->netdev->stats.tx_dropped++;
-		kfree_skb(tc6->waiting_tx_skb);
-		tc6->waiting_tx_skb = NULL;
+		kfree_skb(skb);
 	}
 }
 
@@ -686,6 +692,12 @@ static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)
 	oa_tc6_cleanup_waiting_tx_skb(tc6);
 }
 
+static void oa_tc6_look_for_new_frame(struct oa_tc6 *tc6)
+{
+	tc6->rx_buf_overflow = true;
+	oa_tc6_cleanup_ongoing_rx_skb(tc6);
+}
+
 /* If the failure is at SPI interface level, masking and clearing
  * the interrupt of the device won't work. Since SPI interrupt is
  * disabled, it should stop the repeated interrupts.
@@ -723,8 +735,7 @@ static int oa_tc6_process_extended_status(struct oa_tc6 *tc6)
 	}
 
 	if (FIELD_GET(STATUS0_RX_BUFFER_OVERFLOW_ERROR, value)) {
-		tc6->rx_buf_overflow = true;
-		oa_tc6_cleanup_ongoing_rx_skb(tc6);
+		oa_tc6_look_for_new_frame(tc6);
 		net_err_ratelimited("%s: Receive buffer overflow error\n",
 				    tc6->netdev->name);
 		return -EAGAIN;
@@ -805,13 +816,35 @@ static void oa_tc6_submit_rx_skb(struct oa_tc6 *tc6)
 	tc6->rx_skb = NULL;
 }
 
-static void oa_tc6_update_rx_skb(struct oa_tc6 *tc6, u8 *payload, u8 length)
+/* On oversubscribed traffic condition, particularly with overwhelming rx
+ * buffer overflow errors, there could be data chunk loss. If tail + length
+ * goes beyond end pointer, that is an indication that the data chunk with
+ * end_valid bit is lost. Time to look for a data chunk with start_valid bit.
+ *
+ * If rx_skb is NULL, it is time to start looking for data chunk with
+ * start_bit.
+ */
+static int oa_tc6_update_rx_skb(struct oa_tc6 *tc6, u8 *payload, u8 length)
 {
+	if (!tc6->rx_skb ||
+	    (tc6->rx_skb->tail + length) > tc6->rx_skb->end) {
+		oa_tc6_look_for_new_frame(tc6);
+		return -EAGAIN;
+	}
+
 	memcpy(skb_put(tc6->rx_skb, length), payload, length);
+	return 0;
 }
 
+/* On overwhelming rx buffer overflow errors, due to data chunk loss, it is
+ * possible that we get two data chunks with start_valid bit set, without
+ * end_valid bit set in between. In this case, rx_skb would have a valid
+ * buffer pointer. We should release, if a valid pointer is found before
+ * allocating a new one.
+ */
 static int oa_tc6_allocate_rx_skb(struct oa_tc6 *tc6)
 {
+	oa_tc6_cleanup_ongoing_rx_skb(tc6);
 	tc6->rx_skb = netdev_alloc_skb_ip_align(tc6->netdev, tc6->netdev->mtu +
 						ETH_HLEN + ETH_FCS_LEN);
 	if (!tc6->rx_skb) {
@@ -831,7 +864,9 @@ static int oa_tc6_prcs_complete_rx_frame(struct oa_tc6 *tc6, u8 *payload,
 	if (ret)
 		return ret;
 
-	oa_tc6_update_rx_skb(tc6, payload, size);
+	ret = oa_tc6_update_rx_skb(tc6, payload, size);
+	if (ret)
+		return ret;
 
 	oa_tc6_submit_rx_skb(tc6);
 
@@ -846,22 +881,24 @@ static int oa_tc6_prcs_rx_frame_start(struct oa_tc6 *tc6, u8 *payload, u16 size)
 	if (ret)
 		return ret;
 
-	oa_tc6_update_rx_skb(tc6, payload, size);
-
-	return 0;
+	return oa_tc6_update_rx_skb(tc6, payload, size);
 }
 
-static void oa_tc6_prcs_rx_frame_end(struct oa_tc6 *tc6, u8 *payload, u16 size)
+static int oa_tc6_prcs_rx_frame_end(struct oa_tc6 *tc6, u8 *payload, u16 size)
 {
-	oa_tc6_update_rx_skb(tc6, payload, size);
+	int ret;
 
-	oa_tc6_submit_rx_skb(tc6);
+	ret = oa_tc6_update_rx_skb(tc6, payload, size);
+	if (!ret)
+		oa_tc6_submit_rx_skb(tc6);
+	return ret;
 }
 
-static void oa_tc6_prcs_ongoing_rx_frame(struct oa_tc6 *tc6, u8 *payload,
-					 u32 footer)
+static int oa_tc6_prcs_ongoing_rx_frame(struct oa_tc6 *tc6, u8 *payload,
+					u32 footer)
 {
-	oa_tc6_update_rx_skb(tc6, payload, OA_TC6_CHUNK_PAYLOAD_SIZE);
+	return oa_tc6_update_rx_skb(tc6, payload,
+				    OA_TC6_CHUNK_PAYLOAD_SIZE);
 }
 
 static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
@@ -874,6 +911,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
 	bool start_valid = FIELD_GET(OA_TC6_DATA_FOOTER_START_VALID, footer);
 	bool end_valid = FIELD_GET(OA_TC6_DATA_FOOTER_END_VALID, footer);
 	u16 size;
+	int ret;
 
 	/* Restart the new rx frame after receiving rx buffer overflow error */
 	if (start_valid && tc6->rx_buf_overflow)
@@ -901,8 +939,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
 	/* Process the chunk with only rx frame end */
 	if (end_valid && !start_valid) {
 		size = end_byte_offset + 1;
-		oa_tc6_prcs_rx_frame_end(tc6, data, size);
-		return 0;
+		return oa_tc6_prcs_rx_frame_end(tc6, data, size);
 	}
 
 	/* Process the chunk with previous rx frame end and next rx frame
@@ -915,7 +952,9 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
 		 */
 		if (tc6->rx_skb) {
 			size = end_byte_offset + 1;
-			oa_tc6_prcs_rx_frame_end(tc6, data, size);
+			ret = oa_tc6_prcs_rx_frame_end(tc6, data, size);
+			if (ret)
+				return ret;
 		}
 		size = OA_TC6_CHUNK_PAYLOAD_SIZE - start_byte_offset;
 		return oa_tc6_prcs_rx_frame_start(tc6,
@@ -924,9 +963,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
 	}
 
 	/* Process the chunk with ongoing rx frame data */
-	oa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);
-
-	return 0;
+	return oa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);
 }
 
 static u32 oa_tc6_get_rx_chunk_footer(struct oa_tc6 *tc6, u16 footer_offset)
@@ -1250,11 +1287,6 @@ EXPORT_SYMBOL_GPL(oa_tc6_zero_align_receive_frame_enable);
  */
 netdev_tx_t oa_tc6_start_xmit(struct oa_tc6 *tc6, struct sk_buff *skb)
 {
-	if (tc6->disable_traffic || tc6->waiting_tx_skb) {
-		netif_stop_queue(tc6->netdev);
-		return NETDEV_TX_BUSY;
-	}
-
 	if (skb_linearize(skb)) {
 		dev_kfree_skb_any(skb);
 		tc6->netdev->stats.tx_dropped++;
@@ -1262,6 +1294,11 @@ netdev_tx_t oa_tc6_start_xmit(struct oa_tc6 *tc6, struct sk_buff *skb)
 	}
 
 	spin_lock_bh(&tc6->tx_skb_lock);
+	if (tc6->disable_traffic || tc6->waiting_tx_skb) {
+		netif_stop_queue(tc6->netdev);
+		spin_unlock_bh(&tc6->tx_skb_lock);
+		return NETDEV_TX_BUSY;
+	}
 	tc6->waiting_tx_skb = skb;
 	spin_unlock_bh(&tc6->tx_skb_lock);
 

3/2 2026/06/27 01:29 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 4527
							output: 39
							thoughts: 476
						

Thoughts:
**Analyzing the OA_TC6 Ethernet Driver Patch**

Okay, so I've got this patch affecting the `drivers/net/ethernet/oa_tc6.c` driver, which is for an OPEN Alliance TC6 10BASE-T1S MAC-PHY Serial Peripheral Interface Ethernet device. My immediate thought is to understand the scope of these changes. It looks like it's touching quite a few key functions: `oa_tc6_cleanup_waiting_tx_skb`, `oa_tc6_look_for_new_frame`, all the processing routines for the RX path (`oa_tc6_process_extended_status`, `oa_tc6_update_rx_skb`, `oa_tc6_allocate_rx_skb`, `oa_tc6_prcs_complete_rx_frame`, `oa_tc6_prcs_rx_frame_start`, `oa_tc6_prcs_rx_frame_end`, `oa_tc6_prcs_ongoing_rx_frame`, and `oa_tc6_prcs_rx_chunk_payload`) and the TX path in `oa_tc6_start_xmit`.

Two key fixes are immediately apparent: buffer overflow protection in `oa_tc6_update_rx_skb` via bounds checking (`tc6->rx_skb->tail + length > tc6->rx_skb->end`) and a race condition fix in `oa_tc6_start_xmit` by adding a lock around the check for `tc6->waiting_tx_skb`.

Now, I need to evaluate the testability of this patch, especially in a virtualized environment. This is an SPI-based Ethernet driver. SPI devices are generally a pain to emulate, especially in something like QEMU. Unless there's a specific SPI controller emulation or some sort of mock SPI driver, it's going to be tricky. Let's dig into if there's any SPI mock or a way to fuzz this driver. Ah, syzkaller. I know it isn't set up to directly fuzz SPI devices. Unless we can inject SPI traffic or have a virtual SPI device, we're probably not going to get far there.

However, `oa_tc6_start_xmit` is a standard `netdev_tx_t` function, which means it should be reachable through network traffic. If we can instantiate the network interface, we can test that part. The key question now is, can we instantiate the interface? Let's go back and look at the source code in `drivers/net/ethernet/oa_tc6.c` to figure that out.



4/2 2026/06/27 01:29 tool grepper
0m Args:
{
  "Expression": "oa_tc6_init",
  "PathPrefix": "drivers/net/ethernet/oa_tc6.c"
}

Results:
{
  "Output": "drivers/net/ethernet/oa_tc6.c=1310=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1312-/**\ndrivers/net/ethernet/oa_tc6.c:1313: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1314- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1319- */\ndrivers/net/ethernet/oa_tc6.c:1320:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1321-{\n--\ndrivers/net/ethernet/oa_tc6.c-1424-}\ndrivers/net/ethernet/oa_tc6.c:1425:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1426-\n"
}

5/2 2026/06/27 01:29 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 5926
							output: 33
							thoughts: 26
						

Thoughts:
Okay, here's my interpretation of those thoughts, crafted with the understanding that I'm speaking to a fellow expert:

**Investigating the OA TC6 Landscape**

Alright, so I'm diving into this new code, and the first thing I notice is it revolves around a library or framework related to OA TC6. My initial focus is to understand its integration and dependencies. Specifically, I want to identify the key entry points, so my immediate thought is to trace who's calling `oa_tc6_init`. That function is likely where the core initialization and configuration happens, so finding those call sites will give me a solid grasp on how this library fits into the bigger picture. From there, I can begin to unpack its purpose and functionality in context.



6/2 2026/06/27 01:29 tool grepper
0m Args:
{
  "Expression": "oa_tc6_init",
  "PathPrefix": "drivers/net/ethernet/"
}

Results:
{
  "Output": "drivers/net/ethernet/microchip/lan865x/lan865x.c=333=static int lan865x_probe(struct spi_device *spi)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-348-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:349:\tpriv-\u003etc6 = oa_tc6_init(spi, netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-350-\tif (!priv-\u003etc6) {\n--\ndrivers/net/ethernet/oa_tc6.c=1310=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1312-/**\ndrivers/net/ethernet/oa_tc6.c:1313: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1314- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1319- */\ndrivers/net/ethernet/oa_tc6.c:1320:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1321-{\n--\ndrivers/net/ethernet/oa_tc6.c-1424-}\ndrivers/net/ethernet/oa_tc6.c:1425:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1426-\n"
}

7/2 2026/06/27 01:29 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 6615
							output: 25
							thoughts: 129
						

Thoughts:
**Investigating `lan865x` and SPI Device Instantiation in a Fuzzing Context**

Okay, so I'm looking at this `lan865x` thing and it's being probed by `lan865x_probe`. The critical piece of context here is that it's an SPI driver. My immediate thought, as an expert in this area, is: Can syzkaller *directly* instantiate SPI devices? Generally, the answer is no. Unless there's some kind of clever SPI mock setup or something similar, it's usually not that straightforward. But then my brain starts cataloging the possibilities... we have `mac80211_hwsim` for wifi, `vkms` for DRM, `vhci` for USB, `uinput` for input. These are virtualized device implementations that allow syzkaller to test without requiring the physical hardware. Hmm, is there a virtual SPI equivalent?

Let's see... Wait, yes! There are a couple of possibilities that spring to mind. There's `spi-mock`, which is the more obvious one, but also that `spi-loopback-test`. I need to figure out which of those can actually be used to probe this `lan865x` driver. I need to check to see if there's any realistic way, given our environment, to trigger that `lan865x_probe` function.



8/2 2026/06/27 01:29 tool grepper
0m Args:
{
  "Expression": "lan865x",
  "PathPrefix": ""
}

Results:
{
  "Output": "MAINTAINERS=17620=F:\tDocumentation/devicetree/bindings/net/microchip,lan8650.yaml\nMAINTAINERS:17621:F:\tdrivers/net/ethernet/microchip/lan865x/lan865x.c\nMAINTAINERS-17622-\n--\ndrivers/net/ethernet/microchip/Kconfig=45=config LAN743X\n--\ndrivers/net/ethernet/microchip/Kconfig-59-\ndrivers/net/ethernet/microchip/Kconfig:60:source \"drivers/net/ethernet/microchip/lan865x/Kconfig\"\ndrivers/net/ethernet/microchip/Kconfig-61-source \"drivers/net/ethernet/microchip/lan966x/Kconfig\"\n--\ndrivers/net/ethernet/microchip/Makefile=10=lan743x-objs := lan743x_main.o lan743x_ethtool.o lan743x_ptp.o\ndrivers/net/ethernet/microchip/Makefile-11-\ndrivers/net/ethernet/microchip/Makefile:12:obj-$(CONFIG_LAN865X) += lan865x/\ndrivers/net/ethernet/microchip/Makefile-13-obj-$(CONFIG_LAN966X_SWITCH) += lan966x/\n--\ndrivers/net/ethernet/microchip/lan865x/Kconfig=8=config LAN865X\n--\ndrivers/net/ethernet/microchip/lan865x/Kconfig-16-\t  To compile this driver as a module, choose M here. The module will be\ndrivers/net/ethernet/microchip/lan865x/Kconfig:17:\t  called lan865x.\ndrivers/net/ethernet/microchip/lan865x/Kconfig-18-\n--\ndrivers/net/ethernet/microchip/lan865x/Makefile-5-\ndrivers/net/ethernet/microchip/lan865x/Makefile:6:obj-$(CONFIG_LAN865X) += lan865x.o\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-38-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:39:struct lan865x_priv {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-40-\tstruct work_struct multicast_work;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-45-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:46:static int lan865x_set_hw_macaddr_low_bytes(struct oa_tc6 *tc6, const u8 *mac)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-47-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-54-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:55:static int lan865x_set_hw_macaddr(struct lan865x_priv *priv, const u8 *mac)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-56-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-61-\t/* Configure MAC address low bytes */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:62:\tret = lan865x_set_hw_macaddr_low_bytes(priv-\u003etc6, mac);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-63-\tif (ret)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-75-\t */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:76:\trestore_ret = lan865x_set_hw_macaddr_low_bytes(priv-\u003etc6,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-77-\t\t\t\t\t\t       priv-\u003enetdev-\u003edev_addr);\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-83-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:84:static const struct ethtool_ops lan865x_ethtool_ops = {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-85-\t.get_link_ksettings = phy_ethtool_get_link_ksettings,\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-88-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:89:static int lan865x_set_mac_address(struct net_device *netdev, void *addr)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-90-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:91:\tstruct lan865x_priv *priv = netdev_priv(netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-92-\tstruct sockaddr *address = addr;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-101-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:102:\tret = lan865x_set_hw_macaddr(priv, address-\u003esa_data);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-103-\tif (ret)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=111=static u32 get_address_bit(u8 addr[ETH_ALEN], u32 bit)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-115-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:116:static u32 lan865x_hash(u8 addr[ETH_ALEN])\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-117-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-131-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:132:static int lan865x_set_specific_multicast_addr(struct lan865x_priv *priv)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-133-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-139-\tnetdev_for_each_mc_addr(ha, priv-\u003enetdev) {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:140:\t\tu32 bit_num = lan865x_hash(ha-\u003eaddr);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-141-\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-163-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:164:static int lan865x_set_all_multicast_addr(struct lan865x_priv *priv)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-165-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-185-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:186:static int lan865x_clear_all_multicast_addr(struct lan865x_priv *priv)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-187-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-204-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:205:static void lan865x_multicast_work_handler(struct work_struct *work)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-206-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:207:\tstruct lan865x_priv *priv = container_of(work, struct lan865x_priv,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-208-\t\t\t\t\t\t multicast_work);\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-218-\t\t/* Enabling all multicast mode */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:219:\t\tif (lan865x_set_all_multicast_addr(priv))\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-220-\t\t\treturn;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-226-\t\t/* Enabling specific multicast mode */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:227:\t\tif (lan865x_set_specific_multicast_addr(priv))\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-228-\t\t\treturn;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-234-\t\t/* Enabling local mac address only */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:235:\t\tif (lan865x_clear_all_multicast_addr(priv))\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-236-\t\t\treturn;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-243-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:244:static void lan865x_set_multicast_list(struct net_device *netdev)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-245-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:246:\tstruct lan865x_priv *priv = netdev_priv(netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-247-\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-250-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:251:static netdev_tx_t lan865x_send_packet(struct sk_buff *skb,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-252-\t\t\t\t       struct net_device *netdev)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-253-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:254:\tstruct lan865x_priv *priv = netdev_priv(netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-255-\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-258-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:259:static int lan865x_hw_disable(struct lan865x_priv *priv)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-260-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-273-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:274:static int lan865x_net_close(struct net_device *netdev)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-275-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:276:\tstruct lan865x_priv *priv = netdev_priv(netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-277-\tint ret;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-280-\tphy_stop(netdev-\u003ephydev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:281:\tret = lan865x_hw_disable(priv);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-282-\tif (ret) {\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-289-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:290:static int lan865x_hw_enable(struct lan865x_priv *priv)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-291-{\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-304-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:305:static int lan865x_net_open(struct net_device *netdev)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-306-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:307:\tstruct lan865x_priv *priv = netdev_priv(netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-308-\tint ret;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-309-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:310:\tret = lan865x_hw_enable(priv);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-311-\tif (ret) {\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-322-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:323:static const struct net_device_ops lan865x_netdev_ops = {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:324:\t.ndo_open\t\t= lan865x_net_open,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:325:\t.ndo_stop\t\t= lan865x_net_close,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:326:\t.ndo_start_xmit\t\t= lan865x_send_packet,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:327:\t.ndo_set_rx_mode\t= lan865x_set_multicast_list,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:328:\t.ndo_set_mac_address\t= lan865x_set_mac_address,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-329-\t.ndo_validate_addr\t= eth_validate_addr,\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-332-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:333:static int lan865x_probe(struct spi_device *spi)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-334-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-335-\tstruct net_device *netdev;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:336:\tstruct lan865x_priv *priv;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-337-\tint ret;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-338-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:339:\tnetdev = alloc_etherdev(sizeof(struct lan865x_priv));\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-340-\tif (!netdev)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-346-\tspi_set_drvdata(spi, priv);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:347:\tINIT_WORK(\u0026priv-\u003emulticast_work, lan865x_multicast_work_handler);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-348-\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-391-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:392:\tret = lan865x_set_hw_macaddr(priv, netdev-\u003edev_addr);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-393-\tif (ret) {\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-399-\tnetdev-\u003eirq = spi-\u003eirq;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:400:\tnetdev-\u003enetdev_ops = \u0026lan865x_netdev_ops;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:401:\tnetdev-\u003eethtool_ops = \u0026lan865x_ethtool_ops;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-402-\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-417-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:418:static void lan865x_remove(struct spi_device *spi)\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-419-{\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:420:\tstruct lan865x_priv *priv = spi_get_drvdata(spi);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-421-\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-427-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:428:static const struct spi_device_id lan865x_ids[] = {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-429-\t{ .name = \"lan8650\" },\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-432-};\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:433:MODULE_DEVICE_TABLE(spi, lan865x_ids);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-434-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:435:static const struct of_device_id lan865x_dt_ids[] = {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-436-\t{ .compatible = \"microchip,lan8650\" },\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-439-};\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:440:MODULE_DEVICE_TABLE(of, lan865x_dt_ids);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-441-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:442:static struct spi_driver lan865x_driver = {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-443-\t.driver = {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-444-\t\t.name = DRV_NAME,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:445:\t\t.of_match_table = lan865x_dt_ids,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-446-\t },\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:447:\t.probe = lan865x_probe,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:448:\t.remove = lan865x_remove,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:449:\t.id_table = lan865x_ids,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-450-};\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:451:module_spi_driver(lan865x_driver);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-452-\n--\ndrivers/net/phy/microchip_t1s.c=77=static const u16 lan867x_revb1_fixup_masks[12] = {\n--\ndrivers/net/phy/microchip_t1s.c-87- */\ndrivers/net/phy/microchip_t1s.c:88:static const u32 lan865x_revb_fixup_registers[17] = {\ndrivers/net/phy/microchip_t1s.c-89-\t0x00D0, 0x00E0, 0x00E9, 0x00F5,\n--\ndrivers/net/phy/microchip_t1s.c-95-\ndrivers/net/phy/microchip_t1s.c:96:static const u16 lan865x_revb_fixup_values[17] = {\ndrivers/net/phy/microchip_t1s.c-97-\t0x3F31, 0xC000, 0x9E50, 0x1CF8,\n--\ndrivers/net/phy/microchip_t1s.c-103-\ndrivers/net/phy/microchip_t1s.c:104:static const u16 lan865x_revb_fixup_cfg_regs[2] = {\ndrivers/net/phy/microchip_t1s.c-105-\t0x0084, 0x008A,\n--\ndrivers/net/phy/microchip_t1s.c-107-\ndrivers/net/phy/microchip_t1s.c:108:static const u32 lan865x_revb_sqi_fixup_regs[12] = {\ndrivers/net/phy/microchip_t1s.c-109-\t0x00B0, 0x00B1, 0x00B2, 0x00B3,\n--\ndrivers/net/phy/microchip_t1s.c-113-\ndrivers/net/phy/microchip_t1s.c:114:static const u16 lan865x_revb_sqi_fixup_values[12] = {\ndrivers/net/phy/microchip_t1s.c-115-\t0x0103, 0x0910, 0x1D26, 0x002A,\n--\ndrivers/net/phy/microchip_t1s.c-119-\ndrivers/net/phy/microchip_t1s.c:120:static const u16 lan865x_revb_sqi_fixup_cfg_regs[3] = {\ndrivers/net/phy/microchip_t1s.c-121-\t0x00AD, 0x00AE, 0x00AF,\n--\ndrivers/net/phy/microchip_t1s.c=134=static const u16 lan867x_revd0_fixup_values[8] = {\n--\ndrivers/net/phy/microchip_t1s.c-146- */\ndrivers/net/phy/microchip_t1s.c:147:static int lan865x_revb_indirect_read(struct phy_device *phydev, u16 addr)\ndrivers/net/phy/microchip_t1s.c-148-{\n--\ndrivers/net/phy/microchip_t1s.c-166- */\ndrivers/net/phy/microchip_t1s.c:167:static int lan865x_generate_cfg_offsets(struct phy_device *phydev, s8 offsets[])\ndrivers/net/phy/microchip_t1s.c-168-{\n--\ndrivers/net/phy/microchip_t1s.c-172-\tfor (int i = 0; i \u003c ARRAY_SIZE(fixup_regs); i++) {\ndrivers/net/phy/microchip_t1s.c:173:\t\tret = lan865x_revb_indirect_read(phydev, fixup_regs[i]);\ndrivers/net/phy/microchip_t1s.c-174-\t\tif (ret \u003c 0)\n--\ndrivers/net/phy/microchip_t1s.c-187-\ndrivers/net/phy/microchip_t1s.c:188:static int lan865x_read_cfg_params(struct phy_device *phydev,\ndrivers/net/phy/microchip_t1s.c-189-\t\t\t\t   const u16 cfg_regs[], u16 cfg_params[],\n--\ndrivers/net/phy/microchip_t1s.c-204-\ndrivers/net/phy/microchip_t1s.c:205:static int lan865x_write_cfg_params(struct phy_device *phydev,\ndrivers/net/phy/microchip_t1s.c-206-\t\t\t\t    const u16 cfg_regs[], u16 cfg_params[],\n--\ndrivers/net/phy/microchip_t1s.c-220-\ndrivers/net/phy/microchip_t1s.c:221:static int lan865x_setup_cfgparam(struct phy_device *phydev, s8 offsets[])\ndrivers/net/phy/microchip_t1s.c-222-{\ndrivers/net/phy/microchip_t1s.c:223:\tu16 cfg_results[ARRAY_SIZE(lan865x_revb_fixup_cfg_regs)];\ndrivers/net/phy/microchip_t1s.c:224:\tu16 cfg_params[ARRAY_SIZE(lan865x_revb_fixup_cfg_regs)];\ndrivers/net/phy/microchip_t1s.c-225-\tint ret;\ndrivers/net/phy/microchip_t1s.c-226-\ndrivers/net/phy/microchip_t1s.c:227:\tret = lan865x_read_cfg_params(phydev, lan865x_revb_fixup_cfg_regs,\ndrivers/net/phy/microchip_t1s.c-228-\t\t\t\t      cfg_params, ARRAY_SIZE(cfg_params));\n--\ndrivers/net/phy/microchip_t1s.c-236-\ndrivers/net/phy/microchip_t1s.c:237:\treturn lan865x_write_cfg_params(phydev, lan865x_revb_fixup_cfg_regs,\ndrivers/net/phy/microchip_t1s.c-238-\t\t\t\t\tcfg_results, ARRAY_SIZE(cfg_results));\n--\ndrivers/net/phy/microchip_t1s.c-240-\ndrivers/net/phy/microchip_t1s.c:241:static int lan865x_setup_sqi_cfgparam(struct phy_device *phydev, s8 offsets[])\ndrivers/net/phy/microchip_t1s.c-242-{\ndrivers/net/phy/microchip_t1s.c:243:\tu16 cfg_results[ARRAY_SIZE(lan865x_revb_sqi_fixup_cfg_regs)];\ndrivers/net/phy/microchip_t1s.c:244:\tu16 cfg_params[ARRAY_SIZE(lan865x_revb_sqi_fixup_cfg_regs)];\ndrivers/net/phy/microchip_t1s.c-245-\tint ret;\ndrivers/net/phy/microchip_t1s.c-246-\ndrivers/net/phy/microchip_t1s.c:247:\tret = lan865x_read_cfg_params(phydev, lan865x_revb_sqi_fixup_cfg_regs,\ndrivers/net/phy/microchip_t1s.c-248-\t\t\t\t      cfg_params, ARRAY_SIZE(cfg_params));\n--\ndrivers/net/phy/microchip_t1s.c-258-\ndrivers/net/phy/microchip_t1s.c:259:\treturn lan865x_write_cfg_params(phydev, lan865x_revb_sqi_fixup_cfg_regs,\ndrivers/net/phy/microchip_t1s.c-260-\t\t\t\t\tcfg_results, ARRAY_SIZE(cfg_results));\n--\ndrivers/net/phy/microchip_t1s.c-262-\ndrivers/net/phy/microchip_t1s.c:263:static int lan865x_revb_config_init(struct phy_device *phydev)\ndrivers/net/phy/microchip_t1s.c-264-{\n--\ndrivers/net/phy/microchip_t1s.c-270-\t */\ndrivers/net/phy/microchip_t1s.c:271:\tret = lan865x_generate_cfg_offsets(phydev, offsets);\ndrivers/net/phy/microchip_t1s.c-272-\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-274-\ndrivers/net/phy/microchip_t1s.c:275:\tfor (int i = 0; i \u003c ARRAY_SIZE(lan865x_revb_fixup_registers); i++) {\ndrivers/net/phy/microchip_t1s.c-276-\t\tret = phy_write_mmd(phydev, MDIO_MMD_VEND2,\ndrivers/net/phy/microchip_t1s.c:277:\t\t\t\t    lan865x_revb_fixup_registers[i],\ndrivers/net/phy/microchip_t1s.c:278:\t\t\t\t    lan865x_revb_fixup_values[i]);\ndrivers/net/phy/microchip_t1s.c-279-\t\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-282-\t\tif (i == 1) {\ndrivers/net/phy/microchip_t1s.c:283:\t\t\tret = lan865x_setup_cfgparam(phydev, offsets);\ndrivers/net/phy/microchip_t1s.c-284-\t\t\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-288-\ndrivers/net/phy/microchip_t1s.c:289:\tret = lan865x_setup_sqi_cfgparam(phydev, offsets);\ndrivers/net/phy/microchip_t1s.c-290-\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-292-\ndrivers/net/phy/microchip_t1s.c:293:\tfor (int i = 0; i \u003c ARRAY_SIZE(lan865x_revb_sqi_fixup_regs); i++) {\ndrivers/net/phy/microchip_t1s.c-294-\t\tret = phy_write_mmd(phydev, MDIO_MMD_VEND2,\ndrivers/net/phy/microchip_t1s.c:295:\t\t\t\t    lan865x_revb_sqi_fixup_regs[i],\ndrivers/net/phy/microchip_t1s.c:296:\t\t\t\t    lan865x_revb_sqi_fixup_values[i]);\ndrivers/net/phy/microchip_t1s.c-297-\t\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c=329=static int lan867x_revc_config_init(struct phy_device *phydev)\n--\ndrivers/net/phy/microchip_t1s.c-337-\ndrivers/net/phy/microchip_t1s.c:338:\tret = lan865x_generate_cfg_offsets(phydev, offsets);\ndrivers/net/phy/microchip_t1s.c-339-\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-353-\t\tret = phy_write_mmd(phydev, MDIO_MMD_VEND2,\ndrivers/net/phy/microchip_t1s.c:354:\t\t\t\t    lan865x_revb_fixup_registers[i],\ndrivers/net/phy/microchip_t1s.c:355:\t\t\t\t    lan865x_revb_fixup_values[i]);\ndrivers/net/phy/microchip_t1s.c-356-\t\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-359-\t\tif (i == 1) {\ndrivers/net/phy/microchip_t1s.c:360:\t\t\tret = lan865x_setup_cfgparam(phydev, offsets);\ndrivers/net/phy/microchip_t1s.c-361-\t\t\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-365-\ndrivers/net/phy/microchip_t1s.c:366:\tret = lan865x_setup_sqi_cfgparam(phydev, offsets);\ndrivers/net/phy/microchip_t1s.c-367-\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c-369-\ndrivers/net/phy/microchip_t1s.c:370:\tfor (int i = 0; i \u003c ARRAY_SIZE(lan865x_revb_sqi_fixup_regs); i++) {\ndrivers/net/phy/microchip_t1s.c-371-\t\tret = phy_write_mmd(phydev, MDIO_MMD_VEND2,\ndrivers/net/phy/microchip_t1s.c:372:\t\t\t\t    lan865x_revb_sqi_fixup_regs[i],\ndrivers/net/phy/microchip_t1s.c:373:\t\t\t\t    lan865x_revb_sqi_fixup_values[i]);\ndrivers/net/phy/microchip_t1s.c-374-\t\tif (ret)\n--\ndrivers/net/phy/microchip_t1s.c=494=static int lan86xx_read_status(struct phy_device *phydev)\n--\ndrivers/net/phy/microchip_t1s.c-518- */\ndrivers/net/phy/microchip_t1s.c:519:static int lan865x_phy_read_mmd(struct phy_device *phydev, int devnum,\ndrivers/net/phy/microchip_t1s.c-520-\t\t\t\tu16 regnum)\n--\ndrivers/net/phy/microchip_t1s.c-527-\ndrivers/net/phy/microchip_t1s.c:528:static int lan865x_phy_write_mmd(struct phy_device *phydev, int devnum,\ndrivers/net/phy/microchip_t1s.c-529-\t\t\t\t u16 regnum, u16 val)\n--\ndrivers/net/phy/microchip_t1s.c=537=static struct phy_driver microchip_t1s_driver[] = {\n--\ndrivers/net/phy/microchip_t1s.c-584-\t\t.features           = PHY_BASIC_T1S_P2MP_FEATURES,\ndrivers/net/phy/microchip_t1s.c:585:\t\t.config_init        = lan865x_revb_config_init,\ndrivers/net/phy/microchip_t1s.c-586-\t\t.read_status        = lan86xx_read_status,\ndrivers/net/phy/microchip_t1s.c:587:\t\t.read_mmd           = lan865x_phy_read_mmd,\ndrivers/net/phy/microchip_t1s.c:588:\t\t.write_mmd          = lan865x_phy_write_mmd,\ndrivers/net/phy/microchip_t1s.c-589-\t\t.get_plca_cfg\t    = genphy_c45_plca_get_cfg,\n"
}

9/2 2026/06/27 01:29 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 17427
							output: 27
							thoughts: 88
						

Thoughts:
**Considering SPI Emulation in Syzkaller**

Okay, so I'm looking at how we can handle SPI devices within the Syzkaller environment. The current driver under scrutiny is `lan865x`, and it's an SPI driver, so I need to figure out how to emulate SPI communication effectively for testing. I'm wondering if there's a Syzkaller-native way to emulate SPI devices, similar to how it handles USB with `vhci` or PCI through mocking mechanisms. Hmm, I don't recall seeing a general, ready-to-use SPI emulator like those.

Hold on, wasn't there something… Let me double-check the `drivers/spi/` directory. Maybe I'm missing something, perhaps a module like `spi-mock` or the `spi-loopback-test` module? That could be a crucial component for my debugging and testing strategy. It's time to dig into the kernel source and refresh my memory.



10/2 2026/06/27 01:30 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "spi_mock",
  "PathPrefix": "drivers/spi/"
}

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

11/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 17763
							output: 33
							thoughts: 55
						

Thoughts:
Okay, let's see. My first thought is to dig into syzkaller and see if there's any existing SPI mocking infrastructure. I know syzkaller *generally* avoids direct fuzzing of SPI devices unless there's an indirect entry point. I'm thinking, are there any SPI mocks?

**Checking for Existing SPI Mocks and Leveraging Libraries**

Now, specifically, I'm thinking about the `oa_tc6` library. That's intriguing. Since it's a library, I wonder if it's utilized by other drivers within syzkaller's purview. If so, that could provide a pathway for indirect SPI fuzzing through those other drivers. Need to check its usage!



12/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "oa_tc6_init",
  "PathPrefix": "drivers/net/ethernet/"
}

Results:
{
  "Output": "drivers/net/ethernet/microchip/lan865x/lan865x.c=333=static int lan865x_probe(struct spi_device *spi)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-348-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:349:\tpriv-\u003etc6 = oa_tc6_init(spi, netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-350-\tif (!priv-\u003etc6) {\n--\ndrivers/net/ethernet/oa_tc6.c=1310=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1312-/**\ndrivers/net/ethernet/oa_tc6.c:1313: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1314- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1319- */\ndrivers/net/ethernet/oa_tc6.c:1320:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1321-{\n--\ndrivers/net/ethernet/oa_tc6.c-1424-}\ndrivers/net/ethernet/oa_tc6.c:1425:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1426-\n"
}

13/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 18473
							output: 29
							thoughts: 518
						

Thoughts:
**Reaching the LAN865x Code: A Fuzzing Feasibility Assessment**

Okay, so I'm looking at this patch and my initial thought is: this only touches the `lan865x` driver, and that's an SPI device, right? The inherent challenge is that SPI devices aren't typically instantiated in standard virtualized environments like QEMU unless there's a very specific SPI controller and device tree configuration. Syzkaller, in its standard configuration, doesn't usually set up random SPI devices like this.

My next thought is, does syzkaller have something like `syz_dev_spi`? No, I remember it has things for USB, 80211, etc., but not a general SPI device instantiation. Can we even *reach* this code at all? If the device isn't probed, then `oa_tc6_init` won't be called, and `oa_tc6_start_xmit` won't be registered. So, is there some other way to instantiate this, like through netlink or something similar? Nope, it's an SPI driver, so that avenue is closed.

Now I'm really starting to question if there's *any* chance of this being reachable. If it's an SPI driver, the default syzkaller setup generally won't instantiate it unless there's a virtual SPI bus that syzkaller can somehow use. I should really check syzkaller for SPI support.

Ah, syzkaller does have `dev_spidev`, which lets user-space talk to SPI devices, but it *doesn't* let you instantiate kernel SPI drivers. I need to be more careful here, wait a minute, device tree overlays! Maybe that's the way. Syzkaller can load device tree overlays to instantiate devices. But does syzkaller use device tree overlays for SPI devices? No, it looks like syzkaller doesn't do that for SPI devices in a generic way.

Okay, I'm starting to think I need to be very careful here. If I say `WorthFuzzing=false` just because it's an SPI device, is that *correct*?

Now I'm going back to the prompt, and it says: "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 (e.g., usb gadget, mac80211_hwsim)." Since this is an SPI Ethernet driver, and there's no software-emulated SPI hardware in the kernel that I'm aware of that will instantiate arbitrary SPI drivers (like `mac80211_hwsim` for wifi or `vhci` for USB), then it is impossible to reach in virtualized environments. I need to be absolutely sure. Wait, is there an SPI mock driver? Let's double check.



14/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "spi_register_driver",
  "PathPrefix": "drivers/spi/"
}

Results:
{
  "Output": "drivers/spi/spi-mem.c=1098=int spi_mem_driver_register_with_owner(struct spi_mem_driver *memdrv,\n--\ndrivers/spi/spi-mem.c-1104-\ndrivers/spi/spi-mem.c:1105:\treturn __spi_register_driver(owner, \u0026memdrv-\u003espidrv);\ndrivers/spi/spi-mem.c-1106-}\n--\ndrivers/spi/spi.c=462=EXPORT_SYMBOL_GPL(spi_bus_type);\n--\ndrivers/spi/spi.c-464-/**\ndrivers/spi/spi.c:465: * __spi_register_driver - register a SPI driver\ndrivers/spi/spi.c-466- * @owner: owner module of the driver to register\n--\ndrivers/spi/spi.c-471- */\ndrivers/spi/spi.c:472:int __spi_register_driver(struct module *owner, struct spi_driver *sdrv)\ndrivers/spi/spi.c-473-{\n--\ndrivers/spi/spi.c-514-}\ndrivers/spi/spi.c:515:EXPORT_SYMBOL_GPL(__spi_register_driver);\ndrivers/spi/spi.c-516-\n--\ndrivers/spi/spidev.c=861=static int __init spidev_init(void)\n--\ndrivers/spi/spidev.c-878-\ndrivers/spi/spidev.c:879:\tstatus = spi_register_driver(\u0026spidev_spi_driver);\ndrivers/spi/spidev.c-880-\tif (status \u003c 0) {\n"
}

15/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 20079
							output: 29
							thoughts: 7
						

Thoughts:
Okay, here's my attempt at summarizing that thought process, keeping in mind I'm speaking to a fellow expert:

**Investigating Virtual SPI Controller Options**

Alright, so I'm looking at this new setup, and I'm wondering if I can get away with a virtual SPI controller. No physical hardware needed, purely software emulation. The benefits are obvious: flexibility, potentially lower cost for certain applications, and maybe even easier integration during the design phase. But is there even such a thing as a *good* virtual SPI controller out there, one that's reliable enough for serious use? I need to dig into this – what are the options, what are their limitations, and can they handle the throughput and timing constraints I'm dealing with? This could be a game-changer if it pans out. Gotta do some research.



16/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "spi_register_controller",
  "PathPrefix": "drivers/spi/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 875 lines.\nUse more precise expression if possible.\n\ndrivers/spi/atmel-quadspi.c=1348=static int atmel_qspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/atmel-quadspi.c-1455-\ndrivers/spi/atmel-quadspi.c:1456:\terr = spi_register_controller(ctrl);\ndrivers/spi/atmel-quadspi.c-1457-\tif (err)\n--\ndrivers/spi/spi-airoha-snfi.c=1060=static int airoha_snand_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-airoha-snfi.c-1131-\ndrivers/spi/spi-airoha-snfi.c:1132:\treturn devm_spi_register_controller(dev, ctrl);\ndrivers/spi/spi-airoha-snfi.c-1133-}\n--\ndrivers/spi/spi-altera-dfl.c=124=static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)\n--\ndrivers/spi/spi-altera-dfl.c-160-\ndrivers/spi/spi-altera-dfl.c:161:\terr = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-altera-dfl.c-162-\tif (err)\n--\ndrivers/spi/spi-altera-platform.c=35=static int altera_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-altera-platform.c-113-\ndrivers/spi/spi-altera-platform.c:114:\terr = devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-altera-platform.c-115-\tif (err)\n--\ndrivers/spi/spi-amd.c=821=int amd_spi_probe_common(struct device *dev, struct spi_controller *host)\n--\ndrivers/spi/spi-amd.c-839-\t/* Register the controller with SPI framework */\ndrivers/spi/spi-amd.c:840:\terr = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-amd.c-841-\tif (err)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=326=static int amlogic_spifc_a1_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-368-\ndrivers/spi/spi-amlogic-spifc-a1.c:369:\tret = devm_spi_register_controller(spifc-\u003edev, ctrl);\ndrivers/spi/spi-amlogic-spifc-a1.c-370-\tif (ret)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=1093=static int aml_sfc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-1177-\ndrivers/spi/spi-amlogic-spifc-a4.c:1178:\treturn devm_spi_register_controller(dev, ctrl);\ndrivers/spi/spi-amlogic-spifc-a4.c-1179-}\n--\ndrivers/spi/spi-amlogic-spisg.c=712=static int aml_spisg_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-amlogic-spisg.c-799-\ndrivers/spi/spi-amlogic-spisg.c:800:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-amlogic-spisg.c-801-\tif (ret) {\n--\ndrivers/spi/spi-apple.c=457=static int apple_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-apple.c-504-\ndrivers/spi/spi-apple.c:505:\tret = devm_spi_register_controller(\u0026pdev-\u003edev, ctlr);\ndrivers/spi/spi-apple.c-506-\tif (ret \u003c 0)\ndrivers/spi/spi-apple.c:507:\t\treturn dev_err_probe(\u0026pdev-\u003edev, ret, \"devm_spi_register_controller failed\\n\");\ndrivers/spi/spi-apple.c-508-\n--\ndrivers/spi/spi-ar934x.c=165=static int ar934x_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-ar934x.c-207-\ndrivers/spi/spi-ar934x.c:208:\treturn spi_register_controller(ctlr);\ndrivers/spi/spi-ar934x.c-209-}\n--\ndrivers/spi/spi-armada-3700.c=813=static int a3700_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-armada-3700.c-874-\ndrivers/spi/spi-armada-3700.c:875:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-armada-3700.c-876-\tif (ret) {\n--\ndrivers/spi/spi-aspeed-smc.c=957=static int aspeed_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-aspeed-smc.c-1023-\ndrivers/spi/spi-aspeed-smc.c:1024:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-aspeed-smc.c-1025-\tif (ret)\ndrivers/spi/spi-aspeed-smc.c:1026:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-aspeed-smc.c-1027-\n--\ndrivers/spi/spi-at91-usart.c=476=static int at91_usart_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-at91-usart.c-554-\ndrivers/spi/spi-at91-usart.c:555:\tret = spi_register_controller(controller);\ndrivers/spi/spi-at91-usart.c-556-\tif (ret)\n--\ndrivers/spi/spi-atcspi200.c=546=static int atcspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-atcspi200.c-589-\ndrivers/spi/spi-atcspi200.c:590:\tret = devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-atcspi200.c-591-\tif (ret)\n--\ndrivers/spi/spi-atmel.c=1287=static int atmel_spi_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-atmel.c-1303-\ndrivers/spi/spi-atmel.c:1304:\t/* Setup() is called during spi_register_controller(aka\ndrivers/spi/spi-atmel.c-1305-\t * spi_register_master) but after all membmers of the cs_gpiod\n--\ndrivers/spi/spi-atmel.c=1550=static int atmel_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-atmel.c-1668-\ndrivers/spi/spi-atmel.c:1669:\tret = spi_register_controller(host);\ndrivers/spi/spi-atmel.c-1670-\tif (ret)\n--\ndrivers/spi/spi-axi-spi-engine.c=1104=static int spi_engine_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-axi-spi-engine.c-1239-\ndrivers/spi/spi-axi-spi-engine.c:1240:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-axi-spi-engine.c-1241-}\n--\ndrivers/spi/spi-axiado.c=752=static int ax_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-axiado.c-846-\ndrivers/spi/spi-axiado.c:847:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-axiado.c-848-\tif (ret) {\ndrivers/spi/spi-axiado.c:849:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-axiado.c-850-\t\tgoto err_disable_rpm;\n--\ndrivers/spi/spi-bcm-qspi.c=1482=int bcm_qspi_probe(struct platform_device *pdev,\n--\ndrivers/spi/spi-bcm-qspi.c-1659-\ndrivers/spi/spi-bcm-qspi.c:1660:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcm-qspi.c-1661-\tif (ret \u003c 0) {\n--\ndrivers/spi/spi-bcm2835.c=1349=static int bcm2835_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm2835.c-1406-\ndrivers/spi/spi-bcm2835.c:1407:\terr = spi_register_controller(ctlr);\ndrivers/spi/spi-bcm2835.c-1408-\tif (err) {\n--\ndrivers/spi/spi-bcm2835aux.c=474=static int bcm2835aux_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm2835aux.c-543-\ndrivers/spi/spi-bcm2835aux.c:544:\terr = spi_register_controller(host);\ndrivers/spi/spi-bcm2835aux.c-545-\tif (err) {\n--\ndrivers/spi/spi-bcm63xx-hsspi.c=742=static int bcm63xx_hsspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-857-\t/* register and we are done */\ndrivers/spi/spi-bcm63xx-hsspi.c:858:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcm63xx-hsspi.c-859-\tif (ret)\n--\ndrivers/spi/spi-bcm63xx.c=491=static int bcm63xx_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm63xx.c-599-\t/* register and we are done */\ndrivers/spi/spi-bcm63xx.c:600:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcm63xx.c-601-\tif (ret) {\n--\ndrivers/spi/spi-bcmbca-hsspi.c=432=static int bcmbca_hsspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcmbca-hsspi.c-540-\t/* register and we are done */\ndrivers/spi/spi-bcmbca-hsspi.c:541:\tret = spi_register_controller(host);\ndrivers/spi/spi-bcmbca-hsspi.c-542-\tif (ret)\n--\ndrivers/spi/spi-bitbang.c=424=int spi_bitbang_start(struct spi_bitbang *bitbang)\n--\ndrivers/spi/spi-bitbang.c-435-\t */\ndrivers/spi/spi-bitbang.c:436:\treturn spi_register_controller(ctlr);\ndrivers/spi/spi-bitbang.c-437-}\n--\ndrivers/spi/spi-cadence-quadspi.c=1781=static int cqspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cadence-quadspi.c-1974-\ndrivers/spi/spi-cadence-quadspi.c:1975:\tret = spi_register_controller(host);\ndrivers/spi/spi-cadence-quadspi.c-1976-\tif (ret) {\n--\ndrivers/spi/spi-cadence-xspi.c=1174=static int cdns_xspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cadence-xspi.c-1287-\ndrivers/spi/spi-cadence-xspi.c:1288:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-cadence-xspi.c-1289-\tif (ret) {\n--\ndrivers/spi/spi-cadence.c=636=static int cdns_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cadence.c-742-\t}\ndrivers/spi/spi-cadence.c:743:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-cadence.c-744-\tif (ret) {\ndrivers/spi/spi-cadence.c:745:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-cadence.c-746-\t\tgoto err_disable_rpm;\n--\ndrivers/spi/spi-cavium-octeon.c=19=static int octeon_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cavium-octeon.c-54-\ndrivers/spi/spi-cavium-octeon.c:55:\terr = spi_register_controller(host);\ndrivers/spi/spi-cavium-octeon.c-56-\tif (err) {\n--\ndrivers/spi/spi-cavium-thunderx.c=19=static int thunderx_spi_probe(struct pci_dev *pdev,\n--\ndrivers/spi/spi-cavium-thunderx.c-68-\ndrivers/spi/spi-cavium-thunderx.c:69:\treturn spi_register_controller(host);\ndrivers/spi/spi-cavium-thunderx.c-70-}\n--\ndrivers/spi/spi-ch341.c=141=static int ch341_probe(struct usb_interface *intf,\n--\ndrivers/spi/spi-ch341.c-202-\ndrivers/spi/spi-ch341.c:203:\tret = spi_register_controller(ctrl);\ndrivers/spi/spi-ch341.c-204-\tif (ret)\n--\ndrivers/spi/spi-clps711x.c=91=static int spi_clps711x_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-clps711x.c-137-\ndrivers/spi/spi-clps711x.c:138:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-clps711x.c-139-}\n--\ndrivers/spi/spi-coldfire-qspi.c=338=static int mcfqspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-coldfire-qspi.c-406-\ndrivers/spi/spi-coldfire-qspi.c:407:\tstatus = spi_register_controller(host);\ndrivers/spi/spi-coldfire-qspi.c-408-\tif (status) {\n--\ndrivers/spi/spi-cs42l43.c=313=static int cs42l43_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cs42l43.c-410-\ndrivers/spi/spi-cs42l43.c:411:\tret = devm_spi_register_controller(priv-\u003edev, priv-\u003ectlr);\ndrivers/spi/spi-cs42l43.c-412-\tif (ret)\n--\ndrivers/spi/spi-dln2.c=680=static int dln2_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-dln2.c-758-\ndrivers/spi/spi-dln2.c:759:\tret = spi_register_controller(host);\ndrivers/spi/spi-dln2.c-760-\tif (ret \u003c 0) {\n--\ndrivers/spi/spi-dw-core.c=923=int dw_spi_add_controller(struct device *dev, struct dw_spi *dws)\n--\ndrivers/spi/spi-dw-core.c-1003-\ndrivers/spi/spi-dw-core.c:1004:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-dw-core.c-1005-\tif (ret) {\n--\ndrivers/spi/spi-ep93xx.c=623=static int ep93xx_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-ep93xx.c-692-\ndrivers/spi/spi-ep93xx.c:693:\terror = spi_register_controller(host);\ndrivers/spi/spi-ep93xx.c-694-\tif (error) {\n--\ndrivers/spi/spi-falcon.c=391=static int falcon_sflash_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-falcon.c-407-\ndrivers/spi/spi-falcon.c:408:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-falcon.c-409-}\n--\ndrivers/spi/spi-fsi.c=531=static int fsi_spi_probe(struct fsi_device *fsi)\n--\ndrivers/spi/spi-fsi.c-571-\ndrivers/spi/spi-fsi.c:572:\t\trc = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-fsi.c-573-\t\tif (rc)\n--\ndrivers/spi/spi-fsl-dspi.c=1528=static int dspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-fsl-dspi.c-1680-\ndrivers/spi/spi-fsl-dspi.c:1681:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-fsl-dspi.c-1682-\tif (ret != 0) {\n--\ndrivers/spi/spi-fsl-espi.c=663=static int fsl_espi_probe(struct device *dev, struct resource *mem,\n--\ndrivers/spi/spi-fsl-espi.c-717-\ndrivers/spi/spi-fsl-espi.c:718:\tret = spi_register_controller(host);\ndrivers/spi/spi-fsl-espi.c-719-\tif (ret \u003c 0)\n--\ndrivers/spi/spi-fsl-lpspi.c=892=static int fsl_lpspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-fsl-lpspi.c-1003-\ndrivers/spi/spi-fsl-lpspi.c:1004:\tret = spi_register_controller(controller);\ndrivers/spi/spi-fsl-lpspi.c-1005-\tif (ret \u003c 0) {\ndrivers/spi/spi-fsl-lpspi.c:1006:\t\tdev_err_probe(\u0026pdev-\u003edev, ret, \"spi_register_controller error\\n\");\ndrivers/spi/spi-fsl-lpspi.c-1007-\t\tgoto free_dma;\n--\ndrivers/spi/spi-fsl-qspi.c=894=static int fsl_qspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-fsl-qspi.c-988-\ndrivers/spi/spi-fsl-qspi.c:989:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-fsl-qspi.c-990-\tif (ret)\n--\ndrivers/spi/spi-fsl-spi.c=528=static struct spi_controller *fsl_spi_probe(struct device *dev,\n--\ndrivers/spi/spi-fsl-spi.c-616-\ndrivers/spi/spi-fsl-spi.c:617:\tret = spi_register_controller(host);\ndrivers/spi/spi-fsl-spi.c-618-\tif (ret \u003c 0)\n--\ndrivers/spi/spi-geni-qcom.c=1042=static int spi_geni_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-geni-qcom.c-1149-\ndrivers/spi/spi-geni-qcom.c:1150:\treturn devm_spi_register_controller(dev, spi);\ndrivers/spi/spi-geni-qcom.c-1151-}\n--\ndrivers/spi/spi-gpio.c=340=static int spi_gpio_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-gpio.c-413-\ndrivers/spi/spi-gpio.c:414:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-gpio.c-415-}\n--\ndrivers/spi/spi-gxp.c=250=static int gxp_spifi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-gxp.c-287-\ndrivers/spi/spi-gxp.c:288:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-gxp.c-289-\tif (ret) {\n--\ndrivers/spi/spi-hisi-kunpeng.c=461=static int hisi_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-hisi-kunpeng.c-523-\ndrivers/spi/spi-hisi-kunpeng.c:524:\tret = spi_register_controller(host);\ndrivers/spi/spi-hisi-kunpeng.c-525-\tif (ret)\n--\ndrivers/spi/spi-hisi-sfc-v3xx.c=431=static int hisi_sfc_v3xx_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-hisi-sfc-v3xx.c-497-\ndrivers/spi/spi-hisi-sfc-v3xx.c:498:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-hisi-sfc-v3xx.c-499-\tif (ret)\n--\ndrivers/spi/spi-img-spfi.c=525=static int img_spfi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-img-spfi.c-641-\ndrivers/spi/spi-img-spfi.c:642:\tret = spi_register_controller(host);\ndrivers/spi/spi-img-spfi.c-643-\tif (ret)\n--\ndrivers/spi/spi-imx.c=2218=static int spi_imx_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-imx.c-2358-\ndrivers/spi/spi-imx.c:2359:\tret = spi_register_controller(controller);\ndrivers/spi/spi-imx.c-2360-\tif (ret) {\n--\ndrivers/spi/spi-ingenic.c=383=static int spi_ingenic_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-ingenic.c-454-\ndrivers/spi/spi-ingenic.c:455:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-ingenic.c-456-\tif (ret)\n--\ndrivers/spi/spi-intel.c=1489=int intel_spi_probe(struct device *dev, void __iomem *base,\n--\ndrivers/spi/spi-intel.c-1512-\ndrivers/spi/spi-intel.c:1513:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-intel.c-1514-\tif (ret)\n--\ndrivers/spi/spi-jcore.c=141=static int jcore_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-jcore.c-201-\t/* Register our spi controller */\ndrivers/spi/spi-jcore.c:202:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-jcore.c-203-}\n--\ndrivers/spi/spi-kspi2.c=338=static int kspi2_probe(struct auxiliary_device *auxdev,\n--\ndrivers/spi/spi-kspi2.c-392-\thost-\u003etransfer_one = kspi2_transfer_one;\ndrivers/spi/spi-kspi2.c:393:\tret = devm_spi_register_controller(dev, host);\ndrivers/spi/spi-kspi2.c-394-\tif (ret) {\n--\ndrivers/spi/spi-lantiq-ssc.c=904=static int lantiq_ssc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-lantiq-ssc.c-990-\ndrivers/spi/spi-lantiq-ssc.c:991:\terr = spi_register_controller(host);\ndrivers/spi/spi-lantiq-ssc.c-992-\tif (err) {\n--\ndrivers/spi/spi-ljca.c=218=static int ljca_spi_probe(struct auxiliary_device *auxdev,\n--\ndrivers/spi/spi-ljca.c-242-\ndrivers/spi/spi-ljca.c:243:\tret = spi_register_controller(controller);\ndrivers/spi/spi-ljca.c-244-\tif (ret)\n--\ndrivers/spi/spi-loongson-core.c=196=int loongson_spi_init_controller(struct device *dev, void __iomem *regs)\n--\ndrivers/spi/spi-loongson-core.c-227-\ndrivers/spi/spi-loongson-core.c:228:\treturn devm_spi_register_controller(dev, controller);\ndrivers/spi/spi-loongson-core.c-229-}\n--\ndrivers/spi/spi-lp8841-rtc.c=182=spi_lp8841_rtc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-lp8841-rtc.c-212-\t/* register with the SPI framework */\ndrivers/spi/spi-lp8841-rtc.c:213:\tret = devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-lp8841-rtc.c-214-\tif (ret) {\n--\ndrivers/spi/spi-meson-spicc.c=978=static int meson_spicc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-meson-spicc.c-1074-\ndrivers/spi/spi-meson-spicc.c:1075:\tret = spi_register_controller(host);\ndrivers/spi/spi-meson-spicc.c-1076-\tif (ret) {\n--\ndrivers/spi/spi-meson-spifc.c=285=static int meson_spifc_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-meson-spifc.c-330-\ndrivers/spi/spi-meson-spifc.c:331:\tret = devm_spi_register_controller(spifc-\u003edev, host);\ndrivers/spi/spi-meson-spifc.c-332-\tif (ret) {\n--\ndrivers/spi/spi-microchip-core-qspi.c=719=static int mchp_coreqspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-microchip-core-qspi.c-792-\ndrivers/spi/spi-microchip-core-qspi.c:793:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-microchip-core-qspi.c-794-\tif (ret)\ndrivers/spi/spi-microchip-core-qspi.c-795-\t\treturn dev_err_probe(\u0026pdev-\u003edev, ret,\ndrivers/spi/spi-microchip-core-qspi.c:796:\t\t\t\t     \"spi_register_controller failed\\n\");\ndrivers/spi/spi-microchip-core-qspi.c-797-\n--\ndrivers/spi/spi-microchip-core-spi.c=287=static int mchp_corespi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-microchip-core-spi.c-386-\ndrivers/spi/spi-microchip-core-spi.c:387:\tret = spi_register_controller(host);\ndrivers/spi/spi-microchip-core-spi.c-388-\tif (ret) {\n--\ndrivers/spi/spi-mpc512x-psc.c=458=static int mpc512x_psc_spi_of_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mpc512x-psc.c-513-\ndrivers/spi/spi-mpc512x-psc.c:514:\treturn devm_spi_register_controller(dev, host);\ndrivers/spi/spi-mpc512x-psc.c-515-}\n--\ndrivers/spi/spi-mpc52xx-psc.c=294=static int mpc52xx_psc_spi_of_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mpc52xx-psc.c-343-\ndrivers/spi/spi-mpc52xx-psc.c:344:\treturn devm_spi_register_controller(dev, host);\ndrivers/spi/spi-mpc52xx-psc.c-345-}\n--\ndrivers/spi/spi-mpc52xx.c=387=static int mpc52xx_spi_probe(struct platform_device *op)\n--\ndrivers/spi/spi-mpc52xx.c-492-\tdev_dbg(\u0026op-\u003edev, \"registering spi_controller struct\\n\");\ndrivers/spi/spi-mpc52xx.c:493:\trc = spi_register_controller(host);\ndrivers/spi/spi-mpc52xx.c-494-\tif (rc)\n--\ndrivers/spi/spi-mpfs.c=527=static int mpfs_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mpfs.c-576-\ndrivers/spi/spi-mpfs.c:577:\tret = spi_register_controller(host);\ndrivers/spi/spi-mpfs.c-578-\tif (ret) {\n--\ndrivers/spi/spi-mt65xx.c=1175=static int mtk_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mt65xx.c-1327-\ndrivers/spi/spi-mt65xx.c:1328:\tret = spi_register_controller(host);\ndrivers/spi/spi-mt65xx.c-1329-\tif (ret) {\n--\ndrivers/spi/spi-mt7621.c=316=static int mt7621_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mt7621.c-369-\ndrivers/spi/spi-mt7621.c:370:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-mt7621.c-371-}\n--\ndrivers/spi/spi-mtk-nor.c=810=static int mtk_nor_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mtk-nor.c-915-\ndrivers/spi/spi-mtk-nor.c:916:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-mtk-nor.c-917-\tif (ret \u003c 0)\n--\ndrivers/spi/spi-mtk-snfi.c=1338=static int mtk_snand_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mtk-snfi.c-1464-\tctlr-\u003emode_bits = SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_DUAL | SPI_TX_QUAD;\ndrivers/spi/spi-mtk-snfi.c:1465:\tret = spi_register_controller(ctlr);\ndrivers/spi/spi-mtk-snfi.c-1466-\tif (ret) {\ndrivers/spi/spi-mtk-snfi.c:1467:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed.\\n\");\ndrivers/spi/spi-mtk-snfi.c-1468-\t\tgoto free_buf;\n--\ndrivers/spi/spi-mux.c=126=static int spi_mux_probe(struct spi_device *spi)\n--\ndrivers/spi/spi-mux.c-164-\ndrivers/spi/spi-mux.c:165:\treturn devm_spi_register_controller(\u0026spi-\u003edev, ctlr);\ndrivers/spi/spi-mux.c-166-}\n--\ndrivers/spi/spi-mxic.c=755=static int mxic_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mxic.c-819-\ndrivers/spi/spi-mxic.c:820:\tret = spi_register_controller(host);\ndrivers/spi/spi-mxic.c-821-\tif (ret) {\ndrivers/spi/spi-mxic.c:822:\t\tdev_err(\u0026pdev-\u003edev, \"spi_register_controller failed\\n\");\ndrivers/spi/spi-mxic.c-823-\t\tpm_runtime_disable(\u0026pdev-\u003edev);\n--\ndrivers/spi/spi-mxs.c=528=static int mxs_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-mxs.c-620-\ndrivers/spi/spi-mxs.c:621:\tret = spi_register_controller(host);\ndrivers/spi/spi-mxs.c-622-\tif (ret) {\n--\ndrivers/spi/spi-npcm-fiu.c=689=static int npcm_fiu_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-npcm-fiu.c-746-\ndrivers/spi/spi-npcm-fiu.c:747:\treturn devm_spi_register_controller(dev, ctrl);\ndrivers/spi/spi-npcm-fiu.c-748-}\n--\ndrivers/spi/spi-npcm-pspi.c=340=static int npcm_pspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-npcm-pspi.c-412-\ndrivers/spi/spi-npcm-pspi.c:413:\tret = spi_register_controller(host);\ndrivers/spi/spi-npcm-pspi.c-414-\tif (ret)\n--\ndrivers/spi/spi-nxp-fspi.c=1286=static int nxp_fspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-nxp-fspi.c-1390-\ndrivers/spi/spi-nxp-fspi.c:1391:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, ctlr);\ndrivers/spi/spi-nxp-fspi.c-1392-}\n--\ndrivers/spi/spi-nxp-xspi.c=1208=static int nxp_xspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-nxp-xspi.c-1290-\ndrivers/spi/spi-nxp-xspi.c:1291:\treturn devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-nxp-xspi.c-1292-}\n--\ndrivers/spi/spi-omap2-mcspi.c=1474=static int omap2_mcspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-omap2-mcspi.c-1589-\ndrivers/spi/spi-omap2-mcspi.c:1590:\tstatus = spi_register_controller(ctlr);\ndrivers/spi/spi-omap2-mcspi.c-1591-\tif (status \u003c 0)\n--\ndrivers/spi/spi-orion.c=644=static int orion_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-orion.c-778-\ndrivers/spi/spi-orion.c:779:\tstatus = spi_register_controller(host);\ndrivers/spi/spi-orion.c-780-\tif (status \u003c 0)\n--\ndrivers/spi/spi-pci1xxxx.c=800=static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n--\ndrivers/spi/spi-pci1xxxx.c-931-\t\tspi_controller_set_devdata(spi_host, spi_sub_ptr);\n\n"
}

17/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 30332
							output: 25
							thoughts: 131
						

Thoughts:
**My Search for a Dummy SPI Controller**

Okay, so I'm looking for a way to simulate an SPI controller and devices within the kernel, something that lets user-space create virtual SPI devices. I'm drawing a blank on anything named `spi-mock` or `spi-loopback` that actually *registers* a controller. Hmm... what about that `spi-loopback-test.c` driver? Ah, no, that's just a *device* for testing, not a controller itself. It wouldn't let user-space drive it like a real controller.

Let's see... I'm familiar with `mac80211_hwsim`, that is for WiFi simulation. Not the right track. And `dummy_hcd`? USB. Definitely not what I need. So... I really need a *dummy* SPI controller. Does one even exist? Time to dig around. I'll need to look closely at `drivers/spi/spi-loopback-test.c` and similar files. Hopefully, there is something there that I've missed.



18/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "dummy",
  "PathPrefix": "drivers/spi/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1674 lines.\nUse more precise expression if possible.\n\ndrivers/spi/atmel-quadspi.c=480=static bool atmel_qspi_supports_op(struct spi_mem *mem,\n--\ndrivers/spi/atmel-quadspi.c-498-\tif (op-\u003eaddr.nbytes == 2 \u0026\u0026 op-\u003ecmd.buswidth != op-\u003eaddr.buswidth \u0026\u0026\ndrivers/spi/atmel-quadspi.c:499:\t    op-\u003edummy.nbytes == 0)\ndrivers/spi/atmel-quadspi.c-500-\t\treturn false;\n--\ndrivers/spi/atmel-quadspi.c=524=static int atmel_qspi_set_cfg(struct atmel_qspi *aq,\n--\ndrivers/spi/atmel-quadspi.c-527-\tu32 iar, icr, ifr;\ndrivers/spi/atmel-quadspi.c:528:\tu32 dummy_cycles = 0;\ndrivers/spi/atmel-quadspi.c-529-\tint mode;\n--\ndrivers/spi/atmel-quadspi.c-539-\ndrivers/spi/atmel-quadspi.c:540:\tif (op-\u003edummy.nbytes)\ndrivers/spi/atmel-quadspi.c:541:\t\tdummy_cycles = op-\u003edummy.nbytes * 8 / op-\u003edummy.buswidth;\ndrivers/spi/atmel-quadspi.c-542-\n--\ndrivers/spi/atmel-quadspi.c-546-\t * the option field. For the 16-bit addresses, the workaround depends\ndrivers/spi/atmel-quadspi.c:547:\t * of the number of requested dummy bits. If there are 8 or more dummy\ndrivers/spi/atmel-quadspi.c:548:\t * cycles, the address is shifted and sent with the first dummy byte.\ndrivers/spi/atmel-quadspi.c-549-\t * Otherwise opcode is disabled and the first byte of the address\n--\ndrivers/spi/atmel-quadspi.c-551-\t * use the same buswidth). The limitation is when the 16-bit address is\ndrivers/spi/atmel-quadspi.c:552:\t * used without enough dummy cycles and the opcode is using a different\ndrivers/spi/atmel-quadspi.c-553-\t * buswidth than the address.\n--\ndrivers/spi/atmel-quadspi.c-563-\t\tcase 2:\ndrivers/spi/atmel-quadspi.c:564:\t\t\tif (dummy_cycles \u003c 8 / op-\u003eaddr.buswidth) {\ndrivers/spi/atmel-quadspi.c-565-\t\t\t\tifr \u0026= ~QSPI_IFR_INSTEN;\n--\ndrivers/spi/atmel-quadspi.c-571-\t\t\t\tiar = (op-\u003eaddr.val \u003c\u003c 8) \u0026 0xffffff;\ndrivers/spi/atmel-quadspi.c:572:\t\t\t\tdummy_cycles -= 8 / op-\u003eaddr.buswidth;\ndrivers/spi/atmel-quadspi.c-573-\t\t\t}\n--\ndrivers/spi/atmel-quadspi.c-590-\ndrivers/spi/atmel-quadspi.c:591:\t/* Set number of dummy cycles */\ndrivers/spi/atmel-quadspi.c:592:\tif (dummy_cycles)\ndrivers/spi/atmel-quadspi.c:593:\t\tifr |= QSPI_IFR_NBDUM(dummy_cycles);\ndrivers/spi/atmel-quadspi.c-594-\n--\ndrivers/spi/atmel-quadspi.c=688=static int atmel_qspi_sama7g5_set_cfg(struct atmel_qspi *aq,\n--\ndrivers/spi/atmel-quadspi.c-702-\ndrivers/spi/atmel-quadspi.c:703:\tif (op-\u003edummy.buswidth \u0026\u0026 op-\u003edummy.nbytes) {\ndrivers/spi/atmel-quadspi.c:704:\t\tif (op-\u003eaddr.dtr \u0026\u0026 op-\u003edummy.dtr \u0026\u0026 op-\u003edata.dtr)\ndrivers/spi/atmel-quadspi.c:705:\t\t\tifr |= QSPI_IFR_NBDUM(op-\u003edummy.nbytes * 8 /\ndrivers/spi/atmel-quadspi.c:706:\t\t\t\t\t      (2 * op-\u003edummy.buswidth));\ndrivers/spi/atmel-quadspi.c-707-\t\telse\ndrivers/spi/atmel-quadspi.c:708:\t\t\tifr |= QSPI_IFR_NBDUM(op-\u003edummy.nbytes * 8 /\ndrivers/spi/atmel-quadspi.c:709:\t\t\t\t\t      op-\u003edummy.buswidth);\ndrivers/spi/atmel-quadspi.c-710-\t}\n--\ndrivers/spi/atmel-quadspi.c-717-\ndrivers/spi/atmel-quadspi.c:718:\tif (op-\u003eaddr.dtr \u0026\u0026 op-\u003edummy.dtr \u0026\u0026 op-\u003edata.dtr) {\ndrivers/spi/atmel-quadspi.c-719-\t\tifr |= QSPI_IFR_DDREN;\n--\ndrivers/spi/spi-airoha-snfi.c=486=static bool airoha_snand_is_page_ops(const struct spi_mem_op *op)\n--\ndrivers/spi/spi-airoha-snfi.c-496-\tcase SPI_MEM_DATA_IN:\ndrivers/spi/spi-airoha-snfi.c:497:\t\tif (op-\u003edummy.nbytes * BITS_PER_BYTE / op-\u003edummy.buswidth \u003e 0xf)\ndrivers/spi/spi-airoha-snfi.c-498-\t\t\treturn false;\n--\ndrivers/spi/spi-airoha-snfi.c-510-\tcase SPI_MEM_DATA_OUT:\ndrivers/spi/spi-airoha-snfi.c:511:\t\treturn !op-\u003edummy.nbytes \u0026\u0026 op-\u003eaddr.buswidth == 1 \u0026\u0026\ndrivers/spi/spi-airoha-snfi.c-512-\t\t       (op-\u003edata.buswidth == 4 || op-\u003edata.buswidth == 1);\n--\ndrivers/spi/spi-airoha-snfi.c=518=static bool airoha_snand_supports_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-airoha-snfi.c-530-\treturn (!op-\u003eaddr.nbytes || op-\u003eaddr.buswidth == 1) \u0026\u0026\ndrivers/spi/spi-airoha-snfi.c:531:\t       (!op-\u003edummy.nbytes || op-\u003edummy.buswidth == 1) \u0026\u0026\ndrivers/spi/spi-airoha-snfi.c-532-\t       (!op-\u003edata.nbytes || op-\u003edata.buswidth == 1);\n--\ndrivers/spi/spi-airoha-snfi.c=932=static int airoha_snand_exec_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-airoha-snfi.c-935-\tstruct airoha_snand_ctrl *as_ctrl;\ndrivers/spi/spi-airoha-snfi.c:936:\tint op_len, addr_len, dummy_len;\ndrivers/spi/spi-airoha-snfi.c-937-\tu8 buf[20], *data;\n--\ndrivers/spi/spi-airoha-snfi.c-943-\taddr_len = op-\u003eaddr.nbytes;\ndrivers/spi/spi-airoha-snfi.c:944:\tdummy_len = op-\u003edummy.nbytes;\ndrivers/spi/spi-airoha-snfi.c-945-\ndrivers/spi/spi-airoha-snfi.c:946:\tif (op_len + dummy_len + addr_len \u003e sizeof(buf))\ndrivers/spi/spi-airoha-snfi.c-947-\t\treturn -EIO;\n--\ndrivers/spi/spi-airoha-snfi.c-953-\t\t*data++ = op-\u003eaddr.val \u003e\u003e (8 * (addr_len - i - 1));\ndrivers/spi/spi-airoha-snfi.c:954:\tfor (i = 0; i \u003c dummy_len; i++)\ndrivers/spi/spi-airoha-snfi.c-955-\t\t*data++ = 0xff;\n--\ndrivers/spi/spi-airoha-snfi.c-981-\ndrivers/spi/spi-airoha-snfi.c:982:\t/* dummy */\ndrivers/spi/spi-airoha-snfi.c-983-\tdata += addr_len;\ndrivers/spi/spi-airoha-snfi.c:984:\tif (dummy_len) {\ndrivers/spi/spi-airoha-snfi.c:985:\t\terr = airoha_snand_write_data(as_ctrl, data, dummy_len,\ndrivers/spi/spi-airoha-snfi.c:986:\t\t\t\t\t      op-\u003edummy.buswidth);\ndrivers/spi/spi-airoha-snfi.c-987-\t\tif (err)\n--\ndrivers/spi/spi-amd.c=541=static void amd_spi_mem_data_out(struct amd_spi *amd_spi,\n--\ndrivers/spi/spi-amd.c-585-\t\tfor (i = 0; left_data \u003e= 8; i++, left_data -= 8)\ndrivers/spi/spi-amd.c:586:\t\t\tamd_spi_writereg64(amd_spi, base_addr + op-\u003edummy.nbytes + (i * 8),\ndrivers/spi/spi-amd.c-587-\t\t\t\t\t   *buf_64++);\n--\ndrivers/spi/spi-amd.c-591-\t\t\tamd_spi_writereg8(amd_spi,\ndrivers/spi/spi-amd.c:592:\t\t\t\t\t  base_addr + op-\u003edummy.nbytes + nbytes + i - left_data,\ndrivers/spi/spi-amd.c-593-\t\t\t\t\t  buf[i]);\n--\ndrivers/spi/spi-amd.c=603=static void amd_spi_hiddma_read(struct amd_spi *amd_spi, const struct spi_mem_op *op)\n--\ndrivers/spi/spi-amd.c-620-\ndrivers/spi/spi-amd.c:621:\t/* Configure dummy clock cycles for fast read, dual, quad I/O commands */\ndrivers/spi/spi-amd.c-622-\thid_regval = amd_spi_readreg32(amd_spi, AMD_SPI_HID2_READ_CNTRL2);\ndrivers/spi/spi-amd.c:623:\t/* Fast read dummy cycle */\ndrivers/spi/spi-amd.c-624-\thid_regval \u0026= ~GENMASK(4, 0);\ndrivers/spi/spi-amd.c-625-\ndrivers/spi/spi-amd.c:626:\t/* Fast read Dual I/O dummy cycle */\ndrivers/spi/spi-amd.c-627-\thid_regval \u0026= ~GENMASK(12, 8);\ndrivers/spi/spi-amd.c-628-\ndrivers/spi/spi-amd.c:629:\t/* Fast read Quad I/O dummy cycle */\ndrivers/spi/spi-amd.c-630-\thid_regval = (hid_regval \u0026 ~GENMASK(20, 16)) | BIT(17);\n--\ndrivers/spi/spi-amd.c=661=static void amd_spi_mem_data_in(struct amd_spi *amd_spi,\n--\ndrivers/spi/spi-amd.c-699-\t\tamd_spi_set_addr(amd_spi, op);\ndrivers/spi/spi-amd.c:700:\t\tamd_spi_set_tx_count(amd_spi, op-\u003eaddr.nbytes + op-\u003edummy.nbytes);\ndrivers/spi/spi-amd.c-701-\ndrivers/spi/spi-amd.c:702:\t\tfor (i = 0; i \u003c op-\u003edummy.nbytes; i++)\ndrivers/spi/spi-amd.c-703-\t\t\tamd_spi_writereg8(amd_spi, (base_addr + i), 0xff);\n--\ndrivers/spi/spi-amd.c-710-\t\tfor (i = 0; left_data \u003e= 8; i++, left_data -= 8)\ndrivers/spi/spi-amd.c:711:\t\t\t*buf_64++ = amd_spi_readreg64(amd_spi, base_addr + op-\u003edummy.nbytes +\ndrivers/spi/spi-amd.c-712-\t\t\t\t\t\t      (i * 8));\n--\ndrivers/spi/spi-amd.c-715-\t\tfor (i = 0; i \u003c left_data; i++)\ndrivers/spi/spi-amd.c:716:\t\t\tbuf[i] = amd_spi_readreg8(amd_spi, base_addr + op-\u003edummy.nbytes +\ndrivers/spi/spi-amd.c-717-\t\t\t\t\t\t  nbytes + i - left_data);\n--\ndrivers/spi/spi-amd.c=791=static int amd_spi_setup_hiddma(struct amd_spi *amd_spi, struct device *dev)\n--\ndrivers/spi/spi-amd.c-795-\t/* Allocate DMA buffer to use for HID basic read and write operations. For write\ndrivers/spi/spi-amd.c:796:\t * operations, the DMA buffer should include the opcode, address bytes and dummy\ndrivers/spi/spi-amd.c-797-\t * bytes(if any) in addition to the data bytes. Additionally, the hardware requires\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-91-\tSPIFC_A1_USER_DUMMY_ENABLE | \\\ndrivers/spi/spi-amlogic-spifc-a1.c:92:\tFIELD_PREP(SPIFC_A1_USER_DUMMY_MODE, ilog2((op)-\u003edummy.buswidth)) | \\\ndrivers/spi/spi-amlogic-spifc-a1.c:93:\tFIELD_PREP(SPIFC_A1_USER_DUMMY_CLK_SYCLES, (op)-\u003edummy.nbytes \u003c\u003c 3))\ndrivers/spi/spi-amlogic-spifc-a1.c-94-\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=180=static void amlogic_spifc_a1_set_addr(struct amlogic_spifc_a1 *spifc, u32 addr,\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-192-\ndrivers/spi/spi-amlogic-spifc-a1.c:193:static void amlogic_spifc_a1_set_dummy(struct amlogic_spifc_a1 *spifc,\ndrivers/spi/spi-amlogic-spifc-a1.c:194:\t\t\t\t       u32 dummy_cfg)\ndrivers/spi/spi-amlogic-spifc-a1.c-195-{\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-198-\tval \u0026= ~(SPIFC_A1_USER_DUMMY_MODE | SPIFC_A1_USER_DUMMY_CLK_SYCLES);\ndrivers/spi/spi-amlogic-spifc-a1.c:199:\tval |= dummy_cfg;\ndrivers/spi/spi-amlogic-spifc-a1.c-200-\twritel(val, spifc-\u003ebase + SPIFC_A1_USER_CTRL2_REG);\n--\ndrivers/spi/spi-amlogic-spifc-a1.c=253=static int amlogic_spifc_a1_exec_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-amlogic-spifc-a1.c-271-\ndrivers/spi/spi-amlogic-spifc-a1.c:272:\tif (op-\u003edummy.nbytes)\ndrivers/spi/spi-amlogic-spifc-a1.c:273:\t\tamlogic_spifc_a1_set_dummy(spifc, SPIFC_A1_USER_DUMMY(op));\ndrivers/spi/spi-amlogic-spifc-a1.c-274-\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=337=static bool aml_sfc_is_xio_op(const struct spi_mem_op *op)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-350-\ndrivers/spi/spi-amlogic-spifc-a4.c:351:static int aml_sfc_send_cmd_addr_dummy(struct aml_sfc *sfc, const struct spi_mem_op *op)\ndrivers/spi/spi-amlogic-spifc-a4.c-352-{\ndrivers/spi/spi-amlogic-spifc-a4.c:353:\tu32 dummy_cycle, cmd;\ndrivers/spi/spi-amlogic-spifc-a4.c-354-\tint ret;\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-363-\ndrivers/spi/spi-amlogic-spifc-a4.c:364:\tif (op-\u003edummy.nbytes) {\ndrivers/spi/spi-amlogic-spifc-a4.c-365-\t\t/*  Dummy buswidth configuration is not supported */\ndrivers/spi/spi-amlogic-spifc-a4.c-366-\t\tif (aml_sfc_is_xio_op(op))\ndrivers/spi/spi-amlogic-spifc-a4.c:367:\t\t\tdummy_cycle = op-\u003edummy.nbytes * 8 / op-\u003edata.buswidth;\ndrivers/spi/spi-amlogic-spifc-a4.c-368-\t\telse\ndrivers/spi/spi-amlogic-spifc-a4.c:369:\t\t\tdummy_cycle = op-\u003edummy.nbytes * 8;\ndrivers/spi/spi-amlogic-spifc-a4.c:370:\t\tcmd = CMD_DUMMY(sfc-\u003ecs_sel, dummy_cycle - 1);\ndrivers/spi/spi-amlogic-spifc-a4.c-371-\t\treturn regmap_write(sfc-\u003eregmap_base, SFC_CMD, cmd);\n--\ndrivers/spi/spi-amlogic-spifc-a4.c=792=static int aml_sfc_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-803-\ndrivers/spi/spi-amlogic-spifc-a4.c:804:\tdev_dbg(sfc-\u003edev, \"cmd:0x%02x - addr:%08llX@%d:%u - dummy:%d:%u - data:%d:%u\",\ndrivers/spi/spi-amlogic-spifc-a4.c-805-\t\top-\u003ecmd.opcode, op-\u003eaddr.val, op-\u003eaddr.buswidth, op-\u003eaddr.nbytes,\ndrivers/spi/spi-amlogic-spifc-a4.c:806:\t\top-\u003edummy.buswidth, op-\u003edummy.nbytes, op-\u003edata.buswidth, op-\u003edata.nbytes);\ndrivers/spi/spi-amlogic-spifc-a4.c-807-\n--\ndrivers/spi/spi-amlogic-spifc-a4.c-811-\ndrivers/spi/spi-amlogic-spifc-a4.c:812:\tret = aml_sfc_send_cmd_addr_dummy(sfc, op);\ndrivers/spi/spi-amlogic-spifc-a4.c-813-\tif (ret)\n--\ndrivers/spi/spi-aspeed-smc.c-34-#define   CTRL_IO_ADDRESS_4B\t\tBIT(13)\t/* AST2400 SPI only */\ndrivers/spi/spi-aspeed-smc.c:35:#define   CTRL_IO_DUMMY_SET(dummy)\t\t\t\t\t\\\ndrivers/spi/spi-aspeed-smc.c:36:\t(((((dummy) \u003e\u003e 2) \u0026 0x1) \u003c\u003c 14) | (((dummy) \u0026 0x3) \u003c\u003c 6))\ndrivers/spi/spi-aspeed-smc.c-37-#define   CTRL_FREQ_SEL_SHIFT\t\t8\n--\ndrivers/spi/spi-aspeed-smc.c=239=static ssize_t aspeed_spi_read_user(struct aspeed_spi_chip *chip,\n--\ndrivers/spi/spi-aspeed-smc.c-243-\tint io_mode = aspeed_spi_get_io_mode(op);\ndrivers/spi/spi-aspeed-smc.c:244:\tu8 dummy = 0xFF;\ndrivers/spi/spi-aspeed-smc.c-245-\tint i;\n--\ndrivers/spi/spi-aspeed-smc.c-253-\ndrivers/spi/spi-aspeed-smc.c:254:\tif (op-\u003edummy.buswidth \u0026\u0026 op-\u003edummy.nbytes) {\ndrivers/spi/spi-aspeed-smc.c:255:\t\tfor (i = 0; i \u003c op-\u003edummy.nbytes / op-\u003edummy.buswidth; i++)\ndrivers/spi/spi-aspeed-smc.c:256:\t\t\taspeed_spi_write_to_ahb(chip-\u003eahb_base, \u0026dummy,\tsizeof(dummy));\ndrivers/spi/spi-aspeed-smc.c-257-\t}\n--\ndrivers/spi/spi-aspeed-smc.c=287=static bool aspeed_spi_supports_mem_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-aspeed-smc.c-299-\ndrivers/spi/spi-aspeed-smc.c:300:\tif (op-\u003edummy.nbytes != 0) {\ndrivers/spi/spi-aspeed-smc.c:301:\t\tif (op-\u003edummy.buswidth \u003e 1 || op-\u003edummy.nbytes \u003e 7)\ndrivers/spi/spi-aspeed-smc.c-302-\t\t\treturn false;\n--\ndrivers/spi/spi-aspeed-smc.c=313=static int do_aspeed_spi_exec_mem_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-aspeed-smc.c-340-\ndrivers/spi/spi-aspeed-smc.c:341:\tif (op-\u003edummy.nbytes)\ndrivers/spi/spi-aspeed-smc.c:342:\t\tctl_val |= CTRL_IO_DUMMY_SET(op-\u003edummy.nbytes / op-\u003edummy.buswidth);\ndrivers/spi/spi-aspeed-smc.c-343-\n--\ndrivers/spi/spi-aspeed-smc.c=696=static int aspeed_spi_dirmap_create(struct spi_mem_dirmap_desc *desc)\n--\ndrivers/spi/spi-aspeed-smc.c-708-\t\top-\u003ecmd.opcode, op-\u003ecmd.buswidth, op-\u003eaddr.buswidth,\ndrivers/spi/spi-aspeed-smc.c:709:\t\top-\u003edummy.buswidth, op-\u003edata.buswidth,\ndrivers/spi/spi-aspeed-smc.c:710:\t\top-\u003eaddr.nbytes, op-\u003edummy.nbytes);\ndrivers/spi/spi-aspeed-smc.c-711-\n--\ndrivers/spi/spi-aspeed-smc.c-729-\ndrivers/spi/spi-aspeed-smc.c:730:\tif (op-\u003edummy.nbytes)\ndrivers/spi/spi-aspeed-smc.c:731:\t\tctl_val |= CTRL_IO_DUMMY_SET(op-\u003edummy.nbytes / op-\u003edummy.buswidth);\ndrivers/spi/spi-aspeed-smc.c-732-\n--\ndrivers/spi/spi-atcspi200.c=186=static void atcspi_set_trans_ctl(struct atcspi_dev *spi,\n--\ndrivers/spi/spi-atcspi200.c-207-\t\tif (op-\u003edata.dir == SPI_MEM_DATA_IN) {\ndrivers/spi/spi-atcspi200.c:208:\t\t\tif (op-\u003edummy.nbytes)\ndrivers/spi/spi-atcspi200.c-209-\t\t\t\ttc |= TRANS_MODE_DMY_READ |\ndrivers/spi/spi-atcspi200.c:210:\t\t\t\t      TRANS_DUMMY_CNT(op-\u003edummy.nbytes);\ndrivers/spi/spi-atcspi200.c-211-\t\t\telse\n--\ndrivers/spi/spi-ath79.c=137=static int ath79_exec_mem_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-ath79.c-147-\tif (op-\u003ecmd.opcode != 0x0b || op-\u003edata.dir != SPI_MEM_DATA_IN ||\ndrivers/spi/spi-ath79.c:148:\t    op-\u003eaddr.nbytes != 3 || op-\u003edummy.nbytes != 1)\ndrivers/spi/spi-ath79.c-149-\t\treturn -EOPNOTSUPP;\n--\ndrivers/spi/spi-atmel.c=318=static bool atmel_spi_is_v2(struct atmel_spi *as)\n--\ndrivers/spi/spi-atmel.c-323-/*\ndrivers/spi/spi-atmel.c:324: * Send a dummy message.\ndrivers/spi/spi-atmel.c-325- *\n--\ndrivers/spi/spi-atmel.c-328- */\ndrivers/spi/spi-atmel.c:329:static void atmel_spi_send_dummy(struct atmel_spi *as, struct spi_device *spi, int chip_select)\ndrivers/spi/spi-atmel.c-330-{\n--\ndrivers/spi/spi-atmel.c-380- * packet is sent, once the CS has already been asserted. The workaround is to\ndrivers/spi/spi-atmel.c:381: * avoid this by sending a first (dummy) message before toggling the CS state.\ndrivers/spi/spi-atmel.c-382- */\ndrivers/spi/spi-atmel.c=383=static void cs_activate(struct atmel_spi *as, struct spi_device *spi)\n--\ndrivers/spi/spi-atmel.c-414-\t\t\t\t/*\ndrivers/spi/spi-atmel.c:415:\t\t\t\t * Need to disable the GPIO before sending the dummy\ndrivers/spi/spi-atmel.c-416-\t\t\t\t * message because it is already set by the spi core.\n--\ndrivers/spi/spi-atmel.c-418-\t\t\t\tgpiod_set_value_cansleep(spi_get_csgpiod(spi, 0), 0);\ndrivers/spi/spi-atmel.c:419:\t\t\t\tatmel_spi_send_dummy(as, spi, chip_select);\ndrivers/spi/spi-atmel.c-420-\t\t\t\tas-\u003elast_polarity = new_polarity;\n--\ndrivers/spi/spi-axiado.c=399=static int ax_transfer_one(struct spi_controller *ctlr,\n--\ndrivers/spi/spi-axiado.c-434-\t\t   (transfer-\u003etx_buf \u0026\u0026 transfer-\u003erx_buf)) {\ndrivers/spi/spi-axiado.c:435:\t\t/* RX mode: generate clock by filling TX FIFO with dummy bytes\ndrivers/spi/spi-axiado.c-436-\t\t * Full-duplex mode: generate clock by filling TX FIFO\n--\ndrivers/spi/spi-axiado.c=554=static int ax_spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)\n--\ndrivers/spi/spi-axiado.c-570-\t\t__func__, op-\u003ecmd.opcode, op-\u003ecmd.buswidth, op-\u003eaddr.buswidth,\ndrivers/spi/spi-axiado.c:571:\t\top-\u003edummy.buswidth, op-\u003edata.buswidth, op-\u003eaddr.val,\ndrivers/spi/spi-axiado.c-572-\t\top-\u003edata.nbytes);\n--\ndrivers/spi/spi-axiado.c-577-\t    op-\u003eaddr.buswidth != 1) ||\ndrivers/spi/spi-axiado.c:578:\t    (op-\u003edummy.nbytes \u0026\u0026 op-\u003edummy.buswidth != 0 \u0026\u0026\ndrivers/spi/spi-axiado.c:579:\t    op-\u003edummy.buswidth != 1) ||\ndrivers/spi/spi-axiado.c-580-\t    (op-\u003edata.nbytes \u0026\u0026 op-\u003edata.buswidth != 1)) {\n--\ndrivers/spi/spi-axiado.c-615-\ndrivers/spi/spi-axiado.c:616:\t/* Add dummy bytes (for clock generation) or actual data bytes to TX_FIFO */\ndrivers/spi/spi-axiado.c-617-\tif (op-\u003edata.dir == SPI_MEM_DATA_IN) {\ndrivers/spi/spi-axiado.c:618:\t\tfor (i = 0; i \u003c op-\u003edummy.nbytes; i++)\ndrivers/spi/spi-axiado.c-619-\t\t\tax_spi_write_b(xspi, AX_SPI_TXFIFO, 0x00);\n--\ndrivers/spi/spi-axiado.c-665-\t\t * Since we set SRI, we only need to discard the address bytes and\ndrivers/spi/spi-axiado.c:666:\t\t * dummy bytes from the RX FIFO.\ndrivers/spi/spi-axiado.c-667-\t\t */\ndrivers/spi/spi-axiado.c:668:\t\tbytes_to_discard_from_rx = op-\u003eaddr.nbytes + op-\u003edummy.nbytes;\ndrivers/spi/spi-axiado.c-669-\t\tfor (i = 0; i \u003c bytes_to_discard_from_rx; i++)\n--\ndrivers/spi/spi-axiado.c=699=static int ax_spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)\n--\ndrivers/spi/spi-axiado.c-708-\t/* Calculate protocol overhead bytes according to the real operation each time. */\ndrivers/spi/spi-axiado.c:709:\tprotocol_overhead_bytes = op-\u003ecmd.nbytes + op-\u003eaddr.nbytes + op-\u003edummy.nbytes;\ndrivers/spi/spi-axiado.c-710-\n--\ndrivers/spi/spi-bcm-qspi.c=416=static int bcm_qspi_bspi_set_flex_mode(struct bcm_qspi *qspi,\n--\ndrivers/spi/spi-bcm-qspi.c-430-\ndrivers/spi/spi-bcm-qspi.c:431:\tif (op-\u003edummy.nbytes)\ndrivers/spi/spi-bcm-qspi.c:432:\t\tbpp |= (op-\u003edummy.nbytes * 8) / op-\u003edummy.buswidth;\ndrivers/spi/spi-bcm-qspi.c-433-\n--\ndrivers/spi/spi-bcm-qspi.c=1150=static int bcm_qspi_mspi_exec_mem_op(struct spi_device *spi,\n--\ndrivers/spi/spi-bcm-qspi.c-1168-\tt[0].tx_buf = cmd;\ndrivers/spi/spi-bcm-qspi.c:1169:\tt[0].len = op-\u003eaddr.nbytes + op-\u003edummy.nbytes + 1;\ndrivers/spi/spi-bcm-qspi.c-1170-\tt[0].bits_per_word = spi-\u003ebits_per_word;\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-113- * Default transfer mode is auto. If the msg is prependable, use the prepend\ndrivers/spi/spi-bcm63xx-hsspi.c:114: * mode.  If not, falls back to use the dummy cs workaround mode but limit the\ndrivers/spi/spi-bcm63xx-hsspi.c-115- * clock to 25MHz to make sure it works in all board design.\n--\ndrivers/spi/spi-bcm63xx-hsspi.c=567=static int bcm63xx_hsspi_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-603-\ndrivers/spi/spi-bcm63xx-hsspi.c:604:static int bcm63xx_hsspi_do_dummy_cs_txrx(struct spi_device *spi,\ndrivers/spi/spi-bcm63xx-hsspi.c-605-\t\t\t\t      struct spi_message *msg)\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-608-\tint status = -EINVAL;\ndrivers/spi/spi-bcm63xx-hsspi.c:609:\tint dummy_cs;\ndrivers/spi/spi-bcm63xx-hsspi.c-610-\tbool keep_cs = false;\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-617-\t * a. Invert the target chip select's polarity so it will be active.\ndrivers/spi/spi-bcm63xx-hsspi.c:618:\t * b. Select a \"dummy\" chip select to use as the hardware target.\ndrivers/spi/spi-bcm63xx-hsspi.c:619:\t * c. Invert the dummy chip select's polarity so it will be inactive\ndrivers/spi/spi-bcm63xx-hsspi.c-620-\t *    during the actual transfers.\ndrivers/spi/spi-bcm63xx-hsspi.c:621:\t * d. Tell the hardware to send to the dummy chip select. Thanks to\ndrivers/spi/spi-bcm63xx-hsspi.c-622-\t *    the multiplexed nature of SPI the actual target will receive\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-627-\ndrivers/spi/spi-bcm63xx-hsspi.c:628:\tdummy_cs = !spi_get_chipselect(spi, 0);\ndrivers/spi/spi-bcm63xx-hsspi.c:629:\tbcm63xx_hsspi_set_cs(bs, dummy_cs, true);\ndrivers/spi/spi-bcm63xx-hsspi.c-630-\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-634-\t\t * a. Message is not prependable and in default auto xfer mode. This mean\ndrivers/spi/spi-bcm63xx-hsspi.c:635:\t\t *    we fallback to dummy cs mode at maximum 25MHz safe clock rate.\ndrivers/spi/spi-bcm63xx-hsspi.c:636:\t\t * b. User set to use the dummy cs mode.\ndrivers/spi/spi-bcm63xx-hsspi.c-637-\t\t */\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-641-\t\t\t\tdev_warn_once(\u0026bs-\u003epdev-\u003edev,\ndrivers/spi/spi-bcm63xx-hsspi.c:642:\t\t\t\t\t\"Force to dummy cs mode. Reduce the speed to %dHz\",\ndrivers/spi/spi-bcm63xx-hsspi.c-643-\t\t\t\t\tt-\u003espeed_hz);\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-673-\ndrivers/spi/spi-bcm63xx-hsspi.c:674:\tbcm63xx_hsspi_set_cs(bs, dummy_cs, false);\ndrivers/spi/spi-bcm63xx-hsspi.c-675-\tif (status || !keep_cs)\n--\ndrivers/spi/spi-bcm63xx-hsspi.c=681=static int bcm63xx_hsspi_transfer_one(struct spi_controller *host,\n--\ndrivers/spi/spi-bcm63xx-hsspi.c-703-\t\t} else\ndrivers/spi/spi-bcm63xx-hsspi.c:704:\t\t\tstatus = bcm63xx_hsspi_do_dummy_cs_txrx(spi, msg);\ndrivers/spi/spi-bcm63xx-hsspi.c-705-\t}\n--\ndrivers/spi/spi-bcm63xx.c=217=static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first,\n--\ndrivers/spi/spi-bcm63xx.c-256-\t\t\t *\ndrivers/spi/spi-bcm63xx.c:257:\t\t\t * Therefore, for read-only transfers, we need to write some dummy\ndrivers/spi/spi-bcm63xx.c-258-\t\t\t * value into the FIFO to keep the accumulator tracking the correct\n--\ndrivers/spi/spi-cadence-quadspi.c=398=static unsigned int cqspi_calc_rdreg(const struct spi_mem_op *op)\n--\ndrivers/spi/spi-cadence-quadspi.c-408-\ndrivers/spi/spi-cadence-quadspi.c:409:static unsigned int cqspi_calc_dummy(const struct spi_mem_op *op)\ndrivers/spi/spi-cadence-quadspi.c-410-{\ndrivers/spi/spi-cadence-quadspi.c:411:\tunsigned int dummy_clk;\ndrivers/spi/spi-cadence-quadspi.c-412-\ndrivers/spi/spi-cadence-quadspi.c:413:\tif (!op-\u003edummy.nbytes)\ndrivers/spi/spi-cadence-quadspi.c-414-\t\treturn 0;\ndrivers/spi/spi-cadence-quadspi.c-415-\ndrivers/spi/spi-cadence-quadspi.c:416:\tdummy_clk = op-\u003edummy.nbytes * (8 / op-\u003edummy.buswidth);\ndrivers/spi/spi-cadence-quadspi.c-417-\tif (op-\u003ecmd.dtr)\ndrivers/spi/spi-cadence-quadspi.c:418:\t\tdummy_clk /= 2;\ndrivers/spi/spi-cadence-quadspi.c-419-\ndrivers/spi/spi-cadence-quadspi.c:420:\treturn dummy_clk;\ndrivers/spi/spi-cadence-quadspi.c-421-}\n--\ndrivers/spi/spi-cadence-quadspi.c=538=static int cqspi_command_read(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-547-\tunsigned int reg;\ndrivers/spi/spi-cadence-quadspi.c:548:\tunsigned int dummy_clk;\ndrivers/spi/spi-cadence-quadspi.c-549-\tsize_t read_len;\n--\ndrivers/spi/spi-cadence-quadspi.c-572-\ndrivers/spi/spi-cadence-quadspi.c:573:\tdummy_clk = cqspi_calc_dummy(op);\ndrivers/spi/spi-cadence-quadspi.c:574:\tif (dummy_clk \u003e CQSPI_DUMMY_CLKS_MAX)\ndrivers/spi/spi-cadence-quadspi.c-575-\t\treturn -EOPNOTSUPP;\ndrivers/spi/spi-cadence-quadspi.c-576-\ndrivers/spi/spi-cadence-quadspi.c:577:\tif (dummy_clk)\ndrivers/spi/spi-cadence-quadspi.c:578:\t\treg |= (dummy_clk \u0026 CQSPI_REG_CMDCTRL_DUMMY_MASK)\ndrivers/spi/spi-cadence-quadspi.c-579-\t\t     \u003c\u003c CQSPI_REG_CMDCTRL_DUMMY_LSB;\n--\ndrivers/spi/spi-cadence-quadspi.c=690=static int cqspi_read_setup(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-694-\tvoid __iomem *reg_base = cqspi-\u003eiobase;\ndrivers/spi/spi-cadence-quadspi.c:695:\tunsigned int dummy_clk = 0;\ndrivers/spi/spi-cadence-quadspi.c-696-\tunsigned int reg;\n--\ndrivers/spi/spi-cadence-quadspi.c-711-\ndrivers/spi/spi-cadence-quadspi.c:712:\t/* Setup dummy clock cycles */\ndrivers/spi/spi-cadence-quadspi.c:713:\tdummy_clk = cqspi_calc_dummy(op);\ndrivers/spi/spi-cadence-quadspi.c-714-\ndrivers/spi/spi-cadence-quadspi.c:715:\tif (dummy_clk \u003e CQSPI_DUMMY_CLKS_MAX)\ndrivers/spi/spi-cadence-quadspi.c-716-\t\treturn -EOPNOTSUPP;\ndrivers/spi/spi-cadence-quadspi.c-717-\ndrivers/spi/spi-cadence-quadspi.c:718:\tif (dummy_clk)\ndrivers/spi/spi-cadence-quadspi.c:719:\t\treg |= (dummy_clk \u0026 CQSPI_REG_RD_INSTR_DUMMY_MASK)\ndrivers/spi/spi-cadence-quadspi.c-720-\t\t       \u003c\u003c CQSPI_REG_RD_INSTR_DUMMY_LSB;\n--\ndrivers/spi/spi-cadence-quadspi.c=1017=static int cqspi_write_setup(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-1045-\t * passed in the Read SR command. Also, some SPI NOR flashes like the\ndrivers/spi/spi-cadence-quadspi.c:1046:\t * cypress Semper flash expect a 4-byte dummy address in the Read SR\ndrivers/spi/spi-cadence-quadspi.c-1047-\t * command in DTR mode.\n--\ndrivers/spi/spi-cadence-quadspi.c=1074=static int cqspi_indirect_write_execute(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-1112-\t * If a hazard exists between the APB and AHB interfaces, perform a\ndrivers/spi/spi-cadence-quadspi.c:1113:\t * dummy readback from the controller to ensure synchronization.\ndrivers/spi/spi-cadence-quadspi.c-1114-\t */\n--\ndrivers/spi/spi-cadence-quadspi.c=1325=static ssize_t cqspi_write(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-1338-\t/*\ndrivers/spi/spi-cadence-quadspi.c:1339:\t * Some flashes like the Cypress Semper flash expect a dummy 4-byte\ndrivers/spi/spi-cadence-quadspi.c-1340-\t * address (all 0s) with the read status register command in DTR mode.\ndrivers/spi/spi-cadence-quadspi.c:1341:\t * But this controller does not support sending dummy address bytes to\ndrivers/spi/spi-cadence-quadspi.c-1342-\t * the flash when it is polling the write completion register in DTR\n--\ndrivers/spi/spi-cadence-quadspi.c=1516=static bool cqspi_supports_mem_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-cadence-quadspi.c-1522-\t/*\ndrivers/spi/spi-cadence-quadspi.c:1523:\t * op-\u003edummy.dtr is required for converting nbytes into ncycles.\ndrivers/spi/spi-cadence-quadspi.c-1524-\t * Also, don't check the dtr field of the op phase having zero nbytes.\n--\ndrivers/spi/spi-cadence-quadspi.c-1527-\t\t   (!op-\u003eaddr.nbytes || op-\u003eaddr.dtr) \u0026\u0026\ndrivers/spi/spi-cadence-quadspi.c:1528:\t\t   (!op-\u003edummy.nbytes || op-\u003edummy.dtr) \u0026\u0026\ndrivers/spi/spi-cadence-quadspi.c-1529-\t\t   (!op-\u003edata.nbytes || op-\u003edata.dtr);\ndrivers/spi/spi-cadence-quadspi.c-1530-\ndrivers/spi/spi-cadence-quadspi.c:1531:\tall_false = !op-\u003ecmd.dtr \u0026\u0026 !op-\u003eaddr.dtr \u0026\u0026 !op-\u003edummy.dtr \u0026\u0026\ndrivers/spi/spi-cadence-quadspi.c-1532-\t\t    !op-\u003edata.dtr;\n--\ndrivers/spi/spi-cadence-xspi.c-181-\ndrivers/spi/spi-cadence-xspi.c:182:#define CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op, dummybytes) ( \\\ndrivers/spi/spi-cadence-xspi.c-183-\tFIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_DCNT_H, \\\n--\ndrivers/spi/spi-cadence-xspi.c-185-\tFIELD_PREP(CDNS_XSPI_CMD_DSEQ_R3_NUM_OF_DUMMY, \\\ndrivers/spi/spi-cadence-xspi.c:186:\t\t  (op)-\u003edummy.buswidth != 0 ? \\\ndrivers/spi/spi-cadence-xspi.c:187:\t\t  (((dummybytes) * 8) / (op)-\u003edummy.buswidth) : \\\ndrivers/spi/spi-cadence-xspi.c-188-\t\t  0))\n--\ndrivers/spi/spi-cadence-xspi.c=719=static int cdns_xspi_send_stig_command(struct cdns_xspi_dev *cdns_xspi,\n--\ndrivers/spi/spi-cadence-xspi.c-725-\tint ret;\ndrivers/spi/spi-cadence-xspi.c:726:\tint dummybytes = op-\u003edummy.nbytes;\ndrivers/spi/spi-cadence-xspi.c-727-\n--\ndrivers/spi/spi-cadence-xspi.c-740-\tcmd_regs[2] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_2(op);\ndrivers/spi/spi-cadence-xspi.c:741:\tif (dummybytes != 0) {\ndrivers/spi/spi-cadence-xspi.c-742-\t\tcmd_regs[3] = CDNS_XSPI_CMD_FLD_P1_INSTR_CMD_3(op, 1);\ndrivers/spi/spi-cadence-xspi.c:743:\t\tdummybytes--;\ndrivers/spi/spi-cadence-xspi.c-744-\t} else {\n--\ndrivers/spi/spi-cadence-xspi.c-755-\t\tcmd_regs[2] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_2(op);\ndrivers/spi/spi-cadence-xspi.c:756:\t\tcmd_regs[3] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_3(op, dummybytes);\ndrivers/spi/spi-cadence-xspi.c-757-\t\tcmd_regs[4] = CDNS_XSPI_CMD_FLD_DSEQ_CMD_4(op,\n--\ndrivers/spi/spi-davinci.c=625=static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)\n--\ndrivers/spi/spi-davinci.c-692-\t\t\t * many SG entries (\u003e 20), use the rx buffer as the\ndrivers/spi/spi-davinci.c:693:\t\t\t * dummy tx buffer so that dma reloads are done at the\ndrivers/spi/spi-davinci.c-694-\t\t\t * same time for rx and tx.\n--\ndrivers/spi/spi-davinci.c-770-/**\ndrivers/spi/spi-davinci.c:771: * dummy_thread_fn - dummy thread function\ndrivers/spi/spi-davinci.c-772- * @irq: IRQ number for this SPI Master\n--\ndrivers/spi/spi-davinci.c-777- */\ndrivers/spi/spi-davinci.c:778:static irqreturn_t dummy_thread_fn(s32 irq, void *data)\ndrivers/spi/spi-davinci.c-779-{\n--\ndrivers/spi/spi-davinci.c=922=static int davinci_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-davinci.c-977-\tret = devm_request_threaded_irq(\u0026pdev-\u003edev, dspi-\u003eirq, davinci_spi_irq,\ndrivers/spi/spi-davinci.c:978:\t\t\t\tdummy_thread_fn, 0, dev_name(\u0026pdev-\u003edev), dspi);\ndrivers/spi/spi-davinci.c-979-\tif (ret)\n\n"
}

19/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 43447
							output: 26
							thoughts: 457
						

Thoughts:
**Analyzing the Reachability of `oa_tc6_start_xmit`**

Okay, so I'm digging into how to potentially trigger this `oa_tc6_start_xmit` function. My initial thought was to see if the `spi-loopback-test.c` driver could be used to somehow reach it, but that seems like a dead end. I'm reminded of a situation where I should return `false` for `WorthFuzzing` if the code path is impossible to reach in virtual environments; I'll keep this in mind.

My next line of thinking is about virtual SPI controllers. I checked for a virtual controller. I dismissed `spi-mock.c` and then thought about `spi-gpio.c`, the bitbanging SPI controller. Can syzkaller instantiate something like `spi-gpio`? I know that syzkaller *can* use `mac80211_hwsim`, which is virtual, but for GPIO it needs `gpio-mockup` or `gpio-sim`. If I could use `gpio-sim`, then theoretically I could instantiate `spi-gpio` on top of it using device tree overlays or platform data. But wait, syzkaller doesn't currently handle device tree overlays for `spi-gpio`. This means that `spi-gpio` is not an option. Also, while syzkaller has `syz_genetlink` and other support for other things, there's no generic way to instantiate SPI devices.

Okay, let's step back. I realize that `oa_tc6` is a library and it's only used by the `lan865x` driver. I'm wondering if `lan865x` is instantiable. I see that it has a device tree match: `microchip,lan8650`. Without device tree overlays, it won't be probed. Syzkaller doesn't support those overlays to load SPI devices.

So, the next thing that I need to do is to check if `oa_tc6_start_xmit` is potentially reachable through *another* path. It's exported, so it's a possibility. However, I realize only `lan865x` calls `oa_tc6_init`. Therefore, I need to confirm that `lan865x` is *only* the caller.



20/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "oa_tc6_init",
  "PathPrefix": ""
}

Results:
{
  "Output": "Documentation/networking/oa-tc6-framework.rst=454=The include/linux/oa_tc6.h defines the following functions:\nDocumentation/networking/oa-tc6-framework.rst-455-\nDocumentation/networking/oa-tc6-framework.rst:456:.. c:function:: struct oa_tc6 *oa_tc6_init(struct spi_device *spi, \\\nDocumentation/networking/oa-tc6-framework.rst-457-                                           struct net_device *netdev)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=333=static int lan865x_probe(struct spi_device *spi)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-348-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:349:\tpriv-\u003etc6 = oa_tc6_init(spi, netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-350-\tif (!priv-\u003etc6) {\n--\ndrivers/net/ethernet/oa_tc6.c=1310=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1312-/**\ndrivers/net/ethernet/oa_tc6.c:1313: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1314- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1319- */\ndrivers/net/ethernet/oa_tc6.c:1320:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1321-{\n--\ndrivers/net/ethernet/oa_tc6.c-1424-}\ndrivers/net/ethernet/oa_tc6.c:1425:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1426-\n--\ninclude/linux/oa_tc6.h=13=struct oa_tc6;\ninclude/linux/oa_tc6.h-14-\ninclude/linux/oa_tc6.h:15:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev);\ninclude/linux/oa_tc6.h-16-void oa_tc6_exit(struct oa_tc6 *tc6);\n"
}

21/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 45151
							output: 27
							thoughts: 212
						

Thoughts:
**Analyzing the Reachability of `lan865x` in a Testing Environment**

Okay, so I see that the code I'm looking at is only called by `lan865x`. The immediate question is, can we actually *reach* `lan865x` within the test environment? Let's see... It's an SPI driver, right? That's key. The notes specifically mention code paths being unreachable in virtualized setups like GCE or QEMU, even with software-emulated hardware – think USB gadgets or `mac80211_hwsim`. In our case, syzkaller doesn't have any software-emulated SPI hardware capable of instantiating `lan865x`, making this particular code path seem impossible to trigger.

But, hold on. Is there *any* other way to inject an SPI device into the system? Can we use sysfs somehow? I know `spi_board_info` exists, which could potentially register a device, but that's usually handled by the board-specific code. What about `spidev`? No, that just exposes existing SPI devices to userspace; it doesn't create new ones. I was hoping for something like `spi-mock`, but I've already checked, and it doesn't exist.

Wait... I need to rethink this. Maybe there's a different sysfs interface – perhaps something related to `spi_new_device` or a similar call that allows device instantiation? Let me check into that.



22/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "new_device",
  "PathPrefix": "drivers/spi/"
}

Results:
{
  "Output": "drivers/spi/spi-altera-dfl.c=124=static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)\n--\ndrivers/spi/spi-altera-dfl.c-174-\ndrivers/spi/spi-altera-dfl.c:175:\tif (!spi_new_device(host, \u0026board_info)) {\ndrivers/spi/spi-altera-dfl.c-176-\t\tdev_err(dev, \"%s failed to create SPI device: %s\\n\",\n--\ndrivers/spi/spi-altera-platform.c=35=static int altera_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-altera-platform.c-119-\t\tfor (i = 0; i \u003c pdata-\u003enum_devices; i++) {\ndrivers/spi/spi-altera-platform.c:120:\t\t\tif (!spi_new_device(host, pdata-\u003edevices + i))\ndrivers/spi/spi-altera-platform.c-121-\t\t\t\tdev_warn(\u0026pdev-\u003edev,\n--\ndrivers/spi/spi-butterfly.c=176=static void butterfly_attach(struct parport *p)\n--\ndrivers/spi/spi-butterfly.c-265-\tpp-\u003einfo[0].controller_data = pp;\ndrivers/spi/spi-butterfly.c:266:\tpp-\u003edataflash = spi_new_device(pp-\u003ebitbang.ctlr, \u0026pp-\u003einfo[0]);\ndrivers/spi/spi-butterfly.c-267-\tif (pp-\u003edataflash)\n--\ndrivers/spi/spi-ch341.c=141=static int ch341_probe(struct usb_interface *intf,\n--\ndrivers/spi/spi-ch341.c-206-\ndrivers/spi/spi-ch341.c:207:\tch341-\u003espidev = spi_new_device(ctrl, \u0026chip);\ndrivers/spi/spi-ch341.c-208-\tif (!ch341-\u003espidev) {\n--\ndrivers/spi/spi-cs42l43.c=313=static int cs42l43_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cs42l43.c-427-\ndrivers/spi/spi-cs42l43.c:428:\t\tif (!spi_new_device(priv-\u003ectlr, ampl_info))\ndrivers/spi/spi-cs42l43.c-429-\t\t\treturn dev_err_probe(priv-\u003edev, -ENODEV,\n--\ndrivers/spi/spi-cs42l43.c-431-\ndrivers/spi/spi-cs42l43.c:432:\t\tif (!spi_new_device(priv-\u003ectlr, ampr_info))\ndrivers/spi/spi-cs42l43.c-433-\t\t\treturn dev_err_probe(priv-\u003edev, -ENODEV,\n--\ndrivers/spi/spi-intel.c=1375=static int intel_spi_populate_chip(struct intel_spi *ispi)\n--\ndrivers/spi/spi-intel.c-1401-\ndrivers/spi/spi-intel.c:1402:\tif (!spi_new_device(ispi-\u003ehost, \u0026chip))\ndrivers/spi/spi-intel.c-1403-\t\treturn -ENODEV;\n--\ndrivers/spi/spi-intel.c-1430-\ndrivers/spi/spi-intel.c:1431:\tif (!spi_new_device(ispi-\u003ehost, \u0026chip))\ndrivers/spi/spi-intel.c-1432-\t\treturn -ENODEV;\n--\ndrivers/spi/spi-kspi2.c=310=static int kspi2_register_devices(struct kspi2 *kspi)\n--\ndrivers/spi/spi-kspi2.c-316-\tfor (i = 0; i \u003c kspi-\u003eauxdev-\u003einfo_size; i++) {\ndrivers/spi/spi-kspi2.c:317:\t\tstruct spi_device *device = spi_new_device(kspi-\u003ehost, \u0026info[i]);\ndrivers/spi/spi-kspi2.c-318-\n--\ndrivers/spi/spi-lm70llp.c=188=static void spi_lm70llp_attach(struct parport *p)\n--\ndrivers/spi/spi-lm70llp.c-266-\tpp-\u003einfo.controller_data = pp;\ndrivers/spi/spi-lm70llp.c:267:\tpp-\u003espidev_lm70 = spi_new_device(pp-\u003ebitbang.ctlr, \u0026pp-\u003einfo);\ndrivers/spi/spi-lm70llp.c-268-\tif (pp-\u003espidev_lm70)\n--\ndrivers/spi/spi-lm70llp.c-271-\telse {\ndrivers/spi/spi-lm70llp.c:272:\t\tdev_warn(\u0026pd-\u003edev, \"spi_new_device failed\\n\");\ndrivers/spi/spi-lm70llp.c-273-\t\tstatus = -ENODEV;\n--\ndrivers/spi/spi-xilinx.c=402=static int xilinx_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-xilinx.c-509-\t\tfor (i = 0; i \u003c pdata-\u003enum_devices; i++)\ndrivers/spi/spi-xilinx.c:510:\t\t\tspi_new_device(host, pdata-\u003edevices + i);\ndrivers/spi/spi-xilinx.c-511-\t}\n--\ndrivers/spi/spi.c=788=EXPORT_SYMBOL_GPL(spi_add_device);\n--\ndrivers/spi/spi.c-790-/**\ndrivers/spi/spi.c:791: * spi_new_device - instantiate one new SPI device\ndrivers/spi/spi.c-792- * @ctlr: Controller to which device is connected\n--\ndrivers/spi/spi.c-803- */\ndrivers/spi/spi.c:804:struct spi_device *spi_new_device(struct spi_controller *ctlr,\ndrivers/spi/spi.c-805-\t\t\t\t  struct spi_board_info *chip)\n--\ndrivers/spi/spi.c-859-}\ndrivers/spi/spi.c:860:EXPORT_SYMBOL_GPL(spi_new_device);\ndrivers/spi/spi.c-861-\n--\ndrivers/spi/spi.c=890=static void spi_match_controller_to_boardinfo(struct spi_controller *ctlr,\n--\ndrivers/spi/spi.c-897-\ndrivers/spi/spi.c:898:\tdev = spi_new_device(ctlr, bi);\ndrivers/spi/spi.c-899-\tif (!dev)\n"
}

23/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 47494
							output: 30
							thoughts: 50
						

Thoughts:
**SPI Device Instantiation Conundrum**

Okay, so I'm hitting a roadblock. It looks like there's no straightforward sysfs interface, like we often see with other busses, to just *poof* instantiate an arbitrary SPI device. I was really hoping for something clean and dynamic, but it seems that's not the case.

Wait a second… hold on. Perhaps I'm being too pessimistic. There might be a hidden, more I2C-like approach using a `new_device` attribute, some clever mechanism tucked away. It wouldn't be completely out of character for the kernel to do something a little different for SPI.

Right, let's stop speculating and get to the source. Time to dive into `drivers/spi/spi.c`. That's where I need to look to see what the reality is and either confirm my suspicion or figure out a new solution.



24/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "new_device",
  "PathPrefix": "drivers/spi/spi.c"
}

Results:
{
  "Output": "drivers/spi/spi.c=788=EXPORT_SYMBOL_GPL(spi_add_device);\n--\ndrivers/spi/spi.c-790-/**\ndrivers/spi/spi.c:791: * spi_new_device - instantiate one new SPI device\ndrivers/spi/spi.c-792- * @ctlr: Controller to which device is connected\n--\ndrivers/spi/spi.c-803- */\ndrivers/spi/spi.c:804:struct spi_device *spi_new_device(struct spi_controller *ctlr,\ndrivers/spi/spi.c-805-\t\t\t\t  struct spi_board_info *chip)\n--\ndrivers/spi/spi.c-859-}\ndrivers/spi/spi.c:860:EXPORT_SYMBOL_GPL(spi_new_device);\ndrivers/spi/spi.c-861-\n--\ndrivers/spi/spi.c=890=static void spi_match_controller_to_boardinfo(struct spi_controller *ctlr,\n--\ndrivers/spi/spi.c-897-\ndrivers/spi/spi.c:898:\tdev = spi_new_device(ctlr, bi);\ndrivers/spi/spi.c-899-\tif (!dev)\n"
}

25/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 48090
							output: 26
							thoughts: 332
						

Thoughts:
**My Line of Reasoning for Instantiating the LAN865x SPI Device**

Okay, so I'm trying to figure out how to dynamically bring up this `lan865x` SPI device, right? First thought is, isn't there usually a `new_device` entry in sysfs for SPI? Nope, nothing there. So, I can't trigger it from userspace directly. Hmm, maybe syzkaller has a trick up its sleeve. Let me check...

Syzkaller uses `syz_dev_spi`, but that just interfaces with existing `/dev/spidevX.Y` nodes. Useless. Wait a second, didn't it have something for USB? Ah, `syz_usb_connect`! Could I find a USB to SPI bridge device that I could instantiate through syzkaller, and then somehow get the `lan865x` driver to probe the bridge? Let's investigate the existing USB-to-SPI drivers.

Let's look at `spi-ch341.c` and `spi-dln2.c`. Okay, `spi-ch341.c` *is* a USB-to-SPI bridge. But does it instantiate the target device? Nope, it just creates a `spidev` entry, like I expected. Same for `spi-dln2.c`. So, that's a dead end. No luck with the USB route.

Basically, if this `lan865x` is the only caller of `oa_tc6_init`, the `oa_tc6` code is unreachable, right? That looks like the situation. Wait, is there *any* other place that calls this function? Let me check quickly if there are other callers.



26/2 2026/06/27 01:30 tool grepper
0m Args:
{
  "Expression": "oa_tc6_init",
  "PathPrefix": ""
}

Results:
{
  "Output": "Documentation/networking/oa-tc6-framework.rst=454=The include/linux/oa_tc6.h defines the following functions:\nDocumentation/networking/oa-tc6-framework.rst-455-\nDocumentation/networking/oa-tc6-framework.rst:456:.. c:function:: struct oa_tc6 *oa_tc6_init(struct spi_device *spi, \\\nDocumentation/networking/oa-tc6-framework.rst-457-                                           struct net_device *netdev)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=333=static int lan865x_probe(struct spi_device *spi)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-348-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:349:\tpriv-\u003etc6 = oa_tc6_init(spi, netdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-350-\tif (!priv-\u003etc6) {\n--\ndrivers/net/ethernet/oa_tc6.c=1310=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1312-/**\ndrivers/net/ethernet/oa_tc6.c:1313: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1314- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1319- */\ndrivers/net/ethernet/oa_tc6.c:1320:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1321-{\n--\ndrivers/net/ethernet/oa_tc6.c-1424-}\ndrivers/net/ethernet/oa_tc6.c:1425:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1426-\n--\ninclude/linux/oa_tc6.h=13=struct oa_tc6;\ninclude/linux/oa_tc6.h-14-\ninclude/linux/oa_tc6.h:15:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev);\ninclude/linux/oa_tc6.h-16-void oa_tc6_exit(struct oa_tc6 *tc6);\n"
}

27/2 2026/06/27 01:30 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 49539
							output: 138
							thoughts: 703
						

Thoughts:
**Unreachable Code in a Virtualized Environment**

Okay, so I've looked at this patch. It's modifying `oa_tc6.c`, which, as I understand, is a library specifically for an SPI Ethernet MAC-PHY. The code that calls it is the `lan865x` driver, which is also an SPI device driver. The question is, can we actually *reach* this code in a virtualized environment like QEMU or GCE?

Initially, my thought was, "No way." There's no standard mechanism for directly instantiating arbitrary SPI devices in these environments. We can't just magically create an `lan865x` instance.  My first instinct was that syzkaller couldn't trigger this code because it doesn't use device tree overlays for SPI devices. Even if it *could*, the instructions specifically say to return `WorthFuzzing=false` if the code path is impossible to reach in virtualized environments, even with software-emulated hardware.  And there's no software emulation of SPI that would let us create arbitrary devices.

Just to be absolutely sure, I checked for other ways to reach `oa_tc6` - like `netdevsim` and `dummy` netdev. Nothing.

So, I circled back to confirm my analysis. The `lan865x` driver, being an SPI driver, *requires* a specific hardware configuration. It needs to be present in the device tree or board info.  QEMU/GCE don't provide this hardware, and we can't software-emulate an arbitrary SPI bus for this purpose. The `lan865x_driver` is registered with `module_spi_driver`, and its probe function, `lan865x_probe`, will only be called if there's a compatible device present.

Therefore, the critical initialization function `oa_tc6_init` (and by extension the functions modified in this patch) will *never* be called. They are completely unreachable in our virtualized test environments. So, considering the specific criteria for `WorthFuzzing`, I am confident that `WorthFuzzing=false` is the correct response.



28/2 2026/06/27 01:31 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the oa_tc6 library (OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI), which is only used by the lan865x SPI Ethernet driver. Since SPI devices cannot be dynamically instantiated from userspace in standard virtualized environments (unlike USB via vhci or Wi-Fi via mac80211_hwsim), the lan865x driver will never probe. Consequently, the modified code is completely unreachable in environments like QEMU or GCE.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the oa_tc6 library (OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI), which is only used by the lan865x SPI Ethernet driver. Since SPI devices cannot be dynamically instantiated from userspace in standard virtualized environments (unlike USB via vhci or Wi-Fi via mac80211_hwsim), the lan865x driver will never probe. Consequently, the modified code is completely unreachable in environments like QEMU or GCE.",
  "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)