Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Get out of the interrupt handler early if !IFF_R...
details: https://anonhg.NetBSD.org/src/rev/908e3c4a504e
branches: trunk
changeset: 761378:908e3c4a504e
user: dyoung <dyoung%NetBSD.org@localhost>
date: Wed Jan 26 00:09:27 2011 +0000
description:
Get out of the interrupt handler early if !IFF_RUNNING.
diffstat:
sys/dev/pci/if_bnx.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 42d8f195dd7b -r 908e3c4a504e sys/dev/pci/if_bnx.c
--- a/sys/dev/pci/if_bnx.c Wed Jan 26 00:08:30 2011 +0000
+++ b/sys/dev/pci/if_bnx.c Wed Jan 26 00:09:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bnx.c,v 1.41 2011/01/06 03:37:55 jym Exp $ */
+/* $NetBSD: if_bnx.c,v 1.42 2011/01/26 00:09:27 dyoung Exp $ */
/* $OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */
/*-
@@ -35,7 +35,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
#endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.41 2011/01/06 03:37:55 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.42 2011/01/26 00:09:27 dyoung Exp $");
/*
* The following controllers are supported by this driver:
@@ -5161,11 +5161,13 @@
const struct status_block *sblk;
sc = xsc;
- if (!device_is_active(sc->bnx_dev))
- return 0;
ifp = &sc->bnx_ec.ec_if;
+ if (!device_is_active(sc->bnx_dev) ||
+ (ifp->if_flags & IFF_RUNNING) == 0)
+ return 0;
+
DBRUNIF(1, sc->interrupts_generated++);
bus_dmamap_sync(sc->bnx_dmatag, sc->status_map, 0,
Home |
Main Index |
Thread Index |
Old Index