Page MenuHomeFreeBSD

D31183.diff
No OneTemporary

D31183.diff

Index: sys/dev/nvme/nvme_qpair.c
===================================================================
--- sys/dev/nvme/nvme_qpair.c
+++ sys/dev/nvme/nvme_qpair.c
@@ -615,6 +615,23 @@
qpair->sq_head = cpl.sqhd;
done++;
} else if (!in_panic) {
+ /*
+ * Sanity check: make sure we've submitted a command.
+ * At least one NVMe device will generate a surious
+ * completion interrupt on startup. This lets us ignore
+ * these silently. We only check here when we would
+ * otherwise report on a missing completion. Since the
+ * controller also reads '0' when this happens, the
+ * phase check above is a false positive.
+ */
+ if (qpair->num_cmds == 0) {
+ if (bootverbose)
+ nvme_printf(qpair->ctrlr,
+ "Warning: Completion interrupt before commands submitted queue %d\n",
+ qpair->id);
+ return (false);
+ }
+
/*
* A missing tracker is normally an error. However, a
* panic can stop the CPU this routine is running on

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 6, 10:37 AM (14 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30960283
Default Alt Text
D31183.diff (998 B)

Event Timeline