Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156455795
D34870.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
975 B
Referenced Files
None
Subscribers
None
D34870.diff
View Options
diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h
--- a/sys/dev/nvme/nvme.h
+++ b/sys/dev/nvme/nvme.h
@@ -59,9 +59,6 @@
*/
#define NVME_GLOBAL_NAMESPACE_TAG ((uint32_t)0xFFFFFFFF)
-/* Cap transfers by the maximum addressable by page-sized PRP (4KB -> 2MB). */
-#define NVME_MAX_XFER_SIZE MIN(maxphys, (PAGE_SIZE/8*PAGE_SIZE))
-
/* Host memory buffer sizes are always in 4096 byte chunks */
#define NVME_HMB_UNITS 4096
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1454,7 +1454,8 @@
ctrlr->enable_aborts = 0;
TUNABLE_INT_FETCH("hw.nvme.enable_aborts", &ctrlr->enable_aborts);
- ctrlr->max_xfer_size = NVME_MAX_XFER_SIZE;
+ /* Cap transfers by the maximum addressable by page-sized PRP (4KB pages -> 2MB). */
+ ctrlr->max_xfer_size = MIN(maxphys, (ctrlr->page_size / 8 * ctrlr->page_size));
if (nvme_ctrlr_construct_admin_qpair(ctrlr) != 0)
return (ENXIO);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 14, 7:33 PM (9 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33056703
Default Alt Text
D34870.diff (975 B)
Attached To
Mode
D34870: nvme: Remove NVME_MAX_XFER_SIZE, replace inline calculation
Attached
Detach File
Event Timeline
Log In to Comment