提交 6315e6fc 编写于 作者: S Steven Song

SCSI: SSSRAID: Support 3SNIC 3S5XX serial RAID/HBA controllers

3snic inclusion
category: feature
feature: sssraid
bugzilla: https://gitee.com/openeuler/kernel/issues/I64M90
CVE: NA

------------------------------------------

This commit is to support 3SNIC 3S5XX RAID/HBA controllers.
RAID controllers support RAID 0/1/5/6/10/50/60 modes;
HBA controlllers support RAID 0/1/10 modes.
RAID/HBA support SAS/SATA HDD/SSD.
Signed-off-by: Nliangry <liangry1@3snic.com>
Reviewed-by: Jiang Yu<yujiang@3snic.com>
Reviewed-by: NSteven Song <steven.song@3snic.com>
Signed-off-by: NSteven Song <steven.song@3snic.com>
上级 f5784b3d
.. SPDX-License-Identifier: GPL-2.0
==============================================
SSSRAID - 3SNIC SCSI RAID Controller driver
==============================================
This file describes the SSSRAID SCSI driver for 3SNIC
(http://www.3snic.com) RAID controllers. The SSSRAID
driver is the first generation RAID driver for 3SNIC Corp.
For 3SNIC SSSRAID controller support, enable the SSSRAID driver
when configuring the kernel.
SSSRAID specific entries in /sys
=================================
SSSRAID host attributes
------------------------
- /sys/class/scsi_host/host*/csts_pp
- /sys/class/scsi_host/host*/csts_shst
- /sys/class/scsi_host/host*/csts_cfs
- /sys/class/scsi_host/host*/csts_rdy
- /sys/class/scsi_host/host*/fw_version
The host csts_pp attribute is a read only attribute. This attribute
indicates whether the controller is processing commands. If this attribute
is set to ‘1’, then the controller is processing commands normally. If
this attribute is cleared to ‘0’, then the controller has temporarily stopped
processing commands in order to handle an event (e.g., firmware activation).
The host csts_shst attribute is a read only attribute. This attribute
indicates status of shutdown processing.The shutdown status values are defined
as:
====== ==============================
Value Definition
====== ==============================
00b Normal operation
01b Shutdown processing occurring
10b Shutdown processing complete
11b Reserved
====== ==============================
The host csts_cfs attribute is a read only attribute. This attribute is set to
’1’ when a fatal controller error occurred that could not be communicated in the
appropriate Completion Queue. This bit is cleared to ‘0’ when a fatal controller
error has not occurred.
The host csts_rdy attribute is a read only attribute. This attribute is set to
‘1’ when the controller is ready to process submission queue entries.
The fw_version attribute is read-only and will return the driver version and the
controller firmware version.
SSSRAID scsi device attributes
------------------------------
- /sys/class/scsi_device/X\:X\:X\:X/device/raid_level
- /sys/class/scsi_device/X\:X\:X\:X/device/raid_state
- /sys/class/scsi_device/X\:X\:X\:X/device/raid_resync
The device raid_level attribute is a read only attribute. This attribute indicates
RAID level of scsi device(will dispaly "NA" if scsi device is not virtual disk type).
The device raid_state attribute is read-only and indicates RAID status of scsi
device(will dispaly "NA" if scsi device is not virtual disk type).
The device raid_resync attribute is read-only and indicates RAID rebuild processing
of scsi device(will dispaly "NA" if scsi device is not virtual disk type).
Supported devices
=================
=================== ======= =======================================
PCI ID (pci.ids) OEM Product
=================== ======= =======================================
1F3F:2100 3SNIC 3S510(HBA:8Ports,1G DDR)
1F3F:2100 3SNIC 3S520(HBA:16Ports,1G DDR)
1F3F:2100 3SNIC 3S530(HBA:32Ports,1G DDR)
1F3F:2100 3SNIC 3S540(HBA:40Ports,1G DDR)
1F3F:2200 3SNIC 3S580(RAID:16Ports,2G cache)
1F3F:2200 3SNIC 3S585(RAID:16Ports,4G cache)
1F3F:2200 3SNIC 3S590(RAID:32Ports,4G cache)
1F3F:2200 3SNIC 3S5A0(RAID:40Ports,2G cache)
1F3F:2200 3SNIC 3S5A5(RAID:40Ports,4G cache)
=================== ======= =======================================
......@@ -16669,6 +16669,13 @@ M: Jan-Benedict Glaw <jbglaw@lug-owl.de>
S: Maintained
F: arch/alpha/kernel/srm_env.c
SSSRAID SCSI/Raid DRIVERS
M: Steven Song <steven.song@3snic.com>
L: linux-scsi@vger.kernel.org
S: Maintained
F: Documentation/scsi/sssraid.rst
F: drivers/scsi/sssraid/
ST LSM6DSx IMU IIO DRIVER
M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
L: linux-iio@vger.kernel.org
......
......@@ -2394,6 +2394,7 @@ CONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE=y
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
CONFIG_MEGARAID_SAS=m
CONFIG_SCSI_3SNIC_SSSRAID=m
CONFIG_SCSI_MPT3SAS=m
CONFIG_SCSI_MPT2SAS_MAX_SGE=128
CONFIG_SCSI_MPT3SAS_MAX_SGE=128
......
......@@ -2355,6 +2355,7 @@ CONFIG_SCSI_AACRAID=m
# CONFIG_MEGARAID_LEGACY is not set
CONFIG_MEGARAID_SAS=m
CONFIG_SCSI_MPT3SAS=m
CONFIG_SCSI_3SNIC_SSSRAID=m
CONFIG_SCSI_MPT2SAS_MAX_SGE=128
CONFIG_SCSI_MPT3SAS_MAX_SGE=128
CONFIG_SCSI_MPT2SAS=m
......
......@@ -481,6 +481,7 @@ config SCSI_ARCMSR
source "drivers/scsi/esas2r/Kconfig"
source "drivers/scsi/megaraid/Kconfig.megaraid"
source "drivers/scsi/sssraid/Kconfig"
source "drivers/scsi/mpt3sas/Kconfig"
source "drivers/scsi/smartpqi/Kconfig"
source "drivers/scsi/ufs/Kconfig"
......
......@@ -92,6 +92,7 @@ obj-$(CONFIG_SCSI_CHELSIO_FCOE) += csiostor/
obj-$(CONFIG_SCSI_DMX3191D) += dmx3191d.o
obj-$(CONFIG_SCSI_HPSA) += hpsa.o
obj-$(CONFIG_SCSI_SMARTPQI) += smartpqi/
obj-$(CONFIG_SCSI_3SNIC_SSSRAID) += sssraid/
obj-$(CONFIG_SCSI_SYM53C8XX_2) += sym53c8xx_2/
obj-$(CONFIG_SCSI_ZALON) += zalon7xx.o
obj-$(CONFIG_SCSI_DC395x) += dc395x.o
......
#
# Kernel configuration file for the 3SNIC
#
config SCSI_3SNIC_SSSRAID
tristate "3SNIC sssraid Adapter"
depends on PCI && SCSI
select BLK_DEV_BSGLIB
depends on ARM64 || X86_64
help
This driver supports 3SNIC 3S5xx serial RAID controller, which has
PCI Express Gen4 interface with host and supports SAS/SATA HDD/SSD.
To compile this driver as a module, choose M here: the module will
be called sssraid.
#
# Makefile for the 3SNIC sssraid drivers.
#
obj-$(CONFIG_SCSI_3SNIC_SSSRAID) += sssraid.o
sssraid-objs := sssraid_os.o sssraid_fw.o
此差异已折叠。
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 2022 3SNIC Information Technology, Ltd */
/* 3SNIC RAID SSSXXX Series Linux Driver */
#ifndef SSSRAID_DEBUG_H_INCLUDED
#define SSSRAID_DEBUG_H_INCLUDED
/*
* debug levels
*/
#define SSSRAID_DEBUG 0x00000001
/*
* debug macros
*/
#define ioc_err(ioc, fmt, ...) \
pr_err("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_notice(ioc, fmt, ...) \
pr_notice("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_warn(ioc, fmt, ...) \
pr_warn("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define ioc_info(ioc, fmt, ...) \
pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
#define dbgprint(IOC, FMT, ...) \
do { \
if (unlikely(IOC->logging_level & SSSRAID_DEBUG)) \
pr_info("%s: " FMT, (IOC)->name, ##__VA_ARGS__); \
} while (0)
#endif /* SSSRAID_DEBUG_H_INCLUDED */
此差异已折叠。
此差异已折叠。
......@@ -76,6 +76,12 @@ F: include/linux/wait.h
F: include/uapi/linux/sched.h
F: kernel/sched/
SSSRAID SCSI/Raid DRIVERS
M: Steven Song <steven.song@3snic.com>
S: Maintained
F: Documentation/scsi/sssraid.rst
F: drivers/scsi/sssraid/
THE REST
M: xiexiuqi@huawei.com
M: zhengzengkai@huawei.com
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册