Skip to contentSkip to conversation

scsi: leapraid: Add new scsi driver

PATCH Superseded Dongdong Hao 1 participant 3 messages Jun 1

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Dongdong Hao

author maintainer
#0 lore raw

cover scsi: leapraid: Add new scsi driver

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           | 2071 +++++
 drivers/scsi/leapraid/leapraid_app.c       |  705 ++
 drivers/scsi/leapraid/leapraid_func.c      | 9053 ++++++++++++++++++++
 drivers/scsi/leapraid/leapraid_func.h      | 1566 ++++
 drivers/scsi/leapraid/leapraid_os.c        | 2516 ++++++
 drivers/scsi/leapraid/leapraid_transport.c | 1387 +++
 13 files changed, 17471 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
author maintainer
#1 lore raw

PATCH 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           | 2071 +++++
 drivers/scsi/leapraid/leapraid_app.c       |  705 ++
 drivers/scsi/leapraid/leapraid_func.c      | 9053 ++++++++++++++++++++
 drivers/scsi/leapraid/leapraid_func.h      | 1566 ++++
 drivers/scsi/leapraid/leapraid_os.c        | 2516 ++++++
 drivers/scsi/leapraid/leapraid_transport.c | 1387 +++
 11 files changed, 17331 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
index 2fb1c75afd16..da3ee829d5e2 100644
@@ -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
index c3042393af23..4a2af0f702e1 100644
@@ -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
index 842c254bb226..098f35219e7d 100644
@@ -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
new file mode 100644
index 000000000000..f4ece78f80d3
@@ -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
new file mode 100644
index 000000000000..bdafc036cd00
@@ -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 +2071 -0

2,071 lines not on this page · raw message

drivers/scsi/leapraid/leapraid_app.c new file +705 -0

705 lines not on this page · raw message

drivers/scsi/leapraid/leapraid_func.c new file +9053 -0

173 lines not on this page · raw message

drivers/scsi/leapraid/leapraid_func.h new file +1566 -0

1,566 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.

author maintainer
#2 lore raw

PATCH 2/2 scsi: leapraid: Add driver documentation

In reply to Dongdong Hao

This 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
index f15a0f348ae4..52970f0159ca 100644
@@ -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