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 Handle error case (avoid changing to Xenbus...
details: https://anonhg.NetBSD.org/src/rev/2bbfb0ddb373
branches: trunk
changeset: 758052:2bbfb0ddb373
user: jym <jym%NetBSD.org@localhost>
date: Sat Oct 16 00:18:06 2010 +0000
description:
Handle error case (avoid changing to XenbusStateConnected when resume
failed)
diffstat:
sys/arch/xen/xen/if_xennet_xenbus.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 7c05339a8fff -r 2bbfb0ddb373 sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c Sat Oct 16 00:12:08 2010 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c Sat Oct 16 00:18:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xennet_xenbus.c,v 1.42 2010/10/16 00:12:08 jym Exp $ */
+/* $NetBSD: if_xennet_xenbus.c,v 1.43 2010/10/16 00:18:06 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.42 2010/10/16 00:12:08 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.43 2010/10/16 00:18:06 jym Exp $");
#include "opt_xen.h"
#include "opt_nfs_boot.h"
@@ -530,8 +530,9 @@
xenbus_switch_state(sc->sc_xbusd, NULL, XenbusStateClosed);
break;
case XenbusStateInitWait:
- xennet_xenbus_resume(sc);
- xenbus_switch_state(sc->sc_xbusd, NULL, XenbusStateConnected);
+ if (xennet_xenbus_resume(sc) == 0)
+ xenbus_switch_state(sc->sc_xbusd, NULL,
+ XenbusStateConnected);
break;
case XenbusStateUnknown:
default:
Home |
Main Index |
Thread Index |
Old Index