git: 21d3a84db481 - main - nvme: Add NVMe over Fabrics fields to nvme_controller_data

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sat, 23 Mar 2024 00:25:40 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=21d3a84db481e84cf240f6802b1a4110854eaec5

commit 21d3a84db481e84cf240f6802b1a4110854eaec5
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-03-23 00:24:52 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-03-23 00:24:52 +0000

    nvme: Add NVMe over Fabrics fields to nvme_controller_data
    
    Reviewed by:    imp
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D44448
---
 sys/dev/nvme/nvme.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
index 8e99cb7b5356..46956d5f54cf 100644
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -1350,7 +1350,13 @@ struct nvme_controller_data {
 	uint8_t			reserved8[768];
 
 	/* bytes 1792-2047: NVMe over Fabrics specification */
-	uint8_t			reserved9[256];
+	uint32_t		ioccsz;
+	uint32_t		iorcsz;
+	uint16_t		icdoff;
+	uint8_t			fcatt;
+	uint8_t			msdbd;
+	uint16_t		ofcs;
+	uint8_t			reserved9[242];
 
 	/* bytes 2048-3071: power state descriptors */
 	struct nvme_power_state power_state[32];
@@ -2067,6 +2073,10 @@ void	nvme_controller_data_swapbytes(struct nvme_controller_data *s __unused)
 	s->acwu = le16toh(s->acwu);
 	s->sgls = le32toh(s->sgls);
 	s->mnan = le32toh(s->mnan);
+	s->ioccsz = le32toh(s->ioccsz);
+	s->iorcsz = le32toh(s->iorcsz);
+	s->icdoff = le16toh(s->icdoff);
+	s->ofcs = le16toh(s->ofcs);
 	for (i = 0; i < 32; i++)
 		nvme_power_state_swapbytes(&s->power_state[i]);
 #endif