Skip to content

Commit b1943d9

Browse files
committed
fabrics: decode 'current' discovery subsystem
TP8014 added a new discovery log page entry type '3' for the 'current discovery subsystem'; decode it accordingly. Signed-off-by: Hannes Reinecke <hare@suse.de>
1 parent 3d331e1 commit b1943d9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

fabrics.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ static inline const char *adrfam_str(__u8 adrfam)
142142
}
143143

144144
static const char * const subtypes[] = {
145-
[NVME_NQN_DISC] = "discovery subsystem",
145+
[NVME_NQN_DISC] = "discovery subsystem referral",
146146
[NVME_NQN_NVME] = "nvme subsystem",
147+
[NVME_NQN_CURR] = "current subsystem",
147148
};
148149

149150
static inline const char *subtype_str(__u8 subtype)
@@ -1163,6 +1164,7 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry *e)
11631164

11641165
switch (e->subtype) {
11651166
case NVME_NQN_DISC:
1167+
case NVME_NQN_CURR:
11661168
discover = true;
11671169
case NVME_NQN_NVME:
11681170
break;

linux/nvme.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ static inline uint64_t le64_to_cpu(__le64 x)
7575
#define NVME_NSID_ALL 0xffffffff
7676

7777
enum nvme_subsys_type {
78-
NVME_NQN_DISC = 1, /* Discovery type target subsystem */
78+
NVME_NQN_DISC = 1, /* Referral Discovery type target subsystem */
7979
NVME_NQN_NVME = 2, /* NVME type target subsystem */
80+
NVME_NQN_CURR = 3, /* Current Discovery type target subsystem */
8081
};
8182

8283
/* Address Family codes for Discovery Log Page entry ADRFAM field */

0 commit comments

Comments
 (0)