| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/19 16:51 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"SCSI_MPI3MR"
],
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies error handling in mpi3mr_sas_port_add() within the Broadcom MPI3 Storage Controller driver (mpi3mr). This driver drives vendor-specific Broadcom SAS4116/SAS5116 PCIe controllers, which require physical ASIC hardware not emulated in standard virtualized environments (QEMU/GCE), making the code structurally unreachable for syzkaller.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/19 16:51 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit cf9113f8e3394941d0a7b661bdd9668f47ddd4e9\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Sep 19 16:51:54 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c\nindex 240f67a8e2e3b..74de06e67be4f 100644\n--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c\n+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c\n@@ -1501,6 +1501,8 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,\n \tlist_for_each_entry_safe(mr_sas_phy, next, \u0026mr_sas_port-\u003ephy_list,\n \t port_siblings)\n \t\tlist_del(\u0026mr_sas_phy-\u003eport_siblings);\n+\tif (tgtdev)\n+\t\tmpi3mr_tgtdev_put(tgtdev);\n \tkfree(mr_sas_port);\n \treturn NULL;\n }\n"
} |
| 2/1 | 2026/09/19 16:51 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": [
"SCSI_MPI3MR"
],
"FocusSymbols": [],
"Reasoning": "The patch modifies error handling in mpi3mr_sas_port_add() within the Broadcom MPI3 Storage Controller driver (mpi3mr). This driver drives vendor-specific Broadcom SAS4116/SAS5116 PCIe controllers, which require physical ASIC hardware not emulated in standard virtualized environments (QEMU/GCE), making the code structurally unreachable for syzkaller.",
"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 cf9113f8e3394941d0a7b661bdd9668f47ddd4e9
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 19 16:51:54 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index 240f67a8e2e3b..74de06e67be4f 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -1501,6 +1501,8 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
list_for_each_entry_safe(mr_sas_phy, next, &mr_sas_port->phy_list,
port_siblings)
list_del(&mr_sas_phy->port_siblings);
+ if (tgtdev)
+ mpi3mr_tgtdev_put(tgtdev);
kfree(mr_sas_port);
return NULL;
}
|
| 3/2 | 2026/09/19 16:51 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 2925 output: 31 thoughts: 375 Thoughts: **Evaluating the Patch for Syzkaller Fuzzing** Okay, here's what I'm thinking. The user wants me to decide if this patch is a good candidate for fuzzing with syzkaller. Alright, let's dive in. First, I need to understand what's changed in the `diff` they've provided. I see a removal of a `list_del` call and a new conditional `if (tgtdev) mpi3mr_tgtdev_put(tgtdev);` being added. The function is `mpi3mr_sas_port_add`. Seems related to SAS ports. Now, what is `mpi3mr`? I immediately recall that it's the Broadcom MPI3 Storage Controller, supporting SAS, SATA, and NVMe. That's a good starting point. Any storage controller and SAS is a good candidate for fuzzing. My next step is to get a better understanding of the driver and its configuration. I'll need to check the relevant Kconfig and Makefile files. I'll use either `grepper` or `read-file` to check `drivers/scsi/mpi3mr/Kconfig` or `drivers/scsi/mpi3mr/Makefile`. This will tell me about its build configuration, dependencies, and if it's generally enabled or an option. Then I can determine if this is worth more effort. |
| 4/2 | 2026/09/19 16:52 | tool | grepper |
0mArgs:{
"Expression": "mpi3mr",
"PathPrefix": "drivers/scsi/mpi3mr"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 6732 lines.\nUse more precise expression if possible.\n\ndrivers/scsi/mpi3mr/Makefile:1:# mpi3mr makefile\ndrivers/scsi/mpi3mr/Makefile:2:obj-$(CONFIG_SCSI_MPI3MR) += mpi3mr.o\ndrivers/scsi/mpi3mr/Makefile:3:mpi3mr-y += mpi3mr_os.o \\\ndrivers/scsi/mpi3mr/Makefile:4:\t\tmpi3mr_fw.o \\\ndrivers/scsi/mpi3mr/Makefile:5:\t\tmpi3mr_app.o \\\ndrivers/scsi/mpi3mr/Makefile:6:\t\tmpi3mr_transport.o\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-5- * Copyright (C) 2017-2023 Broadcom Inc.\ndrivers/scsi/mpi3mr/mpi3mr.h:6: * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com)\ndrivers/scsi/mpi3mr/mpi3mr.h-7- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-39-#include \u003cscsi/scsi_tcq.h\u003e\ndrivers/scsi/mpi3mr/mpi3mr.h:40:#include \u003cuapi/scsi/scsi_bsg_mpi3mr.h\u003e\ndrivers/scsi/mpi3mr/mpi3mr.h-41-#include \u003cscsi/scsi_transport_sas.h\u003e\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-50-#include \"mpi/mpi30_tool.h\"\ndrivers/scsi/mpi3mr/mpi3mr.h:51:#include \"mpi3mr_debug.h\"\ndrivers/scsi/mpi3mr/mpi3mr.h-52-\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=57=extern atomic64_t event_counter;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-61-\ndrivers/scsi/mpi3mr/mpi3mr.h:62:#define MPI3MR_DRIVER_NAME\t\"mpi3mr\"\ndrivers/scsi/mpi3mr/mpi3mr.h-63-#define MPI3MR_DRIVER_LICENSE\t\"GPL\"\ndrivers/scsi/mpi3mr/mpi3mr.h:64:#define MPI3MR_DRIVER_AUTHOR\t\"Broadcom Inc. \u003cmpi3mr-linuxdrv.pdl@broadcom.com\u003e\"\ndrivers/scsi/mpi3mr/mpi3mr.h-65-#define MPI3MR_DRIVER_DESC\t\"MPI3 Storage Controller Device Driver\"\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-242-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:243: * struct mpi3mr_nvme_pt_sge - Structure to store SGEs for NVMe\ndrivers/scsi/mpi3mr/mpi3mr.h-244- * Encapsulated commands.\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-252- */\ndrivers/scsi/mpi3mr/mpi3mr.h:253:struct mpi3mr_nvme_pt_sge {\ndrivers/scsi/mpi3mr/mpi3mr.h-254-\t__le64 base_addr;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-262-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:263: * struct mpi3mr_buf_map - local structure to\ndrivers/scsi/mpi3mr/mpi3mr.h-264- * track kernel and user buffers associated with an BSG\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-273- */\ndrivers/scsi/mpi3mr/mpi3mr.h:274:struct mpi3mr_buf_map {\ndrivers/scsi/mpi3mr/mpi3mr.h-275-\tvoid *bsg_buf;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-285-/* IOC State definitions */\ndrivers/scsi/mpi3mr/mpi3mr.h:286:enum mpi3mr_iocstate {\ndrivers/scsi/mpi3mr/mpi3mr.h-287-\tMRIOC_STATE_READY = 1,\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-295-/* Reset reason code definitions*/\ndrivers/scsi/mpi3mr/mpi3mr.h:296:enum mpi3mr_reset_reason {\ndrivers/scsi/mpi3mr/mpi3mr.h-297-\tMPI3MR_RESET_FROM_BRINGUP = 1,\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=336=enum queue_type {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-341-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:342: * struct mpi3mr_compimg_ver - replica of component image\ndrivers/scsi/mpi3mr/mpi3mr.h-343- * version defined in mpi30_image.h in host endianness\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-345- */\ndrivers/scsi/mpi3mr/mpi3mr.h:346:struct mpi3mr_compimg_ver {\ndrivers/scsi/mpi3mr/mpi3mr.h-347-\tu16 build_num;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-355-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:356: * struct mpi3mr_ioc_facs - replica of component image version\ndrivers/scsi/mpi3mr/mpi3mr.h-357- * defined in mpi30_ioc.h in host endianness\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-359- */\ndrivers/scsi/mpi3mr/mpi3mr.h:360:struct mpi3mr_ioc_facts {\ndrivers/scsi/mpi3mr/mpi3mr.h-361-\tu32 ioc_capabilities;\ndrivers/scsi/mpi3mr/mpi3mr.h:362:\tstruct mpi3mr_compimg_ver fw_ver;\ndrivers/scsi/mpi3mr/mpi3mr.h-363-\tu32 mpi_version;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=479=struct op_reply_qinfo {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-496-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:497: * struct mpi3mr_intr_info - Interrupt cookie information\ndrivers/scsi/mpi3mr/mpi3mr.h-498- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-504- */\ndrivers/scsi/mpi3mr/mpi3mr.h:505:struct mpi3mr_intr_info {\ndrivers/scsi/mpi3mr/mpi3mr.h:506:\tstruct mpi3mr_ioc *mrioc;\ndrivers/scsi/mpi3mr/mpi3mr.h-507-\tint os_irq;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-513-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:514: * struct mpi3mr_throttle_group_info - Throttle group info\ndrivers/scsi/mpi3mr/mpi3mr.h-515- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-525- */\ndrivers/scsi/mpi3mr/mpi3mr.h:526:struct mpi3mr_throttle_group_info {\ndrivers/scsi/mpi3mr/mpi3mr.h-527-\tu8 io_divert;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-546-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:547: * struct mpi3mr_hba_port - HBA's port information\ndrivers/scsi/mpi3mr/mpi3mr.h-548- * @port_id: Port number\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-550- */\ndrivers/scsi/mpi3mr/mpi3mr.h:551:struct mpi3mr_hba_port {\ndrivers/scsi/mpi3mr/mpi3mr.h-552-\tstruct list_head list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-557-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:558: * struct mpi3mr_sas_port - Internal SAS port information\ndrivers/scsi/mpi3mr/mpi3mr.h-559- * @port_list: List of ports belonging to a SAS node\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-567- * @port: SAS transport layer port object\ndrivers/scsi/mpi3mr/mpi3mr.h:568: * @phy_list: mpi3mr_sas_phy objects belonging to this port\ndrivers/scsi/mpi3mr/mpi3mr.h-569- */\ndrivers/scsi/mpi3mr/mpi3mr.h:570:struct mpi3mr_sas_port {\ndrivers/scsi/mpi3mr/mpi3mr.h-571-\tstruct list_head port_list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-575-\tu64 phy_mask;\ndrivers/scsi/mpi3mr/mpi3mr.h:576:\tstruct mpi3mr_hba_port *hba_port;\ndrivers/scsi/mpi3mr/mpi3mr.h-577-\tstruct sas_identify remote_identify;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-583-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:584: * struct mpi3mr_sas_phy - Internal SAS Phy information\ndrivers/scsi/mpi3mr/mpi3mr.h-585- * @port_siblings: List of phys belonging to a port\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-594- */\ndrivers/scsi/mpi3mr/mpi3mr.h:595:struct mpi3mr_sas_phy {\ndrivers/scsi/mpi3mr/mpi3mr.h-596-\tstruct list_head port_siblings;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-603-\tu8 phy_belongs_to_port;\ndrivers/scsi/mpi3mr/mpi3mr.h:604:\tstruct mpi3mr_hba_port *hba_port;\ndrivers/scsi/mpi3mr/mpi3mr.h-605-};\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-607-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:608: * struct mpi3mr_sas_node - SAS host/expander information\ndrivers/scsi/mpi3mr/mpi3mr.h-609- * @list: List of sas nodes in a controller\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-623- */\ndrivers/scsi/mpi3mr/mpi3mr.h:624:struct mpi3mr_sas_node {\ndrivers/scsi/mpi3mr/mpi3mr.h-625-\tstruct list_head list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-634-\tu8 host_node;\ndrivers/scsi/mpi3mr/mpi3mr.h:635:\tstruct mpi3mr_hba_port *hba_port;\ndrivers/scsi/mpi3mr/mpi3mr.h:636:\tstruct mpi3mr_sas_phy *phy;\ndrivers/scsi/mpi3mr/mpi3mr.h-637-\tstruct list_head sas_port_list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-641-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:642: * struct mpi3mr_enclosure_node - enclosure information\ndrivers/scsi/mpi3mr/mpi3mr.h-643- * @list: List of enclosures\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-645- */\ndrivers/scsi/mpi3mr/mpi3mr.h:646:struct mpi3mr_enclosure_node {\ndrivers/scsi/mpi3mr/mpi3mr.h-647-\tstruct list_head list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=666=struct tgt_dev_sas_sata {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-674-\tu8 pend_sas_rphy_add;\ndrivers/scsi/mpi3mr/mpi3mr.h:675:\tstruct mpi3mr_hba_port *hba_port;\ndrivers/scsi/mpi3mr/mpi3mr.h-676-\tstruct sas_rphy *rphy;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=710=struct tgt_dev_vd {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-717-\tu8 reset_to;\ndrivers/scsi/mpi3mr/mpi3mr.h:718:\tstruct mpi3mr_throttle_group_info *tg;\ndrivers/scsi/mpi3mr/mpi3mr.h-719-};\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=725=union _form_spec_inf {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-730-\ndrivers/scsi/mpi3mr/mpi3mr.h:731:enum mpi3mr_dev_state {\ndrivers/scsi/mpi3mr/mpi3mr.h-732-\tMPI3MR_DEV_CREATED = 1,\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-737-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:738: * struct mpi3mr_tgt_dev - target device data structure\ndrivers/scsi/mpi3mr/mpi3mr.h-739- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-763- */\ndrivers/scsi/mpi3mr/mpi3mr.h:764:struct mpi3mr_tgt_dev {\ndrivers/scsi/mpi3mr/mpi3mr.h-765-\tstruct list_head list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-784-\tstruct kref ref_count;\ndrivers/scsi/mpi3mr/mpi3mr.h:785:\tenum mpi3mr_dev_state state;\ndrivers/scsi/mpi3mr/mpi3mr.h-786-};\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-788-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:789: * mpi3mr_tgtdev_get - k reference incrementor\ndrivers/scsi/mpi3mr/mpi3mr.h-790- * @s: Target device reference\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-793- */\ndrivers/scsi/mpi3mr/mpi3mr.h:794:static inline void mpi3mr_tgtdev_get(struct mpi3mr_tgt_dev *s)\ndrivers/scsi/mpi3mr/mpi3mr.h-795-{\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-799-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:800: * mpi3mr_free_tgtdev - target device memory dealloctor\ndrivers/scsi/mpi3mr/mpi3mr.h-801- * @r: k reference pointer of the target device\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-804- */\ndrivers/scsi/mpi3mr/mpi3mr.h:805:static inline void mpi3mr_free_tgtdev(struct kref *r)\ndrivers/scsi/mpi3mr/mpi3mr.h-806-{\ndrivers/scsi/mpi3mr/mpi3mr.h:807:\tkfree(container_of(r, struct mpi3mr_tgt_dev, ref_count));\ndrivers/scsi/mpi3mr/mpi3mr.h-808-}\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-810-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:811: * mpi3mr_tgtdev_put - k reference decrementor\ndrivers/scsi/mpi3mr/mpi3mr.h-812- * @s: Target device reference\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-815- */\ndrivers/scsi/mpi3mr/mpi3mr.h:816:static inline void mpi3mr_tgtdev_put(struct mpi3mr_tgt_dev *s)\ndrivers/scsi/mpi3mr/mpi3mr.h-817-{\ndrivers/scsi/mpi3mr/mpi3mr.h:818:\tkref_put(\u0026s-\u003eref_count, mpi3mr_free_tgtdev);\ndrivers/scsi/mpi3mr/mpi3mr.h-819-}\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-822-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:823: * struct mpi3mr_stgt_priv_data - SCSI target private structure\ndrivers/scsi/mpi3mr/mpi3mr.h-824- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-841- */\ndrivers/scsi/mpi3mr/mpi3mr.h:842:struct mpi3mr_stgt_priv_data {\ndrivers/scsi/mpi3mr/mpi3mr.h-843-\tstruct scsi_target *starget;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-854-\tu8 io_divert;\ndrivers/scsi/mpi3mr/mpi3mr.h:855:\tstruct mpi3mr_throttle_group_info *throttle_group;\ndrivers/scsi/mpi3mr/mpi3mr.h:856:\tstruct mpi3mr_tgt_dev *tgt_dev;\ndrivers/scsi/mpi3mr/mpi3mr.h-857-\tu32 pend_count;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-860-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:861: * struct mpi3mr_stgt_priv_data - SCSI device private structure\ndrivers/scsi/mpi3mr/mpi3mr.h-862- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-869- */\ndrivers/scsi/mpi3mr/mpi3mr.h:870:struct mpi3mr_sdev_priv_data {\ndrivers/scsi/mpi3mr/mpi3mr.h:871:\tstruct mpi3mr_stgt_priv_data *tgt_priv_data;\ndrivers/scsi/mpi3mr/mpi3mr.h-872-\tu32 lun_id;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-878-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:879: * struct mpi3mr_drv_cmd - Internal command tracker\ndrivers/scsi/mpi3mr/mpi3mr.h-880- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-895- */\ndrivers/scsi/mpi3mr/mpi3mr.h:896:struct mpi3mr_drv_cmd {\ndrivers/scsi/mpi3mr/mpi3mr.h-897-\tstruct mutex mutex;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-910-\ndrivers/scsi/mpi3mr/mpi3mr.h:911:\tvoid (*callback)(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:912:\t struct mpi3mr_drv_cmd *drv_cmd);\ndrivers/scsi/mpi3mr/mpi3mr.h-913-};\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-915-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:916: * union mpi3mr_trigger_data - Trigger data information\ndrivers/scsi/mpi3mr/mpi3mr.h-917- * @fault: Fault code\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-920- */\ndrivers/scsi/mpi3mr/mpi3mr.h:921:union mpi3mr_trigger_data {\ndrivers/scsi/mpi3mr/mpi3mr.h-922-\tu16 fault;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=937=struct trigger_event_data {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-940-\tu8 trigger_type;\ndrivers/scsi/mpi3mr/mpi3mr.h:941:\tunion mpi3mr_trigger_data trigger_specific_data;\ndrivers/scsi/mpi3mr/mpi3mr.h-942-\tbool snapdump;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=960=struct diag_buffer_desc {\ndrivers/scsi/mpi3mr/mpi3mr.h-961-\tu8 type;\ndrivers/scsi/mpi3mr/mpi3mr.h:962:\tunion mpi3mr_trigger_data trigger_data;\ndrivers/scsi/mpi3mr/mpi3mr.h-963-\tu8 trigger_type;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=995=struct chain_element {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1009- * @meta_chain_idx: Chain frame index of meta data SGL\ndrivers/scsi/mpi3mr/mpi3mr.h:1010: * @mpi3mr_scsiio_req: MPI SCSI IO request\ndrivers/scsi/mpi3mr/mpi3mr.h-1011- */\ndrivers/scsi/mpi3mr/mpi3mr.h=1012=struct scmd_priv {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1019-\tint meta_chain_idx;\ndrivers/scsi/mpi3mr/mpi3mr.h:1020:\tu8 mpi3mr_scsiio_req[MPI3MR_ADMIN_REQ_FRAME_SZ];\ndrivers/scsi/mpi3mr/mpi3mr.h-1021-};\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1023-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:1024: * struct mpi3mr_ioc - Adapter anchor structure stored in shost\ndrivers/scsi/mpi3mr/mpi3mr.h-1025- * private data\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1201- */\ndrivers/scsi/mpi3mr/mpi3mr.h:1202:struct mpi3mr_ioc {\ndrivers/scsi/mpi3mr/mpi3mr.h-1203-\tstruct list_head list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1240-\ndrivers/scsi/mpi3mr/mpi3mr.h:1241:\tstruct mpi3mr_intr_info *intr_info;\ndrivers/scsi/mpi3mr/mpi3mr.h-1242-\tu16 intr_info_count;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1251-\ndrivers/scsi/mpi3mr/mpi3mr.h:1252:\tstruct mpi3mr_drv_cmd init_cmds;\ndrivers/scsi/mpi3mr/mpi3mr.h:1253:\tstruct mpi3mr_drv_cmd cfg_cmds;\ndrivers/scsi/mpi3mr/mpi3mr.h:1254:\tstruct mpi3mr_ioc_facts facts;\ndrivers/scsi/mpi3mr/mpi3mr.h-1255-\tu16 op_reply_desc_sz;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1308-\ndrivers/scsi/mpi3mr/mpi3mr.h:1309:\tstruct mpi3mr_drv_cmd bsg_cmds;\ndrivers/scsi/mpi3mr/mpi3mr.h:1310:\tstruct mpi3mr_drv_cmd host_tm_cmds;\ndrivers/scsi/mpi3mr/mpi3mr.h:1311:\tstruct mpi3mr_drv_cmd dev_rmhs_cmds[MPI3MR_NUM_DEVRMCMD];\ndrivers/scsi/mpi3mr/mpi3mr.h:1312:\tstruct mpi3mr_drv_cmd evtack_cmds[MPI3MR_NUM_EVTACKCMD];\ndrivers/scsi/mpi3mr/mpi3mr.h-1313-\tunsigned long *devrem_bitmap;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1339-\ndrivers/scsi/mpi3mr/mpi3mr.h:1340:\tstruct mpi3mr_fwevt *current_event;\ndrivers/scsi/mpi3mr/mpi3mr.h-1341-\tstruct mpi3_driver_info_layout driver_info;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1347-\tu16 pel_locale;\ndrivers/scsi/mpi3mr/mpi3mr.h:1348:\tstruct mpi3mr_drv_cmd pel_cmds;\ndrivers/scsi/mpi3mr/mpi3mr.h:1349:\tstruct mpi3mr_drv_cmd pel_abort_cmd;\ndrivers/scsi/mpi3mr/mpi3mr.h-1350-\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1378-\tu16 num_io_throttle_group;\ndrivers/scsi/mpi3mr/mpi3mr.h:1379:\tstruct mpi3mr_throttle_group_info *throttle_groups;\ndrivers/scsi/mpi3mr/mpi3mr.h-1380-\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1382-\tu8 scsi_device_channel;\ndrivers/scsi/mpi3mr/mpi3mr.h:1383:\tstruct mpi3mr_drv_cmd transport_cmds;\ndrivers/scsi/mpi3mr/mpi3mr.h:1384:\tstruct mpi3mr_sas_node sas_hba;\ndrivers/scsi/mpi3mr/mpi3mr.h-1385-\tstruct list_head sas_expander_list;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1416-/**\ndrivers/scsi/mpi3mr/mpi3mr.h:1417: * struct mpi3mr_fwevt - Firmware event structure.\ndrivers/scsi/mpi3mr/mpi3mr.h-1418- *\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1431- */\ndrivers/scsi/mpi3mr/mpi3mr.h:1432:struct mpi3mr_fwevt {\ndrivers/scsi/mpi3mr/mpi3mr.h-1433-\tstruct list_head list;\ndrivers/scsi/mpi3mr/mpi3mr.h-1434-\tstruct work_struct work;\ndrivers/scsi/mpi3mr/mpi3mr.h:1435:\tstruct mpi3mr_ioc *mrioc;\ndrivers/scsi/mpi3mr/mpi3mr.h-1436-\tu16 event_id;\n--\ndrivers/scsi/mpi3mr/mpi3mr.h=1467=struct delayed_evt_ack_node {\n--\ndrivers/scsi/mpi3mr/mpi3mr.h-1472-\ndrivers/scsi/mpi3mr/mpi3mr.h:1473:int mpi3mr_setup_resources(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1474:void mpi3mr_cleanup_resources(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1475:int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1476:int mpi3mr_reinit_ioc(struct mpi3mr_ioc *mrioc, u8 is_resume);\ndrivers/scsi/mpi3mr/mpi3mr.h:1477:void mpi3mr_cleanup_ioc(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1478:int mpi3mr_issue_port_enable(struct mpi3mr_ioc *mrioc, u8 async);\ndrivers/scsi/mpi3mr/mpi3mr.h:1479:int mpi3mr_admin_request_post(struct mpi3mr_ioc *mrioc, void *admin_req,\ndrivers/scsi/mpi3mr/mpi3mr.h-1480-u16 admin_req_sz, u8 ignore_reset);\ndrivers/scsi/mpi3mr/mpi3mr.h:1481:int mpi3mr_op_request_post(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1482-\t\t\t struct op_req_qinfo *opreqq, u8 *req);\ndrivers/scsi/mpi3mr/mpi3mr.h:1483:void mpi3mr_add_sg_single(void *paddr, u8 flags, u32 length,\ndrivers/scsi/mpi3mr/mpi3mr.h-1484-\t\t\t dma_addr_t dma_addr);\ndrivers/scsi/mpi3mr/mpi3mr.h:1485:void mpi3mr_build_zero_len_sge(void *paddr);\ndrivers/scsi/mpi3mr/mpi3mr.h:1486:void *mpi3mr_get_sensebuf_virt_addr(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1487-\t\t\t\t dma_addr_t phys_addr);\ndrivers/scsi/mpi3mr/mpi3mr.h:1488:void *mpi3mr_get_reply_virt_addr(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1489-\t\t\t\t dma_addr_t phys_addr);\ndrivers/scsi/mpi3mr/mpi3mr.h:1490:void mpi3mr_repost_sense_buf(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1491-\t\t\t\t u64 sense_buf_dma);\ndrivers/scsi/mpi3mr/mpi3mr.h-1492-\ndrivers/scsi/mpi3mr/mpi3mr.h:1493:void mpi3mr_memset_buffers(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1494:void mpi3mr_free_mem(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1495:void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1496-\t\t\t struct mpi3_event_notification_reply *event_reply);\ndrivers/scsi/mpi3mr/mpi3mr.h:1497:void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1498-\t\t\t\t struct mpi3_default_reply_descriptor *reply_desc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1499-\t\t\t\t u64 *reply_dma, u16 qidx);\ndrivers/scsi/mpi3mr/mpi3mr.h:1500:void mpi3mr_start_watchdog(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1501:void mpi3mr_stop_watchdog(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h-1502-\ndrivers/scsi/mpi3mr/mpi3mr.h:1503:int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1504-\t\t\t u16 reset_reason, u8 snapdump);\ndrivers/scsi/mpi3mr/mpi3mr.h:1505:void mpi3mr_ioc_disable_intr(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1506:void mpi3mr_ioc_enable_intr(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h-1507-\ndrivers/scsi/mpi3mr/mpi3mr.h:1508:enum mpi3mr_iocstate mpi3mr_get_iocstate(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1509:int mpi3mr_process_event_ack(struct mpi3mr_ioc *mrioc, u8 event,\ndrivers/scsi/mpi3mr/mpi3mr.h-1510-\t\t\t u32 event_ctx);\ndrivers/scsi/mpi3mr/mpi3mr.h-1511-\ndrivers/scsi/mpi3mr/mpi3mr.h:1512:void mpi3mr_wait_for_host_io(struct mpi3mr_ioc *mrioc, u32 timeout);\ndrivers/scsi/mpi3mr/mpi3mr.h:1513:void mpi3mr_cleanup_fwevt_list(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1514:void mpi3mr_flush_host_io(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1515:void mpi3mr_invalidate_devhandles(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1516:void mpi3mr_flush_delayed_cmd_lists(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1517:void mpi3mr_check_rh_fault_ioc(struct mpi3mr_ioc *mrioc, u32 reason_code);\ndrivers/scsi/mpi3mr/mpi3mr.h:1518:void mpi3mr_print_fault_info(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1519:void mpi3mr_check_rh_fault_ioc(struct mpi3mr_ioc *mrioc, u32 reason_code);\ndrivers/scsi/mpi3mr/mpi3mr.h:1520:int mpi3mr_process_op_reply_q(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1521-\tstruct op_reply_qinfo *op_reply_q);\ndrivers/scsi/mpi3mr/mpi3mr.h:1522:int mpi3mr_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num);\ndrivers/scsi/mpi3mr/mpi3mr.h:1523:void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1524:void mpi3mr_bsg_exit(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1525:int mpi3mr_issue_tm(struct mpi3mr_ioc *mrioc, u8 tm_type,\ndrivers/scsi/mpi3mr/mpi3mr.h-1526-\tu16 handle, uint lun, u16 htag, ulong timeout,\ndrivers/scsi/mpi3mr/mpi3mr.h:1527:\tstruct mpi3mr_drv_cmd *drv_cmd,\ndrivers/scsi/mpi3mr/mpi3mr.h-1528-\tu8 *resp_code, struct scsi_cmnd *scmd);\ndrivers/scsi/mpi3mr/mpi3mr.h:1529:struct mpi3mr_tgt_dev *mpi3mr_get_tgtdev_by_handle(\ndrivers/scsi/mpi3mr/mpi3mr.h:1530:\tstruct mpi3mr_ioc *mrioc, u16 handle);\ndrivers/scsi/mpi3mr/mpi3mr.h:1531:void mpi3mr_pel_get_seqnum_complete(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:1532:\tstruct mpi3mr_drv_cmd *drv_cmd);\ndrivers/scsi/mpi3mr/mpi3mr.h:1533:int mpi3mr_pel_get_seqnum_post(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:1534:\tstruct mpi3mr_drv_cmd *drv_cmd);\ndrivers/scsi/mpi3mr/mpi3mr.h:1535:void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,\ndrivers/scsi/mpi3mr/mpi3mr.h-1536-\tu16 event_data_size);\ndrivers/scsi/mpi3mr/mpi3mr.h:1537:struct mpi3mr_enclosure_node *mpi3mr_enclosure_find_by_handle(\ndrivers/scsi/mpi3mr/mpi3mr.h:1538:\tstruct mpi3mr_ioc *mrioc, u16 handle);\ndrivers/scsi/mpi3mr/mpi3mr.h:1539:extern const struct attribute_group *mpi3mr_host_groups[];\ndrivers/scsi/mpi3mr/mpi3mr.h:1540:extern const struct attribute_group *mpi3mr_dev_groups[];\ndrivers/scsi/mpi3mr/mpi3mr.h-1541-\ndrivers/scsi/mpi3mr/mpi3mr.h:1542:extern struct sas_function_template mpi3mr_transport_functions;\ndrivers/scsi/mpi3mr/mpi3mr.h:1543:extern struct scsi_transport_template *mpi3mr_transport_template;\ndrivers/scsi/mpi3mr/mpi3mr.h-1544-\ndrivers/scsi/mpi3mr/mpi3mr.h:1545:int mpi3mr_cfg_get_dev_pg0(struct mpi3mr_ioc *mrioc, u16 *ioc_status,\ndrivers/scsi/mpi3mr/mpi3mr.h-1546-\tstruct mpi3_device_page0 *dev_pg0, u16 pg_sz, u32 form, u32 form_spec);\ndrivers/scsi/mpi3mr/mpi3mr.h:1547:int mpi3mr_cfg_get_sas_phy_pg0(struct mpi3mr_ioc *mrioc, u16 *ioc_status,\ndrivers/scsi/mpi3mr/mpi3mr.h-1548-\tstruct mpi3_sas_phy_page0 *phy_pg0, u16 pg_sz, u32 form,\ndrivers/scsi/mpi3mr/mpi3mr.h-1549-\tu32 form_spec);\ndrivers/scsi/mpi3mr/mpi3mr.h:1550:int mpi3mr_cfg_get_sas_phy_pg1(struct mpi3mr_ioc *mrioc, u16 *ioc_status,\ndrivers/scsi/mpi3mr/mpi3mr.h-1551-\tstruct mpi3_sas_phy_page1 *phy_pg1, u16 pg_sz, u32 form,\ndrivers/scsi/mpi3mr/mpi3mr.h-1552-\tu32 form_spec);\ndrivers/scsi/mpi3mr/mpi3mr.h:1553:int mpi3mr_cfg_get_sas_exp_pg0(struct mpi3mr_ioc *mrioc, u16 *ioc_status,\ndrivers/scsi/mpi3mr/mpi3mr.h-1554-\tstruct mpi3_sas_expander_page0 *exp_pg0, u16 pg_sz, u32 form,\ndrivers/scsi/mpi3mr/mpi3mr.h-1555-\tu32 form_spec);\ndrivers/scsi/mpi3mr/mpi3mr.h:1556:int mpi3mr_cfg_get_sas_exp_pg1(struct mpi3mr_ioc *mrioc, u16 *ioc_status,\ndrivers/scsi/mpi3mr/mpi3mr.h-1557-\tstruct mpi3_sas_expander_page1 *exp_pg1, u16 pg_sz, u32 form,\ndrivers/scsi/mpi3mr/mpi3mr.h-1558-\tu32 form_spec);\ndrivers/scsi/mpi3mr/mpi3mr.h:1559:int mpi3mr_cfg_get_enclosure_pg0(struct mpi3mr_ioc *mrioc, u16 *ioc_status,\ndrivers/scsi/mpi3mr/mpi3mr.h-1560-\tstruct mpi3_enclosure_page0 *encl_pg0, u16 pg_sz, u32 form,\ndrivers/scsi/mpi3mr/mpi3mr.h-1561-\tu32 form_spec);\ndrivers/scsi/mpi3mr/mpi3mr.h:1562:int mpi3mr_cfg_get_sas_io_unit_pg0(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1563-\tstruct mpi3_sas_io_unit_page0 *sas_io_unit_pg0, u16 pg_sz);\ndrivers/scsi/mpi3mr/mpi3mr.h:1564:int mpi3mr_cfg_get_sas_io_unit_pg1(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1565-\tstruct mpi3_sas_io_unit_page1 *sas_io_unit_pg1, u16 pg_sz);\ndrivers/scsi/mpi3mr/mpi3mr.h:1566:int mpi3mr_cfg_set_sas_io_unit_pg1(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1567-\tstruct mpi3_sas_io_unit_page1 *sas_io_unit_pg1, u16 pg_sz);\ndrivers/scsi/mpi3mr/mpi3mr.h:1568:int mpi3mr_cfg_get_driver_pg1(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1569-\tstruct mpi3_driver_page1 *driver_pg1, u16 pg_sz);\ndrivers/scsi/mpi3mr/mpi3mr.h:1570:int mpi3mr_cfg_get_driver_pg2(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1571-\tstruct mpi3_driver_page2 *driver_pg2, u16 pg_sz, u8 page_type);\ndrivers/scsi/mpi3mr/mpi3mr.h-1572-\ndrivers/scsi/mpi3mr/mpi3mr.h:1573:u8 mpi3mr_is_expander_device(u16 device_info);\ndrivers/scsi/mpi3mr/mpi3mr.h:1574:int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16 handle);\ndrivers/scsi/mpi3mr/mpi3mr.h:1575:void mpi3mr_expander_remove(struct mpi3mr_ioc *mrioc, u64 sas_address,\ndrivers/scsi/mpi3mr/mpi3mr.h:1576:\tstruct mpi3mr_hba_port *hba_port);\ndrivers/scsi/mpi3mr/mpi3mr.h:1577:struct mpi3mr_sas_node *__mpi3mr_expander_find_by_handle(struct mpi3mr_ioc\ndrivers/scsi/mpi3mr/mpi3mr.h-1578-\t*mrioc, u16 handle);\ndrivers/scsi/mpi3mr/mpi3mr.h:1579:struct mpi3mr_hba_port *mpi3mr_get_hba_port_by_id(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1580-\tu8 port_id);\ndrivers/scsi/mpi3mr/mpi3mr.h:1581:void mpi3mr_sas_host_refresh(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1582:void mpi3mr_sas_host_add(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1583:void mpi3mr_update_links(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1584-\tu64 sas_address_parent, u16 handle, u8 phy_number, u8 link_rate,\ndrivers/scsi/mpi3mr/mpi3mr.h:1585:\tstruct mpi3mr_hba_port *hba_port);\ndrivers/scsi/mpi3mr/mpi3mr.h:1586:void mpi3mr_remove_tgtdev_from_host(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:1587:\tstruct mpi3mr_tgt_dev *tgtdev);\ndrivers/scsi/mpi3mr/mpi3mr.h:1588:int mpi3mr_report_tgtdev_to_sas_transport(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:1589:\tstruct mpi3mr_tgt_dev *tgtdev);\ndrivers/scsi/mpi3mr/mpi3mr.h:1590:void mpi3mr_remove_tgtdev_from_sas_transport(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:1591:\tstruct mpi3mr_tgt_dev *tgtdev);\ndrivers/scsi/mpi3mr/mpi3mr.h:1592:struct mpi3mr_tgt_dev *__mpi3mr_get_tgtdev_by_addr_and_rphy(\ndrivers/scsi/mpi3mr/mpi3mr.h:1593:\tstruct mpi3mr_ioc *mrioc, u64 sas_address, struct sas_rphy *rphy);\ndrivers/scsi/mpi3mr/mpi3mr.h:1594:void mpi3mr_print_device_event_notice(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1595-\tbool device_add);\ndrivers/scsi/mpi3mr/mpi3mr.h:1596:void mpi3mr_refresh_sas_ports(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1597:void mpi3mr_refresh_expanders(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1598:void mpi3mr_add_event_wait_for_device_refresh(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1599:void mpi3mr_flush_drv_cmds(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1600:void mpi3mr_flush_cmds_for_unrecovered_controller(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1601:void mpi3mr_free_enclosure_list(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1602:int mpi3mr_process_admin_reply_q(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1603:void mpi3mr_expander_node_remove(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:1604:\tstruct mpi3mr_sas_node *sas_expander);\ndrivers/scsi/mpi3mr/mpi3mr.h:1605:void mpi3mr_alloc_diag_bufs(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1606:int mpi3mr_post_diag_bufs(struct mpi3mr_ioc *mrioc);\ndrivers/scsi/mpi3mr/mpi3mr.h:1607:int mpi3mr_issue_diag_buf_release(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1608-\tstruct diag_buffer_desc *diag_buffer);\ndrivers/scsi/mpi3mr/mpi3mr.h:1609:void mpi3mr_release_diag_bufs(struct mpi3mr_ioc *mrioc, u8 skip_rel_action);\ndrivers/scsi/mpi3mr/mpi3mr.h:1610:void mpi3mr_set_trigger_data_in_hdb(struct diag_buffer_desc *hdb,\ndrivers/scsi/mpi3mr/mpi3mr.h:1611:\tu8 type, union mpi3mr_trigger_data *trigger_data, bool force);\ndrivers/scsi/mpi3mr/mpi3mr.h:1612:int mpi3mr_refresh_trigger(struct mpi3mr_ioc *mrioc, u8 page_type);\ndrivers/scsi/mpi3mr/mpi3mr.h:1613:struct diag_buffer_desc *mpi3mr_diag_buffer_for_type(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1614-\tu8 buf_type);\ndrivers/scsi/mpi3mr/mpi3mr.h:1615:int mpi3mr_issue_diag_buf_post(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1616-\tstruct diag_buffer_desc *diag_buffer);\ndrivers/scsi/mpi3mr/mpi3mr.h:1617:void mpi3mr_set_trigger_data_in_all_hdb(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h:1618:\tu8 type, union mpi3mr_trigger_data *trigger_data, bool force);\ndrivers/scsi/mpi3mr/mpi3mr.h:1619:void mpi3mr_reply_trigger(struct mpi3mr_ioc *mrioc, u16 iocstatus,\ndrivers/scsi/mpi3mr/mpi3mr.h-1620-\tu32 iocloginfo);\ndrivers/scsi/mpi3mr/mpi3mr.h:1621:void mpi3mr_hdb_trigger_data_event(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1622-\tstruct trigger_event_data *event_data);\ndrivers/scsi/mpi3mr/mpi3mr.h:1623:void mpi3mr_scsisense_trigger(struct mpi3mr_ioc *mrioc, u8 senseky, u8 asc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1624-\tu8 ascq);\ndrivers/scsi/mpi3mr/mpi3mr.h:1625:void mpi3mr_event_trigger(struct mpi3mr_ioc *mrioc, u8 event);\ndrivers/scsi/mpi3mr/mpi3mr.h:1626:void mpi3mr_global_trigger(struct mpi3mr_ioc *mrioc, u64 trigger_data);\ndrivers/scsi/mpi3mr/mpi3mr.h:1627:void mpi3mr_hdbstatuschg_evt_th(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr.h-1628-\tstruct mpi3_event_notification_reply *event_reply);\n--\ndrivers/scsi/mpi3mr/mpi3mr_app.c-5- * Copyright (C) 2017-2023 Broadcom Inc.\ndrivers/scsi/mpi3mr/mpi3mr_app.c:6: * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com)\ndrivers/scsi/mpi3mr/mpi3mr_app.c-7- *\n--\ndrivers/scsi/mpi3mr/mpi3mr_app.c-9-\ndrivers/scsi/mpi3mr/mpi3mr_app.c:10:#include \"mpi3mr.h\"\ndrivers/scsi/mpi3mr/mpi3mr_app.c-11-#include \u003clinux/bsg-lib.h\u003e\ndrivers/scsi/mpi3mr/mpi3mr_app.c:12:#include \u003cuapi/scsi/scsi_bsg_mpi3mr.h\u003e\ndrivers/scsi/mpi3mr/mpi3mr_app.c-13-\ndrivers/scsi/mpi3mr/mpi3mr_app.c-14-/**\ndrivers/scsi/mpi3mr/mpi3mr_app.c:15: * mpi3mr_alloc_trace_buffer: Allocate segmented trace buffer\ndrivers/scsi/mpi3mr/mpi3mr_app.c-16- * @mrioc: Adapter instance reference\n--\ndrivers/scsi/mpi3mr/mpi3mr_app.c-24- */\ndrivers/scsi/mpi3mr/mpi3mr_app.c:25:static int mpi3mr_alloc_trace_buffer(struct mpi3mr_ioc *mrioc, u32 trace_size)\ndrivers/scsi/mpi3mr/mpi3mr_app.c-26-{\n--\ndrivers/scsi/mpi3mr/mpi3mr_app.c-110-/**\n\n"
} |
| 5/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18162 output: 30 thoughts: 13 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Analyzing the SCSI_MPI3MR Kconfig Entry** Okay, so I'm diving into the Kconfig for `SCSI_MPI3MR`. My first instinct is to understand its role in the SCSI subsystem, specifically the connection to the MPI3MR (likely meaning Multi-Protocol Interface 3 Mainboard Revision) controller or driver. I need to quickly recall the implications of selecting or deselecting this option. What dependencies are tied to it? Are we talking about a specific hardware platform or a more generic driver? What other related configurations or modules get pulled in if `SCSI_MPI3MR` is enabled? Are there any potential conflicts or interactions with other SCSI drivers that I need to be aware of? I need to think about the performance implications of using this driver compared to alternative options in a real-world scenario. Let's see if there are any comments or documentation within the Kconfig file itself; that's usually the best place to start. I'll be looking for clues about the supported devices, features, and any caveats that apply. Understanding the specifics of its dependencies and interactions will be key to making informed decisions about the system configuration. |
| 6/2 | 2026/09/19 16:52 | tool | grepper |
0mArgs:{
"Expression": "SCSI_MPI3MR",
"PathPrefix": "drivers/scsi"
}Results: {
"Output": "drivers/scsi/Makefile=103=obj-$(CONFIG_SCSI_MPT3SAS)\t+= mpt3sas/\ndrivers/scsi/Makefile:104:obj-$(CONFIG_SCSI_MPI3MR)\t+= mpi3mr/\ndrivers/scsi/Makefile-105-obj-$(CONFIG_SCSI_ACARD)\t+= atp870u.o\n--\ndrivers/scsi/mpi3mr/Kconfig-2-\ndrivers/scsi/mpi3mr/Kconfig:3:config SCSI_MPI3MR\ndrivers/scsi/mpi3mr/Kconfig-4-\ttristate \"Broadcom MPI3 Storage Controller Device Driver\"\n--\ndrivers/scsi/mpi3mr/Makefile-1-# mpi3mr makefile\ndrivers/scsi/mpi3mr/Makefile:2:obj-$(CONFIG_SCSI_MPI3MR) += mpi3mr.o\ndrivers/scsi/mpi3mr/Makefile-3-mpi3mr-y += mpi3mr_os.o \\\n"
} |
| 7/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18722 output: 37 thoughts: 17 Thoughts: Okay, here's my interpretation of reading `drivers/scsi/mpi3mr/Kconfig`, summarized as if it's my own thought process, assuming I'm an expert in the field: **Diving into the MPI3MR Kconfig** Alright, let's crack open the `drivers/scsi/mpi3mr/Kconfig` file. Instantly, I'm looking for the core elements that define this driver's configurability. I'm expecting to see the standard Kconfig structure: `config` blocks, `bool` and `tristate` options, `depends on` clauses, and maybe some `select` statements to manage dependencies within the SCSI subsystem. First things I'll look for are the most prominent features. I'm focusing on the main `CONFIG_` symbol and its dependencies. Are there any hardware-specific dependencies, perhaps on a particular chipset or platform? Are there any optional features related to RAID functionality, specific controller models, or advanced management capabilities that can be enabled or disabled? I'll quickly scan for any mentions of interrupt modes, DMA configurations, or error handling behaviors that are controlled via Kconfig. I'll be paying close attention to the `help` sections, obviously. They should provide clear, concise descriptions of what each option controls. I'll mentally evaluate the wording. Does it adequately explain the trade-offs of enabling or disabling a given option? Are there any caveats or warnings about compatibility or performance implications? I'm hoping it's well-written, reflecting good documentation practices. I'll want to quickly check for any unusual configuration options. I'll need to know whether any of these are intended to handle edge cases or for performance tuning. And I'll need to evaluate how these options interact with the overall SCSI subsystem configuration. I'm looking for potential conflicts or redundancies. Maybe there are some redundant options that need some rethinking to have a better design. I'm also curious to see how granular the control is. Are there just a few broad options, or is it a fine-grained collection that allows for very precise tuning? I'm thinking about the design philosophy here. Does this Kconfig prioritize ease of use, maximum flexibility, or a balance of both? And I want to get an idea for how it handles driver modules. Is the driver compiled as a module by default, or is it built-in? Finally, after I've gotten a solid overview, I might revisit specific sections to look for potential areas for improvement or possible bugs. Do the dependencies make logical sense? Are there any opportunities to simplify the configuration options without sacrificing functionality? I will be looking to see if there are any opportunities for improving the documentation. |
| 8/2 | 2026/09/19 16:52 | tool | read-file |
0mArgs:{
"File": "drivers/scsi/mpi3mr/Kconfig",
"FirstLine": 1,
"LineCount": 50
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-or-later\n 2:\t\n 3:\tconfig SCSI_MPI3MR\n 4:\t\ttristate \"Broadcom MPI3 Storage Controller Device Driver\"\n 5:\t\tdepends on PCI \u0026\u0026 SCSI\n 6:\t\tselect BLK_DEV_BSGLIB\n 7:\t\tselect SCSI_SAS_ATTRS\n 8:\t\thelp\n 9:\t\tMPI3 based Storage \u0026 RAID Controllers Driver.\n"
} |
| 9/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19467 output: 33 thoughts: 82 Thoughts: **Analyzing the Broadcom MPI3 Storage Controller Driver** Okay, so `CONFIG_SCSI_MPI3MR`... that's the Broadcom MPI3 Storage Controller Device Driver. It's pretty straightforward: SCSI and PCI are its dependencies. My first question, as always, is *what* does this actually drive? Is it tied to physical PCI hardware, or something more abstract? Time to dig into the source. I'll need to check the driver's code, likely in `drivers/scsi/mpi3mr/mpi3mr_os.c` – specifically looking for something like `mpi3mr_pci_table`, or a similar PCI-related data structure. That should give me the hardware context I need to really understand this module's function. |
| 10/2 | 2026/09/19 16:52 | tool | grepper |
0mArgs:{
"Expression": "MODULE_DEVICE_TABLE",
"PathPrefix": "drivers/scsi/mpi3mr"
}Results: {
"Output": "drivers/scsi/mpi3mr/mpi3mr_os.c=6053=static const struct pci_device_id mpi3mr_pci_id_table[] = {\n--\ndrivers/scsi/mpi3mr/mpi3mr_os.c-6067-};\ndrivers/scsi/mpi3mr/mpi3mr_os.c:6068:MODULE_DEVICE_TABLE(pci, mpi3mr_pci_id_table);\ndrivers/scsi/mpi3mr/mpi3mr_os.c-6069-\n"
} |
| 11/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19897 output: 45 thoughts: 30 Thoughts: Here's my summary, as if I were thinking these thoughts: **Analyzing the MPI3MR Driver Code** Alright, let's dive in. I need to take a look at the `drivers/scsi/mpi3mr/mpi3mr_os.c` file. Specifically, I want to zero in on the code around line 6053. I'm hoping to get a clearer picture of how this section of the driver interacts with the operating system, likely dealing with some aspect of SCSI communication or device management within the MPI3MR controller. Given the context, I expect to see OS-specific interactions - perhaps memory allocation, interrupt handling, or command submission. Let's see what's actually going on in that segment of code. |
| 12/2 | 2026/09/19 16:52 | tool | read-file |
0mArgs:{
"File": "drivers/scsi/mpi3mr/mpi3mr_os.c",
"FirstLine": 6050,
"LineCount": 25
}Results: {
"Contents": "6050:\t\treturn PCI_ERS_RESULT_RECOVERED;\n6051:\t}\n6052:\t\n6053:\tstatic const struct pci_device_id mpi3mr_pci_id_table[] = {\n6054:\t\t{\n6055:\t\t\tPCI_DEVICE_SUB(MPI3_MFGPAGE_VENDORID_BROADCOM,\n6056:\t\t\t MPI3_MFGPAGE_DEVID_SAS4116, PCI_ANY_ID, PCI_ANY_ID)\n6057:\t\t},\n6058:\t\t{\n6059:\t\t\tPCI_DEVICE_SUB(MPI3_MFGPAGE_VENDORID_BROADCOM,\n6060:\t\t\t MPI3_MFGPAGE_DEVID_SAS5116_MPI, PCI_ANY_ID, PCI_ANY_ID)\n6061:\t\t},\n6062:\t\t{\n6063:\t\t\tPCI_DEVICE_SUB(MPI3_MFGPAGE_VENDORID_BROADCOM,\n6064:\t\t\t MPI3_MFGPAGE_DEVID_SAS5116_MPI_MGMT, PCI_ANY_ID, PCI_ANY_ID)\n6065:\t\t},\n6066:\t\t{ 0 }\n6067:\t};\n6068:\tMODULE_DEVICE_TABLE(pci, mpi3mr_pci_id_table);\n6069:\t\n6070:\tstatic const struct pci_error_handlers mpi3mr_err_handler = {\n6071:\t\t.error_detected = mpi3mr_pcierr_error_detected,\n6072:\t\t.mmio_enabled = mpi3mr_pcierr_mmio_enabled,\n6073:\t\t.slot_reset = mpi3mr_pcierr_slot_reset,\n6074:\t\t.resume = mpi3mr_pcierr_resume,\n"
} |
| 13/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 20629 output: 45 thoughts: 483 Thoughts: **Analyzing the Broadcom SAS Adapter Emulation in QEMU** Okay, let's break this down. First, I'm seeing the vendor and device IDs: `MPI3_MFGPAGE_VENDORID_BROADCOM` (0x1000 - LSI/Broadcom) paired with `MPI3_MFGPAGE_DEVID_SAS4116`, `MPI3_MFGPAGE_DEVID_SAS5116_MPI`, and `MPI3_MFGPAGE_DEVID_SAS5116_MPI_MGMT`. This looks like a Broadcom SAS controller, specifically a SAS4116 or SAS5116 variant. The immediate question is whether QEMU has any emulation support for this specific hardware. A quick recall of the standard QEMU SCSI/SAS emulations confirms that it does *not*. We've got `lsi53c895a`, `lsi53c810`, `mptsas1068`, `megasas`, `megasas-gen2`, `virtio-scsi-pci`, `am53c974`, and `esp`, but nothing that resembles this Broadcom MPI3 series. So, definitively, standard QEMU doesn't emulate the SAS4116 or SAS5116. However, I need to be completely sure. Before I dismiss this, I should confirm there isn't some obscure virtual or emulated device handling `mpi3mr`. Now, let's pivot to the fuzzing criteria. Given my expertise, I remember the negative criteria: "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." And *bingo*! This specific hardware fits the criteria. Broadcom SAS controllers, especially these more modern MPI3 ones, are highly likely to be considered structurally unreachable within a standard QEMU setup. But hold on, the best way to determine this is to check where `mpi3mr_sas_port_add` is called. Let me now delve into `drivers/scsi/mpi3mr/mpi3mr_transport.c` around line 1501 to understand its context. |
| 14/2 | 2026/09/19 16:52 | tool | read-file |
0mArgs:{
"File": "drivers/scsi/mpi3mr/mpi3mr_transport.c",
"FirstLine": 1465,
"LineCount": 50
}Results: {
"Contents": "1465:\t\t\t __FILE__, __LINE__, __func__);\n1466:\t\t}\n1467:\t\tif (mr_sas_port-\u003eremote_identify.device_type == SAS_END_DEVICE) {\n1468:\t\t\ttgtdev-\u003edev_spec.sas_sata_inf.pend_sas_rphy_add = 0;\n1469:\t\t\ttgtdev-\u003edev_spec.sas_sata_inf.sas_transport_attached = 1;\n1470:\t\t\tmpi3mr_tgtdev_put(tgtdev);\n1471:\t\t}\n1472:\t\n1473:\t\tdev_info(\u0026rphy-\u003edev,\n1474:\t\t \"%s: added: handle(0x%04x), sas_address(0x%016llx)\\n\",\n1475:\t\t __func__, handle, (unsigned long long)\n1476:\t\t mr_sas_port-\u003eremote_identify.sas_address);\n1477:\t\n1478:\t\tmr_sas_port-\u003erphy = rphy;\n1479:\t\tspin_lock_irqsave(\u0026mrioc-\u003esas_node_lock, flags);\n1480:\t\tlist_add_tail(\u0026mr_sas_port-\u003eport_list, \u0026mr_sas_node-\u003esas_port_list);\n1481:\t\tspin_unlock_irqrestore(\u0026mrioc-\u003esas_node_lock, flags);\n1482:\t\n1483:\t\tif (mrioc-\u003ecurrent_event) {\n1484:\t\t\tmrioc-\u003ecurrent_event-\u003epending_at_sml = 0;\n1485:\t\t\tif (mrioc-\u003ecurrent_event-\u003ediscard)\n1486:\t\t\t\tmpi3mr_print_device_event_notice(mrioc, true);\n1487:\t\t}\n1488:\t\n1489:\t\t/* fill in report manufacture */\n1490:\t\tif (mr_sas_port-\u003eremote_identify.device_type ==\n1491:\t\t SAS_EDGE_EXPANDER_DEVICE ||\n1492:\t\t mr_sas_port-\u003eremote_identify.device_type ==\n1493:\t\t SAS_FANOUT_EXPANDER_DEVICE)\n1494:\t\t\tmpi3mr_report_manufacture(mrioc,\n1495:\t\t\t mr_sas_port-\u003eremote_identify.sas_address,\n1496:\t\t\t rphy_to_expander_device(rphy), hba_port-\u003eport_id);\n1497:\t\n1498:\t\treturn mr_sas_port;\n1499:\t\n1500:\t out_fail:\n1501:\t\tlist_for_each_entry_safe(mr_sas_phy, next, \u0026mr_sas_port-\u003ephy_list,\n1502:\t\t port_siblings)\n1503:\t\t\tlist_del(\u0026mr_sas_phy-\u003eport_siblings);\n1504:\t\tif (tgtdev)\n1505:\t\t\tmpi3mr_tgtdev_put(tgtdev);\n1506:\t\tkfree(mr_sas_port);\n1507:\t\treturn NULL;\n1508:\t}\n1509:\t\n1510:\t/**\n1511:\t * mpi3mr_sas_port_remove - remove port from the list\n1512:\t * @mrioc: Adapter instance reference\n1513:\t * @sas_address: SAS address of attached device\n1514:\t * @sas_address_parent: SAS address of parent expander or host\n"
} |
| 15/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 22590 output: 45 thoughts: 34 Thoughts: Okay, here's my understanding, expressed as a first-person summary, keeping in mind I'm an expert in this field: **Diving into `mpi3mr_sas_port_add`** Alright, I need to get a handle on `mpi3mr_sas_port_add`. I know this function intimately, but I want to refresh my memory on how it's actually *called* and, specifically, how the `tgtdev` variable is utilized within its context. Understanding the calling context is crucial to grasping the overall flow and purpose of this function in the larger system. Time to trace this through and see what I find. |
| 16/2 | 2026/09/19 16:52 | tool | read-file |
0mArgs:{
"File": "drivers/scsi/mpi3mr/mpi3mr_transport.c",
"FirstLine": 1410,
"LineCount": 60
}Results: {
"Contents": "1410:\t\n1411:\t\tif (mr_sas_port-\u003eremote_identify.device_type == SAS_END_DEVICE) {\n1412:\t\t\ttgtdev = mpi3mr_get_tgtdev_by_addr(mrioc,\n1413:\t\t\t mr_sas_port-\u003eremote_identify.sas_address,\n1414:\t\t\t mr_sas_port-\u003ehba_port);\n1415:\t\n1416:\t\t\tif (!tgtdev) {\n1417:\t\t\t\tioc_err(mrioc, \"failure at %s:%d/%s()!\\n\",\n1418:\t\t\t\t __FILE__, __LINE__, __func__);\n1419:\t\t\t\tgoto out_fail;\n1420:\t\t\t}\n1421:\t\t\ttgtdev-\u003edev_spec.sas_sata_inf.pend_sas_rphy_add = 1;\n1422:\t\t}\n1423:\t\n1424:\t\tif (!mr_sas_node-\u003eparent_dev) {\n1425:\t\t\tioc_err(mrioc, \"failure at %s:%d/%s()!\\n\",\n1426:\t\t\t __FILE__, __LINE__, __func__);\n1427:\t\t\tgoto out_fail;\n1428:\t\t}\n1429:\t\n1430:\t\tport = sas_port_alloc_num(mr_sas_node-\u003eparent_dev);\n1431:\t\tif ((sas_port_add(port))) {\n1432:\t\t\tioc_err(mrioc, \"failure at %s:%d/%s()!\\n\",\n1433:\t\t\t __FILE__, __LINE__, __func__);\n1434:\t\t\tgoto out_fail;\n1435:\t\t}\n1436:\t\n1437:\t\tlist_for_each_entry(mr_sas_phy, \u0026mr_sas_port-\u003ephy_list,\n1438:\t\t port_siblings) {\n1439:\t\t\tif ((mrioc-\u003elogging_level \u0026 MPI3_DEBUG_TRANSPORT_INFO))\n1440:\t\t\t\tdev_info(\u0026port-\u003edev,\n1441:\t\t\t\t \"add: handle(0x%04x), sas_address(0x%016llx), phy(%d)\\n\",\n1442:\t\t\t\t handle, (unsigned long long)\n1443:\t\t\t\t mr_sas_port-\u003eremote_identify.sas_address,\n1444:\t\t\t\t mr_sas_phy-\u003ephy_id);\n1445:\t\t\tsas_port_add_phy(port, mr_sas_phy-\u003ephy);\n1446:\t\t\tmr_sas_phy-\u003ephy_belongs_to_port = 1;\n1447:\t\t\tmr_sas_phy-\u003ehba_port = hba_port;\n1448:\t\t}\n1449:\t\n1450:\t\tmr_sas_port-\u003eport = port;\n1451:\t\tif (mr_sas_port-\u003eremote_identify.device_type == SAS_END_DEVICE) {\n1452:\t\t\trphy = sas_end_device_alloc(port);\n1453:\t\t\ttgtdev-\u003edev_spec.sas_sata_inf.rphy = rphy;\n1454:\t\t} else {\n1455:\t\t\trphy = sas_expander_alloc(port,\n1456:\t\t\t mr_sas_port-\u003eremote_identify.device_type);\n1457:\t\t}\n1458:\t\trphy-\u003eidentify = mr_sas_port-\u003eremote_identify;\n1459:\t\n1460:\t\tif (mrioc-\u003ecurrent_event)\n1461:\t\t\tmrioc-\u003ecurrent_event-\u003epending_at_sml = 1;\n1462:\t\n1463:\t\tif ((sas_rphy_add(rphy))) {\n1464:\t\t\tioc_err(mrioc, \"failure at %s:%d/%s()!\\n\",\n1465:\t\t\t __FILE__, __LINE__, __func__);\n1466:\t\t}\n1467:\t\tif (mr_sas_port-\u003eremote_identify.device_type == SAS_END_DEVICE) {\n1468:\t\t\ttgtdev-\u003edev_spec.sas_sata_inf.pend_sas_rphy_add = 0;\n1469:\t\t\ttgtdev-\u003edev_spec.sas_sata_inf.sas_transport_attached = 1;\n"
} |
| 17/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23932 output: 33 thoughts: 494 Thoughts: **Analyzing a Potential Kernel Memory Leak Fix** Okay, let's break this down. It seems there's a potential memory leak in `mpi3mr_get_tgtdev_by_addr`. The function takes a reference to `tgtdev`, and if either `sas_port_alloc_num` or `sas_port_add` fails, the code jumps to `out_fail` without releasing `tgtdev`. This patch is addressing that by adding `if (tgtdev) mpi3mr_tgtdev_put(tgtdev);` to the `out_fail` path. Makes sense. Preventing the leak. Now the critical question: is this code *reachable* for fuzzing? Specifically, can `drivers/scsi/mpi3mr` be initialized and executed in a standard QEMU environment, or Google Compute Engine, or syzkaller, without requiring actual, physical hardware? We need to determine if we can reach this code. Let's refer back to Section 2 of the prompt. We need to rule out the negative criteria, those situations where we should *not* fuzz. According to the document, we can't fuzz if the code is unreachable. So, let's examine the code. Let's start with `mpi3mr_probe` in `drivers/scsi/mpi3mr/mpi3mr_os.c`. This will tell us if it can be initialized without the Broadcom PCIe hardware. We can find the answers here. |
| 18/2 | 2026/09/19 16:52 | tool | grepper |
0mArgs:{
"Expression": "mpi3mr_probe",
"PathPrefix": "drivers/scsi/mpi3mr"
}Results: {
"Output": "drivers/scsi/mpi3mr/mpi3mr_os.c=5384=osintfc_mrioc_security_status(struct pci_dev *pdev)\n--\ndrivers/scsi/mpi3mr/mpi3mr_os.c-5443-/**\ndrivers/scsi/mpi3mr/mpi3mr_os.c:5444: * mpi3mr_probe - PCI probe callback\ndrivers/scsi/mpi3mr/mpi3mr_os.c-5445- * @pdev: PCI device instance\n--\ndrivers/scsi/mpi3mr/mpi3mr_os.c=5458=static int\ndrivers/scsi/mpi3mr/mpi3mr_os.c:5459:mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)\ndrivers/scsi/mpi3mr/mpi3mr_os.c-5460-{\n--\ndrivers/scsi/mpi3mr/mpi3mr_os.c=6079=static struct pci_driver mpi3mr_pci_driver = {\n--\ndrivers/scsi/mpi3mr/mpi3mr_os.c-6081-\t.id_table = mpi3mr_pci_id_table,\ndrivers/scsi/mpi3mr/mpi3mr_os.c:6082:\t.probe = mpi3mr_probe,\ndrivers/scsi/mpi3mr/mpi3mr_os.c-6083-\t.remove = mpi3mr_remove,\n"
} |
| 19/2 | 2026/09/19 16:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25174 output: 37 thoughts: 374 Thoughts: **My Assessment of the `mpi3mr` Driver** Okay, let's break down this `mpi3mr` driver. Right, it's a PCI driver – `struct pci_driver mpi3mr_pci_driver` specifically. My immediate thought is, "What hardware is this even for?" And, as expected, it's pretty targeted. It binds to those Broadcom SAS 4116 and 5116 series RAID/storage controller PCI devices. No surprises there. The next thing that comes to mind is, "Can I test this without actual hardware?" So, I look for software emulation. I mean, we're talking about PCIe controllers, so I’d love to emulate this through, say, USB gadget, virtio, loopback, netlink, or even vhost. However, the documentation tells me bluntly: *nope*. No software emulation. It *needs* that physical Broadcom MPI3 PCIe controller ASIC. This puts it squarely in the category of drivers for structurally unreachable hardware, like those vendor-specific PCIe switches, SmartNICs, or GPU drivers (mlxsw, qed, amdgpu, etc.). These always need physical PCIe cards and can't be spun up in QEMU. Then, the question comes to mind, is there any user-space interface that is accessible *before* the hardware probe? The driver registers itself with `pci_register_driver`. So, *that* tells me the probe is never called unless a matching PCI device is present. It’s pretty standard practice. The second thing that needs to be considered is that `mpi3mr_sas_port_add` seems to be an internal SAS transport layer function. My brain already deduces that it's called only when the driver is managing SAS devices attached to the controller. No surprise here. Okay, so I should be checking the callers of `mpi3mr_sas_port_add`, which means going through the code to see what can be gleaned there. |
| 20/2 | 2026/09/19 16:53 | tool | grepper |
0mArgs:{
"Expression": "mpi3mr_sas_port_add",
"PathPrefix": "drivers/scsi/mpi3mr"
}Results: {
"Output": "drivers/scsi/mpi3mr/mpi3mr_transport.c=1196=void mpi3mr_sas_host_add(struct mpi3mr_ioc *mrioc)\n--\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-1313-/**\ndrivers/scsi/mpi3mr/mpi3mr_transport.c:1314: * mpi3mr_sas_port_add - Expose the SAS device to the SAS TL\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-1315- * @mrioc: Adapter instance reference\n--\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-1326- */\ndrivers/scsi/mpi3mr/mpi3mr_transport.c:1327:static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-1328-\tu16 handle, u64 sas_address_parent, struct mpi3mr_hba_port *hba_port)\n--\ndrivers/scsi/mpi3mr/mpi3mr_transport.c=1990=int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16 handle)\n--\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-2127-\tINIT_LIST_HEAD(\u0026sas_expander-\u003esas_port_list);\ndrivers/scsi/mpi3mr/mpi3mr_transport.c:2128:\tmr_sas_port = mpi3mr_sas_port_add(mrioc, handle, sas_address_parent,\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-2129-\t sas_expander-\u003ehba_port);\n--\ndrivers/scsi/mpi3mr/mpi3mr_transport.c=2360=int mpi3mr_report_tgtdev_to_sas_transport(struct mpi3mr_ioc *mrioc,\n--\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-2406-\ttgtdev-\u003ehost_exposed = 1;\ndrivers/scsi/mpi3mr/mpi3mr_transport.c:2407:\tif (!mpi3mr_sas_port_add(mrioc, tgtdev-\u003edev_handle,\ndrivers/scsi/mpi3mr/mpi3mr_transport.c-2408-\t sas_address_parent, hba_port)) {\n"
} |
| 21/2 | 2026/09/19 16:53 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26664 output: 123 thoughts: 331 Thoughts: **My Assessment of `mpi3mr_sas_port_add` for Fuzzing** Okay, so `mpi3mr_sas_port_add` is only relevant when dealing with expander addition or reporting target devices to the SAS transport layer. This happens specifically when we're communicating with Broadcom MPI3 hardware. The crucial point here is that without the actual Broadcom MPI3 PCIe controller (like the SAS4116 or SAS5116), the driver probe never even gets a chance to run. Therefore, this piece of code is fundamentally unreachable in standard virtualization setups that are used for fuzzing, like QEMU or Google Compute Engine. Let's run through the checklist to be absolutely certain. * `WorthFuzzing`: Definitely `false`. * Reasoning: My rationale here is crystal clear: the hardware dependency makes this code completely untouchable in fuzzing environments. * `EnableConfigs`: Empty, or perhaps just include `SCSI_MPI3MR` if we really need to specify it, but the `WorthFuzzing` flag is false. * `FocusSymbols`: Nothing to focus on here, it's just not relevant. Now, let's confirm against the negative criteria: "Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories... - 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." It's a perfect match. The Broadcom MPI3 Storage Controller driver, located in `drivers/scsi/mpi3mr/`, is clearly dependent on the physical Broadcom PCIe hardware (SAS4116, SAS5116), which are impossible to emulate reliably in QEMU or GCE. Alright, let's mark this as a no-go for fuzzing and call the `set-results` tool to finalize this determination. |
| 22/2 | 2026/09/19 16:53 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"SCSI_MPI3MR"
],
"FocusSymbols": [],
"Reasoning": "The patch modifies error handling in mpi3mr_sas_port_add() within the Broadcom MPI3 Storage Controller driver (mpi3mr). This driver drives vendor-specific Broadcom SAS4116/SAS5116 PCIe controllers, which require physical ASIC hardware not emulated in standard virtualized environments (QEMU/GCE), making the code structurally unreachable for syzkaller.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": [
"SCSI_MPI3MR"
],
"FocusSymbols": [],
"Reasoning": "The patch modifies error handling in mpi3mr_sas_port_add() within the Broadcom MPI3 Storage Controller driver (mpi3mr). This driver drives vendor-specific Broadcom SAS4116/SAS5116 PCIe controllers, which require physical ASIC hardware not emulated in standard virtualized environments (QEMU/GCE), making the code structurally unreachable for syzkaller.",
"WorthFuzzing": false
} |
| 23/1 | 2026/09/19 16:53 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|