diff options
author | 2006-12-03 16:12:22 +0000 | |
---|---|---|
committer | 2006-12-03 16:12:22 +0000 | |
commit | 0a5b38d49740f834a7c9c1184bbf1ed18dcd566e (patch) | |
tree | 7e1373c44e9aa47d34d7f2d37f4c663f109dd78f | |
parent | The device doesn't always detach gracefully from the bus after a firmware (diff) | |
download | wireguard-openbsd-0a5b38d49740f834a7c9c1184bbf1ed18dcd566e.tar.xz wireguard-openbsd-0a5b38d49740f834a7c9c1184bbf1ed18dcd566e.zip |
Set sis_stopped=1 early on attach and reset it later in sis_init().
With mickey's help.
-rw-r--r-- | sys/dev/pci/if_sis.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 9b301914c9e..66072776164 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.74 2006/10/18 20:00:21 brad Exp $ */ +/* $OpenBSD: if_sis.c,v 1.75 2006/12/03 16:12:22 grange Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -899,6 +899,8 @@ sis_attach(struct device *parent, struct device *self, void *aux) struct ifnet *ifp; bus_size_t size; + sc->sis_stopped = 1; + /* * Handle power management nonsense. */ @@ -1650,7 +1652,6 @@ sis_init(void *xsc) * Cancel pending I/O and free all RX/TX buffers. */ sis_stop(sc); - sc->sis_stopped = 0; #if NS_IHR_DELAY > 0 /* Configure interrupt holdoff register. */ @@ -1826,6 +1827,7 @@ sis_init(void *xsc) mii_mediachg(mii); #endif + sc->sis_stopped = 0; ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; |