Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142363217
D37356.id112941.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
D37356.id112941.diff
View Options
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -324,7 +324,7 @@
uint32_t max_queues; /* max number of IO SQ's or CQ's */
uint32_t num_cqueues;
uint32_t num_squeues;
- bool num_q_is_set; /* Has host set Number of Queues */
+ bool num_q_is_set; /* Number of Queues is set */
struct pci_nvme_ioreq *ioreqs;
STAILQ_HEAD(, pci_nvme_ioreq) ioreqs_free; /* free list of ioreqs */
@@ -476,6 +476,7 @@
nsq = NVME_QUEUES;
}
+ sc->num_q_is_set = true;
sc->num_squeues = nsq;
sc->submit_queues = calloc(sc->num_squeues + 1,
@@ -1077,8 +1078,6 @@
sc->compl_queues[i].head = 0;
}
- sc->num_q_is_set = false;
-
pci_nvme_aer_destroy(sc);
pci_nvme_aen_destroy(sc);
@@ -1151,6 +1150,8 @@
DPRINTF("%s mapping Admin-CQ guest 0x%lx, host: %p",
__func__, sc->regs.acq, sc->compl_queues[0].qbase);
+ sc->num_q_is_set = false;
+
return (0);
}
@@ -1802,7 +1803,7 @@
uint16_t nqr; /* Number of Queues Requested */
if (sc->num_q_is_set) {
- WPRINTF("%s: Number of Queues already set", __func__);
+ WPRINTF("%s: Number of Queues has been initialized", __func__);
pci_nvme_status_genc(&compl->status,
NVME_SC_COMMAND_SEQUENCE_ERROR);
return;
@@ -1839,8 +1840,6 @@
/* Patch the command value which will be saved on callback's return */
command->cdw11 = NVME_FEATURE_NUM_QUEUES(sc);
compl->cdw0 = NVME_FEATURE_NUM_QUEUES(sc);
-
- sc->num_q_is_set = true;
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 20, 2:41 AM (18 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27758049
Default Alt Text
D37356.id112941.diff (1 KB)
Attached To
Mode
D37356: bhyve: fix the number of queue feature setting timing for nvme controller.
Attached
Detach File
Event Timeline
Log In to Comment