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 Fix a fallout with my xensuspend merge: tal...



details:   https://anonhg.NetBSD.org/src/rev/7b12c05a3aee
branches:  trunk
changeset: 769915:7b12c05a3aee
user:      jym <jym%NetBSD.org@localhost>
date:      Mon Sep 26 21:44:09 2011 +0000

description:
Fix a fallout with my xensuspend merge: talk_to_backend() returns a
boolean, so checking for "true" with "== 0" is... wrong.

Now xennet(4) should work as expected, and not stay in the InitWait state
(which blocks network communication with the backend).

Thanks to riz@ and sborrill@ for reporting breakage with -current
xennet(4) after my merge.

diffstat:

 sys/arch/xen/xen/if_xennet_xenbus.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 06a216810e52 -r 7b12c05a3aee sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Sep 26 21:16:14 2011 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Sep 26 21:44:09 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.52 2011/09/20 00:12:24 jym Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.53 2011/09/26 21:44:09 jym Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.52 2011/09/20 00:12:24 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.53 2011/09/26 21:44:09 jym Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -223,7 +223,7 @@
 static void xennet_tx_complete(struct xennet_xenbus_softc *);
 static void xennet_rx_mbuf_free(struct mbuf *, void *, size_t, void *);
 static int  xennet_handler(void *);
-static int  xennet_talk_to_backend(struct xennet_xenbus_softc *);
+static bool xennet_talk_to_backend(struct xennet_xenbus_softc *);
 #ifdef XENNET_DEBUG_DUMP
 static void xennet_hex_dump(const unsigned char *, size_t, const char *, int);
 #endif
@@ -518,7 +518,7 @@
        return false;
 }
 
-static int
+static bool
 xennet_talk_to_backend(struct xennet_xenbus_softc *sc)
 {
        int error;
@@ -657,7 +657,7 @@
        case XenbusStateInitWait:
                if (sc->sc_backend_status == BEST_CONNECTED)
                        break;
-               if (xennet_talk_to_backend(sc) == 0)
+               if (xennet_talk_to_backend(sc))
                        xenbus_switch_state(sc->sc_xbusd, NULL,
                            XenbusStateConnected);
                break;



Home | Main Index | Thread Index | Old Index