Skip to content

Commit 854a76c

Browse files
Martin Belangerdwsuse
authored andcommitted
types: Add DCTYPE to nvme_id_psd
TP8010 introduced Discovery Controller Type (DCTYPE) to the Identify Controller data structure. Add the new field. Signed-off-by: Martin Belanger <[email protected]> Signed-off-by: Daniel Wagner <[email protected]>
1 parent 646dff7 commit 854a76c

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

src/nvme/types.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,10 @@ struct nvme_id_psd {
909909
* that a host is allowed to place in a capsule. A value of 0h
910910
* indicates no limit.
911911
* @ofcs: Optional Fabric Commands Support, see &enum nvme_id_ctrl_ofcs.
912-
* @rsvd1806: Reserved
912+
* @dctype: Discovery Controller Type (DCTYPE). This field indicates what
913+
* type of Discovery controller the controller is (see enum
914+
* nvme_id_ctrl_dctype)
915+
* @rsvd1807: Reserved
913916
* @psd: Power State Descriptors, see &struct nvme_id_psd.
914917
* @vs: Vendor Specific
915918
*/
@@ -1007,7 +1010,8 @@ struct nvme_id_ctrl {
10071010
__u8 fcatt;
10081011
__u8 msdbd;
10091012
__le16 ofcs;
1010-
__u8 rsvd1806[242];
1013+
__u8 dctype;
1014+
__u8 rsvd1807[241];
10111015

10121016
struct nvme_id_psd psd[32];
10131017
__u8 vs[1024];
@@ -1119,6 +1123,18 @@ enum nvme_id_ctrl_cntrltype {
11191123
NVME_CTRL_CNTRLTYPE_ADMIN = 3,
11201124
};
11211125

1126+
/**
1127+
* enum nvme_id_ctrl_dctype - Discovery Controller types
1128+
* @NVME_CTRL_DCTYPE_NOT_REPORTED: Not reported (I/O, Admin, and pre-TP8010)
1129+
* @NVME_CTRL_DCTYPE_DDC: Direct Discovery controller
1130+
* @NVME_CTRL_DCTYPE_CDC: Central Discovery controller
1131+
*/
1132+
enum nvme_id_ctrl_dctype {
1133+
NVME_CTRL_DCTYPE_NOT_REPORTED = 0,
1134+
NVME_CTRL_DCTYPE_DDC = 1,
1135+
NVME_CTRL_DCTYPE_CDC = 2,
1136+
};
1137+
11221138
/**
11231139
* enum nvme_id_ctrl_nvmsr - This field reports information associated with the
11241140
* NVM Subsystem, see &struct nvme_id_ctrl.nvmsr.

0 commit comments

Comments
 (0)