smartmontools SVN Rev 5640
Utility to control and monitor storage systems with "S.M.A.R.T."
sssraid.h
Go to the documentation of this file.
1/*
2 * sssraid.h
3 *
4 * Home page of code is: http://www.smartmontools.org
5 *
6 * Copyright (C) 2022 3SNIC Inc.
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef _SSSRAID_H_
12#define _SSSRAID_H_
13#include <stdint.h>
14#define u8 uint8_t
15#define u16 uint16_t
16#define u32 uint32_t
17#define u64 uint64_t
18#define ADM_MAX_DATA_SIZE 0x1000U // 4096
19#define ADM_SCSI_CDB_MAX_LEN 32
20#define ADM_SCSI_CDB_SENSE_MAX_LEN 96
21#define ADM_SCSI_CDB_SENSE_LEN32 32
22#define ADM_CMD_SHOW_PDLIST 0x502 // 1282
23#define ADM_CMD_SCSI_PASSTHROUGH 0x51e // 1310
24#define BSG_APPEND_TIMEOUT_MS 600000
25#define DEFAULT_CONMMAND_TIMEOUT_MS 180000
26#define ADM_BSG_MSGCODE_SCSI_PTHRU 1
27
28#define ADM_RAID_SET 0xc0
29#define ADM_RAID_WRITE 0xc1
30#define ADM_RAID_READ 0xc2
31#define ADM_RAID_PARAM_WRITE 0xc3
32#define ADM_RAID_READ_FROM_CQE 0xc4
33
34// pdlist device type interface
43};
44
49};
50
59};
60#define CMD_PDS_MAX_NUM 256U
61#define CMD_PDLIST_ONCE_NUM ((ADM_MAX_DATA_SIZE - 64) / sizeof(struct cmd_pdlist_entry))
62
68};
69
76};
77
84 u8 cdb[32];
87};
88
94 union {
95 struct {
100 };
101 union {
102 struct {
107 };
109
113
123};
124
130 union {
131 struct {
137 };
138 union {
139 struct {
144 };
145 union {
146 struct {
151 };
155 union {
156 struct {
161 };
162 union {
163 struct {
169 };
187};
188
192 union {
195 };
196};
197
198#endif // _SSSRAID_H
adm_pdlist_intf
Definition: sssraid.h:35
@ ADM_DEVICE_TYPE_SAS
Definition: sssraid.h:36
@ ADM_DEVICE_TYPE_SATA
Definition: sssraid.h:38
@ ADM_DEVICE_TYPE_UNKNOW
Definition: sssraid.h:41
@ ADM_DEVICE_TYPE_NVME
Definition: sssraid.h:40
@ ADM_DEVICE_TYPE_PLANE
Definition: sssraid.h:39
@ ADM_DEVICE_TYPE_EXP
Definition: sssraid.h:37
@ ADM_DEVICE_TYPE_BUTT
Definition: sssraid.h:42
#define u16
Definition: sssraid.h:15
#define u32
Definition: sssraid.h:16
#define u64
Definition: sssraid.h:17
#define CMD_PDLIST_ONCE_NUM
Definition: sssraid.h:61
#define u8
Definition: sssraid.h:14
struct sssraid_passthru_common_cmd ioctl_r64
Definition: sssraid.h:193
struct sssraid_ioq_passthru_cmd ioctl_pthru
Definition: sssraid.h:194
Definition: sssraid.h:51
u8 media_type
Definition: sssraid.h:55
u16 slot_id
Definition: sssraid.h:53
u8 interface
Definition: sssraid.h:54
u8 logi_type
Definition: sssraid.h:56
u16 enc_id
Definition: sssraid.h:52
u32 reserve[26]
Definition: sssraid.h:58
u8 logi_status
Definition: sssraid.h:57
u16 start_idx
Definition: sssraid.h:46
struct multi_disk_location loc
Definition: sssraid.h:79
struct cmd_pdlist_entry disks[CMD_PDLIST_ONCE_NUM]
Definition: sssraid.h:67
u32 rsvd1[15]
Definition: sssraid.h:66
struct sssraid_ioq_passthru_cmd::@129::@138 info_1
struct sssraid_ioq_passthru_cmd::@127::@137 info_0
struct sssraid_ioq_passthru_cmd::@133::@140 info_3
struct sssraid_ioq_passthru_cmd::@131::@139 info_2
struct sssraid_ioq_passthru_cmd::@135::@141 info_4
struct sssraid_passthru_common_cmd::@123::@126 info_1
struct sssraid_passthru_common_cmd::@121::@125 info_0