| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/31 07:35 | flow | patch-triage |
3mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the oa_tc6 framework, which is used for OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interfaces. The only driver currently using this framework is the Microchip LAN865x SPI driver. Since this is a hardware-specific SPI device and there is no software emulator for it in QEMU or the kernel, the modified code paths are impossible to reach in virtualized environments and cannot be fuzzed.",
"WorthFuzzing": false
} |
| 1/1 | 2026/07/31 07:35 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit f56a8c9ae38eb680a5d8a7d23d1c97f0ade72e0c\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Jul 31 07:35:27 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 0727d53345a33..2ec22ba3ccba8 100644\n--- a/drivers/net/ethernet/oa_tc6.c\n+++ b/drivers/net/ethernet/oa_tc6.c\n@@ -423,7 +423,7 @@ static int oa_tc6_mdiobus_read(struct mii_bus *bus, int addr, int regnum)\n {\n \tstruct oa_tc6 *tc6 = bus-\u003epriv;\n \tu32 regval;\n-\tbool ret;\n+\tint ret;\n \n \tret = oa_tc6_read_register(tc6, OA_TC6_PHY_STD_REG_ADDR_BASE |\n \t\t\t\t (regnum \u0026 OA_TC6_PHY_STD_REG_ADDR_MASK),\n@@ -652,6 +652,26 @@ static int oa_tc6_enable_data_transfer(struct oa_tc6 *tc6)\n \treturn oa_tc6_write_register(tc6, OA_TC6_REG_CONFIG0, value);\n }\n \n+/* Called when a frame that is meant to be transmitted, is dropped. */\n+static void oa_tc6_drop_tx_skb(struct oa_tc6 *tc6, struct sk_buff *skb)\n+{\n+\tif (skb) {\n+\t\ttc6-\u003enetdev-\u003estats.tx_dropped++;\n+\t\tdev_kfree_skb_any(skb);\n+\t}\n+}\n+\n+static struct sk_buff *oa_tc6_detach_waiting_tx_skb(struct oa_tc6 *tc6)\n+{\n+\tstruct sk_buff *skb;\n+\n+\tlockdep_assert_held(\u0026tc6-\u003etx_skb_lock);\n+\tskb = tc6-\u003ewaiting_tx_skb;\n+\ttc6-\u003ewaiting_tx_skb = NULL;\n+\n+\treturn skb;\n+}\n+\n static void oa_tc6_cleanup_ongoing_rx_skb(struct oa_tc6 *tc6)\n {\n \tif (tc6-\u003erx_skb) {\n@@ -663,29 +683,39 @@ static void oa_tc6_cleanup_ongoing_rx_skb(struct oa_tc6 *tc6)\n \n static void oa_tc6_cleanup_ongoing_tx_skb(struct oa_tc6 *tc6)\n {\n-\tif (tc6-\u003eongoing_tx_skb) {\n-\t\ttc6-\u003enetdev-\u003estats.tx_dropped++;\n-\t\tkfree_skb(tc6-\u003eongoing_tx_skb);\n-\t\ttc6-\u003eongoing_tx_skb = NULL;\n-\t}\n+\toa_tc6_drop_tx_skb(tc6, tc6-\u003eongoing_tx_skb);\n+\ttc6-\u003eongoing_tx_skb = NULL;\n }\n \n static void oa_tc6_cleanup_waiting_tx_skb(struct oa_tc6 *tc6)\n {\n-\tif (tc6-\u003ewaiting_tx_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}\n+\tstruct sk_buff *skb;\n+\n+\tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\n+\tskb = oa_tc6_detach_waiting_tx_skb(tc6);\n+\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n+\n+\toa_tc6_drop_tx_skb(tc6, skb);\n }\n \n-static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)\n+static void oa_tc6_free_ongoing_skbs(struct oa_tc6 *tc6)\n {\n \toa_tc6_cleanup_ongoing_tx_skb(tc6);\n \toa_tc6_cleanup_ongoing_rx_skb(tc6);\n+}\n+\n+static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)\n+{\n+\toa_tc6_free_ongoing_skbs(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@@ -693,9 +723,19 @@ static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)\n static void oa_tc6_disable_traffic(struct oa_tc6 *tc6)\n {\n \tu32 regval = INT_MASK0_ALL_INTERRUPTS;\n+\tstruct sk_buff *skb;\n \n+\tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\n \ttc6-\u003edisable_traffic = true;\n-\toa_tc6_free_pending_skbs(tc6);\n+\tskb = oa_tc6_detach_waiting_tx_skb(tc6);\n+\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n+\n+\t/* disable_traffic, when set, is a point of no return to working\n+\t * state. TX queues are disabled.\n+\t */\n+\tnetif_tx_disable(tc6-\u003enetdev);\n+\toa_tc6_drop_tx_skb(tc6, skb);\n+\toa_tc6_free_ongoing_skbs(tc6);\n \toa_tc6_write_register(tc6, OA_TC6_REG_INT_MASK0, regval);\n \toa_tc6_read_register(tc6, OA_TC6_REG_STATUS0, \u0026regval);\n \toa_tc6_write_register(tc6, OA_TC6_REG_STATUS0, regval);\n@@ -723,8 +763,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@@ -750,6 +789,8 @@ static int oa_tc6_process_extended_status(struct oa_tc6 *tc6)\n \n static int oa_tc6_process_rx_chunk_footer(struct oa_tc6 *tc6, u32 footer)\n {\n+\tint ret = 0;\n+\n \t/* Process rx chunk footer for the following,\n \t * 1. tx credits\n \t * 2. errors if any from MAC-PHY\n@@ -760,9 +801,11 @@ static int oa_tc6_process_rx_chunk_footer(struct oa_tc6 *tc6, u32 footer)\n \t\t\t\t\t footer);\n \n \tif (FIELD_GET(OA_TC6_DATA_FOOTER_EXTENDED_STS, footer)) {\n-\t\tint ret = oa_tc6_process_extended_status(tc6);\n-\n-\t\tif (ret)\n+\t\tret = oa_tc6_process_extended_status(tc6);\n+\t\t/* EAGAIN error is recoverable. Move on to check\n+\t\t * HEADER and SYNC errors before returning.\n+\t\t */\n+\t\tif (ret \u0026\u0026 ret != -EAGAIN)\n \t\t\treturn ret;\n \t}\n \n@@ -780,7 +823,7 @@ static int oa_tc6_process_rx_chunk_footer(struct oa_tc6 *tc6, u32 footer)\n \t\treturn -ENODEV;\n \t}\n \n-\treturn 0;\n+\treturn ret;\n }\n \n static void oa_tc6_submit_rx_skb(struct oa_tc6 *tc6)\n@@ -805,13 +848,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 +896,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 +913,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@@ -901,8 +970,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@@ -916,6 +984,15 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,\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+\n+\t\t\t/* Return value from oa_tc6_prcs_rx_frame_end is not\n+\t\t\t * checked. If it returned an error, it is to make\n+\t\t\t * the code to look for new frame. At this stage,\n+\t\t\t * code below is going to process a new frame. So,\n+\t\t\t * error condition is set to false, in case it is\n+\t\t\t * set before proceeding.\n+\t\t\t */\n+\t\t\ttc6-\u003erx_buf_overflow = false;\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 +1001,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@@ -942,8 +1017,9 @@ static u32 oa_tc6_get_rx_chunk_footer(struct oa_tc6 *tc6, u16 footer_offset)\n static int oa_tc6_process_spi_data_rx_buf(struct oa_tc6 *tc6, u16 length)\n {\n \tu16 no_of_rx_chunks = length / OA_TC6_CHUNK_SIZE;\n+\tbool retry = false;\n+\tint ret = 0;\n \tu32 footer;\n-\tint ret;\n \n \t/* All the rx chunks in the receive SPI data buffer are examined here */\n \tfor (int i = 0; i \u003c no_of_rx_chunks; i++) {\n@@ -952,8 +1028,11 @@ static int oa_tc6_process_spi_data_rx_buf(struct oa_tc6 *tc6, u16 length)\n \t\t\t\t\t\t OA_TC6_CHUNK_PAYLOAD_SIZE);\n \n \t\tret = oa_tc6_process_rx_chunk_footer(tc6, footer);\n-\t\tif (ret)\n-\t\t\treturn ret;\n+\t\tif (ret) {\n+\t\t\tif (ret != -EAGAIN)\n+\t\t\t\treturn ret;\n+\t\t\tretry = true;\n+\t\t}\n \n \t\t/* If there is a data valid chunks then process it for the\n \t\t * information needed to determine the validity and the location\n@@ -965,12 +1044,35 @@ static int oa_tc6_process_spi_data_rx_buf(struct oa_tc6 *tc6, u16 length)\n \n \t\t\tret = oa_tc6_prcs_rx_chunk_payload(tc6, payload,\n \t\t\t\t\t\t\t footer);\n-\t\t\tif (ret)\n-\t\t\t\treturn ret;\n+\t\t\tif (ret) {\n+\t\t\t\tif (ret != -ENOMEM \u0026\u0026 ret != -EAGAIN)\n+\t\t\t\t\treturn ret;\n+\t\t\t\tretry = true;\n+\t\t\t}\n \t\t}\n \t}\n \n-\treturn 0;\n+\t/* Not bailing out on recoverable error codes, -EAGAIN and\n+\t * -ENOMEM. If subsequent loop iterations, if any, succeeds,\n+\t * error code would be overwritten. retry flag helps to\n+\t * make the caller to continue and retry. Since recovery\n+\t * action for -ENOMEM and -EAGAIN are same, we are returning\n+\t * one of the error codes, that is -EAGAIN.\n+\t *\n+\t * Successful recovery depends on how small the frames are,\n+\t * how many chunks, among the received chunks triggered the\n+\t * error, whether data is intact even with error conditions.\n+\t * As a result, there is no single, best method to recover\n+\t * most data when error conditions hit. We do our best by\n+\t * processing all the chunks with good \"footer header\" and\n+\t * \"data valid\" bit set.\n+\t */\n+\tif (retry) {\n+\t\tret = -EAGAIN;\n+\t\toa_tc6_look_for_new_frame(tc6);\n+\t}\n+\n+\treturn ret;\n }\n \n static __be32 oa_tc6_prepare_data_header(bool data_valid, bool start_valid,\n@@ -1132,12 +1234,13 @@ static int oa_tc6_try_spi_transfer(struct oa_tc6 *tc6)\n \t\t}\n \n \t\tret = oa_tc6_process_spi_data_rx_buf(tc6, spi_len);\n-\t\tif (ret) {\n-\t\t\tif (ret == -EAGAIN)\n-\t\t\t\tcontinue;\n \n-\t\t\toa_tc6_cleanup_ongoing_tx_skb(tc6);\n-\t\t\toa_tc6_cleanup_ongoing_rx_skb(tc6);\n+\t\t/* Not continuing with the next iteration to give\n+\t\t * waiting_tx_skb a chance to get drained, if\n+\t\t * needed.\n+\t\t */\n+\t\tif (ret \u0026\u0026 ret != -EAGAIN) {\n+\t\t\toa_tc6_free_ongoing_skbs(tc6);\n \t\t\tnetdev_err(tc6-\u003enetdev, \"Device error: %d\\n\", ret);\n \t\t\treturn ret;\n \t\t}\n@@ -1159,15 +1262,20 @@ static irqreturn_t oa_tc6_macphy_threaded_irq(int irq, void *data)\n \t * no need to attempt spi transfer, once it fails. Pending skbs\n \t * are already freed.\n \t */\n-\tif (!tc6-\u003edisable_traffic) {\n-\t\twhile (tc6-\u003eint_flag ||\n-\t\t (tc6-\u003ewaiting_tx_skb \u0026\u0026 tc6-\u003etx_credits)) {\n-\t\t\tret = oa_tc6_try_spi_transfer(tc6);\n-\t\t\tif (ret) {\n-\t\t\t\tdisable_irq_nosync(tc6-\u003espi-\u003eirq);\n-\t\t\t\toa_tc6_disable_traffic(tc6);\n-\t\t\t\tbreak;\n-\t\t\t}\n+\tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\n+\tif (tc6-\u003edisable_traffic) {\n+\t\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n+\t\treturn IRQ_HANDLED;\n+\t}\n+\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n+\n+\twhile (tc6-\u003eint_flag ||\n+\t (tc6-\u003ewaiting_tx_skb \u0026\u0026 tc6-\u003etx_credits)) {\n+\t\tret = oa_tc6_try_spi_transfer(tc6);\n+\t\tif (ret) {\n+\t\t\tdisable_irq_nosync(tc6-\u003espi-\u003eirq);\n+\t\t\toa_tc6_disable_traffic(tc6);\n+\t\t\tbreak;\n \t\t}\n \t}\n \n@@ -1250,18 +1358,22 @@ 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+\t\toa_tc6_drop_tx_skb(tc6, skb);\n \t\treturn NETDEV_TX_OK;\n \t}\n \n \tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\n+\tif (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+\tif (tc6-\u003edisable_traffic) {\n+\t\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n+\t\toa_tc6_drop_tx_skb(tc6, skb);\n+\t\treturn NETDEV_TX_OK;\n+\t}\n \ttc6-\u003ewaiting_tx_skb = skb;\n \tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n \n@@ -1393,7 +1505,9 @@ EXPORT_SYMBOL_GPL(oa_tc6_init);\n */\n void oa_tc6_exit(struct oa_tc6 *tc6)\n {\n+\tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\n \ttc6-\u003edisable_traffic = true;\n+\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n \tdisable_irq(tc6-\u003espi-\u003eirq);\n \toa_tc6_phy_exit(tc6);\n \toa_tc6_free_pending_skbs(tc6);\n"
} |
| 2/1 | 2026/07/31 07:35 | agent | patch-evaluator |
3mModel:best-expensive Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the oa_tc6 framework, which is used for OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interfaces. The only driver currently using this framework is the Microchip LAN865x SPI driver. Since this is a hardware-specific SPI device and there is no software emulator for it in QEMU or the kernel, the modified code paths are impossible to reach in virtualized environments and cannot be fuzzed.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit f56a8c9ae38eb680a5d8a7d23d1c97f0ade72e0c
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Jul 31 07:35:27 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 0727d53345a33..2ec22ba3ccba8 100644
--- a/drivers/net/ethernet/oa_tc6.c
+++ b/drivers/net/ethernet/oa_tc6.c
@@ -423,7 +423,7 @@ static int oa_tc6_mdiobus_read(struct mii_bus *bus, int addr, int regnum)
{
struct oa_tc6 *tc6 = bus->priv;
u32 regval;
- bool ret;
+ int ret;
ret = oa_tc6_read_register(tc6, OA_TC6_PHY_STD_REG_ADDR_BASE |
(regnum & OA_TC6_PHY_STD_REG_ADDR_MASK),
@@ -652,6 +652,26 @@ static int oa_tc6_enable_data_transfer(struct oa_tc6 *tc6)
return oa_tc6_write_register(tc6, OA_TC6_REG_CONFIG0, value);
}
+/* Called when a frame that is meant to be transmitted, is dropped. */
+static void oa_tc6_drop_tx_skb(struct oa_tc6 *tc6, struct sk_buff *skb)
+{
+ if (skb) {
+ tc6->netdev->stats.tx_dropped++;
+ dev_kfree_skb_any(skb);
+ }
+}
+
+static struct sk_buff *oa_tc6_detach_waiting_tx_skb(struct oa_tc6 *tc6)
+{
+ struct sk_buff *skb;
+
+ lockdep_assert_held(&tc6->tx_skb_lock);
+ skb = tc6->waiting_tx_skb;
+ tc6->waiting_tx_skb = NULL;
+
+ return skb;
+}
+
static void oa_tc6_cleanup_ongoing_rx_skb(struct oa_tc6 *tc6)
{
if (tc6->rx_skb) {
@@ -663,29 +683,39 @@ static void oa_tc6_cleanup_ongoing_rx_skb(struct oa_tc6 *tc6)
static void oa_tc6_cleanup_ongoing_tx_skb(struct oa_tc6 *tc6)
{
- if (tc6->ongoing_tx_skb) {
- tc6->netdev->stats.tx_dropped++;
- kfree_skb(tc6->ongoing_tx_skb);
- tc6->ongoing_tx_skb = NULL;
- }
+ oa_tc6_drop_tx_skb(tc6, tc6->ongoing_tx_skb);
+ tc6->ongoing_tx_skb = NULL;
}
static void oa_tc6_cleanup_waiting_tx_skb(struct oa_tc6 *tc6)
{
- if (tc6->waiting_tx_skb) {
- tc6->netdev->stats.tx_dropped++;
- kfree_skb(tc6->waiting_tx_skb);
- tc6->waiting_tx_skb = NULL;
- }
+ struct sk_buff *skb;
+
+ spin_lock_bh(&tc6->tx_skb_lock);
+ skb = oa_tc6_detach_waiting_tx_skb(tc6);
+ spin_unlock_bh(&tc6->tx_skb_lock);
+
+ oa_tc6_drop_tx_skb(tc6, skb);
}
-static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)
+static void oa_tc6_free_ongoing_skbs(struct oa_tc6 *tc6)
{
oa_tc6_cleanup_ongoing_tx_skb(tc6);
oa_tc6_cleanup_ongoing_rx_skb(tc6);
+}
+
+static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)
+{
+ oa_tc6_free_ongoing_skbs(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.
@@ -693,9 +723,19 @@ static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)
static void oa_tc6_disable_traffic(struct oa_tc6 *tc6)
{
u32 regval = INT_MASK0_ALL_INTERRUPTS;
+ struct sk_buff *skb;
+ spin_lock_bh(&tc6->tx_skb_lock);
tc6->disable_traffic = true;
- oa_tc6_free_pending_skbs(tc6);
+ skb = oa_tc6_detach_waiting_tx_skb(tc6);
+ spin_unlock_bh(&tc6->tx_skb_lock);
+
+ /* disable_traffic, when set, is a point of no return to working
+ * state. TX queues are disabled.
+ */
+ netif_tx_disable(tc6->netdev);
+ oa_tc6_drop_tx_skb(tc6, skb);
+ oa_tc6_free_ongoing_skbs(tc6);
oa_tc6_write_register(tc6, OA_TC6_REG_INT_MASK0, regval);
oa_tc6_read_register(tc6, OA_TC6_REG_STATUS0, ®val);
oa_tc6_write_register(tc6, OA_TC6_REG_STATUS0, regval);
@@ -723,8 +763,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;
@@ -750,6 +789,8 @@ static int oa_tc6_process_extended_status(struct oa_tc6 *tc6)
static int oa_tc6_process_rx_chunk_footer(struct oa_tc6 *tc6, u32 footer)
{
+ int ret = 0;
+
/* Process rx chunk footer for the following,
* 1. tx credits
* 2. errors if any from MAC-PHY
@@ -760,9 +801,11 @@ static int oa_tc6_process_rx_chunk_footer(struct oa_tc6 *tc6, u32 footer)
footer);
if (FIELD_GET(OA_TC6_DATA_FOOTER_EXTENDED_STS, footer)) {
- int ret = oa_tc6_process_extended_status(tc6);
-
- if (ret)
+ ret = oa_tc6_process_extended_status(tc6);
+ /* EAGAIN error is recoverable. Move on to check
+ * HEADER and SYNC errors before returning.
+ */
+ if (ret && ret != -EAGAIN)
return ret;
}
@@ -780,7 +823,7 @@ static int oa_tc6_process_rx_chunk_footer(struct oa_tc6 *tc6, u32 footer)
return -ENODEV;
}
- return 0;
+ return ret;
}
static void oa_tc6_submit_rx_skb(struct oa_tc6 *tc6)
@@ -805,13 +848,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 +896,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 +913,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,
@@ -901,8 +970,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
@@ -916,6 +984,15 @@ 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);
+
+ /* Return value from oa_tc6_prcs_rx_frame_end is not
+ * checked. If it returned an error, it is to make
+ * the code to look for new frame. At this stage,
+ * code below is going to process a new frame. So,
+ * error condition is set to false, in case it is
+ * set before proceeding.
+ */
+ tc6->rx_buf_overflow = false;
}
size = OA_TC6_CHUNK_PAYLOAD_SIZE - start_byte_offset;
return oa_tc6_prcs_rx_frame_start(tc6,
@@ -924,9 +1001,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)
@@ -942,8 +1017,9 @@ static u32 oa_tc6_get_rx_chunk_footer(struct oa_tc6 *tc6, u16 footer_offset)
static int oa_tc6_process_spi_data_rx_buf(struct oa_tc6 *tc6, u16 length)
{
u16 no_of_rx_chunks = length / OA_TC6_CHUNK_SIZE;
+ bool retry = false;
+ int ret = 0;
u32 footer;
- int ret;
/* All the rx chunks in the receive SPI data buffer are examined here */
for (int i = 0; i < no_of_rx_chunks; i++) {
@@ -952,8 +1028,11 @@ static int oa_tc6_process_spi_data_rx_buf(struct oa_tc6 *tc6, u16 length)
OA_TC6_CHUNK_PAYLOAD_SIZE);
ret = oa_tc6_process_rx_chunk_footer(tc6, footer);
- if (ret)
- return ret;
+ if (ret) {
+ if (ret != -EAGAIN)
+ return ret;
+ retry = true;
+ }
/* If there is a data valid chunks then process it for the
* information needed to determine the validity and the location
@@ -965,12 +1044,35 @@ static int oa_tc6_process_spi_data_rx_buf(struct oa_tc6 *tc6, u16 length)
ret = oa_tc6_prcs_rx_chunk_payload(tc6, payload,
footer);
- if (ret)
- return ret;
+ if (ret) {
+ if (ret != -ENOMEM && ret != -EAGAIN)
+ return ret;
+ retry = true;
+ }
}
}
- return 0;
+ /* Not bailing out on recoverable error codes, -EAGAIN and
+ * -ENOMEM. If subsequent loop iterations, if any, succeeds,
+ * error code would be overwritten. retry flag helps to
+ * make the caller to continue and retry. Since recovery
+ * action for -ENOMEM and -EAGAIN are same, we are returning
+ * one of the error codes, that is -EAGAIN.
+ *
+ * Successful recovery depends on how small the frames are,
+ * how many chunks, among the received chunks triggered the
+ * error, whether data is intact even with error conditions.
+ * As a result, there is no single, best method to recover
+ * most data when error conditions hit. We do our best by
+ * processing all the chunks with good "footer header" and
+ * "data valid" bit set.
+ */
+ if (retry) {
+ ret = -EAGAIN;
+ oa_tc6_look_for_new_frame(tc6);
+ }
+
+ return ret;
}
static __be32 oa_tc6_prepare_data_header(bool data_valid, bool start_valid,
@@ -1132,12 +1234,13 @@ static int oa_tc6_try_spi_transfer(struct oa_tc6 *tc6)
}
ret = oa_tc6_process_spi_data_rx_buf(tc6, spi_len);
- if (ret) {
- if (ret == -EAGAIN)
- continue;
- oa_tc6_cleanup_ongoing_tx_skb(tc6);
- oa_tc6_cleanup_ongoing_rx_skb(tc6);
+ /* Not continuing with the next iteration to give
+ * waiting_tx_skb a chance to get drained, if
+ * needed.
+ */
+ if (ret && ret != -EAGAIN) {
+ oa_tc6_free_ongoing_skbs(tc6);
netdev_err(tc6->netdev, "Device error: %d\n", ret);
return ret;
}
@@ -1159,15 +1262,20 @@ static irqreturn_t oa_tc6_macphy_threaded_irq(int irq, void *data)
* no need to attempt spi transfer, once it fails. Pending skbs
* are already freed.
*/
- if (!tc6->disable_traffic) {
- while (tc6->int_flag ||
- (tc6->waiting_tx_skb && tc6->tx_credits)) {
- ret = oa_tc6_try_spi_transfer(tc6);
- if (ret) {
- disable_irq_nosync(tc6->spi->irq);
- oa_tc6_disable_traffic(tc6);
- break;
- }
+ spin_lock_bh(&tc6->tx_skb_lock);
+ if (tc6->disable_traffic) {
+ spin_unlock_bh(&tc6->tx_skb_lock);
+ return IRQ_HANDLED;
+ }
+ spin_unlock_bh(&tc6->tx_skb_lock);
+
+ while (tc6->int_flag ||
+ (tc6->waiting_tx_skb && tc6->tx_credits)) {
+ ret = oa_tc6_try_spi_transfer(tc6);
+ if (ret) {
+ disable_irq_nosync(tc6->spi->irq);
+ oa_tc6_disable_traffic(tc6);
+ break;
}
}
@@ -1250,18 +1358,22 @@ 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++;
+ oa_tc6_drop_tx_skb(tc6, skb);
return NETDEV_TX_OK;
}
spin_lock_bh(&tc6->tx_skb_lock);
+ if (tc6->waiting_tx_skb) {
+ netif_stop_queue(tc6->netdev);
+ spin_unlock_bh(&tc6->tx_skb_lock);
+ return NETDEV_TX_BUSY;
+ }
+ if (tc6->disable_traffic) {
+ spin_unlock_bh(&tc6->tx_skb_lock);
+ oa_tc6_drop_tx_skb(tc6, skb);
+ return NETDEV_TX_OK;
+ }
tc6->waiting_tx_skb = skb;
spin_unlock_bh(&tc6->tx_skb_lock);
@@ -1393,7 +1505,9 @@ EXPORT_SYMBOL_GPL(oa_tc6_init);
*/
void oa_tc6_exit(struct oa_tc6 *tc6)
{
+ spin_lock_bh(&tc6->tx_skb_lock);
tc6->disable_traffic = true;
+ spin_unlock_bh(&tc6->tx_skb_lock);
disable_irq(tc6->spi->irq);
oa_tc6_phy_exit(tc6);
oa_tc6_free_pending_skbs(tc6);
|
| 3/2 | 2026/07/31 07:35 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 7757 output: 20 thoughts: 384 Thoughts: **Analyzing the Potential Reachability of This Ethernet Driver Patch** Okay, so I'm looking at this patch for `drivers/net/ethernet/oa_tc6.c`, which is the Ethernet driver for the OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interface. The changes are focused on how transmit and receive skbs are handled, with new functions like `oa_tc6_drop_tx_skb`, and modifications to error handling in the RX processing functions, and a specific change to `oa_tc6_start_xmit`. The key question is whether this is exploitable or detectable in a virtualized environment for fuzzing. My initial thought is, can this be even reached via standard fuzzing techniques or is it something specific to an SPI device? This is an SPI-based interface, so it's not a standard NIC. Syzkaller doesn't have native SPI emulation, which is a problem. However, sometimes there's a workaround. We might be able to inject SPI traffic if it’s possible somehow, or maybe the driver exposes standard netdev ops. Wait a minute, `oa_tc6_start_xmit` *is* a netdev op! This is a good sign. If the netdev is registered, then it *could* be reached and fuzzed using standard network syscalls. So, the critical point is how the netdev is initialized and registered. I need to find the initialization routine. I'll search for `oa_tc6_init` or `oa_tc6_start_xmit` in the code base to trace how this driver is brought up. That will tell me if this can be fuzzed or not. |
| 4/2 | 2026/07/31 07:35 | tool | grepper |
0mArgs:{
"Expression": "oa_tc6_init"
}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=1385=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1387-/**\ndrivers/net/ethernet/oa_tc6.c:1388: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1389- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1394- */\ndrivers/net/ethernet/oa_tc6.c:1395:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1396-{\n--\ndrivers/net/ethernet/oa_tc6.c-1499-}\ndrivers/net/ethernet/oa_tc6.c:1500:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1501-\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"
} |
| 5/2 | 2026/07/31 07:35 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 9237 output: 19 thoughts: 176 Thoughts: **Analyzing the LAN865x Driver's Initialization Path** Okay, so I see that `oa_tc6_init` is called from `lan865x_probe` within the `lan865x.c` file – and this is an SPI driver, which is important to remember. The immediate question I have is, "Can we even *reach* `lan865x_probe` reliably?" It's a probe function, which, in the context of SPI drivers, makes things a bit less straightforward. My experience with SPI drivers in the context of Syzkaller tells me that general probing is not likely. SPI devices typically get their initialization parameters either from the device tree or from the board files. Syzkaller usually needs a specific setup to trigger these types of probes, like we see in the cases of the `mac80211_hwsim` module for Wi-Fi, the `vkms` module for DRM, or the `vhci` module for USB. It doesn't typically just probe random SPI devices. So, the next logical step is to see if there's any pathway that allows the instantiation of this particular SPI device from the perspective of Syzkaller's probing mechanism. I need to figure out how to force this driver to load. |
| 6/2 | 2026/07/31 07:35 | tool | grepper |
0mArgs:{
"Expression": "lan865x"
}Results: {
"Output": "MAINTAINERS=17623=F:\tDocumentation/devicetree/bindings/net/microchip,lan8650.yaml\nMAINTAINERS:17624:F:\tdrivers/net/ethernet/microchip/lan865x/lan865x.c\nMAINTAINERS-17625-\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"
} |
| 7/2 | 2026/07/31 07:35 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 20062 output: 25 thoughts: 235 Thoughts: **Fuzzing the LAN865x SPI Driver with Syzkaller: A Reality Check** Okay, so I'm looking at `drivers/net/ethernet/microchip/lan865x/lan865x.c`, and it's a Microchip LAN865x SPI driver. The immediate question is, can I even fuzz this with syzkaller? The problem, as I recall, is that syzkaller doesn't have a *generic* SPI emulator built-in. I mean, it doesn't look like there's a plug-and-play SPI emulation layer like you'd get with, say, a virtio device. I thought I remembered *some* SPI support, but after a moment of reflection, that's not quite right. It's more nuanced than that. So, I need to understand if the LAN865x is a dead end. I should double-check if any other driver uses `oa_tc6_init`. Let me glance back at `drivers/net/ethernet/oa_tc6.c`. Yep, it looks like it's a framework for OPEN Alliance TC6. Now, is there any chance there's a virtual driver or emulator related to this TC6 framework? It appears not, or I would have remembered it. It appears to be a MAC-PHY SPI interface. Right, so if it's an SPI device, and there's no SPI emulator within QEMU that syzkaller utilizes, then the code in `lan865x.c` is going to be effectively unreachable within syzkaller's current capabilities. This driver is going to be dead code, as far as fuzzing goes. Wait, just to be absolutely sure, let me check myself. Doesn't syzkaller have something like `syz_spi_setup`? I'll browse through the system call definitions to check, but no. Alright, let's look at the documentation, like `sys/linux/dev_spi.txt`, to confirm. |
| 8/2 | 2026/07/31 07:35 | tool | grepper |
0mError:no matches Args: {
"Expression": "spi",
"PathPrefix": "sys/linux/"
}Results: {
"error": "no matches"
} |
| 9/2 | 2026/07/31 07:35 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 20777 output: 21 thoughts: 46 Thoughts: Okay, here's my interpretation of those thoughts, crafted for an expert audience, presented in the first person: **Navigating the Linux System Codebase** Alright, hold on a second. I was about to reach for `grepper` to explore the `sys/linux/` directory, but that won't be optimal. `grepper` isn't the right tool for deep dives into this particular codebase structure. It's more suited for quick, broad searches. I should be using `read-file` for targeted analysis within specific files, or ideally, the `codesearch-dir-index` functionality for a much more efficient, indexed search across that entire directory. Much better. Let's switch gears then. My focus is SPI. I'm going to leverage either of those superior tools to meticulously check `sys/linux/` for anything related to SPI. Time to get to work. |
| 10/2 | 2026/07/31 07:36 | tool | codesearch-dir-index |
0mError:the directory does not exist Args: {
"Dir": "sys/linux"
}Results: {
"error": "the directory does not exist"
} |
| 11/2 | 2026/07/31 07:36 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 21056 output: 29 thoughts: 59 Thoughts: **Kernel SPI Emulator Hunt** Okay, so this tool isn't meant for messing around in the `syzkaller` codebase, good to know. My focus is the kernel itself. Right, I need to figure out if there's an SPI emulator lurking in the kernel sources. Let me just think... where would they stash something like that? Let's see... could it be in `drivers/spi/spi-mockup.c`? That has possibilities. And what about `drivers/spi/spi-loopback-test.c`? That might also be a viable candidate. Time to go dig around in those files, and see what's what. |
| 12/2 | 2026/07/31 07:36 | tool | grepper |
0mArgs:{
"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=545=static int atcspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-atcspi200.c-588-\ndrivers/spi/spi-atcspi200.c:589:\tret = devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-atcspi200.c-590-\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=1785=static int cqspi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cadence-quadspi.c-1978-\ndrivers/spi/spi-cadence-quadspi.c:1979:\tret = spi_register_controller(host);\ndrivers/spi/spi-cadence-quadspi.c-1980-\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=312=static int cs42l43_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-cs42l43.c-409-\ndrivers/spi/spi-cs42l43.c:410:\tret = devm_spi_register_controller(priv-\u003edev, priv-\u003ectlr);\ndrivers/spi/spi-cs42l43.c-411-\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=339=static int spi_gpio_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-gpio.c-412-\ndrivers/spi/spi-gpio.c:413:\treturn devm_spi_register_controller(\u0026pdev-\u003edev, host);\ndrivers/spi/spi-gpio.c-414-}\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=430=static int hisi_sfc_v3xx_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-hisi-sfc-v3xx.c-496-\ndrivers/spi/spi-hisi-sfc-v3xx.c:497:\tret = devm_spi_register_controller(dev, ctlr);\ndrivers/spi/spi-hisi-sfc-v3xx.c-498-\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=2219=static int spi_imx_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-imx.c-2359-\ndrivers/spi/spi-imx.c:2360:\tret = spi_register_controller(controller);\ndrivers/spi/spi-imx.c-2361-\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"
} |
| 13/2 | 2026/07/31 07:36 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 31328 output: 27 thoughts: 543 Thoughts: **My Investigation into Reaching an SPI Device in Syzkaller** Okay, so I'm thinking about how to get syzkaller to test this `oa_tc6` Ethernet driver. My initial thought was, "Hey, there's `drivers/spi/spi-loopback-test.c`, but that's just a test driver, right?" Can I instantiate an SPI device directly from userspace? Probably not, I'm thinking of `spidev`, which lets you *talk* to an SPI device, but doesn't let you *be* the device itself. I considered emulating the SPI controller, maybe there's `drivers/spi/spi-mockup.c`? Hmm, I don't remember seeing that. I started wondering if any SPI controller could be fuzzed. Then I realized that `drivers/net/ethernet/oa_tc6.c` is likely unreachable unless syzkaller is specifically configured to interact with it, and it's unlikely, given the nature of the device. Then I started thinking of other syzkaller modules, like the `syz_mac80211_hwsim` for wifi, `syz_vhci` for USB, `syz_genetlink` for netlink. But does it have *anything* for SPI? I should check `sys/linux/dev_spi.txt` or something similar, but I can't directly, so I should look for mentions of `oa_tc6` in syzkaller. Hold on... the commit message! It says `Author: syz-cluster <triage@syzkaller.com>`. "syz-cluster: applied patch under review"! That means syzkaller *found* a bug in this code, or it's testing a patch for it! And, if it's testing a patch, it *can* reach this code! But how? Is it a virtual SPI controller? Or is `oa_tc6` being instantiated in a different way? This is important! Syzkaller found a bug here. It *must* be reachable. Okay, let's look at `drivers/net/ethernet/microchip/lan865x/lan865x.c`. It's another SPI driver. Now how could syzkaller probe an SPI driver? Maybe via `syz_devlink` or some netlink command? No, that's not right. SPI devices are created with `spi_new_device` or device tree overlays, or maybe even `sysfs`? But, wait, is there a `spi-mockup` or something similar? I really need to see if there's any `spi` related pseudo-syscall in syzkaller. |
| 14/2 | 2026/07/31 07:36 | tool | grepper |
0mError:no matches Args: {
"Expression": "syz_",
"PathPrefix": "include/linux/"
}Results: {
"error": "no matches"
} |
| 15/2 | 2026/07/31 07:36 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 32506 output: 19 thoughts: 802 Thoughts: **Assessing the Fuzzing Potential of an `oa_tc6` Driver Patch** Okay, so I need to figure out if this patch to `oa_tc6.c` is worth fuzzing. Initially, I thought I could use `read-file` on `sys/linux/`, but the prompt warns against it for syzkaller-specific stuff, which this likely is not. But, since syzkaller is testing it, it *can* reach it somehow. I should focus on the patch itself. Looking at the code, it touches core functions: `oa_tc6_drop_tx_skb`, `oa_tc6_detach_waiting_tx_skb`, and a ton of others, all dealing with TX/RX skbs, SPI transfers, and interrupts. This is the heart of the `oa_tc6` driver – definitely functional and worth investigating for fuzzing potential. Now, the prompt gives me pause. It says to return `WorthFuzzing=false` if it’s hardware-dependent in a way that can't be emulated in standard QEMU. Things like vendor-specific PCIe cards, SmartNICs, or GPU drivers are off limits. But, the driver is for an SPI device, which isn't a PCIe card, right? The key question is, can an SPI device be emulated? Syzkaller could be using a mock SPI controller, or some clever abstraction. I know `mac80211_hwsim` exists for wifi, so I'm wondering if there's an `spi` hwsim. I need to check if QEMU has any SPI controllers at all. QEMU does have some, especially for ARM boards, but Syzkaller usually runs on x86_64, right? So, the architecture question is still open. Perhaps this driver is tested through a mock. Time to check `drivers/net/ethernet/oa_tc6.c` Kconfig and see how it's set up. I need to understand the configuration and dependencies to determine if this can be realistically fuzzed in a standard environment. |
| 16/2 | 2026/07/31 07:36 | tool | grepper |
0mArgs:{
"Expression": "config OA_TC6"
}Results: {
"Output": "drivers/net/ethernet/Kconfig=139=config ETHOC\n--\ndrivers/net/ethernet/Kconfig-148-\ndrivers/net/ethernet/Kconfig:149:config OA_TC6\ndrivers/net/ethernet/Kconfig-150-\ttristate \"OPEN Alliance TC6 10BASE-T1x MAC-PHY support\" if COMPILE_TEST\n"
} |
| 17/2 | 2026/07/31 07:36 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 33891 output: 37 thoughts: 70 Thoughts: **Investigating the OPEN Alliance TC6 10BASE-T1x Support in the Kernel** Okay, so I'm looking at this `config OA_TC6` option and it looks like it's setting up support for the OPEN Alliance TC6 10BASE-T1x MAC-PHY, which is interesting. But the `if COMPILE_TEST` condition is throwing me a bit. Why is this only exposed if we're compiling for testing? That seems odd. It probably means it is for the test infrastructure. Right, time to go spelunking. I'll need to figure out the context of this configuration option, so I should take a look at the `drivers/net/ethernet/Kconfig` file. That's where all the Ethernet driver configurations live, so I'll be able to see how this option fits into the broader picture of Ethernet support within the kernel. Let's see what we can dig up. |
| 18/2 | 2026/07/31 07:36 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/Kconfig",
"FirstLine": 145,
"LineCount": 20
}Results: {
"Contents": " 145:\t\tselect BITREVERSE\n 146:\t\thelp\n 147:\t\t Say Y here if you want to use the OpenCores 10/100 Mbps Ethernet MAC.\n 148:\t\n 149:\tconfig OA_TC6\n 150:\t\ttristate \"OPEN Alliance TC6 10BASE-T1x MAC-PHY support\" if COMPILE_TEST\n 151:\t\tdepends on SPI\n 152:\t\tselect PHYLIB\n 153:\t\thelp\n 154:\t\t This library implements OPEN Alliance TC6 10BASE-T1x MAC-PHY\n 155:\t\t Serial Interface protocol for supporting 10BASE-T1x MAC-PHYs.\n 156:\t\n 157:\t\t To know the implementation details, refer documentation in\n 158:\t\t \u003cfile:Documentation/networking/oa-tc6-framework.rst\u003e.\n 159:\t\n 160:\tsource \"drivers/net/ethernet/pasemi/Kconfig\"\n 161:\tsource \"drivers/net/ethernet/pensando/Kconfig\"\n 162:\tsource \"drivers/net/ethernet/qlogic/Kconfig\"\n 163:\tsource \"drivers/net/ethernet/brocade/Kconfig\"\n 164:\tsource \"drivers/net/ethernet/qualcomm/Kconfig\"\n"
} |
| 19/2 | 2026/07/31 07:36 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 34562 output: 19 thoughts: 29 Thoughts: Okay, here's my take on those thoughts, framed as a first-person summary, keeping in mind my expertise: **Investigating the `OA_TC6` Library Selection** Alright, I'm looking at this library, `OA_TC6`. The mental note is that it's being *selected* by drivers, right? That suggests a specific use case, perhaps some kind of instrumentation or control system. Now, the real question is, which drivers? And more importantly, *why*? I need to understand the selection criteria to get the complete picture. The library name itself likely provides clues, but I need the context of its callers. What functionalities are they looking for? Is it a standard interface or something vendor-specific? Time to dig deeper into the driver code... the analysis begins! |
| 20/2 | 2026/07/31 07:36 | tool | grepper |
0mArgs:{
"Expression": "select OA_TC6"
}Results: {
"Output": "drivers/net/ethernet/microchip/lan865x/Kconfig=8=config LAN865X\n--\ndrivers/net/ethernet/microchip/lan865x/Kconfig-10-\tdepends on SPI\ndrivers/net/ethernet/microchip/lan865x/Kconfig:11:\tselect OA_TC6\ndrivers/net/ethernet/microchip/lan865x/Kconfig-12-\thelp\n"
} |
| 21/2 | 2026/07/31 07:36 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 34902 output: 44 thoughts: 51 Thoughts: **LAN865X and OA_TC6: A Quick Check** Okay, so the `LAN865X` driver is configured to use `OA_TC6`, which is a good starting point, but I need to make sure the board is properly configured. My immediate thought is, can the `LAN865X` even be reached? Let's verify that the hardware is reachable. Time to dive into the kernel configuration to confirm the underlying setup. I'll need to double-check `drivers/net/ethernet/microchip/lan865x/Kconfig` to see what's what. That file should reveal the dependencies and configuration options I need to know. |
| 22/2 | 2026/07/31 07:37 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/microchip/lan865x/Kconfig",
"FirstLine": 1,
"LineCount": 20
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# Microchip LAN865x Driver Support\n 4:\t#\n 5:\t\n 6:\tif NET_VENDOR_MICROCHIP\n 7:\t\n 8:\tconfig LAN865X\n 9:\t\ttristate \"LAN865x support\"\n 10:\t\tdepends on SPI\n 11:\t\tselect OA_TC6\n 12:\t\thelp\n 13:\t\t Support for the Microchip LAN8650/1 Rev.B0/B1 MACPHY Ethernet chip. It\n 14:\t\t uses OPEN Alliance 10BASE-T1x Serial Interface specification.\n 15:\t\n 16:\t\t To compile this driver as a module, choose M here. The module will be\n 17:\t\t called lan865x.\n 18:\t\n 19:\tendif # NET_VENDOR_MICROCHIP\n"
} |
| 23/2 | 2026/07/31 07:37 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 35400 output: 51 thoughts: 493 Thoughts: **Reviewing the Patch: LAN865x and Fuzzing Considerations** Okay, so I'm looking at this patch and immediately, my brain zeroes in on `SPI` and `NET_VENDOR_MICROCHIP`. The key question is, *can* this be fuzzed effectively? I'm trying to figure out if syzkaller found a bug here. Was the driver already being tested? Did it find something, or is this just a new patch the cluster is testing? Let's refocus – the prompt is clear: I need to determine if this patch introduces *functional* changes worth fuzzing. The guidelines are specific: if it involves unreachable code paths in virtualized environments (like GCE or QEMU), or vendor-specific hardware requiring physical cards, then it's not worth fuzzing, based on this criteria. The crucial point: is `lan865x` vendor-specific hardware? Yes, it's a Microchip LAN8650/1 MACPHY Ethernet chip. It's an SPI device. That's a huge clue. *Can* QEMU emulate this? No, QEMU doesn't emulate the LAN865x. Alright, but if it's SPI, could it be instantiated via a generic SPI dummy driver? That's the workaround – could we get to the probe function even without the exact hardware? If there's no LAN865x emulator, the `lan865x_probe` function will never be called if the SPI bus doesn't know about it. So, can userspace instantiate SPI devices through `/sys/bus/spi/devices/...` or via device tree overlays? Yes, that's possible. However, even if we instantiate it, the driver *will* try to communicate with the hardware via SPI. If that hardware isn't there, the SPI transfers are going to fail. Will they time out? Or just return zero values? If it returns zero, the driver might fail during the probe. I need to examine `lan865x_probe` to be sure. |
| 24/2 | 2026/07/31 07:37 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/microchip/lan865x/lan865x.c",
"FirstLine": 333,
"LineCount": 50
}Results: {
"Contents": " 333:\tstatic int lan865x_probe(struct spi_device *spi)\n 334:\t{\n 335:\t\tstruct net_device *netdev;\n 336:\t\tstruct lan865x_priv *priv;\n 337:\t\tint ret;\n 338:\t\n 339:\t\tnetdev = alloc_etherdev(sizeof(struct lan865x_priv));\n 340:\t\tif (!netdev)\n 341:\t\t\treturn -ENOMEM;\n 342:\t\n 343:\t\tpriv = netdev_priv(netdev);\n 344:\t\tpriv-\u003enetdev = netdev;\n 345:\t\tpriv-\u003espi = spi;\n 346:\t\tspi_set_drvdata(spi, priv);\n 347:\t\tINIT_WORK(\u0026priv-\u003emulticast_work, lan865x_multicast_work_handler);\n 348:\t\n 349:\t\tpriv-\u003etc6 = oa_tc6_init(spi, netdev);\n 350:\t\tif (!priv-\u003etc6) {\n 351:\t\t\tret = -ENODEV;\n 352:\t\t\tgoto free_netdev;\n 353:\t\t}\n 354:\t\n 355:\t\t/* LAN865x Rev.B0/B1 configuration parameters from AN1760\n 356:\t\t * As per the Configuration Application Note AN1760 published in the\n 357:\t\t * link, https://www.microchip.com/en-us/application-notes/an1760\n 358:\t\t * Revision F (DS60001760G - June 2024), configure the MAC to set time\n 359:\t\t * stamping at the end of the Start of Frame Delimiter (SFD) and set the\n 360:\t\t * Timer Increment reg to 40 ns to be used as a 25 MHz internal clock.\n 361:\t\t */\n 362:\t\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_TSU_TIMER_INCR,\n 363:\t\t\t\t\t MAC_TSU_TIMER_INCR_COUNT_NANOSECONDS);\n 364:\t\tif (ret) {\n 365:\t\t\tdev_err(\u0026spi-\u003edev, \"Failed to config TSU Timer Incr reg: %d\\n\",\n 366:\t\t\t\tret);\n 367:\t\t\tgoto oa_tc6_exit;\n 368:\t\t}\n 369:\t\n 370:\t\t/* As per the point s3 in the below errata, SPI receive Ethernet frame\n 371:\t\t * transfer may halt when starting the next frame in the same data block\n 372:\t\t * (chunk) as the end of a previous frame. The RFA field should be\n 373:\t\t * configured to 01b or 10b for proper operation. In these modes, only\n 374:\t\t * one receive Ethernet frame will be placed in a single data block.\n 375:\t\t * When the RFA field is written to 01b, received frames will be forced\n 376:\t\t * to only start in the first word of the data block payload (SWO=0). As\n 377:\t\t * recommended, enable zero align receive frame feature for proper\n 378:\t\t * operation.\n 379:\t\t *\n 380:\t\t * https://ww1.microchip.com/downloads/aemDocuments/documents/AIS/ProductDocuments/Errata/LAN8650-1-Errata-80001075.pdf\n 381:\t\t */\n 382:\t\tret = oa_tc6_zero_align_receive_frame_enable(priv-\u003etc6);\n"
} |
| 25/2 | 2026/07/31 07:37 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 37350 output: 41 thoughts: 30 Thoughts: Here's my analysis of the situation, tailored for my expert understanding: **Analyzing the Call to `oa_tc6_write_register` During Probing** Okay, so I see `oa_tc6_write_register` is being invoked within the probe routine. That immediately flags a critical area to examine. Probing often involves initial configuration and hardware checks, so this function is likely responsible for setting up or verifying the state of a specific register associated with "oa_tc6". Given my familiarity with similar systems, I need to understand what this register controls and how its initial state impacts the device's functionality. My immediate focus is to delve into the `oa_tc6_write_register` function itself. I need to dissect its purpose and understand its arguments, any side effects it might have, and where it writes the data. I'll be looking for potential issues related to incorrect initial register values, timing concerns during the write operation, or possible conflicts with other initialization sequences. Any failures here could manifest as probe errors, device malfunction, or instability down the line, hence this warrants immediate and detailed analysis. |
| 26/2 | 2026/07/31 07:37 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/oa_tc6.c",
"FirstLine": 220,
"LineCount": 50
}Results: {
"Contents": " 220:\tstatic u16 oa_tc6_calculate_ctrl_buf_size(u8 length)\n 221:\t{\n 222:\t\t/* Control command consists 4 bytes header + 4 bytes register value for\n 223:\t\t * each register + 4 bytes ignored value.\n 224:\t\t */\n 225:\t\treturn OA_TC6_CTRL_HEADER_SIZE + OA_TC6_CTRL_REG_VALUE_SIZE * length +\n 226:\t\t OA_TC6_CTRL_IGNORED_SIZE;\n 227:\t}\n 228:\t\n 229:\tstatic void oa_tc6_prepare_ctrl_spi_buf(struct oa_tc6 *tc6, u32 address,\n 230:\t\t\t\t\t\tu32 value[], u8 length,\n 231:\t\t\t\t\t\tenum oa_tc6_register_op reg_op)\n 232:\t{\n 233:\t\t__be32 *tx_buf = tc6-\u003espi_ctrl_tx_buf;\n 234:\t\n 235:\t\t*tx_buf = oa_tc6_prepare_ctrl_header(address, length, reg_op);\n 236:\t\n 237:\t\tif (reg_op == OA_TC6_CTRL_REG_WRITE)\n 238:\t\t\toa_tc6_update_ctrl_write_data(tc6, value, length);\n 239:\t}\n 240:\t\n 241:\tstatic int oa_tc6_check_ctrl_write_reply(struct oa_tc6 *tc6, u8 size)\n 242:\t{\n 243:\t\tu8 *tx_buf = tc6-\u003espi_ctrl_tx_buf;\n 244:\t\tu8 *rx_buf = tc6-\u003espi_ctrl_rx_buf;\n 245:\t\n 246:\t\trx_buf += OA_TC6_CTRL_IGNORED_SIZE;\n 247:\t\n 248:\t\t/* The echoed control write must match with the one that was\n 249:\t\t * transmitted.\n 250:\t\t */\n 251:\t\tif (memcmp(tx_buf, rx_buf, size - OA_TC6_CTRL_IGNORED_SIZE))\n 252:\t\t\treturn -EPROTO;\n 253:\t\n 254:\t\treturn 0;\n 255:\t}\n 256:\t\n 257:\tstatic int oa_tc6_check_ctrl_read_reply(struct oa_tc6 *tc6, u8 size)\n 258:\t{\n 259:\t\tu32 *rx_buf = tc6-\u003espi_ctrl_rx_buf + OA_TC6_CTRL_IGNORED_SIZE;\n 260:\t\tu32 *tx_buf = tc6-\u003espi_ctrl_tx_buf;\n 261:\t\n 262:\t\t/* The echoed control read header must match with the one that was\n 263:\t\t * transmitted.\n 264:\t\t */\n 265:\t\tif (*tx_buf != *rx_buf)\n 266:\t\t\treturn -EPROTO;\n 267:\t\n 268:\t\treturn 0;\n 269:\t}\n"
} |
| 27/2 | 2026/07/31 07:37 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 38491 output: 25 thoughts: 268 Thoughts: **Analyzing the Probe Failure** Okay, let me think this through. `oa_tc6_check_ctrl_write_reply` is supposed to confirm the data I wrote over SPI. It's using `memcmp` to check if the echo matches the transmitted control write. Right, if there's no real hardware present, or maybe some dummy SPI controller just spitting back zeros, that `memcmp` will inevitably fail, and return a `-EPROTO` error. Consequently, `oa_tc6_write_register` will choke on that error, which will eventually lead to a failure in `lan865x_probe`. So, the device will never be successfully probed unless the SPI interactions are mirrored or the hardware provides the right echoes. Hold on a second, did I hear right? Does syzkaller have `syz_spi_setup`? I swear I searched for `syz_` in `include/linux/` and found absolutely nothing. Oh, duh, pseudo-syscalls! They're not kernel-side! They're in syzkaller's `sys/linux/` directory. I can't directly search that in the kernel tree, but I can check if there's any SPI emulator in the kernel that syzkaller actually uses, right? Let's go back and search for `spi_register_controller` again in `drivers/spi/`, but this time I'll be looking for clues like "mockup" or "dummy". I bet I can find some useful info that way. |
| 28/2 | 2026/07/31 07:37 | tool | grepper |
0mArgs:{
"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=185=static void atcspi_set_trans_ctl(struct atcspi_dev *spi,\n--\ndrivers/spi/spi-atcspi200.c-206-\t\tif (op-\u003edata.dir == SPI_MEM_DATA_IN) {\ndrivers/spi/spi-atcspi200.c:207:\t\t\tif (op-\u003edummy.nbytes)\ndrivers/spi/spi-atcspi200.c-208-\t\t\t\ttc |= TRANS_MODE_DMY_READ |\ndrivers/spi/spi-atcspi200.c:209:\t\t\t\t TRANS_DUMMY_CNT(op-\u003edummy.nbytes);\ndrivers/spi/spi-atcspi200.c-210-\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=402=static unsigned int cqspi_calc_rdreg(const struct spi_mem_op *op)\n--\ndrivers/spi/spi-cadence-quadspi.c-412-\ndrivers/spi/spi-cadence-quadspi.c:413:static unsigned int cqspi_calc_dummy(const struct spi_mem_op *op)\ndrivers/spi/spi-cadence-quadspi.c-414-{\ndrivers/spi/spi-cadence-quadspi.c:415:\tunsigned int dummy_clk;\ndrivers/spi/spi-cadence-quadspi.c-416-\ndrivers/spi/spi-cadence-quadspi.c:417:\tif (!op-\u003edummy.nbytes)\ndrivers/spi/spi-cadence-quadspi.c-418-\t\treturn 0;\ndrivers/spi/spi-cadence-quadspi.c-419-\ndrivers/spi/spi-cadence-quadspi.c:420:\tdummy_clk = op-\u003edummy.nbytes * (8 / op-\u003edummy.buswidth);\ndrivers/spi/spi-cadence-quadspi.c-421-\tif (op-\u003ecmd.dtr)\ndrivers/spi/spi-cadence-quadspi.c:422:\t\tdummy_clk /= 2;\ndrivers/spi/spi-cadence-quadspi.c-423-\ndrivers/spi/spi-cadence-quadspi.c:424:\treturn dummy_clk;\ndrivers/spi/spi-cadence-quadspi.c-425-}\n--\ndrivers/spi/spi-cadence-quadspi.c=542=static int cqspi_command_read(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-551-\tunsigned int reg;\ndrivers/spi/spi-cadence-quadspi.c:552:\tunsigned int dummy_clk;\ndrivers/spi/spi-cadence-quadspi.c-553-\tsize_t read_len;\n--\ndrivers/spi/spi-cadence-quadspi.c-576-\ndrivers/spi/spi-cadence-quadspi.c:577:\tdummy_clk = cqspi_calc_dummy(op);\ndrivers/spi/spi-cadence-quadspi.c:578:\tif (dummy_clk \u003e CQSPI_DUMMY_CLKS_MAX)\ndrivers/spi/spi-cadence-quadspi.c-579-\t\treturn -EOPNOTSUPP;\ndrivers/spi/spi-cadence-quadspi.c-580-\ndrivers/spi/spi-cadence-quadspi.c:581:\tif (dummy_clk)\ndrivers/spi/spi-cadence-quadspi.c:582:\t\treg |= (dummy_clk \u0026 CQSPI_REG_CMDCTRL_DUMMY_MASK)\ndrivers/spi/spi-cadence-quadspi.c-583-\t\t \u003c\u003c CQSPI_REG_CMDCTRL_DUMMY_LSB;\n--\ndrivers/spi/spi-cadence-quadspi.c=694=static int cqspi_read_setup(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-698-\tvoid __iomem *reg_base = cqspi-\u003eiobase;\ndrivers/spi/spi-cadence-quadspi.c:699:\tunsigned int dummy_clk = 0;\ndrivers/spi/spi-cadence-quadspi.c-700-\tunsigned int reg;\n--\ndrivers/spi/spi-cadence-quadspi.c-715-\ndrivers/spi/spi-cadence-quadspi.c:716:\t/* Setup dummy clock cycles */\ndrivers/spi/spi-cadence-quadspi.c:717:\tdummy_clk = cqspi_calc_dummy(op);\ndrivers/spi/spi-cadence-quadspi.c-718-\ndrivers/spi/spi-cadence-quadspi.c:719:\tif (dummy_clk \u003e CQSPI_DUMMY_CLKS_MAX)\ndrivers/spi/spi-cadence-quadspi.c-720-\t\treturn -EOPNOTSUPP;\ndrivers/spi/spi-cadence-quadspi.c-721-\ndrivers/spi/spi-cadence-quadspi.c:722:\tif (dummy_clk)\ndrivers/spi/spi-cadence-quadspi.c:723:\t\treg |= (dummy_clk \u0026 CQSPI_REG_RD_INSTR_DUMMY_MASK)\ndrivers/spi/spi-cadence-quadspi.c-724-\t\t \u003c\u003c CQSPI_REG_RD_INSTR_DUMMY_LSB;\n--\ndrivers/spi/spi-cadence-quadspi.c=1021=static int cqspi_write_setup(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-1049-\t * passed in the Read SR command. Also, some SPI NOR flashes like the\ndrivers/spi/spi-cadence-quadspi.c:1050:\t * cypress Semper flash expect a 4-byte dummy address in the Read SR\ndrivers/spi/spi-cadence-quadspi.c-1051-\t * command in DTR mode.\n--\ndrivers/spi/spi-cadence-quadspi.c=1078=static int cqspi_indirect_write_execute(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-1116-\t * If a hazard exists between the APB and AHB interfaces, perform a\ndrivers/spi/spi-cadence-quadspi.c:1117:\t * dummy readback from the controller to ensure synchronization.\ndrivers/spi/spi-cadence-quadspi.c-1118-\t */\n--\ndrivers/spi/spi-cadence-quadspi.c=1329=static ssize_t cqspi_write(struct cqspi_flash_pdata *f_pdata,\n--\ndrivers/spi/spi-cadence-quadspi.c-1342-\t/*\ndrivers/spi/spi-cadence-quadspi.c:1343:\t * Some flashes like the Cypress Semper flash expect a dummy 4-byte\ndrivers/spi/spi-cadence-quadspi.c-1344-\t * address (all 0s) with the read status register command in DTR mode.\ndrivers/spi/spi-cadence-quadspi.c:1345:\t * But this controller does not support sending dummy address bytes to\ndrivers/spi/spi-cadence-quadspi.c-1346-\t * the flash when it is polling the write completion register in DTR\n--\ndrivers/spi/spi-cadence-quadspi.c=1520=static bool cqspi_supports_mem_op(struct spi_mem *mem,\n--\ndrivers/spi/spi-cadence-quadspi.c-1526-\t/*\ndrivers/spi/spi-cadence-quadspi.c:1527:\t * op-\u003edummy.dtr is required for converting nbytes into ncycles.\ndrivers/spi/spi-cadence-quadspi.c-1528-\t * Also, don't check the dtr field of the op phase having zero nbytes.\n--\ndrivers/spi/spi-cadence-quadspi.c-1531-\t\t (!op-\u003eaddr.nbytes || op-\u003eaddr.dtr) \u0026\u0026\ndrivers/spi/spi-cadence-quadspi.c:1532:\t\t (!op-\u003edummy.nbytes || op-\u003edummy.dtr) \u0026\u0026\ndrivers/spi/spi-cadence-quadspi.c-1533-\t\t (!op-\u003edata.nbytes || op-\u003edata.dtr);\ndrivers/spi/spi-cadence-quadspi.c-1534-\ndrivers/spi/spi-cadence-quadspi.c:1535:\tall_false = !op-\u003ecmd.dtr \u0026\u0026 !op-\u003eaddr.dtr \u0026\u0026 !op-\u003edummy.dtr \u0026\u0026\ndrivers/spi/spi-cadence-quadspi.c-1536-\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"
} |
| 29/2 | 2026/07/31 07:37 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 51837 output: 26 thoughts: 204 Thoughts: **Investigating SPI-Related Network Device Testing** Okay, so I'm thinking about how `dummy` is pretty standard for dummy cycles in SPI NOR flashes. But hang on, where's `spi-mockup`? I didn't see that one come up initially, and that's concerning. Let me dig into `drivers/spi/spi-loopback-test.c` – maybe there's a clue there. I'm trying to figure out if syzkaller could have possibly tested `oa_tc6`. Wait a second… that's right, `oa_tc6` is a MAC-PHY framework, not a direct network device! Okay, if I look at `drivers/net/ethernet/oa_tc6.c`, it does register a netdev, doesn't it? No, it's just the framework, not the device itself. Ah, right, `lan865x` is the one that registers the netdev. And, I remember `lan865x` is an SPI device. That's the key. So, how could syzkaller be testing it? Could syzkaller be injecting SPI devices using `spi-mockup`? Maybe there's some kind of support for mocking SPI devices, and then `lan865x` could be tested through this mocking interface. Let me do a quick search within `drivers/spi/` for either `spi_mockup` or `spi_dummy`, and see what I can find. That should provide some clarity. |
| 30/2 | 2026/07/31 07:37 | tool | grepper |
0mError:no matches Args: {
"Expression": "mockup",
"PathPrefix": "drivers/spi/"
}Results: {
"error": "no matches"
} |
| 31/2 | 2026/07/31 07:37 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 52411 output: 26 thoughts: 21 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Assessing the Testing Landscape** Alright, no immediate mockup to work from, that's fine. We're going to have to make a choice of existing testing frameworks. Where to start? Let me think... wait a minute, the `drivers/spi/spi-loopback-test.c` file. This looks like a promising avenue, could probably be a good first stop for understanding the existing testing patterns for SPI drivers. It likely offers a barebones approach, which I can use as a base or reference point. |
| 32/2 | 2026/07/31 07:37 | tool | grepper |
0mArgs:{
"Expression": "loopback",
"PathPrefix": "drivers/spi/"
}Results: {
"Output": "drivers/spi/Kconfig=1363=config SPI_LOOPBACK_TEST\ndrivers/spi/Kconfig:1364:\ttristate \"spi loopback test framework support\"\ndrivers/spi/Kconfig-1365-\tdepends on m\ndrivers/spi/Kconfig-1366-\thelp\ndrivers/spi/Kconfig:1367:\t This enables the SPI loopback testing framework driver\ndrivers/spi/Kconfig-1368-\n--\ndrivers/spi/Makefile=14=obj-$(CONFIG_SPI_SPIDEV)\t\t+= spidev.o\ndrivers/spi/Makefile:15:obj-$(CONFIG_SPI_LOOPBACK_TEST)\t\t+= spi-loopback-test.o\ndrivers/spi/Makefile-16-\n--\ndrivers/spi/spi-cadence-xspi.c-39-\ndrivers/spi/spi-cadence-xspi.c:40:/* PHY gate loopback control register */\ndrivers/spi/spi-cadence-xspi.c-41-#define CDNS_XSPI_CCP_PHY_GATE_LPBCK_CTRL\t0x0008\n--\ndrivers/spi/spi-cadence-xspi.c=959=static void cdns_xspi_print_phy_config(struct cdns_xspi_dev *cdns_xspi)\n--\ndrivers/spi/spi-cadence-xspi.c-969-\t\t readl(cdns_xspi-\u003eauxbase + CDNS_XSPI_CCP_PHY_DQS_TIMING));\ndrivers/spi/spi-cadence-xspi.c:970:\tdev_info(dev, \" * phy_gate_loopback_ctrl: %08x\\n\",\ndrivers/spi/spi-cadence-xspi.c-971-\t\t readl(cdns_xspi-\u003eauxbase + CDNS_XSPI_CCP_PHY_GATE_LPBCK_CTRL));\n--\ndrivers/spi/spi-geni-qcom.c=403=static int setup_gsi_xfer(struct spi_transfer *xfer, struct spi_geni_master *mas,\n--\ndrivers/spi/spi-geni-qcom.c-437-\ndrivers/spi/spi-geni-qcom.c:438:\tperipheral.loopback_en = !!(spi_slv-\u003emode \u0026 SPI_LOOP);\ndrivers/spi/spi-geni-qcom.c-439-\tperipheral.clock_pol_high = !!(spi_slv-\u003emode \u0026 SPI_CPOL);\n--\ndrivers/spi/spi-lantiq-ssc.c=307=static void hw_setup_clock_mode(const struct lantiq_ssc_spi *spi,\n--\ndrivers/spi/spi-lantiq-ssc.c-335-\ndrivers/spi/spi-lantiq-ssc.c:336:\t/* Set loopback mode */\ndrivers/spi/spi-lantiq-ssc.c-337-\tif (mode \u0026 SPI_LOOP)\n--\ndrivers/spi/spi-loopback-test.c-2-/*\ndrivers/spi/spi-loopback-test.c:3: * linux/drivers/spi/spi-loopback-test.c\ndrivers/spi/spi-loopback-test.c-4- *\n--\ndrivers/spi/spi-loopback-test.c=32=MODULE_PARM_DESC(dump_messages,\n--\ndrivers/spi/spi-loopback-test.c-35-\t\t \"=3 dump the spi_message structure before and after execution\");\ndrivers/spi/spi-loopback-test.c:36:/* the device is jumpered for loopback - enabling some rx_buf tests */\ndrivers/spi/spi-loopback-test.c:37:static int loopback;\ndrivers/spi/spi-loopback-test.c:38:module_param(loopback, int, 0);\ndrivers/spi/spi-loopback-test.c:39:MODULE_PARM_DESC(loopback,\ndrivers/spi/spi-loopback-test.c:40:\t\t \"if set enable loopback mode, where the rx_buf \"\t\\\ndrivers/spi/spi-loopback-test.c-41-\t\t \"is checked to match tx_buf after the spi_message \"\t\\\n--\ndrivers/spi/spi-loopback-test.c=85=static struct spi_test spi_tests[] = {\n--\ndrivers/spi/spi-loopback-test.c-356-\ndrivers/spi/spi-loopback-test.c:357:static int spi_loopback_test_probe(struct spi_device *spi)\ndrivers/spi/spi-loopback-test.c-358-{\n--\ndrivers/spi/spi-loopback-test.c-371-\ndrivers/spi/spi-loopback-test.c:372:\tdev_info(\u0026spi-\u003edev, \"Executing spi-loopback-tests\\n\");\ndrivers/spi/spi-loopback-test.c-373-\n--\ndrivers/spi/spi-loopback-test.c-375-\ndrivers/spi/spi-loopback-test.c:376:\tdev_info(\u0026spi-\u003edev, \"Finished spi-loopback-tests with return: %i\\n\",\ndrivers/spi/spi-loopback-test.c-377-\t\t ret);\n--\ndrivers/spi/spi-loopback-test.c-382-/* non const match table to permit to change via a module parameter */\ndrivers/spi/spi-loopback-test.c:383:static struct of_device_id spi_loopback_test_of_match[] = {\ndrivers/spi/spi-loopback-test.c:384:\t{ .compatible\t= \"linux,spi-loopback-test\", },\ndrivers/spi/spi-loopback-test.c-385-\t{ }\n--\ndrivers/spi/spi-loopback-test.c-388-/* allow to override the compatible string via a module_parameter */\ndrivers/spi/spi-loopback-test.c:389:module_param_string(compatible, spi_loopback_test_of_match[0].compatible,\ndrivers/spi/spi-loopback-test.c:390:\t\t sizeof(spi_loopback_test_of_match[0].compatible),\ndrivers/spi/spi-loopback-test.c-391-\t\t 0000);\ndrivers/spi/spi-loopback-test.c-392-\ndrivers/spi/spi-loopback-test.c:393:MODULE_DEVICE_TABLE(of, spi_loopback_test_of_match);\ndrivers/spi/spi-loopback-test.c-394-\ndrivers/spi/spi-loopback-test.c:395:static struct spi_driver spi_loopback_test_driver = {\ndrivers/spi/spi-loopback-test.c-396-\t.driver = {\ndrivers/spi/spi-loopback-test.c:397:\t\t.name = \"spi-loopback-test\",\ndrivers/spi/spi-loopback-test.c:398:\t\t.of_match_table = spi_loopback_test_of_match,\ndrivers/spi/spi-loopback-test.c-399-\t},\ndrivers/spi/spi-loopback-test.c:400:\t.probe = spi_loopback_test_probe,\ndrivers/spi/spi-loopback-test.c-401-};\ndrivers/spi/spi-loopback-test.c-402-\ndrivers/spi/spi-loopback-test.c:403:module_spi_driver(spi_loopback_test_driver);\ndrivers/spi/spi-loopback-test.c-404-\n--\ndrivers/spi/spi-loopback-test.c=506=static int spi_check_rx_ranges(struct spi_device *spi,\n--\ndrivers/spi/spi-loopback-test.c-559-\t\tdev_err(\u0026spi-\u003edev,\ndrivers/spi/spi-loopback-test.c:560:\t\t\t\"loopback strangeness - rx changed outside of allowed range at: %p\\n\",\ndrivers/spi/spi-loopback-test.c-561-\t\t\taddr);\n--\ndrivers/spi/spi-loopback-test.c=571=static int spi_test_check_elapsed_time(struct spi_device *spi,\n--\ndrivers/spi/spi-loopback-test.c-600-\ndrivers/spi/spi-loopback-test.c:601:static int spi_test_check_loopback_result(struct spi_device *spi,\ndrivers/spi/spi-loopback-test.c-602-\t\t\t\t\t struct spi_message *msg,\n--\ndrivers/spi/spi-loopback-test.c-609-\ndrivers/spi/spi-loopback-test.c:610:\t/* checks rx_buffer pattern are valid with loopback or without */\ndrivers/spi/spi-loopback-test.c-611-\tif (check_ranges) {\n--\ndrivers/spi/spi-loopback-test.c-616-\ndrivers/spi/spi-loopback-test.c:617:\t/* if we run without loopback, then return now */\ndrivers/spi/spi-loopback-test.c:618:\tif (!loopback)\ndrivers/spi/spi-loopback-test.c-619-\t\treturn 0;\n--\ndrivers/spi/spi-loopback-test.c-639-\t\t\t\tdev_err(\u0026spi-\u003edev,\ndrivers/spi/spi-loopback-test.c:640:\t\t\t\t\t\"loopback strangeness - we expect 0x00 or 0xff, but not 0x%02x\\n\",\ndrivers/spi/spi-loopback-test.c-641-\t\t\t\t\ttxb);\n--\ndrivers/spi/spi-loopback-test.c-656-\tdev_err(\u0026spi-\u003edev,\ndrivers/spi/spi-loopback-test.c:657:\t\t\"loopback strangeness - transfer mismatch on byte %04zx - expected 0x%02x, but got 0x%02x\\n\",\ndrivers/spi/spi-loopback-test.c-658-\t\ti, txb, rxb);\n--\ndrivers/spi/spi-loopback-test.c=932=int spi_test_execute_msg(struct spi_device *spi, struct spi_test *test,\n--\ndrivers/spi/spi-loopback-test.c-974-\t\t/* run rx-buffer tests */\ndrivers/spi/spi-loopback-test.c:975:\t\tret = spi_test_check_loopback_result(spi, msg, tx, rx);\ndrivers/spi/spi-loopback-test.c-976-\t\tif (ret)\n--\ndrivers/spi/spi-nxp-fspi.c=654=static void nxp_fspi_clk_disable_unprep(struct nxp_fspi *f)\n--\ndrivers/spi/spi-nxp-fspi.c-668- * mode 0: Dummy Read strobe generated by FlexSPI Controller\ndrivers/spi/spi-nxp-fspi.c:669: * and loopback internally\ndrivers/spi/spi-nxp-fspi.c-670- * mode 1: Dummy Read strobe generated by FlexSPI Controller\ndrivers/spi/spi-nxp-fspi.c:671: * and loopback from DQS pad\ndrivers/spi/spi-nxp-fspi.c-672- * mode 2: Reserved\n--\ndrivers/spi/spi-nxp-xspi.c=485=static void nxp_xspi_disable_ddr(struct nxp_xspi *xspi)\n--\ndrivers/spi/spi-nxp-xspi.c-495-\treg \u0026= ~XSPI_MCR_DDR_EN;\ndrivers/spi/spi-nxp-xspi.c:496:\t/* Use dummy pad loopback mode to sample data */\ndrivers/spi/spi-nxp-xspi.c-497-\tFIELD_MODIFY(XSPI_MCR_DQS_FA_SEL_MASK, \u0026reg, 0x01);\n--\ndrivers/spi/spi-pl022.c=304=enum ssp_writing {\n--\ndrivers/spi/spi-pl022.c-319- * @pl023: supports a subset of the ST extensions called \"PL023\"\ndrivers/spi/spi-pl022.c:320: * @loopback: supports loopback mode\ndrivers/spi/spi-pl022.c-321- * @internal_cs_ctrl: supports chip select control register\n--\ndrivers/spi/spi-pl022.c=323=struct vendor_data {\n--\ndrivers/spi/spi-pl022.c-328-\tbool pl023;\ndrivers/spi/spi-pl022.c:329:\tbool loopback;\ndrivers/spi/spi-pl022.c-330-\tbool internal_cs_ctrl;\n--\ndrivers/spi/spi-pl022.c=471=static void restore_state(struct pl022 *pl022)\n--\ndrivers/spi/spi-pl022.c-533-/*\ndrivers/spi/spi-pl022.c:534: * The PL023 variant has further differences: no loopback mode, no microwire\ndrivers/spi/spi-pl022.c-535- * support, and a new clock feedback delay setting.\n--\ndrivers/spi/spi-pl022.c=695=static void dma_callback(void *data)\n--\ndrivers/spi/spi-pl022.c-703-\t * Optionally dump out buffers to inspect contents, this is\ndrivers/spi/spi-pl022.c:704:\t * good if you want to convince yourself that the loopback\ndrivers/spi/spi-pl022.c-705-\t * read/write contents are the same, when adopting to a new\n--\ndrivers/spi/spi-pl022.c=1590=static int pl022_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-pl022.c-1791-\t/* Loopback is available on all versions except PL023 */\ndrivers/spi/spi-pl022.c:1792:\tif (pl022-\u003evendor-\u003eloopback) {\ndrivers/spi/spi-pl022.c-1793-\t\tif (spi-\u003emode \u0026 SPI_LOOP)\n--\ndrivers/spi/spi-pl022.c=1851=static int pl022_probe(struct amba_device *adev, const struct amba_id *id)\n--\ndrivers/spi/spi-pl022.c-1898-\t/*\ndrivers/spi/spi-pl022.c:1899:\t * Supports mode 0-3, loopback, and active low CS. Transfers are\ndrivers/spi/spi-pl022.c-1900-\t * always MS bit first on the original pl022.\n--\ndrivers/spi/spi-pl022.c=2081=static struct vendor_data vendor_arm = {\n--\ndrivers/spi/spi-pl022.c-2086-\t.pl023 = false,\ndrivers/spi/spi-pl022.c:2087:\t.loopback = true,\ndrivers/spi/spi-pl022.c-2088-\t.internal_cs_ctrl = false,\n--\ndrivers/spi/spi-pl022.c=2091=static struct vendor_data vendor_st = {\n--\ndrivers/spi/spi-pl022.c-2096-\t.pl023 = false,\ndrivers/spi/spi-pl022.c:2097:\t.loopback = true,\ndrivers/spi/spi-pl022.c-2098-\t.internal_cs_ctrl = false,\n--\ndrivers/spi/spi-pl022.c=2101=static struct vendor_data vendor_st_pl023 = {\n--\ndrivers/spi/spi-pl022.c-2106-\t.pl023 = true,\ndrivers/spi/spi-pl022.c:2107:\t.loopback = false,\ndrivers/spi/spi-pl022.c-2108-\t.internal_cs_ctrl = false,\n--\ndrivers/spi/spi-pl022.c=2111=static struct vendor_data vendor_lsi = {\n--\ndrivers/spi/spi-pl022.c-2116-\t.pl023 = false,\ndrivers/spi/spi-pl022.c:2117:\t.loopback = true,\ndrivers/spi/spi-pl022.c-2118-\t.internal_cs_ctrl = true,\n--\ndrivers/spi/spi-ppc4xx.c-67-/*\ndrivers/spi/spi-ppc4xx.c:68: * SPI_PPC4XX_MODE_IL = 0 means \"loopback disable\"\ndrivers/spi/spi-ppc4xx.c:69: * SPI_PPC4XX_MODE_IL = 1 means \"loopback enable\"\ndrivers/spi/spi-ppc4xx.c-70- */\n--\ndrivers/spi/spi-qup.c=690=static int spi_qup_io_prep(struct spi_device *spi, struct spi_transfer *xfer)\n--\ndrivers/spi/spi-qup.c-695-\tif (spi-\u003emode \u0026 SPI_LOOP \u0026\u0026 xfer-\u003elen \u003e controller-\u003ein_fifo_sz) {\ndrivers/spi/spi-qup.c:696:\t\tdev_err(controller-\u003edev, \"too big size for loopback %d \u003e %d\\n\",\ndrivers/spi/spi-qup.c-697-\t\t\txfer-\u003elen, controller-\u003ein_fifo_sz);\n--\ndrivers/spi/spi-rspi.c=273=static int rspi_set_config_register(struct rspi_data *rspi, int access_size)\ndrivers/spi/spi-rspi.c-274-{\ndrivers/spi/spi-rspi.c:275:\t/* Sets output mode, MOSI signal, and (optionally) loopback */\ndrivers/spi/spi-rspi.c-276-\trspi_write8(rspi, rspi-\u003esppcr, RSPI_SPPCR);\n--\ndrivers/spi/spi-rspi.c=307=static int rspi_rz_set_config_register(struct rspi_data *rspi, int access_size)\ndrivers/spi/spi-rspi.c-308-{\ndrivers/spi/spi-rspi.c:309:\t/* Sets output mode, MOSI signal, and (optionally) loopback */\ndrivers/spi/spi-rspi.c-310-\trspi_write8(rspi, rspi-\u003esppcr, RSPI_SPPCR);\n--\ndrivers/spi/spi-rspi.c=338=static int qspi_set_config_register(struct rspi_data *rspi, int access_size)\n--\ndrivers/spi/spi-rspi.c-342-\ndrivers/spi/spi-rspi.c:343:\t/* Sets output mode, MOSI signal, and (optionally) loopback */\ndrivers/spi/spi-rspi.c-344-\trspi_write8(rspi, rspi-\u003esppcr, RSPI_SPPCR);\n--\ndrivers/spi/spi-rzv2h-rspi.c=596=static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,\n--\ndrivers/spi/spi-rzv2h-rspi.c-653-\ndrivers/spi/spi-rzv2h-rspi.c:654:\t/* Setup loopback */\ndrivers/spi/spi-rzv2h-rspi.c-655-\tconf8 = FIELD_PREP(RSPI_SPPCR_SPLP2, !!(spi-\u003emode \u0026 SPI_LOOP));\n--\ndrivers/spi/spi-s3c64xx.c=132=struct s3c64xx_spi_dma_data {\n--\ndrivers/spi/spi-s3c64xx.c-155- * @clk_ioclk: True if clock is present on this device\ndrivers/spi/spi-s3c64xx.c:156: * @has_loopback: True if loopback mode can be supported\ndrivers/spi/spi-s3c64xx.c-157- * @use_32bit_io: True if the SoC allows only 32-bit register accesses.\n--\ndrivers/spi/spi-s3c64xx.c=164=struct s3c64xx_spi_port_config {\n--\ndrivers/spi/spi-s3c64xx.c-175-\tbool\tclk_ioclk;\ndrivers/spi/spi-s3c64xx.c:176:\tbool\thas_loopback;\ndrivers/spi/spi-s3c64xx.c-177-\tbool\tuse_32bit_io;\n--\ndrivers/spi/spi-s3c64xx.c=695=static int s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)\n--\ndrivers/spi/spi-s3c64xx.c-742-\ndrivers/spi/spi-s3c64xx.c:743:\tif ((sdd-\u003ecur_mode \u0026 SPI_LOOP) \u0026\u0026 sdd-\u003eport_conf-\u003ehas_loopback)\ndrivers/spi/spi-s3c64xx.c-744-\t\tval |= S3C64XX_SPI_MODE_SELF_LOOPBACK;\n--\ndrivers/spi/spi-s3c64xx.c=1246=static int s3c64xx_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-s3c64xx.c-1312-\thost-\u003emode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;\ndrivers/spi/spi-s3c64xx.c:1313:\tif (sdd-\u003eport_conf-\u003ehas_loopback)\ndrivers/spi/spi-s3c64xx.c-1314-\t\thost-\u003emode_bits |= SPI_LOOP;\n--\ndrivers/spi/spi-s3c64xx.c=1561=static const struct s3c64xx_spi_port_config exynos850_spi_port_config = {\n--\ndrivers/spi/spi-s3c64xx.c-1568-\t.clk_from_cmu\t= true,\ndrivers/spi/spi-s3c64xx.c:1569:\t.has_loopback\t= true,\ndrivers/spi/spi-s3c64xx.c-1570-\t.quirks\t\t= S3C64XX_SPI_QUIRK_CS_AUTO,\n--\ndrivers/spi/spi-s3c64xx.c=1573=static const struct s3c64xx_spi_port_config exynosautov9_spi_port_config = {\n--\ndrivers/spi/spi-s3c64xx.c-1583-\t.clk_ioclk\t= true,\ndrivers/spi/spi-s3c64xx.c:1584:\t.has_loopback\t= true,\ndrivers/spi/spi-s3c64xx.c-1585-\t.quirks\t\t= S3C64XX_SPI_QUIRK_CS_AUTO,\n--\ndrivers/spi/spi-s3c64xx.c=1601=static const struct s3c64xx_spi_port_config gs101_spi_port_config = {\n--\ndrivers/spi/spi-s3c64xx.c-1608-\t.clk_from_cmu\t= true,\ndrivers/spi/spi-s3c64xx.c:1609:\t.has_loopback\t= true,\ndrivers/spi/spi-s3c64xx.c-1610-\t.use_32bit_io\t= true,\n--\ndrivers/spi/spi-spacemit-k1.c=146=static int k1_spi_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-spacemit-k1.c-164-\tif (spi-\u003emode \u0026 SPI_LOOP)\ndrivers/spi/spi-spacemit-k1.c:165:\t\tval |= TOP_LBM;\t\t/* enable loopback */\ndrivers/spi/spi-spacemit-k1.c-166-\twritel(val, drv_data-\u003ebase + SSP_TOP_CTRL);\n--\ndrivers/spi/spi.c=4035=static int __spi_setup(struct spi_device *spi, bool initial_setup)\n--\ndrivers/spi/spi.c-4159-\t\t\t(spi-\u003emode \u0026 SPI_3WIRE) ? \"3wire, \" : \"\",\ndrivers/spi/spi.c:4160:\t\t\t(spi-\u003emode \u0026 SPI_LOOP) ? \"loopback, \" : \"\",\ndrivers/spi/spi.c-4161-\t\t\tspi-\u003ebits_per_word, spi-\u003emax_speed_hz,\n"
} |
| 33/2 | 2026/07/31 07:37 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 59010 output: 20 thoughts: 131 Thoughts: **Investigating the `spi-loopback-test` Driver and Its Potential Relationship to the `OA_TC6` Framework** Okay, so I see this `spi-loopback-test` driver, and my initial thought is that it's just a straightforward test driver. But then, I start wondering, could syzkaller be leveraged to test SPI devices? That's interesting, and opens up some possibilities I need to explore. My focus shifts to the patch location, which is listed as being within `drivers/net/ethernet/oa_tc6.c`. Considering this path, and with `oa_tc6` being a MAC-PHY framework, my mind leans towards the idea that it might be tested indirectly, or through a different testing mechanism that isn't immediately obvious. However, the "framework" designation of `OA_TC6` suddenly sparks another question. Is there a virtual driver, perhaps, that *utilizes* this framework? The implications for testing change significantly if this is the case. I need to get back to the driver. I will go back to the `drivers/net/ethernet/oa_tc6.c` to see if there is any mention of this. This requires a more in-depth look. To this end, I should be looking specifically for any other drivers that might be calling `oa_tc6_init`. That will definitively clarify the linkage, if any, between the framework and other drivers within the kernel. |
| 34/2 | 2026/07/31 07:38 | tool | grepper |
0mArgs:{
"Expression": "oa_tc6_init"
}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=1385=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1387-/**\ndrivers/net/ethernet/oa_tc6.c:1388: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1389- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1394- */\ndrivers/net/ethernet/oa_tc6.c:1395:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1396-{\n--\ndrivers/net/ethernet/oa_tc6.c-1499-}\ndrivers/net/ethernet/oa_tc6.c:1500:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1501-\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"
} |
| 35/2 | 2026/07/31 07:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 60182 output: 25 thoughts: 275 Thoughts: **Investigating the LAN865x Syzkaller Fuzzing Vector** Okay, so the `lan865x` driver is the only one using this, which I already know is the Microchip LAN8650/1 Rev.B0/B1 MACPHY Ethernet chip. The question is, how did syzkaller fuzz it? My initial thought is that it might be instantiating the SPI device via `sysfs` and then injecting SPI traffic through a dummy SPI controller. I recall syzkaller has some SPI setup calls, something like `syz_spi_setup`, right? I remember the recent addition of SPI fuzzing capabilities. I need to check the `drivers/spi/` directory for code that acts like a dummy controller specifically for fuzzing purposes. Wait, `drivers/spi/spi-loopback-test.c` is just a test; not what I'm looking for. But what other simulation could it be using? Could syzkaller be utilizing `mac80211_hwsim`? No, that's definitely for WiFi. What about `vhci`? No, that's USB. Then there's `uinput` but that's input device related. And `netdevsim` is for network device simulation. Hmmm, is there an `spisim` or something similar? I need to go back and methodically check `drivers/spi/` for any files with "sim" or "dummy" in their names. I need to find the simulation method for this SPI bus fuzzing. |
| 36/2 | 2026/07/31 07:38 | tool | grepper |
0mArgs:{
"Expression": "sim",
"PathPrefix": "drivers/spi/"
}Results: {
"Output": "drivers/spi/Kconfig=5=menuconfig SPI\n--\ndrivers/spi/Kconfig-20-\ndrivers/spi/Kconfig:21:\t SPI is one of a family of similar protocols using a four wire\ndrivers/spi/Kconfig-22-\t interface (select, clock, data in, data out) including Microwire\n--\ndrivers/spi/Kconfig=51=config SPI_MEM\n--\ndrivers/spi/Kconfig-54-\t Enable this option if you want to enable the SPI memory extension.\ndrivers/spi/Kconfig:55:\t This extension is meant to simplify interaction with SPI memories\ndrivers/spi/Kconfig-56-\t by providing a high-level interface to send memory-like commands.\n--\ndrivers/spi/Kconfig=487=config SPI_GPIO\n--\ndrivers/spi/Kconfig-491-\thelp\ndrivers/spi/Kconfig:492:\t This simple GPIO bitbanging SPI master uses the arch-neutral GPIO\ndrivers/spi/Kconfig-493-\t interface to manage MOSI, MISO, SCK, and chipselect signals. SPI\n--\ndrivers/spi/Kconfig=1301=config SPI_XTENSA_XTFPGA\n--\ndrivers/spi/Kconfig-1307-\ndrivers/spi/Kconfig:1308:\t This simple SPI master controller is built into xtfpga bitstreams\ndrivers/spi/Kconfig-1309-\t and is used to control daughterboard audio codec. It always transfers\n--\ndrivers/spi/spi-altera-core.c-9- * Copyright (c) 2006 Simtec Electronics\ndrivers/spi/spi-altera-core.c:10: *\tBen Dooks \u003cben@simtec.co.uk\u003e\ndrivers/spi/spi-altera-core.c-11- */\n--\ndrivers/spi/spi-altera-platform.c-9- * Copyright (c) 2006 Simtec Electronics\ndrivers/spi/spi-altera-platform.c:10: *\tBen Dooks \u003cben@simtec.co.uk\u003e\ndrivers/spi/spi-altera-platform.c-11- */\n--\ndrivers/spi/spi-au1550.c=536=static irqreturn_t au1550_spi_pio_irq_callback(struct au1550_spi *hw)\n--\ndrivers/spi/spi-au1550.c-606-\t *\ndrivers/spi/spi-au1550.c:607:\t * By simply restarting the spi transfer on Tx Underflow Error,\ndrivers/spi/spi-au1550.c-608-\t * we assume that spi transfer was paused instead of zeroes\n--\ndrivers/spi/spi-bcm2835aux.c=443=static int bcm2835aux_spi_setup(struct spi_device *spi)\n--\ndrivers/spi/spi-bcm2835aux.c-454-\t * * multiple chip-selects: cs0-cs2 are all\ndrivers/spi/spi-bcm2835aux.c:455:\t * simultaniously asserted whenever there is a transfer\ndrivers/spi/spi-bcm2835aux.c-456-\t * this even includes SPI_NO_CS\n--\ndrivers/spi/spi-bcm2835aux.c=474=static int bcm2835aux_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-bcm2835aux.c-491-\t * Known limitations for native cs are:\ndrivers/spi/spi-bcm2835aux.c:492:\t * * multiple chip-selects: cs0-cs2 are all simultaniously asserted\ndrivers/spi/spi-bcm2835aux.c-493-\t * whenever there is a transfer - this even includes SPI_NO_CS\n--\ndrivers/spi/spi-bitbang-txrx.h-3- * Mix this utility code with some glue code to get one of several types of\ndrivers/spi/spi-bitbang-txrx.h:4: * simple SPI master driver. Two do polled word-at-a-time I/O:\ndrivers/spi/spi-bitbang-txrx.h-5- *\n--\ndrivers/spi/spi-bitbang.c=239=static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)\n--\ndrivers/spi/spi-bitbang.c-265-/*\ndrivers/spi/spi-bitbang.c:266: * SECOND PART ... simple transfer queue runner.\ndrivers/spi/spi-bitbang.c-267- *\n--\ndrivers/spi/spi-coldfire-qspi.c-21-#include \u003casm/coldfire.h\u003e\ndrivers/spi/spi-coldfire-qspi.c:22:#include \u003casm/mcfsim.h\u003e\ndrivers/spi/spi-coldfire-qspi.c-23-#include \u003casm/mcfqspi.h\u003e\n--\ndrivers/spi/spi-davinci.c=324=static int davinci_spi_setup_transfer(struct spi_device *spi,\n--\ndrivers/spi/spi-davinci.c-394-\t *\t(distinct from SPI_3WIRE, with just one data wire;\ndrivers/spi/spi-davinci.c:395:\t *\tor similar variants without MOSI or without MISO)\ndrivers/spi/spi-davinci.c-396-\t *\n--\ndrivers/spi/spi-dw-core.c=359=static void dw_spi_irq_setup(struct dw_spi *dws)\n--\ndrivers/spi/spi-dw-core.c-380-/*\ndrivers/spi/spi-dw-core.c:381: * The iterative procedure of the poll-based transfer is simple: write as much\ndrivers/spi/spi-dw-core.c-382- * as possible to the Tx FIFO, wait until the pending to receive data is ready\n--\ndrivers/spi/spi-ep93xx.c=433=static irqreturn_t ep93xx_spi_interrupt(int irq, void *dev_id)\n--\ndrivers/spi/spi-ep93xx.c-451-\t\t * Interrupt is either RX (RIS) or TX (TIS). For both cases we\ndrivers/spi/spi-ep93xx.c:452:\t\t * simply execute next data transfer.\ndrivers/spi/spi-ep93xx.c-453-\t\t */\n--\ndrivers/spi/spi-gpio.c=240=static int spi_gpio_set_direction(struct spi_device *spi, bool output)\n--\ndrivers/spi/spi-gpio.c-264-\t * a clock delay here, but as has been noted above, the\ndrivers/spi/spi-gpio.c:265:\t * nsec delay function for bit-banged GPIO is simply\ndrivers/spi/spi-gpio.c-266-\t * {} because bit-banging just doesn't get fast enough\n--\ndrivers/spi/spi-imx.c=256=static bool spi_imx_can_dma(struct spi_controller *controller, struct spi_device *spi,\n--\ndrivers/spi/spi-imx.c-298- *\ndrivers/spi/spi-imx.c:299: * The simplest way to do this is to just mask the cs bits to 2 bits. This\ndrivers/spi/spi-imx.c-300- * still allows all 4 native chip selects to work as well as gpio chip selects\n--\ndrivers/spi/spi-loopback-test.c-23-\ndrivers/spi/spi-loopback-test.c:24:/* flag to only simulate transfers */\ndrivers/spi/spi-loopback-test.c:25:static int simulate_only;\ndrivers/spi/spi-loopback-test.c:26:module_param(simulate_only, int, 0);\ndrivers/spi/spi-loopback-test.c:27:MODULE_PARM_DESC(simulate_only, \"if not 0 do not execute the spi message\");\ndrivers/spi/spi-loopback-test.c-28-\n--\ndrivers/spi/spi-loopback-test.c=932=int spi_test_execute_msg(struct spi_device *spi, struct spi_test *test,\n--\ndrivers/spi/spi-loopback-test.c-938-\ndrivers/spi/spi-loopback-test.c:939:\t/* only if we do not simulate */\ndrivers/spi/spi-loopback-test.c:940:\tif (!simulate_only) {\ndrivers/spi/spi-loopback-test.c-941-\t\tktime_t start;\n--\ndrivers/spi/spi-lp8841-rtc.c-29- * REVISIT If there is support for SPI_3WIRE and SPI_LSB_FIRST in SPI\ndrivers/spi/spi-lp8841-rtc.c:30: * GPIO driver, this SPI driver can be replaced by a simple GPIO driver\ndrivers/spi/spi-lp8841-rtc.c-31- * providing 3 GPIO pins.\n--\ndrivers/spi/spi-mem.c=708=spi_mem_dirmap_create(struct spi_mem *mem,\n--\ndrivers/spi/spi-mem.c-722-\ndrivers/spi/spi-mem.c:723:\t/* Apply similar constraints to the secondary template */\ndrivers/spi/spi-mem.c-724-\tif (info-\u003esecondary_op_tmpl.cmd.opcode) {\n--\ndrivers/spi/spi-mpc52xx.c=215=static int mpc52xx_spi_fsmstate_transfer(int irq, struct mpc52xx_spi *ms,\n--\ndrivers/spi/spi-mpc52xx.c-226-\t\t * between receiving the interrupt and sending the next byte,\ndrivers/spi/spi-mpc52xx.c:227:\t\t * but it can also be worked around simply by retrying the\ndrivers/spi/spi-mpc52xx.c-228-\t\t * transfer which is what we do here. */\n--\ndrivers/spi/spi-mtk-snfi.c-45-//\ndrivers/spi/spi-mtk-snfi.c:46:// Write requests operates in a similar manner.\ndrivers/spi/spi-mtk-snfi.c-47-// As a limitation of this strategy, we won't be able to access any ECC parity\n--\ndrivers/spi/spi-nxp-fspi.c-16- * A valid sequence consists of four LUT registers.\ndrivers/spi/spi-nxp-fspi.c:17: * Maximum 32 LUT sequences can be programmed simultaneously.\ndrivers/spi/spi-nxp-fspi.c-18- *\n--\ndrivers/spi/spi-nxp-xspi.c-15- * A valid sequence consists of five LUT registers.\ndrivers/spi/spi-nxp-xspi.c:16: * Maximum 16 LUT sequences can be programmed simultaneously.\ndrivers/spi/spi-nxp-xspi.c-17- *\n--\ndrivers/spi/spi-oc-tiny.c-11- * Copyright (c) 2006 Simtec Electronics\ndrivers/spi/spi-oc-tiny.c:12: *\tBen Dooks \u003cben@simtec.co.uk\u003e\ndrivers/spi/spi-oc-tiny.c-13- */\n--\ndrivers/spi/spi-orion.c=644=static int orion_spi_probe(struct platform_device *pdev)\n--\ndrivers/spi/spi-orion.c-752-\t\t * Only map one page for direct access. This is enough for the\ndrivers/spi/spi-orion.c:753:\t\t * simple TX transfer which only writes to the first word.\ndrivers/spi/spi-orion.c-754-\t\t * This needs to get extended for the direct SPI NOR / SPI NAND\n--\ndrivers/spi/spi-ppc4xx.c-12- * Copyright (c) 2006 Simtec Electronics\ndrivers/spi/spi-ppc4xx.c:13: *\tBen Dooks \u003cben@simtec.co.uk\u003e\ndrivers/spi/spi-ppc4xx.c-14- */\n--\ndrivers/spi/spi-qcom-qspi.c=575=static irqreturn_t pio_write(struct qcom_qspi *ctrl)\n--\ndrivers/spi/spi-qcom-qspi.c-599-\t\t/*\ndrivers/spi/spi-qcom-qspi.c:600:\t\t * Process all the whole words; to keep things simple we'll\ndrivers/spi/spi-qcom-qspi.c-601-\t\t * just wait for the next interrupt to handle the last 1-3\n--\ndrivers/spi/spi-s3c64xx.c=572=static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd,\n--\ndrivers/spi/spi-s3c64xx.c-590-\t * proceed further else return -ETIMEDOUT.\ndrivers/spi/spi-s3c64xx.c:591:\t * DmaTx returns after simply writing data in the FIFO,\ndrivers/spi/spi-s3c64xx.c-592-\t * w/o waiting for real transmission on the bus to finish.\n--\ndrivers/spi/spi-sprd-adi.c=217=static int sprd_adi_read(struct sprd_adi *sadi, u32 reg, u32 *read_val)\n--\ndrivers/spi/spi-sprd-adi.c-245-\t * Wait read operation complete, the BIT_RD_CMD_BUSY will be set\ndrivers/spi/spi-sprd-adi.c:246:\t * simultaneously when writing read command to register, and the\ndrivers/spi/spi-sprd-adi.c-247-\t * BIT_RD_CMD_BUSY will be cleared after the read operation is\n--\ndrivers/spi/spi-tle62x0.c-5- * Copyright (c) 2007 Simtec Electronics\ndrivers/spi/spi-tle62x0.c:6: *\tBen Dooks, \u003cben@simtec.co.uk\u003e\ndrivers/spi/spi-tle62x0.c-7- */\n--\ndrivers/spi/spi-tle62x0.c=147=static ssize_t tle62x0_gpio_store(struct device *dev,\n--\ndrivers/spi/spi-tle62x0.c-155-\ndrivers/spi/spi-tle62x0.c:156:\tval = simple_strtoul(buf, \u0026endp, 0);\ndrivers/spi/spi-tle62x0.c-157-\tif (buf == endp)\n--\ndrivers/spi/spi-tle62x0.c=311=module_spi_driver(tle62x0_driver);\ndrivers/spi/spi-tle62x0.c-312-\ndrivers/spi/spi-tle62x0.c:313:MODULE_AUTHOR(\"Ben Dooks \u003cben@simtec.co.uk\u003e\");\ndrivers/spi/spi-tle62x0.c-314-MODULE_DESCRIPTION(\"TLE62x0 SPI driver\");\n--\ndrivers/spi/spidev.c-6- *\tAndrea Paterniani \u003ca.paterniani@swapp-eng.it\u003e\ndrivers/spi/spidev.c:7: * Copyright (C) 2007 David Brownell (simplification, cleanup)\ndrivers/spi/spidev.c-8- */\n--\ndrivers/spi/spidev.c=657=static const struct file_operations spidev_fops = {\n--\ndrivers/spi/spidev.c-659-\t/* REVISIT switch to aio primitives, so that userspace\ndrivers/spi/spidev.c:660:\t * gets more complete API coverage. It'll simplify things\ndrivers/spi/spidev.c-661-\t * too, except for the locking.\n--\ndrivers/spi/spidev.c-674- * /dev/spidevB.C character device nodes exposing our userspace API.\ndrivers/spi/spidev.c:675: * It also simplifies memory management.\ndrivers/spi/spidev.c-676- */\n"
} |
| 37/2 | 2026/07/31 07:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 64933 output: 28 thoughts: 581 Thoughts: **Analyzing the Fuzzing Potential of an `oa_tc6` Patch** Okay, so I'm looking at this patch and my initial thought is, no direct `spi-mockup` or `spi-sim` references here. The question is, is this something syzkaller would even touch? Given syzkaller’s focus on kernel mailing list patches, it'll attempt to test `oa_tc6` if it can compile. But the real question is, will it *fuzz* it, or just do a basic compile test? The prompt says my job is to determine if it makes functional changes and if it should be fuzzed. And it specifies to return `WorthFuzzing=false` if it concerns things that are unreachable in virtualization like GCE or QEMU. So, is `oa_tc6` something vendor-specific? It appears to be an OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interface framework. Ah, it's an SPI device. The crucial question: is it reachable in QEMU? If there's no SPI emulator within QEMU that can emulate this specific device, and no software emulator within the kernel itself, then it's effectively unreachable. Wait, is there *any* SPI emulator in QEMU? Yes, QEMU has SPI controllers like `pl022`, `ssi`, and `bcm2835_spi`. But does it emulate the `lan865x` device, which I *think* is relevant here? No. Okay, so if the device isn't emulated, the probe function will likely fail because the device won't respond to SPI commands. Could a user-space program potentially emulate the SPI device using `spidev`? Nope. `spidev` is for a user-space program acting as an SPI *master*, talking *to* a real SPI device. It doesn't enable a user-space program to act as an SPI *device* (slave), which is what we need for the kernel to talk to. Wait, I recall seeing `spi-slave-time.c` and `spi-slave-system-control.c`. But those are for scenarios where the kernel is *acting* as an SPI slave. What about the kernel as SPI master, and we want to emulate an SPI device? No, there isn't a generic kernel-side mechanism for doing that. So the `oa_tc6` device isn't reachable in a virtualized environment. I'm getting ready to make my decision, but I should double-check quickly to ensure there isn't some obscure `oa_tc6` emulator hiding somewhere in the kernel source. |
| 38/2 | 2026/07/31 07:38 | tool | grepper |
0mArgs:{
"Expression": "oa_tc6",
"PathPrefix": "drivers/net/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 849 lines.\nUse more precise expression if possible.\n\ndrivers/net/ethernet/Makefile=106=obj-$(CONFIG_NET_VENDOR_PENSANDO) += pensando/\ndrivers/net/ethernet/Makefile:107:obj-$(CONFIG_OA_TC6) += oa_tc6.o\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-10-#include \u003clinux/phy.h\u003e\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:11:#include \u003clinux/oa_tc6.h\u003e\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-12-\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=39=struct lan865x_priv {\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-42-\tstruct spi_device *spi;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:43:\tstruct oa_tc6 *tc6;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-44-};\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-51-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:52:\treturn oa_tc6_write_register(tc6, LAN865X_REG_MAC_L_SADDR1, regval);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-53-}\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=55=static int lan865x_set_hw_macaddr(struct lan865x_priv *priv, const u8 *mac)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-67-\tregval = (mac[5] \u003c\u003c 8) | mac[4];\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:68:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_H_SADDR1,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-69-\t\t\t\t regval);\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=132=static int lan865x_set_specific_multicast_addr(struct lan865x_priv *priv)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-148-\t/* Enabling specific multicast addresses */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:149:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_H_HASH, hash_hi);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-150-\tif (ret) {\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-155-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:156:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_L_HASH, hash_lo);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-157-\tif (ret)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=164=static int lan865x_set_all_multicast_addr(struct lan865x_priv *priv)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-168-\t/* Enabling all multicast addresses */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:169:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_H_HASH,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-170-\t\t\t\t 0xffffffff);\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-176-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:177:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_L_HASH,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-178-\t\t\t\t 0xffffffff);\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=186=static int lan865x_clear_all_multicast_addr(struct lan865x_priv *priv)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-189-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:190:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_H_HASH, 0);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-191-\tif (ret) {\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-196-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:197:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_L_HASH, 0);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-198-\tif (ret)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=205=static void lan865x_multicast_work_handler(struct work_struct *work)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-237-\t}\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:238:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_NET_CFG, regval);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-239-\tif (ret)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=251=static netdev_tx_t lan865x_send_packet(struct sk_buff *skb,\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-255-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:256:\treturn oa_tc6_start_xmit(priv-\u003etc6, skb);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-257-}\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=259=static int lan865x_hw_disable(struct lan865x_priv *priv)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-262-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:263:\tif (oa_tc6_read_register(priv-\u003etc6, LAN865X_REG_MAC_NET_CTL, \u0026regval))\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-264-\t\treturn -ENODEV;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-267-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:268:\tif (oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_NET_CTL, regval))\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-269-\t\treturn -ENODEV;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=290=static int lan865x_hw_enable(struct lan865x_priv *priv)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-293-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:294:\tif (oa_tc6_read_register(priv-\u003etc6, LAN865X_REG_MAC_NET_CTL, \u0026regval))\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-295-\t\treturn -ENODEV;\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-298-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:299:\tif (oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_NET_CTL, regval))\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-300-\t\treturn -ENODEV;\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/microchip/lan865x/lan865x.c-361-\t */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:362:\tret = oa_tc6_write_register(priv-\u003etc6, LAN865X_REG_MAC_TSU_TIMER_INCR,\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-363-\t\t\t\t MAC_TSU_TIMER_INCR_COUNT_NANOSECONDS);\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-366-\t\t\tret);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:367:\t\tgoto oa_tc6_exit;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-368-\t}\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-381-\t */\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:382:\tret = oa_tc6_zero_align_receive_frame_enable(priv-\u003etc6);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-383-\tif (ret) {\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-384-\t\tdev_err(\u0026spi-\u003edev, \"Failed to set ZARFE: %d\\n\", ret);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:385:\t\tgoto oa_tc6_exit;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-386-\t}\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-394-\t\tdev_err(\u0026spi-\u003edev, \"Failed to configure MAC: %d\\n\", ret);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:395:\t\tgoto oa_tc6_exit;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-396-\t}\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-405-\t\tdev_err(\u0026spi-\u003edev, \"Register netdev failed (ret = %d)\", ret);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:406:\t\tgoto oa_tc6_exit;\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-407-\t}\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-410-\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:411:oa_tc6_exit:\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:412:\toa_tc6_exit(priv-\u003etc6);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-413-free_netdev:\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c=418=static void lan865x_remove(struct spi_device *spi)\n--\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-423-\tunregister_netdev(priv-\u003enetdev);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c:424:\toa_tc6_exit(priv-\u003etc6);\ndrivers/net/ethernet/microchip/lan865x/lan865x.c-425-\tfree_netdev(priv-\u003enetdev);\n--\ndrivers/net/ethernet/oa_tc6.c-12-#include \u003clinux/phy.h\u003e\ndrivers/net/ethernet/oa_tc6.c:13:#include \u003clinux/oa_tc6.h\u003e\ndrivers/net/ethernet/oa_tc6.c-14-\n--\ndrivers/net/ethernet/oa_tc6.c-111-/* Internal structure for MAC-PHY drivers */\ndrivers/net/ethernet/oa_tc6.c:112:struct oa_tc6 {\ndrivers/net/ethernet/oa_tc6.c-113-\tstruct net_device *netdev;\n--\ndrivers/net/ethernet/oa_tc6.c-134-\ndrivers/net/ethernet/oa_tc6.c:135:enum oa_tc6_header_type {\ndrivers/net/ethernet/oa_tc6.c-136-\tOA_TC6_CTRL_HEADER,\n--\ndrivers/net/ethernet/oa_tc6.c-139-\ndrivers/net/ethernet/oa_tc6.c:140:enum oa_tc6_register_op {\ndrivers/net/ethernet/oa_tc6.c-141-\tOA_TC6_CTRL_REG_READ = 0,\n--\ndrivers/net/ethernet/oa_tc6.c-144-\ndrivers/net/ethernet/oa_tc6.c:145:enum oa_tc6_data_valid_info {\ndrivers/net/ethernet/oa_tc6.c-146-\tOA_TC6_DATA_INVALID,\n--\ndrivers/net/ethernet/oa_tc6.c-149-\ndrivers/net/ethernet/oa_tc6.c:150:enum oa_tc6_data_start_valid_info {\ndrivers/net/ethernet/oa_tc6.c-151-\tOA_TC6_DATA_START_INVALID,\n--\ndrivers/net/ethernet/oa_tc6.c-154-\ndrivers/net/ethernet/oa_tc6.c:155:enum oa_tc6_data_end_valid_info {\ndrivers/net/ethernet/oa_tc6.c-156-\tOA_TC6_DATA_END_INVALID,\n--\ndrivers/net/ethernet/oa_tc6.c-159-\ndrivers/net/ethernet/oa_tc6.c:160:static int oa_tc6_spi_transfer(struct oa_tc6 *tc6,\ndrivers/net/ethernet/oa_tc6.c:161:\t\t\t enum oa_tc6_header_type header_type, u16 length)\ndrivers/net/ethernet/oa_tc6.c-162-{\n--\ndrivers/net/ethernet/oa_tc6.c-180-\ndrivers/net/ethernet/oa_tc6.c:181:static int oa_tc6_get_parity(u32 p)\ndrivers/net/ethernet/oa_tc6.c-182-{\n--\ndrivers/net/ethernet/oa_tc6.c-193-\ndrivers/net/ethernet/oa_tc6.c:194:static __be32 oa_tc6_prepare_ctrl_header(u32 addr, u8 length,\ndrivers/net/ethernet/oa_tc6.c:195:\t\t\t\t\t enum oa_tc6_register_op reg_op)\ndrivers/net/ethernet/oa_tc6.c-196-{\n--\ndrivers/net/ethernet/oa_tc6.c-205-\theader |= FIELD_PREP(OA_TC6_CTRL_HEADER_PARITY,\ndrivers/net/ethernet/oa_tc6.c:206:\t\t\t oa_tc6_get_parity(header));\ndrivers/net/ethernet/oa_tc6.c-207-\n--\ndrivers/net/ethernet/oa_tc6.c-210-\ndrivers/net/ethernet/oa_tc6.c:211:static void oa_tc6_update_ctrl_write_data(struct oa_tc6 *tc6, u32 value[],\ndrivers/net/ethernet/oa_tc6.c-212-\t\t\t\t\t u8 length)\n--\ndrivers/net/ethernet/oa_tc6.c-219-\ndrivers/net/ethernet/oa_tc6.c:220:static u16 oa_tc6_calculate_ctrl_buf_size(u8 length)\ndrivers/net/ethernet/oa_tc6.c-221-{\n--\ndrivers/net/ethernet/oa_tc6.c-228-\ndrivers/net/ethernet/oa_tc6.c:229:static void oa_tc6_prepare_ctrl_spi_buf(struct oa_tc6 *tc6, u32 address,\ndrivers/net/ethernet/oa_tc6.c-230-\t\t\t\t\tu32 value[], u8 length,\ndrivers/net/ethernet/oa_tc6.c:231:\t\t\t\t\tenum oa_tc6_register_op reg_op)\ndrivers/net/ethernet/oa_tc6.c-232-{\n--\ndrivers/net/ethernet/oa_tc6.c-234-\ndrivers/net/ethernet/oa_tc6.c:235:\t*tx_buf = oa_tc6_prepare_ctrl_header(address, length, reg_op);\ndrivers/net/ethernet/oa_tc6.c-236-\ndrivers/net/ethernet/oa_tc6.c-237-\tif (reg_op == OA_TC6_CTRL_REG_WRITE)\ndrivers/net/ethernet/oa_tc6.c:238:\t\toa_tc6_update_ctrl_write_data(tc6, value, length);\ndrivers/net/ethernet/oa_tc6.c-239-}\ndrivers/net/ethernet/oa_tc6.c-240-\ndrivers/net/ethernet/oa_tc6.c:241:static int oa_tc6_check_ctrl_write_reply(struct oa_tc6 *tc6, u8 size)\ndrivers/net/ethernet/oa_tc6.c-242-{\n--\ndrivers/net/ethernet/oa_tc6.c-256-\ndrivers/net/ethernet/oa_tc6.c:257:static int oa_tc6_check_ctrl_read_reply(struct oa_tc6 *tc6, u8 size)\ndrivers/net/ethernet/oa_tc6.c-258-{\n--\ndrivers/net/ethernet/oa_tc6.c-270-\ndrivers/net/ethernet/oa_tc6.c:271:static void oa_tc6_copy_ctrl_read_data(struct oa_tc6 *tc6, u32 value[],\ndrivers/net/ethernet/oa_tc6.c-272-\t\t\t\t u8 length)\n--\ndrivers/net/ethernet/oa_tc6.c-280-\ndrivers/net/ethernet/oa_tc6.c:281:static int oa_tc6_perform_ctrl(struct oa_tc6 *tc6, u32 address, u32 value[],\ndrivers/net/ethernet/oa_tc6.c:282:\t\t\t u8 length, enum oa_tc6_register_op reg_op)\ndrivers/net/ethernet/oa_tc6.c-283-{\n--\ndrivers/net/ethernet/oa_tc6.c-287-\t/* Prepare control command and copy to SPI control buffer */\ndrivers/net/ethernet/oa_tc6.c:288:\toa_tc6_prepare_ctrl_spi_buf(tc6, address, value, length, reg_op);\ndrivers/net/ethernet/oa_tc6.c-289-\ndrivers/net/ethernet/oa_tc6.c:290:\tsize = oa_tc6_calculate_ctrl_buf_size(length);\ndrivers/net/ethernet/oa_tc6.c-291-\ndrivers/net/ethernet/oa_tc6.c-292-\t/* Perform SPI transfer */\ndrivers/net/ethernet/oa_tc6.c:293:\tret = oa_tc6_spi_transfer(tc6, OA_TC6_CTRL_HEADER, size);\ndrivers/net/ethernet/oa_tc6.c-294-\tif (ret) {\n--\ndrivers/net/ethernet/oa_tc6.c-301-\tif (reg_op == OA_TC6_CTRL_REG_WRITE)\ndrivers/net/ethernet/oa_tc6.c:302:\t\treturn oa_tc6_check_ctrl_write_reply(tc6, size);\ndrivers/net/ethernet/oa_tc6.c-303-\ndrivers/net/ethernet/oa_tc6.c-304-\t/* Check echoed/received control read command reply for errors */\ndrivers/net/ethernet/oa_tc6.c:305:\tret = oa_tc6_check_ctrl_read_reply(tc6, size);\ndrivers/net/ethernet/oa_tc6.c-306-\tif (ret)\n--\ndrivers/net/ethernet/oa_tc6.c-308-\ndrivers/net/ethernet/oa_tc6.c:309:\toa_tc6_copy_ctrl_read_data(tc6, value, length);\ndrivers/net/ethernet/oa_tc6.c-310-\n--\ndrivers/net/ethernet/oa_tc6.c-314-/**\ndrivers/net/ethernet/oa_tc6.c:315: * oa_tc6_read_registers - function for reading multiple consecutive registers.\ndrivers/net/ethernet/oa_tc6.c:316: * @tc6: oa_tc6 struct.\ndrivers/net/ethernet/oa_tc6.c-317- * @address: address of the first register to be read in the MAC-PHY.\n--\ndrivers/net/ethernet/oa_tc6.c-324- */\ndrivers/net/ethernet/oa_tc6.c:325:int oa_tc6_read_registers(struct oa_tc6 *tc6, u32 address, u32 value[],\ndrivers/net/ethernet/oa_tc6.c-326-\t\t\t u8 length)\n--\ndrivers/net/ethernet/oa_tc6.c-335-\tmutex_lock(\u0026tc6-\u003espi_ctrl_lock);\ndrivers/net/ethernet/oa_tc6.c:336:\tret = oa_tc6_perform_ctrl(tc6, address, value, length,\ndrivers/net/ethernet/oa_tc6.c-337-\t\t\t\t OA_TC6_CTRL_REG_READ);\n--\ndrivers/net/ethernet/oa_tc6.c-341-}\ndrivers/net/ethernet/oa_tc6.c:342:EXPORT_SYMBOL_GPL(oa_tc6_read_registers);\ndrivers/net/ethernet/oa_tc6.c-343-\ndrivers/net/ethernet/oa_tc6.c-344-/**\ndrivers/net/ethernet/oa_tc6.c:345: * oa_tc6_read_register - function for reading a MAC-PHY register.\ndrivers/net/ethernet/oa_tc6.c:346: * @tc6: oa_tc6 struct.\ndrivers/net/ethernet/oa_tc6.c-347- * @address: register address of the MAC-PHY to be read.\n--\ndrivers/net/ethernet/oa_tc6.c-351- */\ndrivers/net/ethernet/oa_tc6.c:352:int oa_tc6_read_register(struct oa_tc6 *tc6, u32 address, u32 *value)\ndrivers/net/ethernet/oa_tc6.c-353-{\ndrivers/net/ethernet/oa_tc6.c:354:\treturn oa_tc6_read_registers(tc6, address, value, 1);\ndrivers/net/ethernet/oa_tc6.c-355-}\ndrivers/net/ethernet/oa_tc6.c:356:EXPORT_SYMBOL_GPL(oa_tc6_read_register);\ndrivers/net/ethernet/oa_tc6.c-357-\ndrivers/net/ethernet/oa_tc6.c-358-/**\ndrivers/net/ethernet/oa_tc6.c:359: * oa_tc6_write_registers - function for writing multiple consecutive registers.\ndrivers/net/ethernet/oa_tc6.c:360: * @tc6: oa_tc6 struct.\ndrivers/net/ethernet/oa_tc6.c-361- * @address: address of the first register to be written in the MAC-PHY.\n--\ndrivers/net/ethernet/oa_tc6.c-368- */\ndrivers/net/ethernet/oa_tc6.c:369:int oa_tc6_write_registers(struct oa_tc6 *tc6, u32 address, u32 value[],\ndrivers/net/ethernet/oa_tc6.c-370-\t\t\t u8 length)\n--\ndrivers/net/ethernet/oa_tc6.c-379-\tmutex_lock(\u0026tc6-\u003espi_ctrl_lock);\ndrivers/net/ethernet/oa_tc6.c:380:\tret = oa_tc6_perform_ctrl(tc6, address, value, length,\ndrivers/net/ethernet/oa_tc6.c-381-\t\t\t\t OA_TC6_CTRL_REG_WRITE);\n--\ndrivers/net/ethernet/oa_tc6.c-385-}\ndrivers/net/ethernet/oa_tc6.c:386:EXPORT_SYMBOL_GPL(oa_tc6_write_registers);\ndrivers/net/ethernet/oa_tc6.c-387-\ndrivers/net/ethernet/oa_tc6.c-388-/**\ndrivers/net/ethernet/oa_tc6.c:389: * oa_tc6_write_register - function for writing a MAC-PHY register.\ndrivers/net/ethernet/oa_tc6.c:390: * @tc6: oa_tc6 struct.\ndrivers/net/ethernet/oa_tc6.c-391- * @address: register address of the MAC-PHY to be written.\n--\ndrivers/net/ethernet/oa_tc6.c-395- */\ndrivers/net/ethernet/oa_tc6.c:396:int oa_tc6_write_register(struct oa_tc6 *tc6, u32 address, u32 value)\ndrivers/net/ethernet/oa_tc6.c-397-{\ndrivers/net/ethernet/oa_tc6.c:398:\treturn oa_tc6_write_registers(tc6, address, \u0026value, 1);\ndrivers/net/ethernet/oa_tc6.c-399-}\ndrivers/net/ethernet/oa_tc6.c:400:EXPORT_SYMBOL_GPL(oa_tc6_write_register);\ndrivers/net/ethernet/oa_tc6.c-401-\ndrivers/net/ethernet/oa_tc6.c:402:static int oa_tc6_check_phy_reg_direct_access_capability(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-403-{\n--\ndrivers/net/ethernet/oa_tc6.c-406-\ndrivers/net/ethernet/oa_tc6.c:407:\tret = oa_tc6_read_register(tc6, OA_TC6_REG_STDCAP, \u0026regval);\ndrivers/net/ethernet/oa_tc6.c-408-\tif (ret)\n--\ndrivers/net/ethernet/oa_tc6.c-416-\ndrivers/net/ethernet/oa_tc6.c:417:static void oa_tc6_handle_link_change(struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-418-{\n--\ndrivers/net/ethernet/oa_tc6.c-421-\ndrivers/net/ethernet/oa_tc6.c:422:static int oa_tc6_mdiobus_read(struct mii_bus *bus, int addr, int regnum)\ndrivers/net/ethernet/oa_tc6.c-423-{\ndrivers/net/ethernet/oa_tc6.c:424:\tstruct oa_tc6 *tc6 = bus-\u003epriv;\ndrivers/net/ethernet/oa_tc6.c-425-\tu32 regval;\n--\ndrivers/net/ethernet/oa_tc6.c-427-\ndrivers/net/ethernet/oa_tc6.c:428:\tret = oa_tc6_read_register(tc6, OA_TC6_PHY_STD_REG_ADDR_BASE |\ndrivers/net/ethernet/oa_tc6.c-429-\t\t\t\t (regnum \u0026 OA_TC6_PHY_STD_REG_ADDR_MASK),\n--\ndrivers/net/ethernet/oa_tc6.c-436-\ndrivers/net/ethernet/oa_tc6.c:437:static int oa_tc6_mdiobus_write(struct mii_bus *bus, int addr, int regnum,\ndrivers/net/ethernet/oa_tc6.c-438-\t\t\t\tu16 val)\ndrivers/net/ethernet/oa_tc6.c-439-{\ndrivers/net/ethernet/oa_tc6.c:440:\tstruct oa_tc6 *tc6 = bus-\u003epriv;\ndrivers/net/ethernet/oa_tc6.c-441-\ndrivers/net/ethernet/oa_tc6.c:442:\treturn oa_tc6_write_register(tc6, OA_TC6_PHY_STD_REG_ADDR_BASE |\ndrivers/net/ethernet/oa_tc6.c-443-\t\t\t\t (regnum \u0026 OA_TC6_PHY_STD_REG_ADDR_MASK),\n--\ndrivers/net/ethernet/oa_tc6.c-446-\ndrivers/net/ethernet/oa_tc6.c:447:static int oa_tc6_get_phy_c45_mms(int devnum)\ndrivers/net/ethernet/oa_tc6.c-448-{\n--\ndrivers/net/ethernet/oa_tc6.c-464-\ndrivers/net/ethernet/oa_tc6.c:465:static int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,\ndrivers/net/ethernet/oa_tc6.c-466-\t\t\t\t int regnum)\ndrivers/net/ethernet/oa_tc6.c-467-{\ndrivers/net/ethernet/oa_tc6.c:468:\tstruct oa_tc6 *tc6 = bus-\u003epriv;\ndrivers/net/ethernet/oa_tc6.c-469-\tu32 regval;\n--\ndrivers/net/ethernet/oa_tc6.c-471-\ndrivers/net/ethernet/oa_tc6.c:472:\tret = oa_tc6_get_phy_c45_mms(devnum);\ndrivers/net/ethernet/oa_tc6.c-473-\tif (ret \u003c 0)\n--\ndrivers/net/ethernet/oa_tc6.c-475-\ndrivers/net/ethernet/oa_tc6.c:476:\tret = oa_tc6_read_register(tc6, (ret \u003c\u003c 16) | regnum, \u0026regval);\ndrivers/net/ethernet/oa_tc6.c-477-\tif (ret)\n--\ndrivers/net/ethernet/oa_tc6.c-482-\ndrivers/net/ethernet/oa_tc6.c:483:static int oa_tc6_mdiobus_write_c45(struct mii_bus *bus, int addr, int devnum,\ndrivers/net/ethernet/oa_tc6.c-484-\t\t\t\t int regnum, u16 val)\ndrivers/net/ethernet/oa_tc6.c-485-{\ndrivers/net/ethernet/oa_tc6.c:486:\tstruct oa_tc6 *tc6 = bus-\u003epriv;\ndrivers/net/ethernet/oa_tc6.c-487-\tint ret;\ndrivers/net/ethernet/oa_tc6.c-488-\ndrivers/net/ethernet/oa_tc6.c:489:\tret = oa_tc6_get_phy_c45_mms(devnum);\ndrivers/net/ethernet/oa_tc6.c-490-\tif (ret \u003c 0)\n--\ndrivers/net/ethernet/oa_tc6.c-492-\ndrivers/net/ethernet/oa_tc6.c:493:\treturn oa_tc6_write_register(tc6, (ret \u003c\u003c 16) | regnum, val);\ndrivers/net/ethernet/oa_tc6.c-494-}\ndrivers/net/ethernet/oa_tc6.c-495-\ndrivers/net/ethernet/oa_tc6.c:496:static int oa_tc6_mdiobus_register(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-497-{\n--\ndrivers/net/ethernet/oa_tc6.c-506-\ttc6-\u003emdiobus-\u003epriv = tc6;\ndrivers/net/ethernet/oa_tc6.c:507:\ttc6-\u003emdiobus-\u003eread = oa_tc6_mdiobus_read;\ndrivers/net/ethernet/oa_tc6.c:508:\ttc6-\u003emdiobus-\u003ewrite = oa_tc6_mdiobus_write;\ndrivers/net/ethernet/oa_tc6.c-509-\t/* OPEN Alliance 10BASE-T1x compliance MAC-PHYs will have both C22 and\n--\ndrivers/net/ethernet/oa_tc6.c-518-\t */\ndrivers/net/ethernet/oa_tc6.c:519:\ttc6-\u003emdiobus-\u003eread_c45 = oa_tc6_mdiobus_read_c45;\ndrivers/net/ethernet/oa_tc6.c:520:\ttc6-\u003emdiobus-\u003ewrite_c45 = oa_tc6_mdiobus_write_c45;\ndrivers/net/ethernet/oa_tc6.c-521-\ttc6-\u003emdiobus-\u003ename = \"oa-tc6-mdiobus\";\n--\ndrivers/net/ethernet/oa_tc6.c-536-\ndrivers/net/ethernet/oa_tc6.c:537:static void oa_tc6_mdiobus_unregister(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-538-{\n--\ndrivers/net/ethernet/oa_tc6.c-542-\ndrivers/net/ethernet/oa_tc6.c:543:static int oa_tc6_phy_init(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-544-{\n--\ndrivers/net/ethernet/oa_tc6.c-546-\ndrivers/net/ethernet/oa_tc6.c:547:\tret = oa_tc6_check_phy_reg_direct_access_capability(tc6);\ndrivers/net/ethernet/oa_tc6.c-548-\tif (ret) {\n--\ndrivers/net/ethernet/oa_tc6.c-553-\ndrivers/net/ethernet/oa_tc6.c:554:\tret = oa_tc6_mdiobus_register(tc6);\ndrivers/net/ethernet/oa_tc6.c-555-\tif (ret)\n--\ndrivers/net/ethernet/oa_tc6.c-560-\t\tnetdev_err(tc6-\u003enetdev, \"No PHY found\\n\");\ndrivers/net/ethernet/oa_tc6.c:561:\t\toa_tc6_mdiobus_unregister(tc6);\ndrivers/net/ethernet/oa_tc6.c-562-\t\treturn -ENODEV;\n--\ndrivers/net/ethernet/oa_tc6.c-566-\tret = phy_connect_direct(tc6-\u003enetdev, tc6-\u003ephydev,\ndrivers/net/ethernet/oa_tc6.c:567:\t\t\t\t \u0026oa_tc6_handle_link_change,\ndrivers/net/ethernet/oa_tc6.c-568-\t\t\t\t PHY_INTERFACE_MODE_INTERNAL);\n--\ndrivers/net/ethernet/oa_tc6.c-571-\t\t\t tc6-\u003emdiobus-\u003eid);\ndrivers/net/ethernet/oa_tc6.c:572:\t\toa_tc6_mdiobus_unregister(tc6);\ndrivers/net/ethernet/oa_tc6.c-573-\t\treturn ret;\n--\ndrivers/net/ethernet/oa_tc6.c-580-\ndrivers/net/ethernet/oa_tc6.c:581:static void oa_tc6_phy_exit(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-582-{\ndrivers/net/ethernet/oa_tc6.c-583-\tphy_disconnect(tc6-\u003ephydev);\ndrivers/net/ethernet/oa_tc6.c:584:\toa_tc6_mdiobus_unregister(tc6);\ndrivers/net/ethernet/oa_tc6.c-585-}\ndrivers/net/ethernet/oa_tc6.c-586-\ndrivers/net/ethernet/oa_tc6.c:587:static int oa_tc6_read_status0(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-588-{\n--\ndrivers/net/ethernet/oa_tc6.c-591-\ndrivers/net/ethernet/oa_tc6.c:592:\tret = oa_tc6_read_register(tc6, OA_TC6_REG_STATUS0, \u0026regval);\ndrivers/net/ethernet/oa_tc6.c-593-\tif (ret) {\n--\ndrivers/net/ethernet/oa_tc6.c-601-\ndrivers/net/ethernet/oa_tc6.c:602:static int oa_tc6_sw_reset_macphy(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-603-{\n--\ndrivers/net/ethernet/oa_tc6.c-606-\ndrivers/net/ethernet/oa_tc6.c:607:\tret = oa_tc6_write_register(tc6, OA_TC6_REG_RESET, regval);\ndrivers/net/ethernet/oa_tc6.c-608-\tif (ret)\n--\ndrivers/net/ethernet/oa_tc6.c-611-\t/* Poll for soft reset complete for every 1ms until 1s timeout */\ndrivers/net/ethernet/oa_tc6.c:612:\tret = readx_poll_timeout(oa_tc6_read_status0, tc6, regval,\ndrivers/net/ethernet/oa_tc6.c-613-\t\t\t\t regval \u0026 STATUS0_RESETC,\n--\ndrivers/net/ethernet/oa_tc6.c-619-\t/* Clear the reset complete status */\ndrivers/net/ethernet/oa_tc6.c:620:\treturn oa_tc6_write_register(tc6, OA_TC6_REG_STATUS0, regval);\ndrivers/net/ethernet/oa_tc6.c-621-}\ndrivers/net/ethernet/oa_tc6.c-622-\ndrivers/net/ethernet/oa_tc6.c:623:static int oa_tc6_unmask_macphy_error_interrupts(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-624-{\n--\ndrivers/net/ethernet/oa_tc6.c-627-\ndrivers/net/ethernet/oa_tc6.c:628:\tret = oa_tc6_read_register(tc6, OA_TC6_REG_INT_MASK0, \u0026regval);\ndrivers/net/ethernet/oa_tc6.c-629-\tif (ret)\n--\ndrivers/net/ethernet/oa_tc6.c-636-\ndrivers/net/ethernet/oa_tc6.c:637:\treturn oa_tc6_write_register(tc6, OA_TC6_REG_INT_MASK0, regval);\ndrivers/net/ethernet/oa_tc6.c-638-}\ndrivers/net/ethernet/oa_tc6.c-639-\ndrivers/net/ethernet/oa_tc6.c:640:static int oa_tc6_enable_data_transfer(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-641-{\n--\ndrivers/net/ethernet/oa_tc6.c-644-\ndrivers/net/ethernet/oa_tc6.c:645:\tret = oa_tc6_read_register(tc6, OA_TC6_REG_CONFIG0, \u0026value);\ndrivers/net/ethernet/oa_tc6.c-646-\tif (ret)\n--\ndrivers/net/ethernet/oa_tc6.c-651-\ndrivers/net/ethernet/oa_tc6.c:652:\treturn oa_tc6_write_register(tc6, OA_TC6_REG_CONFIG0, value);\ndrivers/net/ethernet/oa_tc6.c-653-}\n--\ndrivers/net/ethernet/oa_tc6.c-655-/* Called when a frame that is meant to be transmitted, is dropped. */\ndrivers/net/ethernet/oa_tc6.c:656:static void oa_tc6_drop_tx_skb(struct oa_tc6 *tc6, struct sk_buff *skb)\ndrivers/net/ethernet/oa_tc6.c-657-{\n--\ndrivers/net/ethernet/oa_tc6.c-663-\ndrivers/net/ethernet/oa_tc6.c:664:static struct sk_buff *oa_tc6_detach_waiting_tx_skb(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-665-{\n--\ndrivers/net/ethernet/oa_tc6.c-674-\ndrivers/net/ethernet/oa_tc6.c:675:static void oa_tc6_cleanup_ongoing_rx_skb(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-676-{\n--\ndrivers/net/ethernet/oa_tc6.c-683-\ndrivers/net/ethernet/oa_tc6.c:684:static void oa_tc6_cleanup_ongoing_tx_skb(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-685-{\ndrivers/net/ethernet/oa_tc6.c:686:\toa_tc6_drop_tx_skb(tc6, tc6-\u003eongoing_tx_skb);\ndrivers/net/ethernet/oa_tc6.c-687-\ttc6-\u003eongoing_tx_skb = NULL;\n--\ndrivers/net/ethernet/oa_tc6.c-689-\ndrivers/net/ethernet/oa_tc6.c:690:static void oa_tc6_cleanup_waiting_tx_skb(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-691-{\n--\ndrivers/net/ethernet/oa_tc6.c-694-\tspin_lock_bh(\u0026tc6-\u003etx_skb_lock);\ndrivers/net/ethernet/oa_tc6.c:695:\tskb = oa_tc6_detach_waiting_tx_skb(tc6);\ndrivers/net/ethernet/oa_tc6.c-696-\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\ndrivers/net/ethernet/oa_tc6.c-697-\ndrivers/net/ethernet/oa_tc6.c:698:\toa_tc6_drop_tx_skb(tc6, skb);\ndrivers/net/ethernet/oa_tc6.c-699-}\ndrivers/net/ethernet/oa_tc6.c-700-\ndrivers/net/ethernet/oa_tc6.c:701:static void oa_tc6_free_ongoing_skbs(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-702-{\ndrivers/net/ethernet/oa_tc6.c:703:\toa_tc6_cleanup_ongoing_tx_skb(tc6);\ndrivers/net/ethernet/oa_tc6.c:704:\toa_tc6_cleanup_ongoing_rx_skb(tc6);\ndrivers/net/ethernet/oa_tc6.c-705-}\ndrivers/net/ethernet/oa_tc6.c-706-\ndrivers/net/ethernet/oa_tc6.c:707:static void oa_tc6_free_pending_skbs(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-708-{\ndrivers/net/ethernet/oa_tc6.c:709:\toa_tc6_free_ongoing_skbs(tc6);\ndrivers/net/ethernet/oa_tc6.c:710:\toa_tc6_cleanup_waiting_tx_skb(tc6);\ndrivers/net/ethernet/oa_tc6.c-711-}\ndrivers/net/ethernet/oa_tc6.c-712-\ndrivers/net/ethernet/oa_tc6.c:713:static void oa_tc6_look_for_new_frame(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-714-{\ndrivers/net/ethernet/oa_tc6.c-715-\ttc6-\u003erx_buf_overflow = true;\ndrivers/net/ethernet/oa_tc6.c:716:\toa_tc6_cleanup_ongoing_rx_skb(tc6);\ndrivers/net/ethernet/oa_tc6.c-717-}\n--\ndrivers/net/ethernet/oa_tc6.c-722- */\ndrivers/net/ethernet/oa_tc6.c:723:static void oa_tc6_disable_traffic(struct oa_tc6 *tc6)\ndrivers/net/ethernet/oa_tc6.c-724-{\n--\ndrivers/net/ethernet/oa_tc6.c-729-\ttc6-\u003edisable_traffic = true;\ndrivers/net/ethernet/oa_tc6.c:730:\tskb = oa_tc6_detach_waiting_tx_skb(tc6);\ndrivers/net/ethernet/oa_tc6.c-731-\tspin_unlock_bh(\u0026tc6-\u003etx_skb_lock);\n--\ndrivers/net/ethernet/oa_tc6.c-736-\tnetif_tx_disable(tc6-\u003enetdev);\ndrivers/net/ethernet/oa_tc6.c:737:\toa_tc6_drop_tx_skb(tc6, skb);\n\n"
} |
| 39/2 | 2026/07/31 07:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 79179 output: 27 thoughts: 172 Thoughts: **Unreachable Code? A Deep Dive into `oa_tc6` and SPI Fuzzing** Alright, let's break this down. `oa_tc6`... right, it's just a *framework*. And, from what I can tell, the *only* driver utilizing it is `lan865x`. Now, `lan865x` is specifically an SPI device. My immediate concern is that if there's *no* SPI emulator built into the kernel, and no method to properly instantiate this particular device for fuzzing, then this code is essentially unreachable within a virtualized environment. This raises a red flag; I need to understand if there is a real fuzzing vector. Hold on, I thought I remembered something. Does Syzkaller have a `syz_spi_setup` function? No, that's not right. Hmm, perhaps Syzkaller utilizes `spidev` to fuzz SPI devices? No, that's definitely not it. `spidev` is all about userspace interaction with SPI hardware; it wouldn't be useful to emulate. Okay, I need to know definitively: does Syzkaller actually have a mechanism for fuzzing SPI drivers? I need to check the Syzkaller source code to identify any `syz_` function calls within the `drivers/spi/` directory. That's the key. If there's nothing there, we're likely dealing with unreachable code, or at the very least, a fuzzing blind spot. |
| 40/2 | 2026/07/31 07:38 | tool | grepper |
0mError:no matches Args: {
"Expression": "syz_",
"PathPrefix": "drivers/spi/"
}Results: {
"error": "no matches"
} |
| 41/2 | 2026/07/31 07:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 79711 output: 20 thoughts: 508 Thoughts: **Analyzing Syzkaller's Interaction with a Potentially Unfuzzable Driver** Okay, first thought: is this really something syzkaller could have found? I need to consider all the mechanisms it could potentially leverage. I start by ruling out the obvious ones: `mac80211_hwsim` for WiFi, `vhci` for USB, `netdevsim` for netdev – not applicable here. Then, the prompt! Ah, it says the changes are *already* applied and committed. "syz-cluster: applied patch under review". That's it! Syzkaller isn't finding a new bug; it's testing a patch submitted to the mailing list. It is not necessarily *finding* a bug in this specific scenario. It is a compile-test scenario. The context provides additional clues. Syzkaller checks for WorthFuzzing=false if a patch contains code unreachable in virtualized environments like GCE or QEMU. That includes things like vendor-specific PCIe switch drivers or anything requiring physical hardware not emulated. So, I need to understand what this `oa_tc6` framework is all about. The description says it's for OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interface, and the only driver using it is `lan865x`. This screams SPI device! There's no SPI emulator in QEMU or in the kernel itself that could emulate this kind of device. It's simply impossible to reach in a virtualized environment. But, I should rule out every possibility. Could `oa_tc6` be reached some other way? I need to trace it: `oa_tc6_init` is *only* called by `lan865x_probe`. `lan865x_probe` itself is only called when an SPI device is probed. Without an emulator for the SPI device, this is unreachable. I'm going to quickly double check that there is no other caller of `oa_tc6_init` just to be absolutely sure. |
| 42/2 | 2026/07/31 07:38 | tool | grepper |
0mArgs:{
"Expression": "oa_tc6_init"
}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=1385=EXPORT_SYMBOL_GPL(oa_tc6_start_xmit);\n--\ndrivers/net/ethernet/oa_tc6.c-1387-/**\ndrivers/net/ethernet/oa_tc6.c:1388: * oa_tc6_init - allocates and initializes oa_tc6 structure.\ndrivers/net/ethernet/oa_tc6.c-1389- * @spi: device with which data will be exchanged.\n--\ndrivers/net/ethernet/oa_tc6.c-1394- */\ndrivers/net/ethernet/oa_tc6.c:1395:struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)\ndrivers/net/ethernet/oa_tc6.c-1396-{\n--\ndrivers/net/ethernet/oa_tc6.c-1499-}\ndrivers/net/ethernet/oa_tc6.c:1500:EXPORT_SYMBOL_GPL(oa_tc6_init);\ndrivers/net/ethernet/oa_tc6.c-1501-\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"
} |
| 43/2 | 2026/07/31 07:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 81390 output: 126 thoughts: 336 Thoughts: **My Assessment: Unfuzzable Code Path** Okay, so the patch I'm looking at exclusively touches `lan865x_probe`. Right away, I know `lan865x` is an SPI device. That's the key. Can you emulate an `lan865x` in a virtual environment like QEMU or Syzkaller? Nope. It's a specific Microchip MACPHY Ethernet chip. So, it's inherently unreachable in these virtualized fuzzing environments. My instinct says this is a dead end. I'm stopping for a second though, just to make sure I haven't missed something subtle. Is there *any* chance that `oa_tc6` framework, which is what this patch modifies, is used by a driver outside of the current tree, perhaps as part of a larger, pending series? Even if that were the case, the *framework* itself is for SPI devices. And generally speaking, unless there's a specific emulator for the SPI device, like `mac80211_hwsim` for wifi, it's not going to be accessible in QEMU or Syzkaller. We're lacking that kind of emulator here. Let me just solidify this. This patch modifies `drivers/net/ethernet/oa_tc6.c`. That's the OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interface framework. And as far as I can tell, the *only* driver that uses that framework is the `lan865x`. It's a driver for that very specific Microchip LAN8650/1 MACPHY Ethernet chip. Because this is a hardware-specific SPI device and we don't have a software emulator for it in the kernel or QEMU, the code paths modified by this patch are, for all practical purposes, impossible to reach in virtualized environments like GCE or QEMU. It's not fuzzable. I'll use the `set-results` tool to mark this as uninteresting. |
| 44/2 | 2026/07/31 07:39 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the oa_tc6 framework, which is used for OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interfaces. The only driver currently using this framework is the Microchip LAN865x SPI driver. Since this is a hardware-specific SPI device and there is no software emulator for it in QEMU or the kernel, the modified code paths are impossible to reach in virtualized environments and cannot be fuzzed.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the oa_tc6 framework, which is used for OPEN Alliance TC6 10BASE-T1S MAC-PHY SPI interfaces. The only driver currently using this framework is the Microchip LAN865x SPI driver. Since this is a hardware-specific SPI device and there is no software emulator for it in QEMU or the kernel, the modified code paths are impossible to reach in virtualized environments and cannot be fuzzed.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|