scsi: Add LeapRAID driver support
Subsystems (3)
Dongdong Hao
maintainerv3 cover scsi: Add LeapRAID driver support
This series adds the LeapRAID driver and its documentation.
Changes in v3:
- Simplify bool return, drop redundant assignment and noisy logs
- Fix byte alignment issues for fw_event mask and pd_hdls on ARM64
- Added Reviewed-by tags from Damien for both patches.
Dongdong Hao (2):
scsi: leapraid: Add new SCSI driver
scsi: leapraid: Add driver documentation
Documentation/scsi/index.rst | 1 + Documentation/scsi/leapraid.rst | 139 + 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 | 2050 +++++ drivers/scsi/leapraid/leapraid_app.c | 699 ++ drivers/scsi/leapraid/leapraid_func.c | 8980 ++++++++++++++++++++ drivers/scsi/leapraid/leapraid_func.h | 1558 ++++ drivers/scsi/leapraid/leapraid_os.c | 2516 ++++++ drivers/scsi/leapraid/leapraid_transport.c | 1387 +++ 13 files changed, 17363 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
Signature · 1 line
2.25.1
Dongdong Hao
maintainerPATCH v3 1/2 scsi: leapraid: Add new SCSI driver
The LeapRAID driver provides support for LeapRAID PCIe RAID controllers, enabling communication between the host operating system, firmware, and hardware for efficient storage management.
The driver is organized into several logical modules, each with a clear responsibility:
leapraid_os.c: Integrates with the Linux SCSI subsystem, handling host template callbacks, PCIe device probing, and initialization.
leapraid_func.c: Contains low-level routines for firmware/hardware interaction, interrupt handling, and reset logic.
leapraid_app.c: Provides the ioctl interface for user-space tools.
leapraid_transport.c: Manages interactions with the SCSI transport layer for SAS PHYs and ports.
leapraid_func.h: Contains internal definitions shared among driver modules.
leapraid.h: Contains low-level hardware definitions for driver/firmware interaction.
The leapraid_probe() function orchestrates the setup: it allocates the adapter structure and SCSI host, configures hardware interfaces, and registers it with the SCSI mid-layer. Following registration, scsi_scan_host() is invoked to initiate device discovery, with firmware reporting devices via interrupt-driven events.
This initial commit provides the necessary infrastructure for subsequent development of full I/O path handling, error recovery, and advanced management features.
--- 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 | 2050 +++++ drivers/scsi/leapraid/leapraid_app.c | 699 ++ drivers/scsi/leapraid/leapraid_func.c | 8980 ++++++++++++++++++++ drivers/scsi/leapraid/leapraid_func.h | 1558 ++++ drivers/scsi/leapraid/leapraid_os.c | 2516 ++++++ drivers/scsi/leapraid/leapraid_transport.c | 1387 +++ 11 files changed, 17223 insertions(+) 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
MAINTAINERS +7 -0
@@ -14507,6 +14507,13 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening F: scripts/leaking_addresses.pl +LEAPIO SCSI RAID DRIVER +M: Dongdong Hao <[email protected]> +L: [email protected] +S: Supported +F: Documentation/scsi/leapraid.rst +F: drivers/scsi/leapraid/ + LED SUBSYSTEM M: Lee Jones <[email protected]> M: Pavel Machek <[email protected]>
drivers/scsi/Kconfig +1 -0
@@ -499,6 +499,7 @@ source "drivers/scsi/esas2r/Kconfig" source "drivers/scsi/megaraid/Kconfig.megaraid" source "drivers/scsi/mpt3sas/Kconfig" source "drivers/scsi/mpi3mr/Kconfig" +source "drivers/scsi/leapraid/Kconfig" source "drivers/scsi/smartpqi/Kconfig" config SCSI_HPTIOP
drivers/scsi/Makefile +1 -0
@@ -91,6 +91,7 @@ obj-$(CONFIG_SCSI_BFA_FC) += bfa/ obj-$(CONFIG_SCSI_CHELSIO_FCOE) += csiostor/ obj-$(CONFIG_SCSI_DMX3191D) += dmx3191d.o obj-$(CONFIG_SCSI_HPSA) += hpsa.o +obj-$(CONFIG_SCSI_LEAPRAID) += leapraid/ obj-$(CONFIG_SCSI_SMARTPQI) += smartpqi/ obj-$(CONFIG_SCSI_SYM53C8XX_2) += sym53c8xx_2/ obj-$(CONFIG_SCSI_ZALON) += zalon7xx.o
drivers/scsi/leapraid/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +config SCSI_LEAPRAID + tristate "LeapIO RAID Adapter" + depends on PCI && SCSI + select SCSI_SAS_ATTRS + help + This driver supports LeapIO PCIe-based storage + and RAID controllers. + + <http://www.leap-io.com> + + To compile this driver as a module, choose M here: the + resulting kernel module will be named leapraid.
drivers/scsi/leapraid/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for the LEAPRAID drivers. +# + +obj-$(CONFIG_SCSI_LEAPRAID) += leapraid.o +leapraid-objs += leapraid_func.o \ + leapraid_os.o \ + leapraid_transport.o \ + leapraid_app.o
drivers/scsi/leapraid/leapraid.h new file +2050 -0
2,050 lines not on this page · raw message
drivers/scsi/leapraid/leapraid_app.c new file +699 -0
699 lines not on this page · raw message
drivers/scsi/leapraid/leapraid_func.c new file +8980 -0
200 lines not on this page · raw message
drivers/scsi/leapraid/leapraid_func.h new file +1558 -0
1,558 lines not on this page · raw message
drivers/scsi/leapraid/leapraid_os.c new file +2516 -0
2,516 lines not on this page · raw message
drivers/scsi/leapraid/leapraid_transport.c new file +1387 -0
1,387 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
Dongdong Hao
maintainerPATCH v3 2/2 scsi: leapraid: Add driver documentation
In reply to Dongdong HaoThis patch adds the necessary documentation for the LeapRAID SCSI driver to the kernel's documentation tree.
--- Documentation/scsi/index.rst | 1 + Documentation/scsi/leapraid.rst | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 Documentation/scsi/leapraid.rst
Documentation/scsi/index.rst +1 -0
@@ -56,6 +56,7 @@ SCSI host adapter drivers g_NCR5380 hpsa hptiop + leapraid libsas lpfc megaraid
Documentation/scsi/leapraid.rst new file +139 -0
139 lines not on this page · raw message
Signature · 1 line
2.25.1
[email protected]
AI reviewRe: [PATCH v3 2/2] scsi: leapraid: Add driver documentation
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The documentation incorrectly names the module parameter for multipath support as `enable_mpio`…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The documentation incorrectly names the module parameter for multipath support as enable_mpio instead of enable_mp. --
commit 958c37a9e9c4054d4110e1b080f8c3be25877cb6
Author: Dongdong Hao <[email protected]>
scsi: leapraid: Add driver documentation
This patch adds the necessary documentation for the LeapRAID SCSI driver to the kernel's documentation tree.
Quoted 5 lines
Documentation/scsi/leapraid.rst new file +0
-0
[ ... ]
Documentation/scsi/leapraid.rst
Quoted 4 lines
+2.
enable_mpio
+--------------Documentation/scsi/leapraid.rst new file +2
-0+ +This parameter enables or disables multipath support for target devices.
[Severity: Medium]
Should this module parameter be documented as enable_mp instead of enable_mpio?
If users attempt to configure multipath support using enable_mpio via the kernel command line or modprobe config, they will encounter unknown parameter errors.
Quoted 5 lines
Documentation/scsi/leapraid.rst new file +5
-0+When set to 1, multipath functionality is enabled (default), allowing +multiple paths to be established. Setting it to 0 disables multipath +handling. + +3. msix_disable
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2