[PATCH v5 0/2] scsi: Add LeapRAID driver support

Dongdong Hao <[email protected]> Tue, 4 Aug 2026 15:02:24 +0800
Newsgroups gmane.linux.scsi
Message-ID <[email protected]>
This series adds the LeapRAID driver and its documentation.

This version addresses issues reported by Sashiko and the kernel test
robot, as well as issues identified through internal testing. Because
[PATCH v4 1/2] exceeded the line-count limit of the public Sashiko
service, it was not analyzed. We therefore deployed Sashiko locally
with an increased line-count limit to complete the analysis and have
fixed all identified issues.

Changes in v5:

[PATCH v5 1/2] scsi: leapraid: Add new SCSI driver
- Fix /dev/leapraid_ctl adapter lifetime races during concurrent probe
  and removal.
- Fix firmware log mmap teardown by tracking active VMAs.
- Fix passthrough data_sge_offset validation to prevent overwrites.
- Validate asynchronous firmware event lengths to prevent out-of-bounds
  accesses.
- Fix SMP passthrough payload validation to prevent size_t underflow.
- Fix teardown races among event queuing, host removal, and IRQ handling.
- Fix MSI-X CPU mapping for sparse CPU IDs by using nr_cpu_ids.
- Make host-memory cleanup idempotent to prevent double cleanup.
- Initialize the internal SCSI command mutex earlier to ensure safe
  error-path cleanup.
- Fix Clang -Wunaligned-access warnings for packed SGE structures and
  related cases.
- Add the missing unwind path in leapraid_request_host_memory() and fix
  related error-path issues.
- Prevent nested hard resets during asynchronous recovery to avoid
  deadlocks.
- Remove periodic timestamp synchronization.

[PATCH v5 2/2] scsi: leapraid: Add documentation
- Document the actual enable_mp module parameter instead of enable_mpio.
- Drop SMART polling, which remains available only in the vendor driver.
- Remove the custom sas_address sysfs attribute, as it is provided by the
  SAS transport class.
- Drop the user-selectable interrupt_mode and msix_disable parameters.
- Rename the NCQ parameter to ncq_cmd_prio_enable for clarity.

Review tags collected
=====================

  1/2  Reviewed-by: Damien Le Moal [email protected]  (given on v2)
       Reviewed-by: Hannes Reinecke [email protected]    (given on v5)      
  2/2  Reviewed-by: Damien Le Moal [email protected]  (given on v2)
       Reviewed-by: Hannes Reinecke [email protected]    (given on v5)

Dongdong Hao (2):
  scsi: leapraid: Add new SCSI driver
  scsi: leapraid: Add driver documentation

 Documentation/scsi/index.rst               |    1 +
 Documentation/scsi/leapraid.rst            |  110 +
 MAINTAINERS                                |    7 +
 drivers/scsi/Kconfig                       |    1 +
 drivers/scsi/Makefile                      |    1 +
 drivers/scsi/leapraid/Kconfig              |   14 +
 drivers/scsi/leapraid/Makefile             |   10 +
 drivers/scsi/leapraid/leapraid.h           | 2048 +++++
 drivers/scsi/leapraid/leapraid_app.c       |  803 ++
 drivers/scsi/leapraid/leapraid_func.c      | 8626 ++++++++++++++++++++
 drivers/scsi/leapraid/leapraid_func.h      | 1486 ++++
 drivers/scsi/leapraid/leapraid_os.c        | 2468 ++++++
 drivers/scsi/leapraid/leapraid_transport.c | 1403 ++++
 13 files changed, 16978 insertions(+)
 create mode 100644 Documentation/scsi/leapraid.rst
 create mode 100644 drivers/scsi/leapraid/Kconfig
 create mode 100644 drivers/scsi/leapraid/Makefile
 create mode 100644 drivers/scsi/leapraid/leapraid.h
 create mode 100644 drivers/scsi/leapraid/leapraid_app.c
 create mode 100644 drivers/scsi/leapraid/leapraid_func.c
 create mode 100644 drivers/scsi/leapraid/leapraid_func.h
 create mode 100644 drivers/scsi/leapraid/leapraid_os.c
 create mode 100644 drivers/scsi/leapraid/leapraid_transport.c

-- 
2.25.1