AI Trajectory


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

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "KMSANReasoning": "",
  "NeedsKMSAN": false,
  "Reasoning": "The changes modify the Broadcom ThorUltra Ethernet driver (drivers/net/ethernet/broadcom/bnge/), refactoring notification queue 0 (NQ0) lifecycle management across open/close. This driver requires vendor-specific physical PCIe hardware (Broadcom ThorUltra BCM57708 ASIC) that is not emulated in standard QEMU or GCE virtualized environments, making the modified code structurally unreachable for fuzzing.",
  "WorthFuzzing": false
}

1/1 2026/11/15 14:11 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit ee7e5d3143e9ff88d38bbb50302a7ed5ca8d20da\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sun Nov 15 14:11:26 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge.h b/drivers/net/ethernet/broadcom/bnge/bnge.h\nindex 4479ccd071f532..64c792b278ad5f 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge.h\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge.h\n@@ -220,6 +220,36 @@ struct bnge_dev {\n \tu32\t\t\tphy_flags;\n };\n \n+/* The netdev has no name until register_netdev(), so log through the PCI\n+ * device before that (e.g. during probe).\n+ */\n+#define bnge_log(level, bd, fmt, ...)\t\t\t\t\t\\\n+\tdo {\t\t\t\t\t\t\t\t\\\n+\t\tstruct bnge_dev *__bd = (bd);\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\t\\\n+\t\tif (__bd-\u003enetdev \u0026\u0026\t\t\t\t\t\\\n+\t\t    READ_ONCE(__bd-\u003enetdev-\u003ereg_state) != NETREG_UNINITIALIZED)\\\n+\t\t\tnetdev_##level(__bd-\u003enetdev, fmt, ##__VA_ARGS__);\\\n+\t\telse\t\t\t\t\t\t\t\\\n+\t\t\tdev_##level(__bd-\u003edev, fmt, ##__VA_ARGS__);\t\\\n+\t} while (0)\n+\n+#define bnge_err(bd, fmt, ...)\tbnge_log(err, bd, fmt, ##__VA_ARGS__)\n+#define bnge_warn(bd, fmt, ...)\tbnge_log(warn, bd, fmt, ##__VA_ARGS__)\n+#define bnge_dbg(bd, fmt, ...)\tbnge_log(dbg, bd, fmt, ##__VA_ARGS__)\n+\n+/* Index of the first NQ created in ndo_open() and destroyed in ndo_stop().\n+ * NQ0 (index 0) lives from probe to remove and is managed by\n+ * bnge_nq0_init()/uninit() and the nq0 handoff helpers; therefore,\n+ * bnge_for_each_open_nq() skips it.\n+ *\n+ * irq_tbl order: NQ0, aux (RoCE) vectors, open-time NQs.\n+ */\n+#define BNGE_FIRST_OPEN_NQ\t1\n+\n+#define bnge_for_each_open_nq(i, bd) \\\n+\tfor ((i) = BNGE_FIRST_OPEN_NQ; (i) \u003c (bd)-\u003enq_nr_rings; (i)++)\n+\n static inline bool bnge_is_roce_en(struct bnge_dev *bd)\n {\n \treturn bd-\u003eflags \u0026 BNGE_EN_ROCE;\n@@ -263,4 +293,21 @@ static inline void bnge_db_write(struct bnge_dev *bd, struct bnge_db_info *db,\n bool bnge_aux_registered(struct bnge_dev *bd);\n u16 bnge_aux_get_msix(struct bnge_dev *bd);\n \n+/* irq_tbl index of the i-th aux vector, also used as its ring_idx */\n+static inline int bnge_aux_irq_idx(int i)\n+{\n+\treturn BNGE_FIRST_OPEN_NQ + i;\n+}\n+\n+/* irq_tbl index of NQ nq_idx. @aux_msix is a single bnge_aux_get_msix()\n+ * sample shared by all NQs of one allocation.\n+ */\n+static inline int bnge_nq_irq_idx(u16 aux_msix, int nq_idx)\n+{\n+\tif (nq_idx \u003c BNGE_FIRST_OPEN_NQ)\n+\t\treturn nq_idx;\n+\n+\treturn aux_msix + nq_idx;\n+}\n+\n #endif /* _BNGE_H_ */\ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c b/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c\nindex 0955b488b6fea0..0393bfea7b6580 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c\n@@ -34,9 +34,9 @@ static void bnge_fill_msix_vecs(struct bnge_dev *bd,\n \t}\n \tnum_msix = auxr_dev-\u003eauxr_info-\u003emsix_requested;\n \tfor (i = 0; i \u003c num_msix; i++) {\n-\t\tinfo[i].vector = bd-\u003eirq_tbl[i].vector;\n+\t\tinfo[i].vector = bd-\u003eirq_tbl[bnge_aux_irq_idx(i)].vector;\n \t\tinfo[i].db_offset = bd-\u003edb_offset;\n-\t\tinfo[i].ring_idx = i;\n+\t\tinfo[i].ring_idx = bnge_aux_irq_idx(i);\n \t}\n }\n \ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c b/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c\nindex 651c5e783516cc..fb960bff85fa5e 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c\n@@ -1302,7 +1302,8 @@ int hwrm_ring_free_send_msg(struct bnge_net *bn,\n \tbnge_hwrm_req_drop(bd, req);\n exit:\n \tif (rc) {\n-\t\tnetdev_err(bd-\u003enetdev, \"hwrm_ring_free type %d failed. rc:%d\\n\", ring_type, rc);\n+\t\tbnge_err(bd, \"hwrm_ring_free type %d failed. rc:%d\\n\",\n+\t\t\t ring_type, rc);\n \t\treturn -EIO;\n \t}\n \treturn 0;\n@@ -1395,7 +1396,7 @@ int hwrm_ring_alloc_send_msg(struct bnge_net *bn,\n \t\treq-\u003eint_mode = RING_ALLOC_REQ_INT_MODE_MSIX;\n \t\tbreak;\n \tdefault:\n-\t\tnetdev_err(bn-\u003enetdev, \"hwrm alloc invalid ring type %d\\n\", ring_type);\n+\t\tbnge_err(bd, \"hwrm alloc invalid ring type %d\\n\", ring_type);\n \t\treturn -EINVAL;\n \t}\n \n@@ -1406,7 +1407,8 @@ int hwrm_ring_alloc_send_msg(struct bnge_net *bn,\n \n exit:\n \tif (rc) {\n-\t\tnetdev_err(bd-\u003enetdev, \"hwrm_ring_alloc type %d failed. rc:%d\\n\", ring_type, rc);\n+\t\tbnge_err(bd, \"hwrm_ring_alloc type %d failed. rc:%d\\n\",\n+\t\t\t ring_type, rc);\n \t\treturn -EIO;\n \t}\n \tring-\u003efw_ring_id = ring_id;\ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c\nindex 25f844e6f6d34a..ab917c0f81b1f7 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c\n@@ -503,61 +503,95 @@ static int bnge_alloc_cp_desc_arr(struct bnge_cp_ring_info *cpr, int n)\n \treturn -ENOMEM;\n }\n \n-static void bnge_free_nq_arrays(struct bnge_net *bn)\n+static void bnge_free_nq(struct bnge_net *bn, struct bnge_napi *bnapi)\n {\n-\tstruct bnge_dev *bd = bn-\u003ebd;\n-\tint i;\n+\tstruct bnge_nq_ring_info *nqr = \u0026bnapi-\u003enq_ring;\n \n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n-\t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n+\tbnge_free_ring(bn-\u003ebd, \u0026nqr-\u003ering_struct.ring_mem);\n+\tbnge_free_nq_desc_arr(nqr);\n+}\n+\n+static int bnge_alloc_nq(struct bnge_net *bn, struct bnge_napi *bnapi,\n+\t\t\t u16 aux_msix)\n+{\n+\tstruct bnge_nq_ring_info *nqr = \u0026bnapi-\u003enq_ring;\n+\tstruct bnge_ring_mem_info *rmem;\n+\tstruct bnge_ring_struct *ring;\n+\tint rc;\n \n-\t\tbnge_free_nq_desc_arr(\u0026bnapi-\u003enq_ring);\n+\tring = \u0026nqr-\u003ering_struct;\n+\trmem = \u0026ring-\u003ering_mem;\n+\n+\trc = bnge_alloc_nq_desc_arr(nqr, bn-\u003ecp_nr_pages);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\tnqr-\u003ebnapi = bnapi;\n+\trmem-\u003enr_pages = bn-\u003ecp_nr_pages;\n+\trmem-\u003epage_size = HW_CMPD_RING_SIZE;\n+\trmem-\u003epg_arr = (void **)nqr-\u003edesc_ring;\n+\trmem-\u003edma_arr = nqr-\u003edesc_mapping;\n+\trmem-\u003evmem_size = 0;\n+\trmem-\u003eflags = BNGE_RMEM_RING_PTE_FLAG;\n+\trc = bnge_alloc_ring(bn-\u003ebd, rmem);\n+\tif (rc) {\n+\t\tbnge_free_nq_desc_arr(nqr);\n+\t\treturn rc;\n \t}\n+\n+\tring-\u003efw_ring_id = INVALID_HW_RING_ID_32BIT;\n+\tring-\u003emap_idx = bnge_nq_irq_idx(aux_msix, bnapi-\u003eindex);\n+\treturn 0;\n }\n \n-static int bnge_alloc_nq_arrays(struct bnge_net *bn)\n+static void bnge_free_nqs(struct bnge_net *bn)\n {\n \tstruct bnge_dev *bd = bn-\u003ebd;\n-\tint i, rc;\n+\tint i;\n \n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n-\t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n+\tbnge_for_each_open_nq(i, bd)\n+\t\tbnge_free_nq(bn, bn-\u003ebnapi[i]);\n+}\n \n-\t\trc = bnge_alloc_nq_desc_arr(\u0026bnapi-\u003enq_ring, bn-\u003ecp_nr_pages);\n+static int bnge_alloc_nqs(struct bnge_net *bn)\n+{\n+\tstruct bnge_dev *bd = bn-\u003ebd;\n+\tu16 aux_msix;\n+\tint i, rc;\n+\n+\t/* RoCE can be disabled concurrently; sample the aux vector count once\n+\t * so every NQ gets a distinct irq_tbl index.\n+\t */\n+\taux_msix = bnge_aux_get_msix(bd);\n+\tbnge_for_each_open_nq(i, bd) {\n+\t\trc = bnge_alloc_nq(bn, bn-\u003ebnapi[i], aux_msix);\n \t\tif (rc)\n-\t\t\tgoto err_free_nq_arrays;\n+\t\t\tgoto err_free_nqs;\n \t}\n \treturn 0;\n \n-err_free_nq_arrays:\n-\tbnge_free_nq_arrays(bn);\n+err_free_nqs:\n+\twhile (--i \u003e= BNGE_FIRST_OPEN_NQ)\n+\t\tbnge_free_nq(bn, bn-\u003ebnapi[i]);\n \treturn rc;\n }\n \n-static void bnge_free_nq_tree(struct bnge_net *bn)\n+static void bnge_free_cp_rings(struct bnge_net *bn)\n {\n \tstruct bnge_dev *bd = bn-\u003ebd;\n \tint i;\n \n \tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n-\t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n-\t\tstruct bnge_nq_ring_info *nqr;\n-\t\tstruct bnge_ring_struct *ring;\n+\t\tstruct bnge_nq_ring_info *nqr = \u0026bn-\u003ebnapi[i]-\u003enq_ring;\n \t\tint j;\n \n-\t\tnqr = \u0026bnapi-\u003enq_ring;\n-\t\tring = \u0026nqr-\u003ering_struct;\n-\n-\t\tbnge_free_ring(bd, \u0026ring-\u003ering_mem);\n-\n \t\tif (!nqr-\u003ecp_ring_arr)\n \t\t\tcontinue;\n \n \t\tfor (j = 0; j \u003c nqr-\u003ecp_ring_count; j++) {\n \t\t\tstruct bnge_cp_ring_info *cpr = \u0026nqr-\u003ecp_ring_arr[j];\n \n-\t\t\tring = \u0026cpr-\u003ering_struct;\n-\t\t\tbnge_free_ring(bd, \u0026ring-\u003ering_mem);\n+\t\t\tbnge_free_ring(bd, \u0026cpr-\u003ering_struct.ring_mem);\n \t\t\tbnge_free_cp_desc_arr(cpr);\n \t\t}\n \t\tkfree(nqr-\u003ecp_ring_arr);\n@@ -594,31 +628,21 @@ static int alloc_one_cp_ring(struct bnge_net *bn,\n \treturn rc;\n }\n \n-static int bnge_alloc_nq_tree(struct bnge_net *bn)\n+static int bnge_alloc_cp_rings(struct bnge_net *bn)\n {\n \tstruct bnge_dev *bd = bn-\u003ebd;\n-\tint i, j, ulp_msix, rc;\n+\tint i, j, rc;\n \tint tcs = 1;\n \n-\tulp_msix = bnge_aux_get_msix(bd);\n \tfor (i = 0, j = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n \t\tbool sh = !!(bd-\u003eflags \u0026 BNGE_EN_SHARED_CHNL);\n \t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n \t\tstruct bnge_nq_ring_info *nqr;\n \t\tstruct bnge_cp_ring_info *cpr;\n-\t\tstruct bnge_ring_struct *ring;\n \t\tint cp_count = 0, k;\n \t\tint rx = 0, tx = 0;\n \n \t\tnqr = \u0026bnapi-\u003enq_ring;\n-\t\tnqr-\u003ebnapi = bnapi;\n-\t\tring = \u0026nqr-\u003ering_struct;\n-\n-\t\trc = bnge_alloc_ring(bd, \u0026ring-\u003ering_mem);\n-\t\tif (rc)\n-\t\t\tgoto err_free_nq_tree;\n-\n-\t\tring-\u003emap_idx = ulp_msix + i;\n \n \t\tif (i \u003c bd-\u003erx_nr_rings) {\n \t\t\tcp_count++;\n@@ -634,7 +658,7 @@ static int bnge_alloc_nq_tree(struct bnge_net *bn)\n \t\tnqr-\u003ecp_ring_arr = kzalloc_objs(*cpr, cp_count);\n \t\tif (!nqr-\u003ecp_ring_arr) {\n \t\t\trc = -ENOMEM;\n-\t\t\tgoto err_free_nq_tree;\n+\t\t\tgoto err_free_cp_rings;\n \t\t}\n \n \t\tnqr-\u003ecp_ring_count = cp_count;\n@@ -643,7 +667,7 @@ static int bnge_alloc_nq_tree(struct bnge_net *bn)\n \t\t\tcpr = \u0026nqr-\u003ecp_ring_arr[k];\n \t\t\trc = alloc_one_cp_ring(bn, cpr);\n \t\t\tif (rc)\n-\t\t\t\tgoto err_free_nq_tree;\n+\t\t\t\tgoto err_free_cp_rings;\n \n \t\t\tcpr-\u003ebnapi = bnapi;\n \t\t\tcpr-\u003ecp_idx = k;\n@@ -663,8 +687,8 @@ static int bnge_alloc_nq_tree(struct bnge_net *bn)\n \t}\n \treturn 0;\n \n-err_free_nq_tree:\n-\tbnge_free_nq_tree(bn);\n+err_free_cp_rings:\n+\tbnge_free_cp_rings(bn);\n \treturn rc;\n }\n \n@@ -1191,17 +1215,27 @@ static int bnge_init_ring_grps(struct bnge_net *bn)\n \t\tbn-\u003egrp_info[i].agg_fw_ring_id = INVALID_HW_RING_ID;\n \t\tbn-\u003egrp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;\n \t}\n+\t/* NQ0 stays allocated in FW across open/close */\n+\tbn-\u003egrp_info[0].nq_fw_ring_id =\n+\t\t(u16)bn-\u003enq0-\u003enq_ring.ring_struct.fw_ring_id;\n \n \treturn 0;\n }\n \n+static void bnge_nq0_clear_rings(struct bnge_net *bn)\n+{\n+\tbn-\u003enq0-\u003erx_ring = NULL;\n+\tmemset(bn-\u003enq0-\u003etx_ring, 0, sizeof(bn-\u003enq0-\u003etx_ring));\n+\tbn-\u003enq0-\u003eevents = 0;\n+}\n+\n static void bnge_free_core(struct bnge_net *bn)\n {\n \tbnge_free_vnic_attributes(bn);\n \tbnge_free_tx_rings(bn);\n \tbnge_free_rx_rings(bn);\n-\tbnge_free_nq_tree(bn);\n-\tbnge_free_nq_arrays(bn);\n+\tbnge_free_cp_rings(bn);\n+\tbnge_free_nqs(bn);\n \tbnge_free_ring_stats(bn);\n \tbnge_free_ring_grps(bn);\n \tbnge_free_vnics(bn);\n@@ -1211,6 +1245,7 @@ static void bnge_free_core(struct bnge_net *bn)\n \tbn-\u003etx_ring = NULL;\n \tkfree(bn-\u003erx_ring);\n \tbn-\u003erx_ring = NULL;\n+\tbnge_nq0_clear_rings(bn);\n \tkfree(bn-\u003ebnapi);\n \tbn-\u003ebnapi = NULL;\n }\n@@ -1225,20 +1260,20 @@ static int bnge_alloc_core(struct bnge_net *bn)\n \tarr_size = L1_CACHE_ALIGN(sizeof(struct bnge_napi *) *\n \t\t\tbd-\u003enq_nr_rings);\n \tsize = L1_CACHE_ALIGN(sizeof(struct bnge_napi));\n-\tbnapi = kzalloc(arr_size + size * bd-\u003enq_nr_rings, GFP_KERNEL);\n+\tbnapi = kzalloc(arr_size +\n+\t\t\tsize * (bd-\u003enq_nr_rings - BNGE_FIRST_OPEN_NQ),\n+\t\t\tGFP_KERNEL);\n \tif (!bnapi)\n \t\treturn rc;\n \n \tbn-\u003ebnapi = bnapi;\n \tbnapi += arr_size;\n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++, bnapi += size) {\n-\t\tstruct bnge_nq_ring_info *nqr;\n-\n+\tbn-\u003ebnapi[0] = bn-\u003enq0;\n+\tbnge_for_each_open_nq(i, bd) {\n \t\tbn-\u003ebnapi[i] = bnapi;\n \t\tbn-\u003ebnapi[i]-\u003eindex = i;\n \t\tbn-\u003ebnapi[i]-\u003ebn = bn;\n-\t\tnqr = \u0026bn-\u003ebnapi[i]-\u003enq_ring;\n-\t\tnqr-\u003ering_struct.ring_mem.flags = BNGE_RMEM_RING_PTE_FLAG;\n+\t\tbnapi += size;\n \t}\n \n \tbn-\u003erx_ring = kzalloc_objs(struct bnge_rx_ring_info, bd-\u003erx_nr_rings);\n@@ -1297,7 +1332,7 @@ static int bnge_alloc_core(struct bnge_net *bn)\n \tif (rc)\n \t\tgoto err_free_ring_stats;\n \n-\trc = bnge_alloc_nq_arrays(bn);\n+\trc = bnge_alloc_nqs(bn);\n \tif (rc)\n \t\tgoto err_free_vnics;\n \n@@ -1305,13 +1340,13 @@ static int bnge_alloc_core(struct bnge_net *bn)\n \n \trc = bnge_alloc_rx_rings(bn);\n \tif (rc)\n-\t\tgoto err_free_nq_arrays;\n+\t\tgoto err_free_nqs;\n \n \trc = bnge_alloc_tx_rings(bn);\n \tif (rc)\n \t\tgoto err_free_rx_rings;\n \n-\trc = bnge_alloc_nq_tree(bn);\n+\trc = bnge_alloc_cp_rings(bn);\n \tif (rc)\n \t\tgoto err_free_tx_rings;\n \n@@ -1320,17 +1355,17 @@ static int bnge_alloc_core(struct bnge_net *bn)\n \t\t\t\t\t\t  BNGE_VNIC_UCAST_FLAG;\n \trc = bnge_alloc_vnic_attributes(bn);\n \tif (rc)\n-\t\tgoto err_free_nq_tree;\n+\t\tgoto err_free_cp_rings;\n \treturn 0;\n \n-err_free_nq_tree:\n-\tbnge_free_nq_tree(bn);\n+err_free_cp_rings:\n+\tbnge_free_cp_rings(bn);\n err_free_tx_rings:\n \tbnge_free_tx_rings(bn);\n err_free_rx_rings:\n \tbnge_free_rx_rings(bn);\n-err_free_nq_arrays:\n-\tbnge_free_nq_arrays(bn);\n+err_free_nqs:\n+\tbnge_free_nqs(bn);\n err_free_vnics:\n \tbnge_free_vnics(bn);\n err_free_ring_stats:\n@@ -1345,6 +1380,7 @@ static int bnge_alloc_core(struct bnge_net *bn)\n \tkfree(bn-\u003erx_ring);\n \tbn-\u003erx_ring = NULL;\n err_free_bnapi:\n+\tbnge_nq0_clear_rings(bn);\n \tkfree(bn-\u003ebnapi);\n \tbn-\u003ebnapi = NULL;\n \treturn rc;\n@@ -1389,21 +1425,18 @@ static int bnge_cp_num_to_irq_num(struct bnge_net *bn, int n)\n \treturn nqr-\u003ering_struct.map_idx;\n }\n \n-static void bnge_init_nq_tree(struct bnge_net *bn)\n+static void bnge_init_cp_rings(struct bnge_net *bn)\n {\n \tstruct bnge_dev *bd = bn-\u003ebd;\n \tint i, j;\n \n \tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n \t\tstruct bnge_nq_ring_info *nqr = \u0026bn-\u003ebnapi[i]-\u003enq_ring;\n-\t\tstruct bnge_ring_struct *ring = \u0026nqr-\u003ering_struct;\n \n-\t\tring-\u003efw_ring_id = INVALID_HW_RING_ID_32BIT;\n \t\tfor (j = 0; j \u003c nqr-\u003ecp_ring_count; j++) {\n \t\t\tstruct bnge_cp_ring_info *cpr = \u0026nqr-\u003ecp_ring_arr[j];\n \n-\t\t\tring = \u0026cpr-\u003ering_struct;\n-\t\t\tring-\u003efw_ring_id = INVALID_HW_RING_ID_32BIT;\n+\t\t\tcpr-\u003ering_struct.fw_ring_id = INVALID_HW_RING_ID_32BIT;\n \t\t}\n \t}\n }\n@@ -1914,6 +1947,44 @@ static int bnge_hwrm_rx_ring_alloc(struct bnge_net *bn,\n \treturn 0;\n }\n \n+static int bnge_hwrm_nq_alloc(struct bnge_net *bn, struct bnge_napi *bnapi)\n+{\n+\tstruct bnge_nq_ring_info *nqr = \u0026bnapi-\u003enq_ring;\n+\tu32 type = HWRM_RING_ALLOC_NQ;\n+\tstruct bnge_ring_struct *ring;\n+\tunsigned int vector;\n+\tu32 map_idx;\n+\tint rc;\n+\n+\tring = \u0026nqr-\u003ering_struct;\n+\tmap_idx = ring-\u003emap_idx;\n+\n+\tvector = bn-\u003ebd-\u003eirq_tbl[map_idx].vector;\n+\tdisable_irq_nosync(vector);\n+\trc = hwrm_ring_alloc_send_msg(bn, ring, type, map_idx);\n+\tif (rc) {\n+\t\tenable_irq(vector);\n+\t\treturn rc;\n+\t}\n+\tbnge_set_db(bn, \u0026nqr-\u003enq_db, type, map_idx, ring-\u003efw_ring_id);\n+\tbnge_db_nq(bn, \u0026nqr-\u003enq_db, nqr-\u003enq_raw_cons);\n+\tenable_irq(vector);\n+\n+\treturn 0;\n+}\n+\n+static void bnge_hwrm_nq_free(struct bnge_net *bn, struct bnge_napi *bnapi)\n+{\n+\tstruct bnge_ring_struct *ring = \u0026bnapi-\u003enq_ring.ring_struct;\n+\n+\tif (ring-\u003efw_ring_id == INVALID_HW_RING_ID_32BIT)\n+\t\treturn;\n+\n+\thwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_NQ,\n+\t\t\t\tINVALID_HW_RING_ID);\n+\tring-\u003efw_ring_id = INVALID_HW_RING_ID_32BIT;\n+}\n+\n static int bnge_hwrm_ring_alloc(struct bnge_net *bn)\n {\n \tstruct bnge_dev *bd = bn-\u003ebd;\n@@ -1921,31 +1992,14 @@ static int bnge_hwrm_ring_alloc(struct bnge_net *bn)\n \tint i, rc = 0;\n \n \tagg_rings = !!(bnge_is_agg_reqd(bd));\n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n+\tbnge_for_each_open_nq(i, bd) {\n \t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n-\t\tstruct bnge_nq_ring_info *nqr = \u0026bnapi-\u003enq_ring;\n-\t\tstruct bnge_ring_struct *ring = \u0026nqr-\u003ering_struct;\n-\t\tu32 type = HWRM_RING_ALLOC_NQ;\n-\t\tu32 map_idx = ring-\u003emap_idx;\n-\t\tunsigned int vector;\n \n-\t\tvector = bd-\u003eirq_tbl[map_idx].vector;\n-\t\tdisable_irq_nosync(vector);\n-\t\trc = hwrm_ring_alloc_send_msg(bn, ring, type, map_idx);\n-\t\tif (rc) {\n-\t\t\tenable_irq(vector);\n+\t\trc = bnge_hwrm_nq_alloc(bn, bnapi);\n+\t\tif (rc)\n \t\t\tgoto err_out;\n-\t\t}\n-\t\tbnge_set_db(bn, \u0026nqr-\u003enq_db, type, map_idx, ring-\u003efw_ring_id);\n-\t\tbnge_db_nq(bn, \u0026nqr-\u003enq_db, nqr-\u003enq_raw_cons);\n-\t\tenable_irq(vector);\n-\t\tbn-\u003egrp_info[i].nq_fw_ring_id = (u16)ring-\u003efw_ring_id;\n-\n-\t\tif (!i) {\n-\t\t\trc = bnge_hwrm_set_async_event_cr(bd, ring-\u003efw_ring_id);\n-\t\t\tif (rc)\n-\t\t\t\tnetdev_warn(bn-\u003enetdev, \"Failed to set async event completion ring.\\n\");\n-\t\t}\n+\t\tbn-\u003egrp_info[i].nq_fw_ring_id =\n+\t\t\t(u16)bnapi-\u003enq_ring.ring_struct.fw_ring_id;\n \t}\n \n \tfor (i = 0; i \u003c bd-\u003etx_nr_rings; i++) {\n@@ -2388,7 +2442,8 @@ static void bnge_enable_int(struct bnge_net *bn)\n \tstruct bnge_dev *bd = bn-\u003ebd;\n \tint i;\n \n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n+\t/* NQ0 is armed by bnge_nq0_wq_to_napi() */\n+\tbnge_for_each_open_nq(i, bd) {\n \t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n \t\tstruct bnge_nq_ring_info *nqr;\n \n@@ -2405,7 +2460,7 @@ static void bnge_disable_napi(struct bnge_net *bn)\n \tif (test_and_set_bit(BNGE_STATE_NAPI_DISABLED, \u0026bn-\u003estate))\n \t\treturn;\n \n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n+\tbnge_for_each_open_nq(i, bd) {\n \t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n \n \t\tnapi_disable_locked(\u0026bnapi-\u003enapi);\n@@ -2418,7 +2473,7 @@ static void bnge_enable_napi(struct bnge_net *bn)\n \tint i;\n \n \tclear_bit(BNGE_STATE_NAPI_DISABLED, \u0026bn-\u003estate);\n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n+\tbnge_for_each_open_nq(i, bd) {\n \t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n \n \t\tbnapi-\u003ein_reset = false;\n@@ -2566,23 +2621,16 @@ static void bnge_hwrm_ring_free(struct bnge_net *bn, bool close_path)\n \tbnge_disable_int_sync(bn);\n \n \tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n-\t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n-\t\tstruct bnge_nq_ring_info *nqr;\n-\t\tstruct bnge_ring_struct *ring;\n+\t\tstruct bnge_nq_ring_info *nqr = \u0026bn-\u003ebnapi[i]-\u003enq_ring;\n \t\tint j;\n \n-\t\tnqr = \u0026bnapi-\u003enq_ring;\n \t\tfor (j = 0; j \u003c nqr-\u003ecp_ring_count \u0026\u0026 nqr-\u003ecp_ring_arr; j++)\n \t\t\tbnge_hwrm_cp_ring_free(bn, \u0026nqr-\u003ecp_ring_arr[j]);\n+\t}\n \n-\t\tring = \u0026nqr-\u003ering_struct;\n-\t\tif (ring-\u003efw_ring_id != INVALID_HW_RING_ID_32BIT) {\n-\t\t\thwrm_ring_free_send_msg(bn, ring,\n-\t\t\t\t\t\tRING_FREE_REQ_RING_TYPE_NQ,\n-\t\t\t\t\t\tINVALID_HW_RING_ID);\n-\t\t\tring-\u003efw_ring_id = INVALID_HW_RING_ID_32BIT;\n-\t\t\tbn-\u003egrp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;\n-\t\t}\n+\tbnge_for_each_open_nq(i, bd) {\n+\t\tbnge_hwrm_nq_free(bn, bn-\u003ebnapi[i]);\n+\t\tbn-\u003egrp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;\n \t}\n }\n \n@@ -2593,7 +2641,7 @@ static void bnge_setup_msix(struct bnge_net *bn)\n \tint len, i;\n \n \tlen = sizeof(bd-\u003eirq_tbl[0].name);\n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n+\tbnge_for_each_open_nq(i, bd) {\n \t\tint map_idx = bnge_cp_num_to_irq_num(bn, i);\n \t\tchar *attr;\n \n@@ -2627,27 +2675,58 @@ static void bnge_hwrm_resource_free(struct bnge_net *bn, bool close_path)\n \tbnge_hwrm_stat_ctx_free(bn);\n }\n \n-static void bnge_free_irq(struct bnge_net *bn)\n+static void bnge_nq_free_irq(struct bnge_net *bn, struct bnge_napi *bnapi)\n+{\n+\tint map_idx = bnapi-\u003enq_ring.ring_struct.map_idx;\n+\tstruct bnge_irq *irq = \u0026bn-\u003ebd-\u003eirq_tbl[map_idx];\n+\n+\tif (irq-\u003erequested) {\n+\t\tif (irq-\u003ehave_cpumask) {\n+\t\t\tirq_set_affinity_hint(irq-\u003evector, NULL);\n+\t\t\tfree_cpumask_var(irq-\u003ecpu_mask);\n+\t\t\tirq-\u003ehave_cpumask = 0;\n+\t\t}\n+\t\tfree_irq(irq-\u003evector, bnapi);\n+\t}\n+\n+\tirq-\u003erequested = 0;\n+}\n+\n+static int bnge_nq_request_irq(struct bnge_net *bn, struct bnge_napi *bnapi)\n {\n+\tint map_idx = bnapi-\u003enq_ring.ring_struct.map_idx;\n \tstruct bnge_dev *bd = bn-\u003ebd;\n \tstruct bnge_irq *irq;\n-\tint i;\n+\tint rc;\n \n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n-\t\tint map_idx = bnge_cp_num_to_irq_num(bn, i);\n+\tirq = \u0026bd-\u003eirq_tbl[map_idx];\n \n-\t\tirq = \u0026bd-\u003eirq_tbl[map_idx];\n-\t\tif (irq-\u003erequested) {\n-\t\t\tif (irq-\u003ehave_cpumask) {\n-\t\t\t\tirq_set_affinity_hint(irq-\u003evector, NULL);\n-\t\t\t\tfree_cpumask_var(irq-\u003ecpu_mask);\n-\t\t\t\tirq-\u003ehave_cpumask = 0;\n-\t\t\t}\n-\t\t\tfree_irq(irq-\u003evector, bn-\u003ebnapi[i]);\n-\t\t}\n+\trc = request_irq(irq-\u003evector, irq-\u003ehandler, 0, irq-\u003ename, bnapi);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\tirq-\u003erequested = 1;\n \n-\t\tirq-\u003erequested = 0;\n+\tif (zalloc_cpumask_var(\u0026irq-\u003ecpu_mask, GFP_KERNEL)) {\n+\t\tint numa_node = dev_to_node(\u0026bd-\u003epdev-\u003edev);\n+\n+\t\tirq-\u003ehave_cpumask = 1;\n+\t\tcpumask_set_cpu(cpumask_local_spread(bnapi-\u003eindex, numa_node),\n+\t\t\t\tirq-\u003ecpu_mask);\n+\t\tif (irq_set_affinity_hint(irq-\u003evector, irq-\u003ecpu_mask))\n+\t\t\tbnge_warn(bd, \"Set affinity failed, IRQ = %d\\n\",\n+\t\t\t\t  irq-\u003evector);\n \t}\n+\treturn 0;\n+}\n+\n+static void bnge_free_irq(struct bnge_net *bn)\n+{\n+\tstruct bnge_dev *bd = bn-\u003ebd;\n+\tint i;\n+\n+\tbnge_for_each_open_nq(i, bd)\n+\t\tbnge_nq_free_irq(bn, bn-\u003ebnapi[i]);\n }\n \n static int bnge_request_irq(struct bnge_net *bn)\n@@ -2660,30 +2739,10 @@ static int bnge_request_irq(struct bnge_net *bn)\n \t\tnetdev_err(bn-\u003enetdev, \"bnge_setup_interrupts err: %d\\n\", rc);\n \t\treturn rc;\n \t}\n-\tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n-\t\tint map_idx = bnge_cp_num_to_irq_num(bn, i);\n-\t\tstruct bnge_irq *irq = \u0026bd-\u003eirq_tbl[map_idx];\n-\n-\t\trc = request_irq(irq-\u003evector, irq-\u003ehandler, 0, irq-\u003ename,\n-\t\t\t\t bn-\u003ebnapi[i]);\n+\tbnge_for_each_open_nq(i, bd) {\n+\t\trc = bnge_nq_request_irq(bn, bn-\u003ebnapi[i]);\n \t\tif (rc)\n \t\t\tgoto err_free_irq;\n-\n-\t\tnetif_napi_set_irq_locked(\u0026bn-\u003ebnapi[i]-\u003enapi, irq-\u003evector);\n-\t\tirq-\u003erequested = 1;\n-\n-\t\tif (zalloc_cpumask_var(\u0026irq-\u003ecpu_mask, GFP_KERNEL)) {\n-\t\t\tint numa_node = dev_to_node(\u0026bd-\u003epdev-\u003edev);\n-\n-\t\t\tirq-\u003ehave_cpumask = 1;\n-\t\t\tcpumask_set_cpu(cpumask_local_spread(i, numa_node),\n-\t\t\t\t\tirq-\u003ecpu_mask);\n-\t\t\tif (irq_set_affinity_hint(irq-\u003evector, irq-\u003ecpu_mask)) {\n-\t\t\t\tnetdev_warn(bn-\u003enetdev,\n-\t\t\t\t\t    \"Set affinity failed, IRQ = %d\\n\",\n-\t\t\t\t\t    irq-\u003evector);\n-\t\t\t}\n-\t\t}\n \t}\n \treturn 0;\n \n@@ -2800,9 +2859,14 @@ static void bnge_init_napi(struct bnge_net *bn)\n \tint i;\n \n \tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n+\t\tint map_idx;\n+\n \t\tbnapi = bn-\u003ebnapi[i];\n+\t\tmap_idx = bnapi-\u003enq_ring.ring_struct.map_idx;\n \t\tnetif_napi_add_config_locked(bn-\u003enetdev, \u0026bnapi-\u003enapi,\n \t\t\t\t\t     bnge_napi_poll, bnapi-\u003eindex);\n+\t\tnetif_napi_set_irq_locked(\u0026bnapi-\u003enapi,\n+\t\t\t\t\t  bd-\u003eirq_tbl[map_idx].vector);\n \t}\n }\n \n@@ -2826,11 +2890,91 @@ static void bnge_del_napi(struct bnge_net *bn)\n \tsynchronize_net();\n }\n \n+static int bnge_nq0_init(struct bnge_net *bn)\n+{\n+\tstruct bnge_nq_ring_info *nqr;\n+\tstruct bnge_dev *bd = bn-\u003ebd;\n+\tstruct bnge_napi *bnapi;\n+\tstruct bnge_irq *irq;\n+\tint rc;\n+\n+\t/* NQ0 helpers hard-code NQ index 0 */\n+\tBUILD_BUG_ON(BNGE_FIRST_OPEN_NQ != 1);\n+\n+\tbnapi = kzalloc_obj(*bnapi);\n+\tif (!bnapi)\n+\t\treturn -ENOMEM;\n+\n+\tbnapi-\u003ebn = bn;\n+\tbnapi-\u003eindex = 0;\n+\tbn-\u003enq0 = bnapi;\n+\tnqr = \u0026bnapi-\u003enq_ring;\n+\n+\t/* NQ0 always sits at irq_tbl[0], independent of the aux vector count.\n+\t * Its ring size is fixed here; a later change to bn-\u003ecp_* must\n+\t * re-create NQ0.\n+\t */\n+\trc = bnge_alloc_nq(bn, bnapi, 0);\n+\tif (rc)\n+\t\tgoto err_free_bnapi;\n+\n+\tirq = \u0026bd-\u003eirq_tbl[nqr-\u003ering_struct.map_idx];\n+\tirq-\u003ehandler = bnge_nq0_msix;\n+\tsnprintf(irq-\u003ename, sizeof(irq-\u003ename), \"%s-nq0\", pci_name(bd-\u003epdev));\n+\n+\trc = bnge_nq_request_irq(bn, bnapi);\n+\tif (rc)\n+\t\tgoto err_free_nq;\n+\n+\trc = bnge_hwrm_nq_alloc(bn, bnapi);\n+\tif (rc)\n+\t\tgoto err_free_irq;\n+\n+\trc = bnge_hwrm_set_async_event_cr(bd, nqr-\u003ering_struct.fw_ring_id);\n+\tif (rc) {\n+\t\tbnge_err(bd, \"Failed to set async event completion ring: %d\\n\",\n+\t\t\t rc);\n+\t\tgoto err_free_hwrm;\n+\t}\n+\n+\t/* BNGE_STATE_NQ0_NAPI is clear, so from here on the ISR queues\n+\t * nq0_work. nq0_wq must already exist.\n+\t * This is the first arm, so keep it last: the unwind above does not\n+\t * cancel nq0_work.\n+\t */\n+\tBNGE_DB_NQ_ARM(bd, \u0026nqr-\u003enq_db, nqr-\u003enq_raw_cons);\n+\treturn 0;\n+\n+err_free_hwrm:\n+\tbnge_hwrm_nq_free(bn, bnapi);\n+err_free_irq:\n+\tbnge_nq_free_irq(bn, bnapi);\n+err_free_nq:\n+\tbnge_free_nq(bn, bnapi);\n+err_free_bnapi:\n+\tkfree(bnapi);\n+\tbn-\u003enq0 = NULL;\n+\treturn rc;\n+}\n+\n+static void bnge_nq0_uninit(struct bnge_net *bn)\n+{\n+\tstruct bnge_napi *bnapi = bn-\u003enq0;\n+\n+\tbnge_nq_free_irq(bn, bnapi);\n+\tcancel_work_sync(\u0026bn-\u003enq0_work);\n+\n+\tbnge_hwrm_nq_free(bn, bnapi);\n+\tbnge_free_nq(bn, bnapi);\n+\tkfree(bnapi);\n+\tbn-\u003enq0 = NULL;\n+}\n+\n static int bnge_init_nic(struct bnge_net *bn)\n {\n \tint rc;\n \n-\tbnge_init_nq_tree(bn);\n+\tbnge_init_cp_rings(bn);\n \n \tbnge_init_rx_rings(bn);\n \trc = bnge_alloc_rx_ring_pair_bufs(bn);\n@@ -2913,11 +3057,32 @@ static int bnge_hwrm_if_change(struct bnge_dev *bd, bool up)\n \treturn bnge_hwrm_req_send(bd, req);\n }\n \n+/* Hand NQ0 from nq0_work to NAPI. The caller keeps NQ0's IRQ disabled; it is\n+ * re-enabled here.\n+ */\n+static void bnge_nq0_wq_to_napi(struct bnge_net *bn)\n+{\n+\tstruct bnge_nq_ring_info *nqr = \u0026bn-\u003enq0-\u003enq_ring;\n+\tstruct bnge_napi *bnapi = bn-\u003enq0;\n+\tstruct bnge_dev *bd = bn-\u003ebd;\n+\n+\tbnapi-\u003ein_reset = false;\n+\tbnapi-\u003etx_fault = 0;\n+\tnapi_enable_locked(\u0026bnapi-\u003enapi);\n+\tset_bit(BNGE_STATE_NQ0_NAPI, \u0026bn-\u003estate);\n+\tBNGE_DB_NQ_ARM(bd, \u0026nqr-\u003enq_db, nqr-\u003enq_raw_cons);\n+\tenable_irq(bd-\u003eirq_tbl[nqr-\u003ering_struct.map_idx].vector);\n+}\n+\n static int bnge_open_core(struct bnge_net *bn)\n {\n+\tstruct bnge_nq_ring_info *nqr0 = \u0026bn-\u003enq0-\u003enq_ring;\n \tstruct bnge_dev *bd = bn-\u003ebd;\n+\tunsigned int vector0;\n \tint rc;\n \n+\tvector0 = bd-\u003eirq_tbl[nqr0-\u003ering_struct.map_idx].vector;\n+\n \tnetif_carrier_off(bn-\u003enetdev);\n \n \trc = bnge_hwrm_if_change(bd, true);\n@@ -2932,10 +3097,19 @@ static int bnge_open_core(struct bnge_net *bn)\n \t\tgoto err_if_change;\n \t}\n \n+\tdisable_irq(vector0);\n+\tcancel_work_sync(\u0026bn-\u003enq0_work);\n+\n+\t/* Clear sp_event bits left by events seen while down. Nothing can set\n+\t * them here: NQ0's IRQ is off, nq0_work is cancelled and the timer is\n+\t * stopped. Link state is read again at the end of open.\n+\t */\n+\tWRITE_ONCE(bn-\u003esp_event, 0);\n+\n \trc = bnge_alloc_core(bn);\n \tif (rc) {\n \t\tnetdev_err(bn-\u003enetdev, \"bnge_alloc_core err: %d\\n\", rc);\n-\t\tgoto err_if_change;\n+\t\tgoto err_nq0_resume;\n \t}\n \n \tbnge_init_napi(bn);\n@@ -2967,6 +3141,7 @@ static int bnge_open_core(struct bnge_net *bn)\n \tset_bit(BNGE_STATE_STATS_ENABLE, \u0026bn-\u003estate);\n \n \tbnge_enable_int(bn);\n+\tbnge_nq0_wq_to_napi(bn);\n \n \tbnge_tx_enable(bn);\n \n@@ -2982,6 +3157,10 @@ static int bnge_open_core(struct bnge_net *bn)\n err_del_napi:\n \tbnge_del_napi(bn);\n \tbnge_free_core(bn);\n+err_nq0_resume:\n+\t/* Drop CQ notifications left by the failed bring-up; re-arms NQ0 */\n+\tbnge_nq0_poll(bn);\n+\tenable_irq(vector0);\n err_if_change:\n \tbnge_hwrm_if_change(bd, false);\n \treturn rc;\n@@ -3183,6 +3362,36 @@ static void bnge_save_ring_stats(struct bnge_net *bn)\n \t}\n }\n \n+/* Hand NQ0 from NAPI to nq0_work. Call with the netdev lock held, after the\n+ * rings were destroyed in FW (bnge_shutdown_nic()). The IRQ is off while NQ0\n+ * changes hands and is re-enabled last, so the ISR queues nq0_work from then\n+ * on.\n+ */\n+static void bnge_nq0_napi_to_wq(struct bnge_net *bn)\n+{\n+\tstruct bnge_nq_ring_info *nqr = \u0026bn-\u003enq0-\u003enq_ring;\n+\tstruct bnge_napi *bnapi = bn-\u003enq0;\n+\tstruct bnge_dev *bd = bn-\u003ebd;\n+\tunsigned int vector;\n+\n+\tvector = bd-\u003eirq_tbl[nqr-\u003ering_struct.map_idx].vector;\n+\n+\tdisable_irq(vector);\n+\tnapi_disable_locked(\u0026bnapi-\u003enapi);\n+\t/* bnge_napi_poll() may still be writing the doorbell after\n+\t * napi_complete_done()\n+\t */\n+\tsynchronize_net();\n+\t/* Nothing should be pending; cancel so bnge_nq0_poll() below cannot\n+\t * overlap the worker\n+\t */\n+\tcancel_work_sync(\u0026bn-\u003enq0_work);\n+\tclear_bit(BNGE_STATE_NQ0_NAPI, \u0026bn-\u003estate);\n+\t/* Drop CQ notifications left by the destroyed rings; re-arms NQ0 */\n+\tbnge_nq0_poll(bn);\n+\tenable_irq(vector);\n+}\n+\n static void bnge_close_core(struct bnge_net *bn)\n {\n \tstruct bnge_dev *bd = bn-\u003ebd;\n@@ -3193,6 +3402,8 @@ static void bnge_close_core(struct bnge_net *bn)\n \n \ttimer_delete_sync(\u0026bn-\u003etimer);\n \tbnge_shutdown_nic(bn);\n+\n+\tbnge_nq0_napi_to_wq(bn);\n \tbnge_disable_napi(bn);\n \n \t/* Save ring stats before shutdown */\n@@ -3215,7 +3426,6 @@ static int bnge_close(struct net_device *dev)\n \tbnge_close_core(bn);\n \tbnge_hwrm_shutdown_link(bn-\u003ebd);\n \tbnge_hwrm_if_change(bn-\u003ebd, false);\n-\tbn-\u003esp_event = 0;\n \n \treturn 0;\n }\n@@ -3517,6 +3727,7 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs)\n \t\tnetif_set_tso_max_segs(netdev, bd-\u003etso_max_segs);\n \n \tINIT_WORK(\u0026bn-\u003esp_task, bnge_sp_task);\n+\tINIT_WORK(\u0026bn-\u003enq0_work, bnge_nq0_work);\n \ttimer_setup(\u0026bn-\u003etimer, bnge_timer, 0);\n \tbn-\u003ecurrent_interval = BNGE_TIMER_INTERVAL;\n \n@@ -3528,6 +3739,14 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs)\n \t\tgoto err_netdev;\n \t}\n \n+\tbn-\u003enq0_wq = alloc_ordered_workqueue(\"bnge_nq0_wq-%s\", WQ_MEM_RECLAIM,\n+\t\t\t\t\t     dev_name(bd-\u003edev));\n+\tif (!bn-\u003enq0_wq) {\n+\t\tnetdev_err(netdev, \"Unable to create NQ0 workqueue.\\n\");\n+\t\trc = -ENOMEM;\n+\t\tgoto err_free_workq;\n+\t}\n+\n \tbn-\u003erx_ring_size = BNGE_DEFAULT_RX_RING_SIZE;\n \tbn-\u003etx_ring_size = BNGE_DEFAULT_TX_RING_SIZE;\n \tbn-\u003erx_dir = DMA_FROM_DEVICE;\n@@ -3541,24 +3760,35 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs)\n \n \trc = bnge_probe_phy(bn, true);\n \tif (rc)\n-\t\tgoto err_free_workq;\n+\t\tgoto err_free_nq0_wq;\n \n \trc = bnge_alloc_port_stats(bn);\n \tif (rc)\n-\t\tgoto err_free_workq;\n+\t\tgoto err_free_nq0_wq;\n \tspin_lock_init(\u0026bn-\u003estats_lock);\n \n \tnetdev-\u003erequest_ops_lock = true;\n+\n+\trc = bnge_nq0_init(bn);\n+\tif (rc) {\n+\t\tdev_err(bd-\u003edev, \"NQ0 init failed rc: %d\\n\", rc);\n+\t\tgoto err_free_port_stats;\n+\t}\n+\n \trc = register_netdev(netdev);\n \tif (rc) {\n \t\tdev_err(bd-\u003edev, \"Register netdev failed rc: %d\\n\", rc);\n-\t\tgoto err_free_port_stats;\n+\t\tgoto err_uninit_nq0;\n \t}\n \n \treturn 0;\n \n+err_uninit_nq0:\n+\tbnge_nq0_uninit(bn);\n err_free_port_stats:\n \tbnge_free_port_stats(bn);\n+err_free_nq0_wq:\n+\tdestroy_workqueue(bn-\u003enq0_wq);\n err_free_workq:\n \tdestroy_workqueue(bn-\u003ebnge_pf_wq);\n err_netdev:\n@@ -3576,6 +3806,10 @@ void bnge_netdev_free(struct bnge_dev *bd)\n \n \tunregister_netdev(netdev);\n \n+\t/* NQ0 can queue sp_task; destroy it before the timer and workqueue */\n+\tbnge_nq0_uninit(bn);\n+\tdestroy_workqueue(bn-\u003enq0_wq);\n+\n \ttimer_shutdown_sync(\u0026bn-\u003etimer);\n \tcancel_work_sync(\u0026bn-\u003esp_task);\n \tbn-\u003esp_event = 0;\ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h\nindex 476b5bab96fed2..8c300f2fb5f3cb 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h\n@@ -266,6 +266,7 @@ struct bnge_stats_mem {\n enum bnge_net_state {\n \tBNGE_STATE_NAPI_DISABLED,\n \tBNGE_STATE_STATS_ENABLE,\n+\tBNGE_STATE_NQ0_NAPI,\n };\n \n #define BNGE_TIMER_INTERVAL\tHZ\n@@ -315,6 +316,8 @@ struct bnge_net {\n \tu32\t\t\thash_seed;\n \tu64\t\t\ttoeplitz_prefix;\n \n+\t/* Lives from probe to remove. bnapi[0] points to it. */\n+\tstruct bnge_napi\t\t*nq0;\n \tstruct bnge_napi\t\t**bnapi;\n \n \tstruct bnge_rx_ring_info\t*rx_ring;\n@@ -350,7 +353,9 @@ struct bnge_net {\n \tunsigned int\t\tcurrent_interval;\n \tstruct timer_list\ttimer;\n \tstruct workqueue_struct *bnge_pf_wq;\n+\tstruct workqueue_struct *nq0_wq;\n \tstruct work_struct\tsp_task;\n+\tstruct work_struct\tnq0_work;\n \tunsigned long\t\tsp_event;\n \n \tstruct bnge_ethtool_link_info\teth_link_info;\ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c b/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c\nindex b066ee887a0996..bbae84b4157ea5 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c\n@@ -431,20 +431,10 @@ void bnge_init_ring_struct(struct bnge_net *bn)\n \tfor (i = 0; i \u003c bd-\u003enq_nr_rings; i++) {\n \t\tstruct bnge_napi *bnapi = bn-\u003ebnapi[i];\n \t\tstruct bnge_ring_mem_info *rmem;\n-\t\tstruct bnge_nq_ring_info *nqr;\n \t\tstruct bnge_rx_ring_info *rxr;\n \t\tstruct bnge_tx_ring_info *txr;\n \t\tstruct bnge_ring_struct *ring;\n \n-\t\tnqr = \u0026bnapi-\u003enq_ring;\n-\t\tring = \u0026nqr-\u003ering_struct;\n-\t\trmem = \u0026ring-\u003ering_mem;\n-\t\trmem-\u003enr_pages = bn-\u003ecp_nr_pages;\n-\t\trmem-\u003epage_size = HW_CMPD_RING_SIZE;\n-\t\trmem-\u003epg_arr = (void **)nqr-\u003edesc_ring;\n-\t\trmem-\u003edma_arr = nqr-\u003edesc_mapping;\n-\t\trmem-\u003evmem_size = 0;\n-\n \t\trxr = bnapi-\u003erx_ring;\n \t\tif (!rxr)\n \t\t\tgoto skip_rx;\ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c\nindex 472b02cc43b3c1..265a780a11ed08 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c\n@@ -45,6 +45,21 @@ irqreturn_t bnge_msix(int irq, void *dev_instance)\n \treturn IRQ_HANDLED;\n }\n \n+/* NQ0 outlives ndo_stop(). While the interface is up it is polled by NAPI\n+ * like any other NQ; while it is down it has no NAPI and nq0_work services it.\n+ */\n+irqreturn_t bnge_nq0_msix(int irq, void *dev_instance)\n+{\n+\tstruct bnge_napi *bnapi = dev_instance;\n+\tstruct bnge_net *bn = bnapi-\u003ebn;\n+\n+\tif (test_bit(BNGE_STATE_NQ0_NAPI, \u0026bn-\u003estate))\n+\t\treturn bnge_msix(irq, dev_instance);\n+\n+\tqueue_work(bn-\u003enq0_wq, \u0026bn-\u003enq0_work);\n+\treturn IRQ_HANDLED;\n+}\n+\n static struct rx_agg_cmp *bnge_get_tpa_agg(struct bnge_net *bn,\n \t\t\t\t\t   struct bnge_rx_ring_info *rxr,\n \t\t\t\t\t   u16 agg_id, u16 curr)\n@@ -1135,8 +1150,8 @@ static void bnge_async_event_process(struct bnge_net *bn,\n \tu32 data1 = le32_to_cpu(cmpl-\u003eevent_data1);\n \tu32 data2 = le32_to_cpu(cmpl-\u003eevent_data2);\n \n-\tnetdev_dbg(bn-\u003enetdev, \"hwrm event 0x%x {0x%x, 0x%x}\\n\",\n-\t\t   event_id, data1, data2);\n+\tbnge_dbg(bn-\u003ebd, \"hwrm event 0x%x {0x%x, 0x%x}\\n\",\n+\t\t event_id, data1, data2);\n \n \tswitch (event_id) {\n \tcase ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:\n@@ -1396,6 +1411,44 @@ int bnge_napi_poll(struct napi_struct *napi, int budget)\n \treturn work_done;\n }\n \n+/* Poll NQ0 without NAPI: handle its own events, drop notifications for CQs\n+ * that no longer exist, and re-arm it.\n+ */\n+void bnge_nq0_poll(struct bnge_net *bn)\n+{\n+\tstruct bnge_nq_ring_info *nqr = \u0026bn-\u003enq0-\u003enq_ring;\n+\tu32 raw_cons = nqr-\u003enq_raw_cons;\n+\n+\twhile (1) {\n+\t\tu32 cons = RING_CMP(bn, raw_cons);\n+\t\tstruct nqe_cn *nqcmp;\n+\t\tu16 type;\n+\n+\t\tnqcmp = \u0026nqr-\u003edesc_ring[CP_RING(cons)][CP_IDX(cons)];\n+\t\tif (!NQ_CMP_VALID(bn, nqcmp, raw_cons))\n+\t\t\tbreak;\n+\n+\t\t/* The valid test of the entry must be done first before\n+\t\t * reading any further.\n+\t\t */\n+\t\tdma_rmb();\n+\n+\t\ttype = le16_to_cpu(nqcmp-\u003etype);\n+\t\tif (NQE_CN_TYPE(type) != NQ_CN_TYPE_CQ_NOTIFICATION)\n+\t\t\tbnge_hwrm_handler(bn, (struct tx_cmp *)nqcmp);\n+\t\traw_cons = NEXT_RAW_CMP(raw_cons);\n+\t}\n+\n+\tnqr-\u003ehas_more_work = 0;\n+\tnqr-\u003enq_raw_cons = raw_cons;\n+\tBNGE_DB_NQ_ARM(bn-\u003ebd, \u0026nqr-\u003enq_db, raw_cons);\n+}\n+\n+void bnge_nq0_work(struct work_struct *work)\n+{\n+\tbnge_nq0_poll(container_of(work, struct bnge_net, nq0_work));\n+}\n+\n static u16 bnge_xmit_get_cfa_action(struct sk_buff *skb)\n {\n \tstruct metadata_dst *md_dst = skb_metadata_dst(skb);\ndiff --git a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h\nindex bd0aa6c221a499..3db6809499ba9e 100644\n--- a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h\n+++ b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h\n@@ -120,6 +120,9 @@ irqreturn_t bnge_msix(int irq, void *dev_instance);\n netdev_tx_t bnge_start_xmit(struct sk_buff *skb, struct net_device *dev);\n void bnge_reuse_rx_data(struct bnge_rx_ring_info *rxr, u16 cons, void *data);\n int bnge_napi_poll(struct napi_struct *napi, int budget);\n+irqreturn_t bnge_nq0_msix(int irq, void *dev_instance);\n+void bnge_nq0_poll(struct bnge_net *bn);\n+void bnge_nq0_work(struct work_struct *work);\n netdev_features_t bnge_features_check(struct sk_buff *skb,\n \t\t\t\t      struct net_device *dev,\n \t\t\t\t      netdev_features_t features);\n"
}

2/1 2026/11/15 14:11 agent patch-evaluator
1m Model:
core

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The changes modify the Broadcom ThorUltra Ethernet driver (drivers/net/ethernet/broadcom/bnge/), refactoring notification queue 0 (NQ0) lifecycle management across open/close. This driver requires vendor-specific physical PCIe hardware (Broadcom ThorUltra BCM57708 ASIC) that is not emulated in standard QEMU or GCE virtualized environments, making the modified code structurally unreachable for fuzzing.",
  "WorthFuzzing": false
}

Instruction:
You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.

================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.

- REACHABILITY IS THE PRIMARY GATE:
  Fuzzing can only discover bugs in code that can actually execute in standard virtualized
  environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
  If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
  regardless of whether it adds assertions or complex logic.

- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
  Patch authors routinely label changes as "cleanups", "refactorings", or state
  "No functional change intended". Do NOT take these claims at face value.
  Code refactorings that rearrange logic, introduce helper functions, or alter state management
  in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
  If reachable executable code is modified or refactored, it MUST be fuzzed.

- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
  When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
  BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
  Even if the author believes the invariant always holds, fuzzing is essential to verify whether
  an unusual sequence of operations can violate it.

================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:

- Non-kernel and non-executable changes:
  * Modifications to Documentation/, comments, or spelling fixes.
  * User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
    that do not affect the compiled kernel image (vmlinux) or kernel modules.
  * Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
    that do not alter control flow or data structures.
  * Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
  * Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
    ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
  * Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
    physical PCI hot-unplug or manual sysfs driver unbinding.
  * Code paths exclusive to architectures other than the target architecture.

================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
  * Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
    BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
  * Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
  * Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
  * Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).

================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:

- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
  Do NOT list generic, ubiquitous functions called by almost every program in the corpus
  (including, but not limited to: general memory allocators and deallocators, page fault
  and trap handlers, or core synchronization primitives; this is not an exhaustive list).
  Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
  which severely dilutes fuzzing effort away from the actual changes.

- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
  List functions that specifically implement the logic being added or altered, or direct API entrypoints
  for the subsystem feature under review.

- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
  Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
  distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
  If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
  functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).

================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any '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:
Target architecture: amd64

For your convenience, here is the diff of the changes:
commit ee7e5d3143e9ff88d38bbb50302a7ed5ca8d20da
Author: syz-cluster <triage@syzkaller.com>
Date:   Sun Nov 15 14:11:26 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/ethernet/broadcom/bnge/bnge.h b/drivers/net/ethernet/broadcom/bnge/bnge.h
index 4479ccd071f532..64c792b278ad5f 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge.h
+++ b/drivers/net/ethernet/broadcom/bnge/bnge.h
@@ -220,6 +220,36 @@ struct bnge_dev {
 	u32			phy_flags;
 };
 
+/* The netdev has no name until register_netdev(), so log through the PCI
+ * device before that (e.g. during probe).
+ */
+#define bnge_log(level, bd, fmt, ...)					\
+	do {								\
+		struct bnge_dev *__bd = (bd);				\
+									\
+		if (__bd->netdev &&					\
+		    READ_ONCE(__bd->netdev->reg_state) != NETREG_UNINITIALIZED)\
+			netdev_##level(__bd->netdev, fmt, ##__VA_ARGS__);\
+		else							\
+			dev_##level(__bd->dev, fmt, ##__VA_ARGS__);	\
+	} while (0)
+
+#define bnge_err(bd, fmt, ...)	bnge_log(err, bd, fmt, ##__VA_ARGS__)
+#define bnge_warn(bd, fmt, ...)	bnge_log(warn, bd, fmt, ##__VA_ARGS__)
+#define bnge_dbg(bd, fmt, ...)	bnge_log(dbg, bd, fmt, ##__VA_ARGS__)
+
+/* Index of the first NQ created in ndo_open() and destroyed in ndo_stop().
+ * NQ0 (index 0) lives from probe to remove and is managed by
+ * bnge_nq0_init()/uninit() and the nq0 handoff helpers; therefore,
+ * bnge_for_each_open_nq() skips it.
+ *
+ * irq_tbl order: NQ0, aux (RoCE) vectors, open-time NQs.
+ */
+#define BNGE_FIRST_OPEN_NQ	1
+
+#define bnge_for_each_open_nq(i, bd) \
+	for ((i) = BNGE_FIRST_OPEN_NQ; (i) < (bd)->nq_nr_rings; (i)++)
+
 static inline bool bnge_is_roce_en(struct bnge_dev *bd)
 {
 	return bd->flags & BNGE_EN_ROCE;
@@ -263,4 +293,21 @@ static inline void bnge_db_write(struct bnge_dev *bd, struct bnge_db_info *db,
 bool bnge_aux_registered(struct bnge_dev *bd);
 u16 bnge_aux_get_msix(struct bnge_dev *bd);
 
+/* irq_tbl index of the i-th aux vector, also used as its ring_idx */
+static inline int bnge_aux_irq_idx(int i)
+{
+	return BNGE_FIRST_OPEN_NQ + i;
+}
+
+/* irq_tbl index of NQ nq_idx. @aux_msix is a single bnge_aux_get_msix()
+ * sample shared by all NQs of one allocation.
+ */
+static inline int bnge_nq_irq_idx(u16 aux_msix, int nq_idx)
+{
+	if (nq_idx < BNGE_FIRST_OPEN_NQ)
+		return nq_idx;
+
+	return aux_msix + nq_idx;
+}
+
 #endif /* _BNGE_H_ */
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c b/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c
index 0955b488b6fea0..0393bfea7b6580 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_auxr.c
@@ -34,9 +34,9 @@ static void bnge_fill_msix_vecs(struct bnge_dev *bd,
 	}
 	num_msix = auxr_dev->auxr_info->msix_requested;
 	for (i = 0; i < num_msix; i++) {
-		info[i].vector = bd->irq_tbl[i].vector;
+		info[i].vector = bd->irq_tbl[bnge_aux_irq_idx(i)].vector;
 		info[i].db_offset = bd->db_offset;
-		info[i].ring_idx = i;
+		info[i].ring_idx = bnge_aux_irq_idx(i);
 	}
 }
 
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c b/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c
index 651c5e783516cc..fb960bff85fa5e 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c
@@ -1302,7 +1302,8 @@ int hwrm_ring_free_send_msg(struct bnge_net *bn,
 	bnge_hwrm_req_drop(bd, req);
 exit:
 	if (rc) {
-		netdev_err(bd->netdev, "hwrm_ring_free type %d failed. rc:%d\n", ring_type, rc);
+		bnge_err(bd, "hwrm_ring_free type %d failed. rc:%d\n",
+			 ring_type, rc);
 		return -EIO;
 	}
 	return 0;
@@ -1395,7 +1396,7 @@ int hwrm_ring_alloc_send_msg(struct bnge_net *bn,
 		req->int_mode = RING_ALLOC_REQ_INT_MODE_MSIX;
 		break;
 	default:
-		netdev_err(bn->netdev, "hwrm alloc invalid ring type %d\n", ring_type);
+		bnge_err(bd, "hwrm alloc invalid ring type %d\n", ring_type);
 		return -EINVAL;
 	}
 
@@ -1406,7 +1407,8 @@ int hwrm_ring_alloc_send_msg(struct bnge_net *bn,
 
 exit:
 	if (rc) {
-		netdev_err(bd->netdev, "hwrm_ring_alloc type %d failed. rc:%d\n", ring_type, rc);
+		bnge_err(bd, "hwrm_ring_alloc type %d failed. rc:%d\n",
+			 ring_type, rc);
 		return -EIO;
 	}
 	ring->fw_ring_id = ring_id;
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c
index 25f844e6f6d34a..ab917c0f81b1f7 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c
@@ -503,61 +503,95 @@ static int bnge_alloc_cp_desc_arr(struct bnge_cp_ring_info *cpr, int n)
 	return -ENOMEM;
 }
 
-static void bnge_free_nq_arrays(struct bnge_net *bn)
+static void bnge_free_nq(struct bnge_net *bn, struct bnge_napi *bnapi)
 {
-	struct bnge_dev *bd = bn->bd;
-	int i;
+	struct bnge_nq_ring_info *nqr = &bnapi->nq_ring;
 
-	for (i = 0; i < bd->nq_nr_rings; i++) {
-		struct bnge_napi *bnapi = bn->bnapi[i];
+	bnge_free_ring(bn->bd, &nqr->ring_struct.ring_mem);
+	bnge_free_nq_desc_arr(nqr);
+}
+
+static int bnge_alloc_nq(struct bnge_net *bn, struct bnge_napi *bnapi,
+			 u16 aux_msix)
+{
+	struct bnge_nq_ring_info *nqr = &bnapi->nq_ring;
+	struct bnge_ring_mem_info *rmem;
+	struct bnge_ring_struct *ring;
+	int rc;
 
-		bnge_free_nq_desc_arr(&bnapi->nq_ring);
+	ring = &nqr->ring_struct;
+	rmem = &ring->ring_mem;
+
+	rc = bnge_alloc_nq_desc_arr(nqr, bn->cp_nr_pages);
+	if (rc)
+		return rc;
+
+	nqr->bnapi = bnapi;
+	rmem->nr_pages = bn->cp_nr_pages;
+	rmem->page_size = HW_CMPD_RING_SIZE;
+	rmem->pg_arr = (void **)nqr->desc_ring;
+	rmem->dma_arr = nqr->desc_mapping;
+	rmem->vmem_size = 0;
+	rmem->flags = BNGE_RMEM_RING_PTE_FLAG;
+	rc = bnge_alloc_ring(bn->bd, rmem);
+	if (rc) {
+		bnge_free_nq_desc_arr(nqr);
+		return rc;
 	}
+
+	ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
+	ring->map_idx = bnge_nq_irq_idx(aux_msix, bnapi->index);
+	return 0;
 }
 
-static int bnge_alloc_nq_arrays(struct bnge_net *bn)
+static void bnge_free_nqs(struct bnge_net *bn)
 {
 	struct bnge_dev *bd = bn->bd;
-	int i, rc;
+	int i;
 
-	for (i = 0; i < bd->nq_nr_rings; i++) {
-		struct bnge_napi *bnapi = bn->bnapi[i];
+	bnge_for_each_open_nq(i, bd)
+		bnge_free_nq(bn, bn->bnapi[i]);
+}
 
-		rc = bnge_alloc_nq_desc_arr(&bnapi->nq_ring, bn->cp_nr_pages);
+static int bnge_alloc_nqs(struct bnge_net *bn)
+{
+	struct bnge_dev *bd = bn->bd;
+	u16 aux_msix;
+	int i, rc;
+
+	/* RoCE can be disabled concurrently; sample the aux vector count once
+	 * so every NQ gets a distinct irq_tbl index.
+	 */
+	aux_msix = bnge_aux_get_msix(bd);
+	bnge_for_each_open_nq(i, bd) {
+		rc = bnge_alloc_nq(bn, bn->bnapi[i], aux_msix);
 		if (rc)
-			goto err_free_nq_arrays;
+			goto err_free_nqs;
 	}
 	return 0;
 
-err_free_nq_arrays:
-	bnge_free_nq_arrays(bn);
+err_free_nqs:
+	while (--i >= BNGE_FIRST_OPEN_NQ)
+		bnge_free_nq(bn, bn->bnapi[i]);
 	return rc;
 }
 
-static void bnge_free_nq_tree(struct bnge_net *bn)
+static void bnge_free_cp_rings(struct bnge_net *bn)
 {
 	struct bnge_dev *bd = bn->bd;
 	int i;
 
 	for (i = 0; i < bd->nq_nr_rings; i++) {
-		struct bnge_napi *bnapi = bn->bnapi[i];
-		struct bnge_nq_ring_info *nqr;
-		struct bnge_ring_struct *ring;
+		struct bnge_nq_ring_info *nqr = &bn->bnapi[i]->nq_ring;
 		int j;
 
-		nqr = &bnapi->nq_ring;
-		ring = &nqr->ring_struct;
-
-		bnge_free_ring(bd, &ring->ring_mem);
-
 		if (!nqr->cp_ring_arr)
 			continue;
 
 		for (j = 0; j < nqr->cp_ring_count; j++) {
 			struct bnge_cp_ring_info *cpr = &nqr->cp_ring_arr[j];
 
-			ring = &cpr->ring_struct;
-			bnge_free_ring(bd, &ring->ring_mem);
+			bnge_free_ring(bd, &cpr->ring_struct.ring_mem);
 			bnge_free_cp_desc_arr(cpr);
 		}
 		kfree(nqr->cp_ring_arr);
@@ -594,31 +628,21 @@ static int alloc_one_cp_ring(struct bnge_net *bn,
 	return rc;
 }
 
-static int bnge_alloc_nq_tree(struct bnge_net *bn)
+static int bnge_alloc_cp_rings(struct bnge_net *bn)
 {
 	struct bnge_dev *bd = bn->bd;
-	int i, j, ulp_msix, rc;
+	int i, j, rc;
 	int tcs = 1;
 
-	ulp_msix = bnge_aux_get_msix(bd);
 	for (i = 0, j = 0; i < bd->nq_nr_rings; i++) {
 		bool sh = !!(bd->flags & BNGE_EN_SHARED_CHNL);
 		struct bnge_napi *bnapi = bn->bnapi[i];
 		struct bnge_nq_ring_info *nqr;
 		struct bnge_cp_ring_info *cpr;
-		struct bnge_ring_struct *ring;
 		int cp_count = 0, k;
 		int rx = 0, tx = 0;
 
 		nqr = &bnapi->nq_ring;
-		nqr->bnapi = bnapi;
-		ring = &nqr->ring_struct;
-
-		rc = bnge_alloc_ring(bd, &ring->ring_mem);
-		if (rc)
-			goto err_free_nq_tree;
-
-		ring->map_idx = ulp_msix + i;
 
 		if (i < bd->rx_nr_rings) {
 			cp_count++;
@@ -634,7 +658,7 @@ static int bnge_alloc_nq_tree(struct bnge_net *bn)
 		nqr->cp_ring_arr = kzalloc_objs(*cpr, cp_count);
 		if (!nqr->cp_ring_arr) {
 			rc = -ENOMEM;
-			goto err_free_nq_tree;
+			goto err_free_cp_rings;
 		}
 
 		nqr->cp_ring_count = cp_count;
@@ -643,7 +667,7 @@ static int bnge_alloc_nq_tree(struct bnge_net *bn)
 			cpr = &nqr->cp_ring_arr[k];
 			rc = alloc_one_cp_ring(bn, cpr);
 			if (rc)
-				goto err_free_nq_tree;
+				goto err_free_cp_rings;
 
 			cpr->bnapi = bnapi;
 			cpr->cp_idx = k;
@@ -663,8 +687,8 @@ static int bnge_alloc_nq_tree(struct bnge_net *bn)
 	}
 	return 0;
 
-err_free_nq_tree:
-	bnge_free_nq_tree(bn);
+err_free_cp_rings:
+	bnge_free_cp_rings(bn);
 	return rc;
 }
 
@@ -1191,17 +1215,27 @@ static int bnge_init_ring_grps(struct bnge_net *bn)
 		bn->grp_info[i].agg_fw_ring_id = INVALID_HW_RING_ID;
 		bn->grp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;
 	}
+	/* NQ0 stays allocated in FW across open/close */
+	bn->grp_info[0].nq_fw_ring_id =
+		(u16)bn->nq0->nq_ring.ring_struct.fw_ring_id;
 
 	return 0;
 }
 
+static void bnge_nq0_clear_rings(struct bnge_net *bn)
+{
+	bn->nq0->rx_ring = NULL;
+	memset(bn->nq0->tx_ring, 0, sizeof(bn->nq0->tx_ring));
+	bn->nq0->events = 0;
+}
+
 static void bnge_free_core(struct bnge_net *bn)
 {
 	bnge_free_vnic_attributes(bn);
 	bnge_free_tx_rings(bn);
 	bnge_free_rx_rings(bn);
-	bnge_free_nq_tree(bn);
-	bnge_free_nq_arrays(bn);
+	bnge_free_cp_rings(bn);
+	bnge_free_nqs(bn);
 	bnge_free_ring_stats(bn);
 	bnge_free_ring_grps(bn);
 	bnge_free_vnics(bn);
@@ -1211,6 +1245,7 @@ static void bnge_free_core(struct bnge_net *bn)
 	bn->tx_ring = NULL;
 	kfree(bn->rx_ring);
 	bn->rx_ring = NULL;
+	bnge_nq0_clear_rings(bn);
 	kfree(bn->bnapi);
 	bn->bnapi = NULL;
 }
@@ -1225,20 +1260,20 @@ static int bnge_alloc_core(struct bnge_net *bn)
 	arr_size = L1_CACHE_ALIGN(sizeof(struct bnge_napi *) *
 			bd->nq_nr_rings);
 	size = L1_CACHE_ALIGN(sizeof(struct bnge_napi));
-	bnapi = kzalloc(arr_size + size * bd->nq_nr_rings, GFP_KERNEL);
+	bnapi = kzalloc(arr_size +
+			size * (bd->nq_nr_rings - BNGE_FIRST_OPEN_NQ),
+			GFP_KERNEL);
 	if (!bnapi)
 		return rc;
 
 	bn->bnapi = bnapi;
 	bnapi += arr_size;
-	for (i = 0; i < bd->nq_nr_rings; i++, bnapi += size) {
-		struct bnge_nq_ring_info *nqr;
-
+	bn->bnapi[0] = bn->nq0;
+	bnge_for_each_open_nq(i, bd) {
 		bn->bnapi[i] = bnapi;
 		bn->bnapi[i]->index = i;
 		bn->bnapi[i]->bn = bn;
-		nqr = &bn->bnapi[i]->nq_ring;
-		nqr->ring_struct.ring_mem.flags = BNGE_RMEM_RING_PTE_FLAG;
+		bnapi += size;
 	}
 
 	bn->rx_ring = kzalloc_objs(struct bnge_rx_ring_info, bd->rx_nr_rings);
@@ -1297,7 +1332,7 @@ static int bnge_alloc_core(struct bnge_net *bn)
 	if (rc)
 		goto err_free_ring_stats;
 
-	rc = bnge_alloc_nq_arrays(bn);
+	rc = bnge_alloc_nqs(bn);
 	if (rc)
 		goto err_free_vnics;
 
@@ -1305,13 +1340,13 @@ static int bnge_alloc_core(struct bnge_net *bn)
 
 	rc = bnge_alloc_rx_rings(bn);
 	if (rc)
-		goto err_free_nq_arrays;
+		goto err_free_nqs;
 
 	rc = bnge_alloc_tx_rings(bn);
 	if (rc)
 		goto err_free_rx_rings;
 
-	rc = bnge_alloc_nq_tree(bn);
+	rc = bnge_alloc_cp_rings(bn);
 	if (rc)
 		goto err_free_tx_rings;
 
@@ -1320,17 +1355,17 @@ static int bnge_alloc_core(struct bnge_net *bn)
 						  BNGE_VNIC_UCAST_FLAG;
 	rc = bnge_alloc_vnic_attributes(bn);
 	if (rc)
-		goto err_free_nq_tree;
+		goto err_free_cp_rings;
 	return 0;
 
-err_free_nq_tree:
-	bnge_free_nq_tree(bn);
+err_free_cp_rings:
+	bnge_free_cp_rings(bn);
 err_free_tx_rings:
 	bnge_free_tx_rings(bn);
 err_free_rx_rings:
 	bnge_free_rx_rings(bn);
-err_free_nq_arrays:
-	bnge_free_nq_arrays(bn);
+err_free_nqs:
+	bnge_free_nqs(bn);
 err_free_vnics:
 	bnge_free_vnics(bn);
 err_free_ring_stats:
@@ -1345,6 +1380,7 @@ static int bnge_alloc_core(struct bnge_net *bn)
 	kfree(bn->rx_ring);
 	bn->rx_ring = NULL;
 err_free_bnapi:
+	bnge_nq0_clear_rings(bn);
 	kfree(bn->bnapi);
 	bn->bnapi = NULL;
 	return rc;
@@ -1389,21 +1425,18 @@ static int bnge_cp_num_to_irq_num(struct bnge_net *bn, int n)
 	return nqr->ring_struct.map_idx;
 }
 
-static void bnge_init_nq_tree(struct bnge_net *bn)
+static void bnge_init_cp_rings(struct bnge_net *bn)
 {
 	struct bnge_dev *bd = bn->bd;
 	int i, j;
 
 	for (i = 0; i < bd->nq_nr_rings; i++) {
 		struct bnge_nq_ring_info *nqr = &bn->bnapi[i]->nq_ring;
-		struct bnge_ring_struct *ring = &nqr->ring_struct;
 
-		ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
 		for (j = 0; j < nqr->cp_ring_count; j++) {
 			struct bnge_cp_ring_info *cpr = &nqr->cp_ring_arr[j];
 
-			ring = &cpr->ring_struct;
-			ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
+			cpr->ring_struct.fw_ring_id = INVALID_HW_RING_ID_32BIT;
 		}
 	}
 }
@@ -1914,6 +1947,44 @@ static int bnge_hwrm_rx_ring_alloc(struct bnge_net *bn,
 	return 0;
 }
 
+static int bnge_hwrm_nq_alloc(struct bnge_net *bn, struct bnge_napi *bnapi)
+{
+	struct bnge_nq_ring_info *nqr = &bnapi->nq_ring;
+	u32 type = HWRM_RING_ALLOC_NQ;
+	struct bnge_ring_struct *ring;
+	unsigned int vector;
+	u32 map_idx;
+	int rc;
+
+	ring = &nqr->ring_struct;
+	map_idx = ring->map_idx;
+
+	vector = bn->bd->irq_tbl[map_idx].vector;
+	disable_irq_nosync(vector);
+	rc = hwrm_ring_alloc_send_msg(bn, ring, type, map_idx);
+	if (rc) {
+		enable_irq(vector);
+		return rc;
+	}
+	bnge_set_db(bn, &nqr->nq_db, type, map_idx, ring->fw_ring_id);
+	bnge_db_nq(bn, &nqr->nq_db, nqr->nq_raw_cons);
+	enable_irq(vector);
+
+	return 0;
+}
+
+static void bnge_hwrm_nq_free(struct bnge_net *bn, struct bnge_napi *bnapi)
+{
+	struct bnge_ring_struct *ring = &bnapi->nq_ring.ring_struct;
+
+	if (ring->fw_ring_id == INVALID_HW_RING_ID_32BIT)
+		return;
+
+	hwrm_ring_free_send_msg(bn, ring, RING_FREE_REQ_RING_TYPE_NQ,
+				INVALID_HW_RING_ID);
+	ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
+}
+
 static int bnge_hwrm_ring_alloc(struct bnge_net *bn)
 {
 	struct bnge_dev *bd = bn->bd;
@@ -1921,31 +1992,14 @@ static int bnge_hwrm_ring_alloc(struct bnge_net *bn)
 	int i, rc = 0;
 
 	agg_rings = !!(bnge_is_agg_reqd(bd));
-	for (i = 0; i < bd->nq_nr_rings; i++) {
+	bnge_for_each_open_nq(i, bd) {
 		struct bnge_napi *bnapi = bn->bnapi[i];
-		struct bnge_nq_ring_info *nqr = &bnapi->nq_ring;
-		struct bnge_ring_struct *ring = &nqr->ring_struct;
-		u32 type = HWRM_RING_ALLOC_NQ;
-		u32 map_idx = ring->map_idx;
-		unsigned int vector;
 
-		vector = bd->irq_tbl[map_idx].vector;
-		disable_irq_nosync(vector);
-		rc = hwrm_ring_alloc_send_msg(bn, ring, type, map_idx);
-		if (rc) {
-			enable_irq(vector);
+		rc = bnge_hwrm_nq_alloc(bn, bnapi);
+		if (rc)
 			goto err_out;
-		}
-		bnge_set_db(bn, &nqr->nq_db, type, map_idx, ring->fw_ring_id);
-		bnge_db_nq(bn, &nqr->nq_db, nqr->nq_raw_cons);
-		enable_irq(vector);
-		bn->grp_info[i].nq_fw_ring_id = (u16)ring->fw_ring_id;
-
-		if (!i) {
-			rc = bnge_hwrm_set_async_event_cr(bd, ring->fw_ring_id);
-			if (rc)
-				netdev_warn(bn->netdev, "Failed to set async event completion ring.\n");
-		}
+		bn->grp_info[i].nq_fw_ring_id =
+			(u16)bnapi->nq_ring.ring_struct.fw_ring_id;
 	}
 
 	for (i = 0; i < bd->tx_nr_rings; i++) {
@@ -2388,7 +2442,8 @@ static void bnge_enable_int(struct bnge_net *bn)
 	struct bnge_dev *bd = bn->bd;
 	int i;
 
-	for (i = 0; i < bd->nq_nr_rings; i++) {
+	/* NQ0 is armed by bnge_nq0_wq_to_napi() */
+	bnge_for_each_open_nq(i, bd) {
 		struct bnge_napi *bnapi = bn->bnapi[i];
 		struct bnge_nq_ring_info *nqr;
 
@@ -2405,7 +2460,7 @@ static void bnge_disable_napi(struct bnge_net *bn)
 	if (test_and_set_bit(BNGE_STATE_NAPI_DISABLED, &bn->state))
 		return;
 
-	for (i = 0; i < bd->nq_nr_rings; i++) {
+	bnge_for_each_open_nq(i, bd) {
 		struct bnge_napi *bnapi = bn->bnapi[i];
 
 		napi_disable_locked(&bnapi->napi);
@@ -2418,7 +2473,7 @@ static void bnge_enable_napi(struct bnge_net *bn)
 	int i;
 
 	clear_bit(BNGE_STATE_NAPI_DISABLED, &bn->state);
-	for (i = 0; i < bd->nq_nr_rings; i++) {
+	bnge_for_each_open_nq(i, bd) {
 		struct bnge_napi *bnapi = bn->bnapi[i];
 
 		bnapi->in_reset = false;
@@ -2566,23 +2621,16 @@ static void bnge_hwrm_ring_free(struct bnge_net *bn, bool close_path)
 	bnge_disable_int_sync(bn);
 
 	for (i = 0; i < bd->nq_nr_rings; i++) {
-		struct bnge_napi *bnapi = bn->bnapi[i];
-		struct bnge_nq_ring_info *nqr;
-		struct bnge_ring_struct *ring;
+		struct bnge_nq_ring_info *nqr = &bn->bnapi[i]->nq_ring;
 		int j;
 
-		nqr = &bnapi->nq_ring;
 		for (j = 0; j < nqr->cp_ring_count && nqr->cp_ring_arr; j++)
 			bnge_hwrm_cp_ring_free(bn, &nqr->cp_ring_arr[j]);
+	}
 
-		ring = &nqr->ring_struct;
-		if (ring->fw_ring_id != INVALID_HW_RING_ID_32BIT) {
-			hwrm_ring_free_send_msg(bn, ring,
-						RING_FREE_REQ_RING_TYPE_NQ,
-						INVALID_HW_RING_ID);
-			ring->fw_ring_id = INVALID_HW_RING_ID_32BIT;
-			bn->grp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;
-		}
+	bnge_for_each_open_nq(i, bd) {
+		bnge_hwrm_nq_free(bn, bn->bnapi[i]);
+		bn->grp_info[i].nq_fw_ring_id = INVALID_HW_RING_ID;
 	}
 }
 
@@ -2593,7 +2641,7 @@ static void bnge_setup_msix(struct bnge_net *bn)
 	int len, i;
 
 	len = sizeof(bd->irq_tbl[0].name);
-	for (i = 0; i < bd->nq_nr_rings; i++) {
+	bnge_for_each_open_nq(i, bd) {
 		int map_idx = bnge_cp_num_to_irq_num(bn, i);
 		char *attr;
 
@@ -2627,27 +2675,58 @@ static void bnge_hwrm_resource_free(struct bnge_net *bn, bool close_path)
 	bnge_hwrm_stat_ctx_free(bn);
 }
 
-static void bnge_free_irq(struct bnge_net *bn)
+static void bnge_nq_free_irq(struct bnge_net *bn, struct bnge_napi *bnapi)
+{
+	int map_idx = bnapi->nq_ring.ring_struct.map_idx;
+	struct bnge_irq *irq = &bn->bd->irq_tbl[map_idx];
+
+	if (irq->requested) {
+		if (irq->have_cpumask) {
+			irq_set_affinity_hint(irq->vector, NULL);
+			free_cpumask_var(irq->cpu_mask);
+			irq->have_cpumask = 0;
+		}
+		free_irq(irq->vector, bnapi);
+	}
+
+	irq->requested = 0;
+}
+
+static int bnge_nq_request_irq(struct bnge_net *bn, struct bnge_napi *bnapi)
 {
+	int map_idx = bnapi->nq_ring.ring_struct.map_idx;
 	struct bnge_dev *bd = bn->bd;
 	struct bnge_irq *irq;
-	int i;
+	int rc;
 
-	for (i = 0; i < bd->nq_nr_rings; i++) {
-		int map_idx = bnge_cp_num_to_irq_num(bn, i);
+	irq = &bd->irq_tbl[map_idx];
 
-		irq = &bd->irq_tbl[map_idx];
-		if (irq->requested) {
-			if (irq->have_cpumask) {
-				irq_set_affinity_hint(irq->vector, NULL);
-				free_cpumask_var(irq->cpu_mask);
-				irq->have_cpumask = 0;
-			}
-			free_irq(irq->vector, bn->bnapi[i]);
-		}
+	rc = request_irq(irq->vector, irq->handler, 0, irq->name, bnapi);
+	if (rc)
+		return rc;
+
+	irq->requested = 1;
 
-		irq->requested = 0;
+	if (zalloc_cpumask_var(&irq->cpu_mask, GFP_KERNEL)) {
+		int numa_node = dev_to_node(&bd->pdev->dev);
+
+		irq->have_cpumask = 1;
+		cpumask_set_cpu(cpumask_local_spread(bnapi->index, numa_node),
+				irq->cpu_mask);
+		if (irq_set_affinity_hint(irq->vector, irq->cpu_mask))
+			bnge_warn(bd, "Set affinity failed, IRQ = %d\n",
+				  irq->vector);
 	}
+	return 0;
+}
+
+static void bnge_free_irq(struct bnge_net *bn)
+{
+	struct bnge_dev *bd = bn->bd;
+	int i;
+
+	bnge_for_each_open_nq(i, bd)
+		bnge_nq_free_irq(bn, bn->bnapi[i]);
 }
 
 static int bnge_request_irq(struct bnge_net *bn)
@@ -2660,30 +2739,10 @@ static int bnge_request_irq(struct bnge_net *bn)
 		netdev_err(bn->netdev, "bnge_setup_interrupts err: %d\n", rc);
 		return rc;
 	}
-	for (i = 0; i < bd->nq_nr_rings; i++) {
-		int map_idx = bnge_cp_num_to_irq_num(bn, i);
-		struct bnge_irq *irq = &bd->irq_tbl[map_idx];
-
-		rc = request_irq(irq->vector, irq->handler, 0, irq->name,
-				 bn->bnapi[i]);
+	bnge_for_each_open_nq(i, bd) {
+		rc = bnge_nq_request_irq(bn, bn->bnapi[i]);
 		if (rc)
 			goto err_free_irq;
-
-		netif_napi_set_irq_locked(&bn->bnapi[i]->napi, irq->vector);
-		irq->requested = 1;
-
-		if (zalloc_cpumask_var(&irq->cpu_mask, GFP_KERNEL)) {
-			int numa_node = dev_to_node(&bd->pdev->dev);
-
-			irq->have_cpumask = 1;
-			cpumask_set_cpu(cpumask_local_spread(i, numa_node),
-					irq->cpu_mask);
-			if (irq_set_affinity_hint(irq->vector, irq->cpu_mask)) {
-				netdev_warn(bn->netdev,
-					    "Set affinity failed, IRQ = %d\n",
-					    irq->vector);
-			}
-		}
 	}
 	return 0;
 
@@ -2800,9 +2859,14 @@ static void bnge_init_napi(struct bnge_net *bn)
 	int i;
 
 	for (i = 0; i < bd->nq_nr_rings; i++) {
+		int map_idx;
+
 		bnapi = bn->bnapi[i];
+		map_idx = bnapi->nq_ring.ring_struct.map_idx;
 		netif_napi_add_config_locked(bn->netdev, &bnapi->napi,
 					     bnge_napi_poll, bnapi->index);
+		netif_napi_set_irq_locked(&bnapi->napi,
+					  bd->irq_tbl[map_idx].vector);
 	}
 }
 
@@ -2826,11 +2890,91 @@ static void bnge_del_napi(struct bnge_net *bn)
 	synchronize_net();
 }
 
+static int bnge_nq0_init(struct bnge_net *bn)
+{
+	struct bnge_nq_ring_info *nqr;
+	struct bnge_dev *bd = bn->bd;
+	struct bnge_napi *bnapi;
+	struct bnge_irq *irq;
+	int rc;
+
+	/* NQ0 helpers hard-code NQ index 0 */
+	BUILD_BUG_ON(BNGE_FIRST_OPEN_NQ != 1);
+
+	bnapi = kzalloc_obj(*bnapi);
+	if (!bnapi)
+		return -ENOMEM;
+
+	bnapi->bn = bn;
+	bnapi->index = 0;
+	bn->nq0 = bnapi;
+	nqr = &bnapi->nq_ring;
+
+	/* NQ0 always sits at irq_tbl[0], independent of the aux vector count.
+	 * Its ring size is fixed here; a later change to bn->cp_* must
+	 * re-create NQ0.
+	 */
+	rc = bnge_alloc_nq(bn, bnapi, 0);
+	if (rc)
+		goto err_free_bnapi;
+
+	irq = &bd->irq_tbl[nqr->ring_struct.map_idx];
+	irq->handler = bnge_nq0_msix;
+	snprintf(irq->name, sizeof(irq->name), "%s-nq0", pci_name(bd->pdev));
+
+	rc = bnge_nq_request_irq(bn, bnapi);
+	if (rc)
+		goto err_free_nq;
+
+	rc = bnge_hwrm_nq_alloc(bn, bnapi);
+	if (rc)
+		goto err_free_irq;
+
+	rc = bnge_hwrm_set_async_event_cr(bd, nqr->ring_struct.fw_ring_id);
+	if (rc) {
+		bnge_err(bd, "Failed to set async event completion ring: %d\n",
+			 rc);
+		goto err_free_hwrm;
+	}
+
+	/* BNGE_STATE_NQ0_NAPI is clear, so from here on the ISR queues
+	 * nq0_work. nq0_wq must already exist.
+	 * This is the first arm, so keep it last: the unwind above does not
+	 * cancel nq0_work.
+	 */
+	BNGE_DB_NQ_ARM(bd, &nqr->nq_db, nqr->nq_raw_cons);
+	return 0;
+
+err_free_hwrm:
+	bnge_hwrm_nq_free(bn, bnapi);
+err_free_irq:
+	bnge_nq_free_irq(bn, bnapi);
+err_free_nq:
+	bnge_free_nq(bn, bnapi);
+err_free_bnapi:
+	kfree(bnapi);
+	bn->nq0 = NULL;
+	return rc;
+}
+
+static void bnge_nq0_uninit(struct bnge_net *bn)
+{
+	struct bnge_napi *bnapi = bn->nq0;
+
+	bnge_nq_free_irq(bn, bnapi);
+	cancel_work_sync(&bn->nq0_work);
+
+	bnge_hwrm_nq_free(bn, bnapi);
+	bnge_free_nq(bn, bnapi);
+	kfree(bnapi);
+	bn->nq0 = NULL;
+}
+
 static int bnge_init_nic(struct bnge_net *bn)
 {
 	int rc;
 
-	bnge_init_nq_tree(bn);
+	bnge_init_cp_rings(bn);
 
 	bnge_init_rx_rings(bn);
 	rc = bnge_alloc_rx_ring_pair_bufs(bn);
@@ -2913,11 +3057,32 @@ static int bnge_hwrm_if_change(struct bnge_dev *bd, bool up)
 	return bnge_hwrm_req_send(bd, req);
 }
 
+/* Hand NQ0 from nq0_work to NAPI. The caller keeps NQ0's IRQ disabled; it is
+ * re-enabled here.
+ */
+static void bnge_nq0_wq_to_napi(struct bnge_net *bn)
+{
+	struct bnge_nq_ring_info *nqr = &bn->nq0->nq_ring;
+	struct bnge_napi *bnapi = bn->nq0;
+	struct bnge_dev *bd = bn->bd;
+
+	bnapi->in_reset = false;
+	bnapi->tx_fault = 0;
+	napi_enable_locked(&bnapi->napi);
+	set_bit(BNGE_STATE_NQ0_NAPI, &bn->state);
+	BNGE_DB_NQ_ARM(bd, &nqr->nq_db, nqr->nq_raw_cons);
+	enable_irq(bd->irq_tbl[nqr->ring_struct.map_idx].vector);
+}
+
 static int bnge_open_core(struct bnge_net *bn)
 {
+	struct bnge_nq_ring_info *nqr0 = &bn->nq0->nq_ring;
 	struct bnge_dev *bd = bn->bd;
+	unsigned int vector0;
 	int rc;
 
+	vector0 = bd->irq_tbl[nqr0->ring_struct.map_idx].vector;
+
 	netif_carrier_off(bn->netdev);
 
 	rc = bnge_hwrm_if_change(bd, true);
@@ -2932,10 +3097,19 @@ static int bnge_open_core(struct bnge_net *bn)
 		goto err_if_change;
 	}
 
+	disable_irq(vector0);
+	cancel_work_sync(&bn->nq0_work);
+
+	/* Clear sp_event bits left by events seen while down. Nothing can set
+	 * them here: NQ0's IRQ is off, nq0_work is cancelled and the timer is
+	 * stopped. Link state is read again at the end of open.
+	 */
+	WRITE_ONCE(bn->sp_event, 0);
+
 	rc = bnge_alloc_core(bn);
 	if (rc) {
 		netdev_err(bn->netdev, "bnge_alloc_core err: %d\n", rc);
-		goto err_if_change;
+		goto err_nq0_resume;
 	}
 
 	bnge_init_napi(bn);
@@ -2967,6 +3141,7 @@ static int bnge_open_core(struct bnge_net *bn)
 	set_bit(BNGE_STATE_STATS_ENABLE, &bn->state);
 
 	bnge_enable_int(bn);
+	bnge_nq0_wq_to_napi(bn);
 
 	bnge_tx_enable(bn);
 
@@ -2982,6 +3157,10 @@ static int bnge_open_core(struct bnge_net *bn)
 err_del_napi:
 	bnge_del_napi(bn);
 	bnge_free_core(bn);
+err_nq0_resume:
+	/* Drop CQ notifications left by the failed bring-up; re-arms NQ0 */
+	bnge_nq0_poll(bn);
+	enable_irq(vector0);
 err_if_change:
 	bnge_hwrm_if_change(bd, false);
 	return rc;
@@ -3183,6 +3362,36 @@ static void bnge_save_ring_stats(struct bnge_net *bn)
 	}
 }
 
+/* Hand NQ0 from NAPI to nq0_work. Call with the netdev lock held, after the
+ * rings were destroyed in FW (bnge_shutdown_nic()). The IRQ is off while NQ0
+ * changes hands and is re-enabled last, so the ISR queues nq0_work from then
+ * on.
+ */
+static void bnge_nq0_napi_to_wq(struct bnge_net *bn)
+{
+	struct bnge_nq_ring_info *nqr = &bn->nq0->nq_ring;
+	struct bnge_napi *bnapi = bn->nq0;
+	struct bnge_dev *bd = bn->bd;
+	unsigned int vector;
+
+	vector = bd->irq_tbl[nqr->ring_struct.map_idx].vector;
+
+	disable_irq(vector);
+	napi_disable_locked(&bnapi->napi);
+	/* bnge_napi_poll() may still be writing the doorbell after
+	 * napi_complete_done()
+	 */
+	synchronize_net();
+	/* Nothing should be pending; cancel so bnge_nq0_poll() below cannot
+	 * overlap the worker
+	 */
+	cancel_work_sync(&bn->nq0_work);
+	clear_bit(BNGE_STATE_NQ0_NAPI, &bn->state);
+	/* Drop CQ notifications left by the destroyed rings; re-arms NQ0 */
+	bnge_nq0_poll(bn);
+	enable_irq(vector);
+}
+
 static void bnge_close_core(struct bnge_net *bn)
 {
 	struct bnge_dev *bd = bn->bd;
@@ -3193,6 +3402,8 @@ static void bnge_close_core(struct bnge_net *bn)
 
 	timer_delete_sync(&bn->timer);
 	bnge_shutdown_nic(bn);
+
+	bnge_nq0_napi_to_wq(bn);
 	bnge_disable_napi(bn);
 
 	/* Save ring stats before shutdown */
@@ -3215,7 +3426,6 @@ static int bnge_close(struct net_device *dev)
 	bnge_close_core(bn);
 	bnge_hwrm_shutdown_link(bn->bd);
 	bnge_hwrm_if_change(bn->bd, false);
-	bn->sp_event = 0;
 
 	return 0;
 }
@@ -3517,6 +3727,7 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs)
 		netif_set_tso_max_segs(netdev, bd->tso_max_segs);
 
 	INIT_WORK(&bn->sp_task, bnge_sp_task);
+	INIT_WORK(&bn->nq0_work, bnge_nq0_work);
 	timer_setup(&bn->timer, bnge_timer, 0);
 	bn->current_interval = BNGE_TIMER_INTERVAL;
 
@@ -3528,6 +3739,14 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs)
 		goto err_netdev;
 	}
 
+	bn->nq0_wq = alloc_ordered_workqueue("bnge_nq0_wq-%s", WQ_MEM_RECLAIM,
+					     dev_name(bd->dev));
+	if (!bn->nq0_wq) {
+		netdev_err(netdev, "Unable to create NQ0 workqueue.\n");
+		rc = -ENOMEM;
+		goto err_free_workq;
+	}
+
 	bn->rx_ring_size = BNGE_DEFAULT_RX_RING_SIZE;
 	bn->tx_ring_size = BNGE_DEFAULT_TX_RING_SIZE;
 	bn->rx_dir = DMA_FROM_DEVICE;
@@ -3541,24 +3760,35 @@ int bnge_netdev_alloc(struct bnge_dev *bd, int max_irqs)
 
 	rc = bnge_probe_phy(bn, true);
 	if (rc)
-		goto err_free_workq;
+		goto err_free_nq0_wq;
 
 	rc = bnge_alloc_port_stats(bn);
 	if (rc)
-		goto err_free_workq;
+		goto err_free_nq0_wq;
 	spin_lock_init(&bn->stats_lock);
 
 	netdev->request_ops_lock = true;
+
+	rc = bnge_nq0_init(bn);
+	if (rc) {
+		dev_err(bd->dev, "NQ0 init failed rc: %d\n", rc);
+		goto err_free_port_stats;
+	}
+
 	rc = register_netdev(netdev);
 	if (rc) {
 		dev_err(bd->dev, "Register netdev failed rc: %d\n", rc);
-		goto err_free_port_stats;
+		goto err_uninit_nq0;
 	}
 
 	return 0;
 
+err_uninit_nq0:
+	bnge_nq0_uninit(bn);
 err_free_port_stats:
 	bnge_free_port_stats(bn);
+err_free_nq0_wq:
+	destroy_workqueue(bn->nq0_wq);
 err_free_workq:
 	destroy_workqueue(bn->bnge_pf_wq);
 err_netdev:
@@ -3576,6 +3806,10 @@ void bnge_netdev_free(struct bnge_dev *bd)
 
 	unregister_netdev(netdev);
 
+	/* NQ0 can queue sp_task; destroy it before the timer and workqueue */
+	bnge_nq0_uninit(bn);
+	destroy_workqueue(bn->nq0_wq);
+
 	timer_shutdown_sync(&bn->timer);
 	cancel_work_sync(&bn->sp_task);
 	bn->sp_event = 0;
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h
index 476b5bab96fed2..8c300f2fb5f3cb 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.h
@@ -266,6 +266,7 @@ struct bnge_stats_mem {
 enum bnge_net_state {
 	BNGE_STATE_NAPI_DISABLED,
 	BNGE_STATE_STATS_ENABLE,
+	BNGE_STATE_NQ0_NAPI,
 };
 
 #define BNGE_TIMER_INTERVAL	HZ
@@ -315,6 +316,8 @@ struct bnge_net {
 	u32			hash_seed;
 	u64			toeplitz_prefix;
 
+	/* Lives from probe to remove. bnapi[0] points to it. */
+	struct bnge_napi		*nq0;
 	struct bnge_napi		**bnapi;
 
 	struct bnge_rx_ring_info	*rx_ring;
@@ -350,7 +353,9 @@ struct bnge_net {
 	unsigned int		current_interval;
 	struct timer_list	timer;
 	struct workqueue_struct *bnge_pf_wq;
+	struct workqueue_struct *nq0_wq;
 	struct work_struct	sp_task;
+	struct work_struct	nq0_work;
 	unsigned long		sp_event;
 
 	struct bnge_ethtool_link_info	eth_link_info;
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c b/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c
index b066ee887a0996..bbae84b4157ea5 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c
@@ -431,20 +431,10 @@ void bnge_init_ring_struct(struct bnge_net *bn)
 	for (i = 0; i < bd->nq_nr_rings; i++) {
 		struct bnge_napi *bnapi = bn->bnapi[i];
 		struct bnge_ring_mem_info *rmem;
-		struct bnge_nq_ring_info *nqr;
 		struct bnge_rx_ring_info *rxr;
 		struct bnge_tx_ring_info *txr;
 		struct bnge_ring_struct *ring;
 
-		nqr = &bnapi->nq_ring;
-		ring = &nqr->ring_struct;
-		rmem = &ring->ring_mem;
-		rmem->nr_pages = bn->cp_nr_pages;
-		rmem->page_size = HW_CMPD_RING_SIZE;
-		rmem->pg_arr = (void **)nqr->desc_ring;
-		rmem->dma_arr = nqr->desc_mapping;
-		rmem->vmem_size = 0;
-
 		rxr = bnapi->rx_ring;
 		if (!rxr)
 			goto skip_rx;
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
index 472b02cc43b3c1..265a780a11ed08 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
@@ -45,6 +45,21 @@ irqreturn_t bnge_msix(int irq, void *dev_instance)
 	return IRQ_HANDLED;
 }
 
+/* NQ0 outlives ndo_stop(). While the interface is up it is polled by NAPI
+ * like any other NQ; while it is down it has no NAPI and nq0_work services it.
+ */
+irqreturn_t bnge_nq0_msix(int irq, void *dev_instance)
+{
+	struct bnge_napi *bnapi = dev_instance;
+	struct bnge_net *bn = bnapi->bn;
+
+	if (test_bit(BNGE_STATE_NQ0_NAPI, &bn->state))
+		return bnge_msix(irq, dev_instance);
+
+	queue_work(bn->nq0_wq, &bn->nq0_work);
+	return IRQ_HANDLED;
+}
+
 static struct rx_agg_cmp *bnge_get_tpa_agg(struct bnge_net *bn,
 					   struct bnge_rx_ring_info *rxr,
 					   u16 agg_id, u16 curr)
@@ -1135,8 +1150,8 @@ static void bnge_async_event_process(struct bnge_net *bn,
 	u32 data1 = le32_to_cpu(cmpl->event_data1);
 	u32 data2 = le32_to_cpu(cmpl->event_data2);
 
-	netdev_dbg(bn->netdev, "hwrm event 0x%x {0x%x, 0x%x}\n",
-		   event_id, data1, data2);
+	bnge_dbg(bn->bd, "hwrm event 0x%x {0x%x, 0x%x}\n",
+		 event_id, data1, data2);
 
 	switch (event_id) {
 	case ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
@@ -1396,6 +1411,44 @@ int bnge_napi_poll(struct napi_struct *napi, int budget)
 	return work_done;
 }
 
+/* Poll NQ0 without NAPI: handle its own events, drop notifications for CQs
+ * that no longer exist, and re-arm it.
+ */
+void bnge_nq0_poll(struct bnge_net *bn)
+{
+	struct bnge_nq_ring_info *nqr = &bn->nq0->nq_ring;
+	u32 raw_cons = nqr->nq_raw_cons;
+
+	while (1) {
+		u32 cons = RING_CMP(bn, raw_cons);
+		struct nqe_cn *nqcmp;
+		u16 type;
+
+		nqcmp = &nqr->desc_ring[CP_RING(cons)][CP_IDX(cons)];
+		if (!NQ_CMP_VALID(bn, nqcmp, raw_cons))
+			break;
+
+		/* The valid test of the entry must be done first before
+		 * reading any further.
+		 */
+		dma_rmb();
+
+		type = le16_to_cpu(nqcmp->type);
+		if (NQE_CN_TYPE(type) != NQ_CN_TYPE_CQ_NOTIFICATION)
+			bnge_hwrm_handler(bn, (struct tx_cmp *)nqcmp);
+		raw_cons = NEXT_RAW_CMP(raw_cons);
+	}
+
+	nqr->has_more_work = 0;
+	nqr->nq_raw_cons = raw_cons;
+	BNGE_DB_NQ_ARM(bn->bd, &nqr->nq_db, raw_cons);
+}
+
+void bnge_nq0_work(struct work_struct *work)
+{
+	bnge_nq0_poll(container_of(work, struct bnge_net, nq0_work));
+}
+
 static u16 bnge_xmit_get_cfa_action(struct sk_buff *skb)
 {
 	struct metadata_dst *md_dst = skb_metadata_dst(skb);
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h
index bd0aa6c221a499..3db6809499ba9e 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_txrx.h
@@ -120,6 +120,9 @@ irqreturn_t bnge_msix(int irq, void *dev_instance);
 netdev_tx_t bnge_start_xmit(struct sk_buff *skb, struct net_device *dev);
 void bnge_reuse_rx_data(struct bnge_rx_ring_info *rxr, u16 cons, void *data);
 int bnge_napi_poll(struct napi_struct *napi, int budget);
+irqreturn_t bnge_nq0_msix(int irq, void *dev_instance);
+void bnge_nq0_poll(struct bnge_net *bn);
+void bnge_nq0_work(struct work_struct *work);
 netdev_features_t bnge_features_check(struct sk_buff *skb,
 				      struct net_device *dev,
 				      netdev_features_t features);

3/2 2026/11/15 14:11 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 19059
							output: 38
							thoughts: 181
						

Thoughts:
**Evaluating a Patch for Syzkaller Fuzzing**

Okay, so I've got a patch here, and the question is whether it's a good candidate for syzkaller fuzzing. My first thought is to take a close look at it. Let's see... it modifies files in `drivers/net/ethernet/broadcom/bnge/`: `bnge.h`, `bnge_auxr.c`, `bnge_hwrm_lib.c`, `bnge_netdev.c`, `bnge_netdev.h`, `bnge_rmem.c`, `bnge_txrx.c`, and `bnge_txrx.h`. Right, so it's a network driver, specifically for Broadcom Ethernet. Now, what *is* `bnge` exactly? I should probably check that, just to get a fuller picture. Let's see... should I use `grepper` here, or would a quick check of the Kconfig do the trick? Yeah, checking the Kconfig first should be a good starting point.



4/2 2026/11/15 14:11 tool grepper
0m Args:
{
  "Expression": "CONFIG_BNGE|bnge",
  "PathPrefixes": [
    "drivers/net/ethernet/broadcom/"
  ]
}

Results:
{
  "Output": "\nFull output is too long, showing 200 out of 6419 lines.\nUse more precise expression or PathPrefixes if possible.\n\nNumber of matching lines per file (25 files in total):\ndrivers/net/ethernet/broadcom/Makefile:1\ndrivers/net/ethernet/broadcom/bnge/Makefile:12\ndrivers/net/ethernet/broadcom/bnge/bnge.h:37\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:50\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.h:14\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c:96\ndrivers/net/ethernet/broadcom/bnge/bnge_db.h:1\ndrivers/net/ethernet/broadcom/bnge/bnge_devlink.c:31\ndrivers/net/ethernet/broadcom/bnge/bnge_devlink.h:5\ndrivers/net/ethernet/broadcom/bnge/bnge_ethtool.c:107\ndrivers/net/ethernet/broadcom/bnge/bnge_ethtool.h:1\ndrivers/net/ethernet/broadcom/bnge/bnge_hwrm.c:59\ndrivers/net/ethernet/broadcom/bnge/bnge_hwrm.h:26\ndrivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.c:274\ndrivers/net/ethernet/broadcom/bnge/bnge_hwrm_lib.h:47\ndrivers/net/ethernet/broadcom/bnge/bnge_link.c:172\ndrivers/net/ethernet/broadcom/bnge/bnge_link.h:15\ndrivers/net/ethernet/broadcom/bnge/bnge_netdev.c:732\ndrivers/net/ethernet/broadcom/bnge/bnge_netdev.h:86\ndrivers/net/ethernet/broadcom/bnge/bnge_resc.c:124\ndrivers/net/ethernet/broadcom/bnge/bnge_resc.h:16\ndrivers/net/ethernet/broadcom/bnge/bnge_rmem.c:64\ndrivers/net/ethernet/broadcom/bnge/bnge_rmem.h:19\ndrivers/net/ethernet/broadcom/bnge/bnge_txrx.c:213\ndrivers/net/ethernet/broadcom/bnge/bnge_txrx.h:16\n\ndrivers/net/ethernet/broadcom/Makefile=20=obj-$(CONFIG_BCMASP) += asp2/\ndrivers/net/ethernet/broadcom/Makefile:21:obj-$(CONFIG_BNGE) += bnge/\n--\ndrivers/net/ethernet/broadcom/bnge/Makefile-2-\ndrivers/net/ethernet/broadcom/bnge/Makefile:3:obj-$(CONFIG_BNGE) += bng_en.o\ndrivers/net/ethernet/broadcom/bnge/Makefile-4-\ndrivers/net/ethernet/broadcom/bnge/Makefile:5:bng_en-y := bnge_core.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:6:\t    bnge_devlink.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:7:\t    bnge_hwrm.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:8:\t    bnge_hwrm_lib.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:9:\t    bnge_rmem.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:10:\t    bnge_resc.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:11:\t    bnge_netdev.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:12:\t    bnge_ethtool.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:13:\t    bnge_auxr.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:14:\t    bnge_txrx.o \\\ndrivers/net/ethernet/broadcom/bnge/Makefile:15:\t    bnge_link.o\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-10-#include \u003clinux/etherdevice.h\u003e\ndrivers/net/ethernet/broadcom/bnge/bnge.h:11:#include \u003clinux/bnge/hsi.h\u003e\ndrivers/net/ethernet/broadcom/bnge/bnge.h:12:#include \"bnge_rmem.h\"\ndrivers/net/ethernet/broadcom/bnge/bnge.h:13:#include \"bnge_resc.h\"\ndrivers/net/ethernet/broadcom/bnge/bnge.h:14:#include \"bnge_auxr.h\"\ndrivers/net/ethernet/broadcom/bnge/bnge.h-15-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-19-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:20:extern char bnge_driver_name[];\ndrivers/net/ethernet/broadcom/bnge/bnge.h-21-\ndrivers/net/ethernet/broadcom/bnge/bnge.h=22=enum board_idx {\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-25-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:26:struct bnge_auxr_priv {\ndrivers/net/ethernet/broadcom/bnge/bnge.h-27-\tstruct auxiliary_device aux_dev;\ndrivers/net/ethernet/broadcom/bnge/bnge.h:28:\tstruct bnge_auxr_dev *auxr_dev;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-29-\tint id;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-31-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:32:struct bnge_pf_info {\ndrivers/net/ethernet/broadcom/bnge/bnge.h-33-\tu16\tfw_fid;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h=81=enum {\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-92-#define BNGE_MAX_QUEUE\t\t8\ndrivers/net/ethernet/broadcom/bnge/bnge.h:93:struct bnge_queue_info {\ndrivers/net/ethernet/broadcom/bnge/bnge.h-94-\tu8      queue_id;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-102-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:103:struct bnge_dev {\ndrivers/net/ethernet/broadcom/bnge/bnge.h-104-\tstruct device\t*dev;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-144-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:145:\tstruct bnge_pf_info\tpf;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-146-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-153-\t/* Backing stores */\ndrivers/net/ethernet/broadcom/bnge/bnge.h:154:\tstruct bnge_ctx_mem_info\t*ctx;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-155-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-157-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:158:\tstruct bnge_hw_resc\thw_resc;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-159-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-204-\tu8\t\t\tmax_lltc;\t/* lossless TCs */\ndrivers/net/ethernet/broadcom/bnge/bnge.h:205:\tstruct bnge_queue_info\tq_info[BNGE_MAX_QUEUE];\ndrivers/net/ethernet/broadcom/bnge/bnge.h-206-\tu8\t\t\ttc_to_qidx[BNGE_MAX_QUEUE];\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-210-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:211:\tstruct bnge_irq\t\t*irq_tbl;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-212-\tu16\t\t\tirqs_acquired;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-213-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:214:\tstruct bnge_auxr_priv\t*aux_priv;\ndrivers/net/ethernet/broadcom/bnge/bnge.h:215:\tstruct bnge_auxr_dev\t*auxr_dev;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-216-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:217:\tstruct bnge_link_info\tlink_info;\ndrivers/net/ethernet/broadcom/bnge/bnge.h-218-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-225- */\ndrivers/net/ethernet/broadcom/bnge/bnge.h:226:#define bnge_log(level, bd, fmt, ...)\t\t\t\t\t\\\ndrivers/net/ethernet/broadcom/bnge/bnge.h-227-\tdo {\t\t\t\t\t\t\t\t\\\ndrivers/net/ethernet/broadcom/bnge/bnge.h:228:\t\tstruct bnge_dev *__bd = (bd);\t\t\t\t\\\ndrivers/net/ethernet/broadcom/bnge/bnge.h-229-\t\t\t\t\t\t\t\t\t\\\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-236-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:237:#define bnge_err(bd, fmt, ...)\tbnge_log(err, bd, fmt, ##__VA_ARGS__)\ndrivers/net/ethernet/broadcom/bnge/bnge.h:238:#define bnge_warn(bd, fmt, ...)\tbnge_log(warn, bd, fmt, ##__VA_ARGS__)\ndrivers/net/ethernet/broadcom/bnge/bnge.h:239:#define bnge_dbg(bd, fmt, ...)\tbnge_log(dbg, bd, fmt, ##__VA_ARGS__)\ndrivers/net/ethernet/broadcom/bnge/bnge.h-240-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-242- * NQ0 (index 0) lives from probe to remove and is managed by\ndrivers/net/ethernet/broadcom/bnge/bnge.h:243: * bnge_nq0_init()/uninit() and the nq0 handoff helpers; therefore,\ndrivers/net/ethernet/broadcom/bnge/bnge.h:244: * bnge_for_each_open_nq() skips it.\ndrivers/net/ethernet/broadcom/bnge/bnge.h-245- *\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-249-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:250:#define bnge_for_each_open_nq(i, bd) \\\ndrivers/net/ethernet/broadcom/bnge/bnge.h-251-\tfor ((i) = BNGE_FIRST_OPEN_NQ; (i) \u003c (bd)-\u003enq_nr_rings; (i)++)\ndrivers/net/ethernet/broadcom/bnge/bnge.h-252-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:253:static inline bool bnge_is_roce_en(struct bnge_dev *bd)\ndrivers/net/ethernet/broadcom/bnge/bnge.h-254-{\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-257-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:258:static inline bool bnge_is_agg_reqd(struct bnge_dev *bd)\ndrivers/net/ethernet/broadcom/bnge/bnge.h-259-{\ndrivers/net/ethernet/broadcom/bnge/bnge.h-260-\tif (bd-\u003enetdev) {\ndrivers/net/ethernet/broadcom/bnge/bnge.h:261:\t\tstruct bnge_net *bn = netdev_priv(bd-\u003enetdev);\ndrivers/net/ethernet/broadcom/bnge/bnge.h-262-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-272-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:273:static inline void bnge_writeq(struct bnge_dev *bd, u64 val,\ndrivers/net/ethernet/broadcom/bnge/bnge.h-274-\t\t\t       void __iomem *addr)\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-285-/* For TX and RX ring doorbells */\ndrivers/net/ethernet/broadcom/bnge/bnge.h:286:static inline void bnge_db_write(struct bnge_dev *bd, struct bnge_db_info *db,\ndrivers/net/ethernet/broadcom/bnge/bnge.h-287-\t\t\t\t u32 idx)\ndrivers/net/ethernet/broadcom/bnge/bnge.h-288-{\ndrivers/net/ethernet/broadcom/bnge/bnge.h:289:\tbnge_writeq(bd, db-\u003edb_key64 | DB_RING_IDX(db, idx),\ndrivers/net/ethernet/broadcom/bnge/bnge.h-290-\t\t    db-\u003edoorbell);\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-292-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:293:bool bnge_aux_registered(struct bnge_dev *bd);\ndrivers/net/ethernet/broadcom/bnge/bnge.h:294:u16 bnge_aux_get_msix(struct bnge_dev *bd);\ndrivers/net/ethernet/broadcom/bnge/bnge.h-295-\ndrivers/net/ethernet/broadcom/bnge/bnge.h-296-/* irq_tbl index of the i-th aux vector, also used as its ring_idx */\ndrivers/net/ethernet/broadcom/bnge/bnge.h:297:static inline int bnge_aux_irq_idx(int i)\ndrivers/net/ethernet/broadcom/bnge/bnge.h-298-{\n--\ndrivers/net/ethernet/broadcom/bnge/bnge.h-301-\ndrivers/net/ethernet/broadcom/bnge/bnge.h:302:/* irq_tbl index of NQ nq_idx. @aux_msix is a single bnge_aux_get_msix()\ndrivers/net/ethernet/broadcom/bnge/bnge.h-303- * sample shared by all NQs of one allocation.\ndrivers/net/ethernet/broadcom/bnge/bnge.h-304- */\ndrivers/net/ethernet/broadcom/bnge/bnge.h:305:static inline int bnge_nq_irq_idx(u16 aux_msix, int nq_idx)\ndrivers/net/ethernet/broadcom/bnge/bnge.h-306-{\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-16-#include \u003clinux/auxiliary_bus.h\u003e\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:17:#include \u003clinux/bnge/hsi.h\u003e\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-18-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:19:#include \"bnge.h\"\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:20:#include \"bnge_hwrm.h\"\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:21:#include \"bnge_auxr.h\"\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-22-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:23:static DEFINE_IDA(bnge_aux_dev_ids);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-24-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:25:static void bnge_fill_msix_vecs(struct bnge_dev *bd,\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:26:\t\t\t\tstruct bnge_msix_info *info)\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-27-{\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:28:\tstruct bnge_auxr_dev *auxr_dev = bd-\u003eauxr_dev;\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-29-\tint num_msix, i;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-36-\tfor (i = 0; i \u003c num_msix; i++) {\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:37:\t\tinfo[i].vector = bd-\u003eirq_tbl[bnge_aux_irq_idx(i)].vector;\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-38-\t\tinfo[i].db_offset = bd-\u003edb_offset;\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:39:\t\tinfo[i].ring_idx = bnge_aux_irq_idx(i);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-40-\t}\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-42-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:43:int bnge_register_dev(struct bnge_auxr_dev *auxr_dev,\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-44-\t\t      void *handle)\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-45-{\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:46:\tstruct bnge_dev *bd = pci_get_drvdata(auxr_dev-\u003epdev);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:47:\tstruct bnge_auxr_info *auxr_info;\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-48-\tint rc = 0;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-56-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:57:\tif (!bnge_aux_has_enough_resources(bd)) {\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-58-\t\trc = -ENOMEM;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-66-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:67:\tbnge_fill_msix_vecs(bd, bd-\u003eauxr_dev-\u003emsix_info);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-68-\tauxr_dev-\u003eflags |= BNGE_ARDEV_MSIX_ALLOC;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-74-}\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:75:EXPORT_SYMBOL(bnge_register_dev);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-76-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:77:void bnge_unregister_dev(struct bnge_auxr_dev *auxr_dev)\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-78-{\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:79:\tstruct bnge_dev *bd = pci_get_drvdata(auxr_dev-\u003epdev);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:80:\tstruct bnge_auxr_info *auxr_info;\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-81-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-91-}\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:92:EXPORT_SYMBOL(bnge_unregister_dev);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-93-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:94:int bnge_send_msg(struct bnge_auxr_dev *auxr_dev, struct bnge_fw_msg *fw_msg)\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-95-{\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:96:\tstruct bnge_dev *bd = pci_get_drvdata(auxr_dev-\u003epdev);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-97-\tstruct output *resp;\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-101-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:102:\trc = bnge_hwrm_req_init(bd, req, 0 /* don't care */);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-103-\tif (rc)\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-105-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:106:\trc = bnge_hwrm_req_replace(bd, req, fw_msg-\u003emsg, fw_msg-\u003emsg_len);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-107-\tif (rc)\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-109-\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:110:\tbnge_hwrm_req_timeout(bd, req, fw_msg-\u003etimeout);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:111:\tresp = bnge_hwrm_req_hold(bd, req);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c:112:\trc = bnge_hwrm_req_send(bd, req);\ndrivers/net/ethernet/broadcom/bnge/bnge_auxr.c-113-\tresp_len = le16_to_cpu(resp-\u003eresp_len);\n\n"
}

5/2 2026/11/15 14:11 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 25791
							output: 34
							thoughts: 40
						

Thoughts:
Okay, let's dive into this. Here's my thought process on this:

**Investigating the "bnge" Module**

Right, so "bnge"... sounds vaguely familiar, but I need to be precise. My first thought is to determine *exactly* what "bnge" refers to in this context. Is it a PCI driver? My initial hunch is that it might be, possibly for Broadcom NetXtreme-G/E network interfaces. That seems plausible, given the naming convention I've observed in the past. To confirm this hunch I need to check the project's Kconfig file, as that's where I expect to find the definitive definition of `CONFIG_BNGE`. That's the key: find where `CONFIG_BNGE` is defined and verify its relation to any known hardware.



6/2 2026/11/15 14:11 tool grepper
0m Args:
{
  "Expression": "config BNGE",
  "PathPrefixes": [
    "drivers/net/ethernet/broadcom/"
  ]
}

Results:
{
  "Output": "drivers/net/ethernet/broadcom/Kconfig=250=config BNXT_HWMON\n--\ndrivers/net/ethernet/broadcom/Kconfig-257-\ndrivers/net/ethernet/broadcom/Kconfig:258:config BNGE\ndrivers/net/ethernet/broadcom/Kconfig-259-\ttristate \"Broadcom ThorUltra Ethernet device support\"\n"
}

7/2 2026/11/15 14:11 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 26148
							output: 40
							thoughts: 25
						

Thoughts:
Here's a summary of my thought process, as requested:

**Navigating the Broadcom Ethernet Driver Configuration**

Okay, let's dive in. I need to understand the configuration options for the Broadcom Ethernet drivers. Specifically, I'm thinking I'll start by examining the `Kconfig` file. I'm recalling that `drivers/net/ethernet/broadcom/Kconfig` is probably the place to start, given the standard kernel build system structure. My intuition suggests that line 258 might be a good jumping-off point for exploring some key options or dependencies. Perhaps it relates to a specific feature I'm trying to enable, or maybe it's the start of a logical grouping of related settings. Let's see what that section reveals.



8/2 2026/11/15 14:11 tool read-file
0m Args:
{
  "File": "drivers/net/ethernet/broadcom/Kconfig",
  "FirstLine": 255,
  "LineCount": 30
}

Results:
{
  "Contents": " 255:\t\t  Say Y if you want to expose the thermal sensor data on NetXtreme-C/E\n 256:\t\t  devices, via the hwmon sysfs interface.\n 257:\t\n 258:\tconfig BNGE\n 259:\t\ttristate \"Broadcom ThorUltra Ethernet device support\"\n 260:\t\tdepends on PCI\n 261:\t\tselect NET_DEVLINK\n 262:\t\tselect PAGE_POOL\n 263:\t\tselect AUXILIARY_BUS\n 264:\t\thelp\n 265:\t\t  This driver supports Broadcom ThorUltra 50/100/200/400/800 gigabit\n 266:\t\t  Ethernet cards. The module will be called bng_en. To compile this\n 267:\t\t  driver as a module, choose M here.\n 268:\t\n 269:\tconfig BCMASP\n 270:\t\ttristate \"Broadcom ASP 2.0 Ethernet support\"\n 271:\t\tdepends on ARCH_BRCMSTB || COMPILE_TEST\n 272:\t\tdefault ARCH_BRCMSTB\n 273:\t\tdepends on OF\n 274:\t\tselect PHYLIB\n 275:\t\tselect MDIO_BCM_UNIMAC\n 276:\t\tselect PAGE_POOL\n 277:\t\thelp\n 278:\t\t  This configuration enables the Broadcom ASP 2.0 Ethernet controller\n 279:\t\t  driver which is present in Broadcom STB SoCs such as 72165.\n 280:\t\n 281:\tendif # NET_VENDOR_BROADCOM\n"
}

9/2 2026/11/15 14:11 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 26804
							output: 42
							thoughts: 155
						

Thoughts:
**Hardware Compatibility Deep Dive**

Okay, so I'm looking at this driver, let's call it `bng_en`. The documentation states it's designed for Broadcom ThorUltra cards, specifically the 50, 100, 200, 400, and 800 gigabit models. Seems straightforward enough, but my immediate question is, will this play nicely within a QEMU environment? Are these ThorUltra cards emulated at all, or do we have a potential compatibility issue right off the bat?

Let's quickly re-examine the relevant section of the documentation. Ah, here it is: the "Structurally unreachable hardware" section is the key. They specifically mention devices that *require* physical ASICs, PCIe cards that are not emulated in standard QEMU. They use examples like `mlxsw`, `pds_core`, `qed`, `ionic`, and `amdgpu`. While they don't explicitly say "Broadcom ThorUltra," the description is concerning enough to warrant further investigation. I'm going to have to check if Broadcom's hardware falls into this category.

To get a clearer picture, I'll need to dive into the code itself. Specifically, I'll be looking at `bnge_core.c` and focusing on the PCI device IDs it handles. That should tell me if we are attempting to interact with Broadcom's cards, and hopefully provide some clues about how the driver expects to find the underlying hardware. Knowing that will give me a good handle on whether we are dealing with a standard or specialized device, in terms of emulability.



10/2 2026/11/15 14:12 tool grepper
0m Args:
{
  "Expression": "pci_driver|PCI_DEVICE",
  "PathPrefixes": [
    "drivers/net/ethernet/broadcom/bnge/"
  ]
}

Results:
{
  "Output": "drivers/net/ethernet/broadcom/bnge/bnge_core.c=407=static void bnge_shutdown(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-416-\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c:417:static struct pci_driver bnge_driver = {\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-418-\t.name\t\t= bnge_driver_name,\n"
}

11/2 2026/11/15 14:12 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 27503
							output: 47
							thoughts: 25
						

Thoughts:
Okay, let's dive into this. Here's how I'd approach that snippet of code and what I'd be thinking:

**Examining the PCI Device Table in bnge_core.c**

Alright, I'm going to jump into `bnge_core.c` and specifically hone in on line 410. Based on previous experience, and the context clues of this codebase, that line is highly likely to be the starting point or within the section where the PCI device table is defined or initialized. My initial thought is to quickly scan this area. I expect to find a data structure – likely a `struct` or a similar construct – that encapsulates the details of various PCI devices supported by this driver. Things I'll be looking for include device ID, vendor ID, maybe class codes, and, potentially, associated driver-specific configuration data. This is often where the driver tells the system which devices it can claim and control. Understanding this table is fundamental for how the driver identifies and interacts with the specific hardware it's designed to manage. It helps answer the basic question: "Which PCI devices is *this* driver responsible for?" Time to get my hands dirty.



12/2 2026/11/15 14:12 tool read-file
0m Args:
{
  "File": "drivers/net/ethernet/broadcom/bnge/bnge_core.c",
  "FirstLine": 380,
  "LineCount": 50
}

Results:
{
  "Contents": " 380:\tstatic void bnge_remove_one(struct pci_dev *pdev)\n 381:\t{\n 382:\t\tstruct bnge_dev *bd = pci_get_drvdata(pdev);\n 383:\t\n 384:\t\tbnge_rdma_aux_device_del(bd);\n 385:\t\n 386:\t\tbnge_netdev_free(bd);\n 387:\t\n 388:\t\tbnge_free_irqs(bd);\n 389:\t\n 390:\t\tbnge_rdma_aux_device_uninit(bd);\n 391:\t\n 392:\t\tbnge_net_uninit_dflt_config(bd);\n 393:\t\n 394:\t\tbnge_devlink_unregister(bd);\n 395:\t\n 396:\t\tbnge_fw_unregister_dev(bd);\n 397:\t\n 398:\t\tbnge_cleanup_hwrm_resources(bd);\n 399:\t\n 400:\t\tbnge_unmap_bars(pdev);\n 401:\t\n 402:\t\tbnge_devlink_free(bd);\n 403:\t\n 404:\t\tbnge_pci_disable(pdev);\n 405:\t}\n 406:\t\n 407:\tstatic void bnge_shutdown(struct pci_dev *pdev)\n 408:\t{\n 409:\t\tpci_disable_device(pdev);\n 410:\t\n 411:\t\tif (system_state == SYSTEM_POWER_OFF) {\n 412:\t\t\tpci_wake_from_d3(pdev, 0);\n 413:\t\t\tpci_set_power_state(pdev, PCI_D3hot);\n 414:\t\t}\n 415:\t}\n 416:\t\n 417:\tstatic struct pci_driver bnge_driver = {\n 418:\t\t.name\t\t= bnge_driver_name,\n 419:\t\t.id_table\t= bnge_pci_tbl,\n 420:\t\t.probe\t\t= bnge_probe_one,\n 421:\t\t.remove\t\t= bnge_remove_one,\n 422:\t\t.shutdown\t= bnge_shutdown,\n 423:\t};\n 424:\t\n 425:\tstatic int __init bnge_init_module(void)\n 426:\t{\n 427:\t\treturn pci_register_driver(\u0026bnge_driver);\n 428:\t}\n 429:\tmodule_init(bnge_init_module);\n"
}

13/2 2026/11/15 14:12 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 28539
							output: 41
							thoughts: 13
						

Thoughts:
Okay, here's my attempt at summarizing that thought process, tailored for an expert audience:

**Examining the `bnge_pci_tbl` Table**

Alright, let's dive into this. The initial thought, of course, is to check the `bnge_pci_tbl` table. Now, the context is likely implied, but my internal assumption is that this table holds crucial information about the Broadcom NetXtreme Gigabit Ethernet (bnge) network interface controller, specifically related to its PCI configuration. I'm immediately interested in what this table holds. It could be base addresses, interrupt lines, device IDs, vendor IDs – all the low-level stuff that's essential for proper device initialization and operation. Knowing what's in there would immediately dictate next steps. Whether I'm debugging driver initialization, looking at resource allocation, or trying to understand hardware interaction, the `bnge_pci_tbl` is my starting point for all things PCI and bnge-related. This is a critical point to review.



14/2 2026/11/15 14:12 tool grepper
0m Args:
{
  "Expression": "bnge_pci_tbl",
  "PathPrefixes": [
    "drivers/net/ethernet/broadcom/bnge/"
  ]
}

Results:
{
  "Output": "drivers/net/ethernet/broadcom/bnge/bnge_core.c=20=static const struct {\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-25-\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c:26:static const struct pci_device_id bnge_pci_tbl[] = {\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-27-\t{ PCI_VDEVICE(BROADCOM, 0x1780), .driver_data = BCM57708 },\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-30-};\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c:31:MODULE_DEVICE_TABLE(pci, bnge_pci_tbl);\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-32-\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c=417=static struct pci_driver bnge_driver = {\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-418-\t.name\t\t= bnge_driver_name,\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c:419:\t.id_table\t= bnge_pci_tbl,\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-420-\t.probe\t\t= bnge_probe_one,\n"
}

15/2 2026/11/15 14:12 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 29221
							output: 40
							thoughts: 516
						

Thoughts:
**Analyzing the Emulation Status of the BCM57708 NIC within QEMU**

Okay, so I'm looking at the `bnge_pci_tbl` which points to the BCM57708, a Broadcom ThorUltra NIC, a seriously high-speed enterprise Ethernet card, pushing up to 800 gigabit. My initial thought is, does QEMU even *pretend* to emulate this? The answer, as I know it, is a firm no. Standard QEMU doesn't touch anything Broadcom ThorUltra related (that's `bnge`, for short).

But let's be thorough. I need to rule out *any* kind of emulation. Maybe there's a virtual bus, a mock device, something like `netdevsim` that might provide a hook, right? I'll need to dig around and search for any reference to `bnge` within the QEMU source, or even in the wider virtio ecosystem – gotta be sure.

This Broadcom ThorUltra is a serious piece of hardware, a beast! The BCM57708 is its ASIC, and this is for seriously high-end enterprise networking.

Now, let me go back to the instructions I was reading carefully and reread section 2. I have to decide when it's safe to return `WorthFuzzing=false`. The "NEGATIVE CRITERIA" section is key, it shows conditions under which I should *not* fuzz. So far, I know QEMU doesn't emulate it, but I need to make sure I am in a "NEGATIVE CRITERIA" category.

The section lists things like:

*   Non-kernel and non-executable changes, which is not applicable.
*   Structurally unreachable hardware: This is the one! This section specifically mentions "vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., `mlxsw`, `pds_core`, `qed`, `ionic`, `amdgpu`) requiring physical ASIC/PCIe cards not emulated in standard QEMU".

And, what do you know, `bnge` fits that description exactly! This `bnge` (Broadcom ThorUltra Ethernet device support) is located under `drivers/net/ethernet/broadcom/bnge/`. This requires those physical Broadcom ThorUltra PCIe cards (BCM57708).

Okay, so is there *any* remote chance this `bnge` can be probed or run without physical hardware? I have to confirm. Let me jump into `bnge_core.c` and take a look at the `bnge_probe_one` function to see what I can find!



16/2 2026/11/15 14:12 tool grepper
0m Args:
{
  "Expression": "bnge_probe_one",
  "PathPrefixes": [
    "drivers/net/ethernet/broadcom/bnge/"
  ]
}

Results:
{
  "Output": "drivers/net/ethernet/broadcom/bnge/bnge_core.c=249=static int bnge_map_db_bar(struct bnge_dev *bd)\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-260-\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c:261:static int bnge_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-262-{\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c=417=static struct pci_driver bnge_driver = {\n--\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-419-\t.id_table\t= bnge_pci_tbl,\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c:420:\t.probe\t\t= bnge_probe_one,\ndrivers/net/ethernet/broadcom/bnge/bnge_core.c-421-\t.remove\t\t= bnge_remove_one,\n"
}

17/2 2026/11/15 14:12 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 30675
							output: 47
							thoughts: 21
						

Thoughts:
Okay, let's dive into this. Here's my thought process as I approach this task:

**Analyzing `bnge_probe_one` within `bnge_core.c`**

Alright, the first step is clear: I need to open and examine the `bnge_probe_one` function, specifically within the `bnge_core.c` file. This signals we're getting into the core of the Broadcom NetXtreme Gigabit Ethernet driver (or similar, given the `bnge` prefix), and the `probe` function is a crucial starting point for device initialization and detection. My primary focus will be on understanding how the driver identifies and potentially initializes a specific hardware instance. I'll be looking for key aspects like:

*   **Hardware Detection:** What methods does it use to detect the presence of a supported Broadcom NIC? Does it rely on PCI IDs, device tree entries, or something else?
*   **Resource Allocation:** How does it handle allocating resources for the device, such as memory regions, interrupt lines, and DMA channels?
*   **Initialization Steps:** What sequence of operations does it perform to bring the NIC online? This likely involves resetting the hardware, configuring registers, and enabling interrupts.
*   **Error Handling:** Are there robust error checks and recovery mechanisms in place to handle potential issues during the probe process? I'll be looking for conditionals and error codes.
*   **Driver Structure:** How does `bnge_probe_one` fit within the overall `bnge` driver architecture? Does it call other functions within the same file or in other modules?

Given my expertise, I'll be able to quickly zero in on the relevant code sections and identify the key algorithms and data structures involved. I'm expecting this probe function to be responsible for handling the critical early-stage hardware interaction, so the details here are going to be crucial for understanding the driver's overall behavior. I'm ready to get my hands dirty and start digging into the code.



18/2 2026/11/15 14:12 tool read-file
0m Args:
{
  "File": "drivers/net/ethernet/broadcom/bnge/bnge_core.c",
  "FirstLine": 260,
  "LineCount": 80
}

Results:
{
  "Contents": " 260:\t\n 261:\tstatic int bnge_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)\n 262:\t{\n 263:\t\tunsigned int max_irqs;\n 264:\t\tstruct bnge_dev *bd;\n 265:\t\tint rc;\n 266:\t\n 267:\t\tif (pci_is_bridge(pdev))\n 268:\t\t\treturn -ENODEV;\n 269:\t\n 270:\t\tif (!pdev-\u003emsix_cap) {\n 271:\t\t\tdev_err(\u0026pdev-\u003edev, \"MSIX capability missing, aborting\\n\");\n 272:\t\t\treturn -ENODEV;\n 273:\t\t}\n 274:\t\n 275:\t\tif (is_kdump_kernel()) {\n 276:\t\t\tpci_clear_master(pdev);\n 277:\t\t\tpcie_flr(pdev);\n 278:\t\t}\n 279:\t\n 280:\t\trc = bnge_pci_enable(pdev);\n 281:\t\tif (rc)\n 282:\t\t\treturn rc;\n 283:\t\n 284:\t\tbnge_print_device_info(pdev, ent-\u003edriver_data);\n 285:\t\n 286:\t\tbd = bnge_devlink_alloc(pdev);\n 287:\t\tif (!bd) {\n 288:\t\t\tdev_err(\u0026pdev-\u003edev, \"Devlink allocation failed\\n\");\n 289:\t\t\trc = -ENOMEM;\n 290:\t\t\tgoto err_pci_disable;\n 291:\t\t}\n 292:\t\n 293:\t\tbd-\u003ebar0 = pci_ioremap_bar(pdev, 0);\n 294:\t\tif (!bd-\u003ebar0) {\n 295:\t\t\tdev_err(\u0026pdev-\u003edev, \"Failed mapping BAR-0, aborting\\n\");\n 296:\t\t\trc = -ENOMEM;\n 297:\t\t\tgoto err_devl_free;\n 298:\t\t}\n 299:\t\n 300:\t\trc = bnge_init_hwrm_resources(bd);\n 301:\t\tif (rc)\n 302:\t\t\tgoto err_bar_unmap;\n 303:\t\n 304:\t\trc = bnge_fw_register_dev(bd);\n 305:\t\tif (rc) {\n 306:\t\t\tdev_err(\u0026pdev-\u003edev, \"Failed to register with firmware rc = %d\\n\", rc);\n 307:\t\t\tgoto err_hwrm_cleanup;\n 308:\t\t}\n 309:\t\n 310:\t\tbnge_devlink_register(bd);\n 311:\t\n 312:\t\tmax_irqs = bnge_get_max_irq(pdev);\n 313:\t\tbnge_set_max_func_irqs(bd, max_irqs);\n 314:\t\n 315:\t\tbnge_aux_init_dflt_config(bd);\n 316:\t\n 317:\t\trc = bnge_net_init_dflt_config(bd);\n 318:\t\tif (rc) {\n 319:\t\t\tdev_err(\u0026pdev-\u003edev, \"Error setting up default cfg to netdev rc = %d\\n\",\n 320:\t\t\t\trc);\n 321:\t\t\tgoto err_fw_reg;\n 322:\t\t}\n 323:\t\n 324:\t\trc = bnge_map_db_bar(bd);\n 325:\t\tif (rc) {\n 326:\t\t\tdev_err(\u0026pdev-\u003edev, \"Failed mapping doorbell BAR rc = %d, aborting\\n\",\n 327:\t\t\t\trc);\n 328:\t\t\tgoto err_config_uninit;\n 329:\t\t}\n 330:\t\n 331:\t#if BITS_PER_LONG == 32\n 332:\t\tspin_lock_init(\u0026bd-\u003edb_lock);\n 333:\t#endif\n 334:\t\n 335:\t\tbnge_rdma_aux_device_init(bd);\n 336:\t\n 337:\t\trc = bnge_alloc_irqs(bd);\n 338:\t\tif (rc) {\n 339:\t\t\tdev_err(\u0026pdev-\u003edev, \"Error IRQ allocation rc = %d\\n\", rc);\n"
}

19/2 2026/11/15 14:12 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 32354
							output: 17
							thoughts: 606
						

Thoughts:
**My Assessment: bnge Driver and Fuzzing Feasibility**

Okay, let's break this down. My initial assessment is that this patch, related to the `bnge` driver, is *not* suitable for fuzzing in a standard QEMU or GCE environment. Here's my reasoning, and I want to be thorough.

First, the key takeaway is that `bnge` interacts with the firmware and hardware resources via HWRM, dealing directly with the Broadcom ThorUltra ASIC. It initializes hardware resources, registers the device with the firmware, maps PCI BARs, and communicates directly with the ASIC. The problem is, as we know, *there's no emulation of this specific hardware in standard QEMU or GCE*. They simply don't have the BCM57708 or ThorUltra capabilities emulated. This is a fundamental limitation.

Now, let's examine the patch itself. Every single file modified is located within the `drivers/net/ethernet/broadcom/bnge/` directory. That's a strong signal. The patch touches the header files, auxiliary routines, HWRM library, and network device interaction code. This confirms that we're dealing exclusively with the `bnge` driver, and that it is for the Broadcom ThorUltra Ethernet adapter (BCM57708).

This aligns perfectly with section 2 of the guidance: structurally unreachable hardware, like vendor-specific PCIe switches, SmartNICs, or GPU drivers, that require a physical ASIC and aren't emulated. `bnge` fits this description precisely. It is a vendor-specific driver for a PCIe SmartNIC that relies on physical hardware not available in standard virtualized environments.

Therefore, my initial conclusions are solid:

*   **WorthFuzzing: False** - Because the hardware is not emulated.
*   **FocusSymbols: \[\]** - There's no point in specifying focus symbols because the target isn't accessible.
*   **EnableConfigs: \[\]** - Similarly, no configuration options will make this work in a standard virtualized environment.
*   **Reasoning:** The patch modifies code for the Broadcom ThorUltra Ethernet adapter (`bnge`), which depends on physical PCIe hardware (BCM57708) that isn't emulated in standard QEMU or GCE setups. This means it's unreachable for syzkaller in a typical fuzzing environment.

Let's do a quick cross-check though. It's always wise to be extra careful: I need to verify that *no* other files are touched by this patch outside of the `bnge` area. I'll quickly check the `git diff` output to make sure there are no surprising modifications in other areas that could change this assessment. This will be the final step to have confidence in this decision.



20/2 2026/11/15 14:12 tool grepper
0m Args:
{
  "Expression": "diff --git"
}

Results:
{
  "Output": "Documentation/bpf/drgn.rst=99=For example, to print ``struct bpf_prog_aux`` for BPF program id 53077:\n--\nDocumentation/bpf/drgn.rst-103-    % git diff\nDocumentation/bpf/drgn.rst:104:    diff --git a/tools/bpf_inspect.py b/tools/bpf_inspect.py\nDocumentation/bpf/drgn.rst-105-    index 650e228..aea2357 100755\n--\nDocumentation/dev-tools/checkuapi.rst=54=won't break userspace::\n--\nDocumentation/dev-tools/checkuapi.rst-69-      *  comp2_t is 24-bit with 5-bit base 2 exponent and 20 bit fraction\nDocumentation/dev-tools/checkuapi.rst:70:    diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h\nDocumentation/dev-tools/checkuapi.rst-71-    EOF\n--\nDocumentation/dev-tools/checkuapi.rst=310=Consider this change::\n--\nDocumentation/dev-tools/checkuapi.rst-312-    cat \u003c\u003c 'EOF' | patch -l -p1\nDocumentation/dev-tools/checkuapi.rst:313:    diff --git a/include/uapi/asm-generic/Kbuild b/include/uapi/asm-generic/Kbuild\nDocumentation/dev-tools/checkuapi.rst-314-    index ebb180aac74e..a9c88b0a8b3b 100644\n--\nDocumentation/doc-guide/contributing.rst=84=looked like this::\n--\nDocumentation/doc-guide/contributing.rst-102-\nDocumentation/doc-guide/contributing.rst:103:  diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c\nDocumentation/doc-guide/contributing.rst-104-  index 57f6944d65a6..00c9b80b3d33 100644\n--\nDocumentation/mm/transhuge.rst=73=change::\nDocumentation/mm/transhuge.rst-74-\nDocumentation/mm/transhuge.rst:75:\tdiff --git a/mm/mremap.c b/mm/mremap.c\nDocumentation/mm/transhuge.rst-76-\t--- a/mm/mremap.c\n--\nDocumentation/translations/it_IT/doc-guide/contributing.rst=91=patch risultante era questa::\n--\nDocumentation/translations/it_IT/doc-guide/contributing.rst-109-\nDocumentation/translations/it_IT/doc-guide/contributing.rst:110:  diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c\nDocumentation/translations/it_IT/doc-guide/contributing.rst-111-  index 57f6944d65a6..00c9b80b3d33 100644\n--\nDocumentation/translations/zh_CN/doc-guide/contributing.rst=36=C代码编译器发出的警告常常会被视为误报,从而导致出现了旨在让编译器闭嘴的补丁。\n--\nDocumentation/translations/zh_CN/doc-guide/contributing.rst-86-\nDocumentation/translations/zh_CN/doc-guide/contributing.rst:87:  diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c\nDocumentation/translations/zh_CN/doc-guide/contributing.rst-88-  index 57f6944d65a6..00c9b80b3d33 100644\n--\nscripts/checkpatch.pl=2680=sub process {\n--\nscripts/checkpatch.pl-2853-\t\t    ($line =~ /^rename (?:from|to) \\S+\\s*$/ ||\nscripts/checkpatch.pl:2854:\t\t     $line =~ /^diff --git a\\/[\\w\\/\\.\\_\\-]+ b\\/\\S+\\s*$/))) {\nscripts/checkpatch.pl-2855-\t\t\t$is_patch = 1;\n--\nscripts/checkpatch.pl-2911-\t\t# extract the filename as it passes\nscripts/checkpatch.pl:2912:\t\tif ($line =~ /^diff --git.*?(\\S+)$/) {\nscripts/checkpatch.pl-2913-\t\t\t$realfile = $1;\n--\nscripts/get_maintainer.pl=552=foreach my $file (@ARGV) {\n--\nscripts/get_maintainer.pl-601-\t\tpush(@files, $filename);\nscripts/get_maintainer.pl:602:\t    } elsif (m/^diff --git a\\/(\\S+) b\\/(\\S+)\\s*$/) {\nscripts/get_maintainer.pl-603-\t\tmy $filename1 = $1;\n"
}

21/2 2026/11/15 14:12 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 34869
							output: 122
							thoughts: 525
						

Thoughts:
**Analysis of the bnge Driver Changes**

Okay, so I've been given a diff and I'm quickly assessing its fuzzing potential. The diff clearly shows modifications confined to the `drivers/net/ethernet/broadcom/bnge/` directory. That immediately focuses my attention on the Broadcom ThorUltra driver, specifically the `bnge` module.

From the file names, I'm quickly piecing together that these changes appear to involve the management of notification queues (NQs), and specifically NQ0. This points towards how the driver handles interrupt processing and packet handling – probably related to NAPI and a workqueue. The hint here is "interface open/close," so the changes likely affect how the driver transitions between operational states.

My concern now is if these changes are reachable during standard fuzzing. The key point here is that the ThorUltra driver is tied to a *specific* Broadcom hardware: the BCM57708 ASIC. That makes the code's structural reachability my primary concern. I know that because it requires specific PCIe hardware, it's not present or emulated in standard QEMU or GCE environments.

The implication here is that these changes, while potentially interesting from a code perspective, are *unlikely* to be triggered by standard fuzzing attempts. This implies a "false" value for `WorthFuzzing`, as it's structurally unreachable. I don't see any value in spending cycles on this.

Therefore, I'm going to flag this as a non-target for fuzzing and will use `set-results` to indicate that.



22/2 2026/11/15 14:13 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The changes modify the Broadcom ThorUltra Ethernet driver (drivers/net/ethernet/broadcom/bnge/), refactoring notification queue 0 (NQ0) lifecycle management across open/close. This driver requires vendor-specific physical PCIe hardware (Broadcom ThorUltra BCM57708 ASIC) that is not emulated in standard QEMU or GCE virtualized environments, making the modified code structurally unreachable for fuzzing.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The changes modify the Broadcom ThorUltra Ethernet driver (drivers/net/ethernet/broadcom/bnge/), refactoring notification queue 0 (NQ0) lifecycle management across open/close. This driver requires vendor-specific physical PCIe hardware (Broadcom ThorUltra BCM57708 ASIC) that is not emulated in standard QEMU or GCE virtualized environments, making the modified code structurally unreachable for fuzzing.",
  "WorthFuzzing": false
}

23/1 2026/11/15 14:13 action If
0m Args:
{
  "WorthFuzzing": false
}

Results:
null

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