diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-07-28 18:39:33 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-07-28 18:39:33 +0000 |
commit | 38bf67680f32a66c32af541492bb74e8bbba6a95 (patch) | |
tree | 35dc1f22b5737ef7130acc47a86d1b0781392e8f /sys | |
parent | 2b770b1fb71a6edc900d503c54aed101ea5b7308 (diff) |
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@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_sis.c | 11 |
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; } /* |