Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154213613
D34707.id104330.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34707.id104330.diff
View Options
Index: sys/dev/nvme/nvme_ctrlr.c
===================================================================
--- sys/dev/nvme/nvme_ctrlr.c
+++ sys/dev/nvme/nvme_ctrlr.c
@@ -389,7 +389,7 @@
cc |= 4 << NVME_CC_REG_IOCQES_SHIFT; /* CQ entry size == 16 == 2^4 */
/* This evaluates to 0, which is according to spec. */
- cc |= (PAGE_SIZE >> 13) << NVME_CC_REG_MPS_SHIFT;
+ cc |= (PAGE_SHIFT - NVME_BASE_SHIFT) << NVME_CC_REG_MPS_SHIFT;
nvme_ctrlr_barrier(ctrlr, BUS_SPACE_BARRIER_WRITE);
nvme_mmio_write_4(ctrlr, cc, cc);
Index: sys/dev/nvme/nvme_private.h
===================================================================
--- sys/dev/nvme/nvme_private.h
+++ sys/dev/nvme/nvme_private.h
@@ -94,7 +94,12 @@
#define NVME_DEFAULT_RETRY_COUNT (4)
/* Maximum log page size to fetch for AERs. */
-#define NVME_MAX_AER_LOG_SIZE (4096)
+#define NVME_MAX_AER_LOG_SIZE (4096) /* XXX really NVME_PAGE_SIZE ? */
+
+/*
+ * Page size parameters
+ */
+#define NVME_BASE_SHIFT 12 /* Several parameters (MSP) are 2^(12+x) */
/*
* Define CACHE_LINE_SIZE here for older FreeBSD versions that do not define
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 28, 4:20 AM (9 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32250251
Default Alt Text
D34707.id104330.diff (1 KB)
Attached To
Mode
D34707: nvme: MPS is a power of two
Attached
Detach File
Event Timeline
Log In to Comment