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
This commit is contained in:
Ian Dowse 2003-04-17 08:36:52 +00:00
parent daabb372ca
commit 2ea36df806
2 changed files with 2 additions and 4 deletions

View File

@ -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);

View File

@ -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);