Skip to content

Commit f93b61c

Browse files
hufangchen123opsiff
authored andcommitted
SCSI: hisi_raid: support SPxxx serial RAID/HBA controllers
Supported devices ================= =================== ======= ======================================= PCI ID (pci.ids) OEM Product =================== ======= ======================================= 19E5:3858 HUAWEI SP186-M-8i(HBA:8Ports) 19E5:3858 HUAWEI SP186-M-16i(HBA:16Ports) 19E5:3858 HUAWEI SP186-M-32i(HBA:32Ports) 19E5:3858 HUAWEI SP186-M-40i(HBA:40Ports) 19E5:3758 HUAWEI SP686C-M-16i(RAID:16Ports,2G cache) 19E5:3758 HUAWEI SP686C-M-16i(RAID:16Ports,4G cache) 19E5:3758 HUAWEI SP686C-MH-32i(RAID:32Ports,4G cache) 19E5:3758 HUAWEI SP686C-M-40i(RAID:40Ports,2G cache) 19E5:3758 HUAWEI SP686C-M-40i(RAID:40Ports,4G cache) =================== ======= ======================================= Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/373 Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/380 Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/387 [ Ming Wang: Convert files to Unix line endings. ] Co-developed-by: Ming Wang <wangming01@loongson.cn> Signed-off-by: Ming Wang <wangming01@loongson.cn> Signed-off-by: hufangchen <hufangchen@huawei.com> [ WangYuli: Add commit message and support COMPILE_TEST. ] Co-developed-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: WangYuli <wangyuli@uniontech.com>
1 parent ac2e425 commit f93b61c

8 files changed

Lines changed: 4910 additions & 0 deletions

File tree

Documentation/scsi/hisi_raid.rst

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
==============================================
4+
hisi_raid - HUAWEI SCSI RAID Controller driver
5+
==============================================
6+
7+
This file describes the hisi_raid SCSI driver for HUAWEI
8+
RAID controllers. The hisi_raid driver is the first
9+
generation RAID driver.
10+
11+
For hisi_raid controller support, enable the hisi_raid driver
12+
when configuring the kernel.
13+
14+
hisi_raid specific entries in /sys
15+
=================================
16+
17+
hisi_raid host attributes
18+
------------------------
19+
- /sys/class/scsi_host/host*/csts_pp
20+
- /sys/class/scsi_host/host*/csts_shst
21+
- /sys/class/scsi_host/host*/csts_cfs
22+
- /sys/class/scsi_host/host*/csts_rdy
23+
- /sys/class/scsi_host/host*/fw_version
24+
25+
The host csts_pp attribute is a read only attribute. This attribute
26+
indicates whether the controller is processing commands. If this attribute
27+
is set to ‘1’, then the controller is processing commands normally. If
28+
this attribute is cleared to ‘0’, then the controller has temporarily stopped
29+
processing commands in order to handle an event (e.g., firmware activation).
30+
31+
The host csts_shst attribute is a read only attribute. This attribute
32+
indicates status of shutdown processing.The shutdown status values are defined
33+
as:
34+
====== ==============================
35+
Value Definition
36+
====== ==============================
37+
00b Normal operation
38+
01b Shutdown processing occurring
39+
10b Shutdown processing complete
40+
11b Reserved
41+
====== ==============================
42+
The host csts_cfs attribute is a read only attribute. This attribute is set to
43+
’1’ when a fatal controller error occurred that could not be communicated in the
44+
appropriate Completion Queue. This bit is cleared to ‘0’ when a fatal controller
45+
error has not occurred.
46+
47+
The host csts_rdy attribute is a read only attribute. This attribute is set to
48+
‘1’ when the controller is ready to process submission queue entries.
49+
50+
The fw_version attribute is read-only and will return the driver version and the
51+
controller firmware version.
52+
53+
hisi_raid scsi device attributes
54+
------------------------------
55+
- /sys/class/scsi_device/X\:X\:X\:X/device/raid_level
56+
- /sys/class/scsi_device/X\:X\:X\:X/device/raid_state
57+
- /sys/class/scsi_device/X\:X\:X\:X/device/raid_resync
58+
59+
The device raid_level attribute is a read only attribute. This attribute indicates
60+
RAID level of scsi device(will dispaly "NA" if scsi device is not virtual disk type).
61+
62+
The device raid_state attribute is read-only and indicates RAID status of scsi
63+
device(will dispaly "NA" if scsi device is not virtual disk type).
64+
65+
The device raid_resync attribute is read-only and indicates RAID rebuild processing
66+
of scsi device(will dispaly "NA" if scsi device is not virtual disk type).
67+
68+
Supported devices
69+
=================
70+
71+
=================== ======= =======================================
72+
PCI ID (pci.ids) OEM Product
73+
=================== ======= =======================================
74+
19E5:3858 HUAWEI SP186-M-8i(HBA:8Ports)
75+
19E5:3858 HUAWEI SP186-M-16i(HBA:16Ports)
76+
19E5:3858 HUAWEI SP186-M-32i(HBA:32Ports)
77+
19E5:3858 HUAWEI SP186-M-40i(HBA:40Ports)
78+
19E5:3758 HUAWEI SP686C-M-16i(RAID:16Ports,2G cache)
79+
19E5:3758 HUAWEI SP686C-M-16i(RAID:16Ports,4G cache)
80+
19E5:3758 HUAWEI SP686C-MH-32i(RAID:32Ports,4G cache)
81+
19E5:3758 HUAWEI SP686C-M-40i(RAID:40Ports,2G cache)
82+
19E5:3758 HUAWEI SP686C-M-40i(RAID:40Ports,4G cache)
83+
=================== ======= =======================================

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9559,6 +9559,13 @@ S: Maintained
95599559
F: Documentation/ABI/testing/debugfs-hisi-zip
95609560
F: drivers/crypto/hisilicon/zip/
95619561

9562+
HISI_RAID SCSI RAID DRIVERS
9563+
M: Fangchen Hu <hufangchen@huawei.com>
9564+
L: kernel@openeuler.org
9565+
S: Maintained
9566+
F: Documentation/scsi/hisi_raid.rst
9567+
F: drivers/scsi/hisi_raid/
9568+
95629569
HMM - Heterogeneous Memory Management
95639570
M: Jérôme Glisse <jglisse@redhat.com>
95649571
L: linux-mm@kvack.org

drivers/scsi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ source "drivers/scsi/mpt3sas/Kconfig"
491491
source "drivers/scsi/mpi3mr/Kconfig"
492492
source "drivers/scsi/leapioraid/Kconfig"
493493
source "drivers/scsi/smartpqi/Kconfig"
494+
source "drivers/scsi/hisi_raid/Kconfig"
494495

495496
config SCSI_HPTIOP
496497
tristate "HighPoint RocketRAID 3xxx/4xxx Controller support"

drivers/scsi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ obj-$(CONFIG_MEGARAID_LEGACY) += megaraid.o
9999
obj-$(CONFIG_MEGARAID_NEWGEN) += megaraid/
100100
obj-$(CONFIG_MEGARAID_SAS) += megaraid/
101101
obj-$(CONFIG_SCSI_MPT3SAS) += mpt3sas/
102+
obj-$(CONFIG_SCSI_HISI_RAID) += hisi_raid/
102103
obj-$(CONFIG_SCSI_MPI3MR) += mpi3mr/
103104
obj-$(CONFIG_SCSI_LEAPIORAID) += leapioraid/
104105
obj-$(CONFIG_SCSI_ACARD) += atp870u.o

drivers/scsi/hisi_raid/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Kernel configuration file for the hisi_raid
3+
#
4+
5+
config SCSI_HISI_RAID
6+
tristate "Huawei Hisi_Raid Adapter"
7+
depends on PCI && SCSI
8+
select BLK_DEV_BSGLIB
9+
depends on ARM64 || X86_64 || COMPILE_TEST
10+
help
11+
This driver supports hisi_raid SPxx serial RAID controller, which has
12+
PCI Express Gen4 interface with host and supports SAS/SATA HDD/SSD.
13+
To compile this driver as a module, choose M here: the module will
14+
be called hisi_raid.

drivers/scsi/hisi_raid/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Makefile for the hisi_raid drivers.
3+
#
4+
5+
obj-$(CONFIG_SCSI_HISI_RAID) += hiraid.o
6+
7+
hiraid-objs := hiraid_main.o

0 commit comments

Comments
 (0)