Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Check whether the fxp(4) actually attached before...
details: https://anonhg.NetBSD.org/src/rev/48e9e778db21
branches: trunk
changeset: 753301:48e9e778db21
user: dyoung <dyoung%NetBSD.org@localhost>
date: Mon Mar 22 17:12:09 2010 +0000
description:
Check whether the fxp(4) actually attached before calling fxp_stop().
diffstat:
sys/dev/ic/i82557.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (38 lines):
diff -r affe45ca3f0c -r 48e9e778db21 sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c Mon Mar 22 17:11:19 2010 +0000
+++ b/sys/dev/ic/i82557.c Mon Mar 22 17:12:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82557.c,v 1.133 2010/03/22 16:11:58 dyoung Exp $ */
+/* $NetBSD: i82557.c,v 1.134 2010/03/22 17:12:09 dyoung Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.133 2010/03/22 16:11:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.134 2010/03/22 17:12:09 dyoung Exp $");
#include "rnd.h"
@@ -2496,15 +2496,15 @@
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
int i, s;
+ /* Succeed now if there's no work to do. */
+ if ((sc->sc_flags & FXPF_ATTACHED) == 0)
+ return (0);
+
s = splnet();
/* Stop the interface. Callouts are stopped in it. */
fxp_stop(ifp, 1);
splx(s);
- /* Succeed now if there's no work to do. */
- if ((sc->sc_flags & FXPF_ATTACHED) == 0)
- return (0);
-
/* Destroy our callout. */
callout_destroy(&sc->sc_callout);
Home |
Main Index |
Thread Index |
Old Index