summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2003-04-17 08:36:52 +0000
committeriedowse <iedowse@FreeBSD.org>2003-04-17 08:36:52 +0000
commit1bc9e58dac87a3728201ca739f20f1a31595c34a (patch)
tree237a8c066ed6182dee398117f5118dcecfd32fae
parentf33582721f3a0ec7c7294fe4dde9efbc2058633b (diff)
downloadFreeBSD-src-1bc9e58dac87a3728201ca739f20f1a31595c34a.zip
FreeBSD-src-1bc9e58dac87a3728201ca739f20f1a31595c34a.tar.gz
Revert part of revision 1.97 by calling dc_stop() unconditionally
in dc_detach() instead of only calling it if the hardware is preset. This is a workaround for page faults in softclock() after a `dc' device was detached, caused by not disabling a timer before freeing its memory. The bus_child_present() checks should probably be re-added later, but only to avoid the hardware accesses and not the other resource cleanups in dc_stop(). Approved by: njl
-rw-r--r--sys/dev/dc/if_dc.c3
-rw-r--r--sys/pci/if_dc.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index f39e612..15acd86 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2306,8 +2306,7 @@ dc_detach(dev)
ifp = &sc->arpcom.ac_if;
if (device_is_alive(dev)) {
- if (bus_child_present(dev))
- dc_stop(sc);
+ dc_stop(sc);
ether_ifdetach(ifp);
device_delete_child(dev, sc->dc_miibus);
bus_generic_detach(dev);
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index f39e612..15acd86 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -2306,8 +2306,7 @@ dc_detach(dev)
ifp = &sc->arpcom.ac_if;
if (device_is_alive(dev)) {
- if (bus_child_present(dev))
- dc_stop(sc);
+ dc_stop(sc);
ether_ifdetach(ifp);
device_delete_child(dev, sc->dc_miibus);
bus_generic_detach(dev);
OpenPOWER on IntegriCloud