diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2004-01-01 11:44:50 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2004-01-01 11:44:50 +0000 |
commit | d7e3410f1fe3bc12515c66197799bdb43c0be056 (patch) | |
tree | df5b62176032d3b646cbaad6de819cb11c5ec067 /sys | |
parent | 630d54740ac81f7aa979b32790aeeaac07055c46 (diff) |
avoid redundant calls to sis_stop() for shared irqs; from freebsd; ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_sis.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/if_sisreg.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 30a710ec539..6bbe959e9a4 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.35 2003/12/11 07:41:19 chris Exp $ */ +/* $OpenBSD: if_sis.c,v 1.36 2004/01/01 11:44:49 markus Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1690,6 +1690,7 @@ void sis_init(xsc) * Cancel pending I/O and free all RX/TX buffers. */ sis_stop(sc); + sc->sis_stopped = 0; mii = &sc->sc_mii; @@ -2024,6 +2025,9 @@ void sis_stop(sc) register int i; struct ifnet *ifp; + if (sc->sis_stopped) + return; + ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; @@ -2076,6 +2080,7 @@ void sis_stop(sc) } ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + sc->sis_stopped = 1; return; } diff --git a/sys/dev/pci/if_sisreg.h b/sys/dev/pci/if_sisreg.h index 63723d8cc30..97e79706e20 100644 --- a/sys/dev/pci/if_sisreg.h +++ b/sys/dev/pci/if_sisreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sisreg.h,v 1.14 2003/12/11 07:41:19 chris Exp $ */ +/* $OpenBSD: if_sisreg.h,v 1.15 2004/01/01 11:44:49 markus Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. @@ -433,6 +433,7 @@ struct sis_softc { caddr_t sc_listkva; bus_dmamap_t sc_rx_sparemap; bus_dmamap_t sc_tx_sparemap; + int sis_stopped; }; /* |