summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2005-07-28 18:39:32 +0000
committerbrad <brad@openbsd.org>2005-07-28 18:39:32 +0000
commit359dd9e7a7641da7cb1be2eb0d15fc27c839a5cb (patch)
tree77a717efa18a81f382d90ce60906dfb2e0bdcaa7
parentmissing packet_init_compression(); from solar (diff)
downloadwireguard-openbsd-359dd9e7a7641da7cb1be2eb0d15fc27c839a5cb.tar.xz
wireguard-openbsd-359dd9e7a7641da7cb1be2eb0d15fc27c839a5cb.zip
clear IFF_RUNNING & IFF_OACTIVE in sis_stop() before de-allocating resources,
also move setting of sis_stopped further up in sis_stop(). ok fgsch@
-rw-r--r--sys/dev/pci/if_sis.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index bd52a95cd4d..7bb79e809a6 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.49 2005/07/21 16:08:21 fgsch Exp $ */
+/* $OpenBSD: if_sis.c,v 1.50 2005/07/28 18:39:32 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -2036,6 +2036,10 @@ void sis_stop(sc)
ifp->if_timer = 0;
timeout_del(&sc->sis_timeout);
+
+ ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ sc->sis_stopped = 1;
+
CSR_WRITE_4(sc, SIS_IER, 0);
CSR_WRITE_4(sc, SIS_IMR, 0);
CSR_READ_4(sc, SIS_ISR); /* clear any interrupts already pending */
@@ -2083,11 +2087,6 @@ void sis_stop(sc)
bzero((char *)&sc->sis_ldata->sis_tx_list[i],
sizeof(struct sis_desc) - sizeof(bus_dmamap_t));
}
-
- ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
- sc->sis_stopped = 1;
-
- return;
}
/*