Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156453294
D33574.id100303.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
895 B
Referenced Files
None
Subscribers
None
D33574.id100303.diff
View Options
Index: usr.sbin/bhyve/pci_nvme.c
===================================================================
--- usr.sbin/bhyve/pci_nvme.c
+++ usr.sbin/bhyve/pci_nvme.c
@@ -1838,12 +1838,16 @@
return (0);
}
+#define NVME_FEATURES_SEL_SUPPORTED 0x3
+#define NVME_FEATURES_NS_SPECIFIC (1 << 1)
+
static int
nvme_opc_get_features(struct pci_nvme_softc* sc, struct nvme_command* command,
struct nvme_completion* compl)
{
struct nvme_feature_obj *feat;
uint8_t fid = command->cdw10 & 0xFF;
+ uint8_t sel = (command->cdw10 >> 8) & 0x7;
DPRINTF("%s: Feature ID 0x%x (%s)", __func__, fid, nvme_fid_to_name(fid));
@@ -1862,7 +1866,10 @@
}
if (compl->status == NVME_SC_SUCCESS) {
- compl->cdw0 = feat->cdw11;
+ if ((sel == NVME_FEATURES_SEL_SUPPORTED) && feat->namespace_specific)
+ compl->cdw0 = NVME_FEATURES_NS_SPECIFIC;
+ else
+ compl->cdw0 = feat->cdw11;
}
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 14, 7:12 PM (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33055582
Default Alt Text
D33574.id100303.diff (895 B)
Attached To
Mode
D33574: bhyve nvme: Add Select support to Get Features
Attached
Detach File
Event Timeline
Log In to Comment