Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic cache flush call must wait for completion; cap wa...



details:   https://anonhg.NetBSD.org/src/rev/bada0c80793c
branches:  trunk
changeset: 347879:bada0c80793c
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Sep 20 21:18:08 2016 +0000

description:
cache flush call must wait for completion; cap wait to 60 seconds just in case
controller won't respond

diffstat:

 sys/dev/ic/ld_nvme.c |  8 ++++----
 sys/dev/ic/nvme.c    |  6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r 6e559b459406 -r bada0c80793c sys/dev/ic/ld_nvme.c
--- a/sys/dev/ic/ld_nvme.c      Tue Sep 20 20:57:45 2016 +0000
+++ b/sys/dev/ic/ld_nvme.c      Tue Sep 20 21:18:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_nvme.c,v 1.6 2016/09/19 20:33:51 jdolecek Exp $     */
+/*     $NetBSD: ld_nvme.c,v 1.7 2016/09/20 21:18:08 jdolecek Exp $     */
 
 /*-
  * Copyright (C) 2016 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.6 2016/09/19 20:33:51 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.7 2016/09/20 21:18:08 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -181,9 +181,9 @@
 {
        struct ld_nvme_softc *sc = device_private(ld->sc_dv);
 
+       /* wait for the sync to finish */
        return nvme_ns_sync(sc->sc_nvme, sc->sc_nsid, sc,
-           (flags & LDFL_POLL) ? NVME_NS_CTX_F_POLL : 0,
-           ld_nvme_syncdone);
+           NVME_NS_CTX_F_POLL, ld_nvme_syncdone);
 }
 
 static void
diff -r 6e559b459406 -r bada0c80793c sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Tue Sep 20 20:57:45 2016 +0000
+++ b/sys/dev/ic/nvme.c Tue Sep 20 21:18:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvme.c,v 1.12 2016/09/19 22:11:41 jdolecek Exp $       */
+/*     $NetBSD: nvme.c,v 1.13 2016/09/20 21:18:08 jdolecek 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.12 2016/09/19 22:11:41 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.13 2016/09/20 21:18:08 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -108,7 +108,7 @@
 #define NVME_TIMO_QOP          5       /* queue create and delete timeout */
 #define NVME_TIMO_IDENT                10      /* probe identify timeout */
 #define NVME_TIMO_PT           -1      /* passthrough cmd timeout */
-#define NVME_TIMO_SY           -1      /* sync cache timeout */
+#define NVME_TIMO_SY           60      /* sync cache timeout */
 
 #define nvme_read4(_s, _r) \
        bus_space_read_4((_s)->sc_iot, (_s)->sc_ioh, (_r))



Home | Main Index | Thread Index | Old Index