Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen remove some XENNET_DEBUG code which causes ...



details:   https://anonhg.NetBSD.org/src/rev/69674cb1531e
branches:  trunk
changeset: 970906:69674cb1531e
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Apr 06 10:44:44 2020 +0000

description:
remove some XENNET_DEBUG code which causes kernel faults

diffstat:

 sys/arch/xen/xen/if_xennet_xenbus.c |  29 ++++++-----------------------
 1 files changed, 6 insertions(+), 23 deletions(-)

diffs (71 lines):

diff -r 5ac56960e7b0 -r 69674cb1531e sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Apr 06 10:33:10 2020 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Apr 06 10:44:44 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.102 2020/04/06 10:33:10 jdolecek Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.103 2020/04/06 10:44:44 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.102 2020/04/06 10:33:10 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.103 2020/04/06 10:44:44 jdolecek Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -127,7 +127,7 @@
 #include "locators.h"
 
 #undef XENNET_DEBUG_DUMP
-#undef XENNET_DEBUG
+#define XENNET_DEBUG
 
 #ifdef XENNET_DEBUG
 #define XEDB_FOLLOW     0x01
@@ -240,8 +240,9 @@
 static bool xennet_xenbus_suspend(device_t dev, const pmf_qual_t *);
 static bool xennet_xenbus_resume (device_t dev, const pmf_qual_t *);
 
-CFATTACH_DECL_NEW(xennet, sizeof(struct xennet_xenbus_softc),
-   xennet_xenbus_match, xennet_xenbus_attach, xennet_xenbus_detach, NULL);
+CFATTACH_DECL3_NEW(xennet, sizeof(struct xennet_xenbus_softc),
+   xennet_xenbus_match, xennet_xenbus_attach, xennet_xenbus_detach, NULL,
+   NULL, NULL, /*DVF_DETACH_SHUTDOWN*/0);
 
 static int
 xennet_xenbus_match(device_t parent, cfdata_t match, void *aux)
@@ -1089,12 +1090,6 @@
                    "mbuf %p, buf %p/%p/%p, size %d\n",
                    req->txreq_id, m, mtod(m, void *), (void *)pa,
                    (void *)xpmap_ptom_masked(pa), m->m_pkthdr.len));
-#ifdef XENNET_DEBUG
-               paddr_t pa2;
-               pmap_extract_ma(pmap_kernel(), mtod(m, vaddr_t), &pa2);
-               DPRINTFN(XEDB_MBUF, ("xennet_start pa %p ma %p/%p\n",
-                   (void *)pa, (void *)xpmap_ptom_masked(pa), (void *)pa2));
-#endif
 
 #ifdef XENNET_DEBUG_DUMP
                xennet_hex_dump(mtod(m, u_char *), m->m_pkthdr.len, "s",
@@ -1114,18 +1109,6 @@
                if (notify)
                        do_notify = 1;
 
-#ifdef XENNET_DEBUG
-               DPRINTFN(XEDB_MEM, ("packet addr %p/%p, physical %p/%p, "
-                   "m_paddr %p, len %d/%d\n", M_BUFADDR(m), mtod(m, void *),
-                   (void *)*kvtopte(mtod(m, vaddr_t)),
-                   (void *)xpmap_mtop(*kvtopte(mtod(m, vaddr_t))),
-                   (void *)m->m_paddr, m->m_pkthdr.len, m->m_len));
-               DPRINTFN(XEDB_MEM, ("id %d gref %d offset %d size %d flags %d"
-                   " prod %d\n",
-                   txreq->id, txreq->gref, txreq->offset, txreq->size,
-                   txreq->flags, req_prod));
-#endif
-
                /*
                 * Pass packet to bpf if there is a listener.
                 */



Home | Main Index | Thread Index | Old Index