Module Name: src
Committed By: nonaka
Date: Fri Sep 20 05:32:42 UTC 2019
Modified Files:
src/sys/dev/ic: nvme.c
Log Message:
Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done().
A new completion queue entry check incorrectly determined that there was
a Completion Queue entry for a command that was not submitted.
Fix PR kern/54275, PR kern/54503, PR kern/54532.
To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/ic/nvme.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.44 src/sys/dev/ic/nvme.c:1.45
--- src/sys/dev/ic/nvme.c:1.44 Fri Jun 28 15:08:47 2019
+++ src/sys/dev/ic/nvme.c Fri Sep 20 05:32:42 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: nvme.c,v 1.44 2019/06/28 15:08:47 jmcneill Exp $ */
+/* $NetBSD: nvme.c,v 1.45 2019/09/20 05:32:42 nonaka Exp $ */
/* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44 2019/06/28 15:08:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.45 2019/09/20 05:32:42 nonaka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1302,8 +1302,8 @@ nvme_poll_done(struct nvme_queue *q, str
{
struct nvme_poll_state *state = ccb->ccb_cookie;
- SET(cqe->flags, htole16(NVME_CQE_PHASE));
state->c = *cqe;
+ SET(state->c.flags, htole16(NVME_CQE_PHASE));
ccb->ccb_cookie = state->cookie;
state->done(q, ccb, &state->c);