nvme: add checks for sq_head
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I8519a4b68db44cb8fe6dd251a52bf0f1dca73c32 Reviewed-on: https://review.gerrithub.io/391890 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
28ff7a0da7
commit
9c1d97a247
@ -160,6 +160,7 @@ struct nvme_pcie_qpair {
|
||||
|
||||
uint16_t sq_tail;
|
||||
uint16_t cq_head;
|
||||
uint16_t sq_head;
|
||||
|
||||
uint8_t phase;
|
||||
|
||||
@ -1096,6 +1097,10 @@ nvme_pcie_qpair_submit_tracker(struct spdk_nvme_qpair *qpair, struct nvme_tracke
|
||||
pqpair->sq_tail = 0;
|
||||
}
|
||||
|
||||
if (pqpair->sq_tail == pqpair->sq_head) {
|
||||
SPDK_ERRLOG("sq_tail is passing sq_head!\n");
|
||||
}
|
||||
|
||||
spdk_wmb();
|
||||
g_thread_mmio_ctrlr = pctrlr;
|
||||
if (spdk_likely(nvme_pcie_qpair_update_mmio_required(qpair,
|
||||
@ -1981,6 +1986,7 @@ nvme_pcie_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_
|
||||
#endif
|
||||
|
||||
tr = &pqpair->tr[cpl->cid];
|
||||
pqpair->sq_head = cpl->sqhd;
|
||||
|
||||
if (tr->active) {
|
||||
nvme_pcie_qpair_complete_tracker(qpair, tr, cpl, true);
|
||||
|
Loading…
Reference in New Issue
Block a user