diff options
| author | Warner Losh <imp@FreeBSD.org> | 2025-10-10 00:16:47 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2025-10-10 00:19:04 +0000 |
| commit | 53825afc5dd13f3d16c3db6727260d7184bcd581 (patch) | |
| tree | 210d09b8b3d18cd1d4d27510f438d088db4a82f3 | |
| parent | 498368529011086067ed48e40cbfd46a4d5ef2ca (diff) | |
nvme: There's 64 LBAF descriptors, not 16
Older versions of the standard were limited to 16, but the actual limit
is 64. Bump the limit to 64. This should be a #define, but there's no
good standardized name, so I'm punting on that. All the places that use
it, apart from the byte swapping code, do the right thing and use the
nlbaf field to limit what to access.
Sponsored by: Netflix
| -rw-r--r-- | sys/dev/nvme/nvme.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 17c5cdb4db87..57cb37907e65 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1507,9 +1507,7 @@ struct nvme_namespace_data { uint8_t eui64[8]; /** lba format support */ - uint32_t lbaf[16]; - - uint8_t reserved7[192]; + uint32_t lbaf[64]; uint8_t vendor_specific[3712]; } __packed __aligned(4); @@ -2175,7 +2173,7 @@ void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s __unused) s->anagrpid = le32toh(s->anagrpid); s->nvmsetid = le16toh(s->nvmsetid); s->endgid = le16toh(s->endgid); - for (i = 0; i < 16; i++) + for (i = 0; i < 64; i++) s->lbaf[i] = le32toh(s->lbaf[i]); #endif } |
