summaryrefslogtreecommitdiffstats
path: root/sys/dev/ep/if_ep.c
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2003-08-19 14:06:42 +0000
committercognet <cognet@FreeBSD.org>2003-08-19 14:06:42 +0000
commit6404cf2aa0d0a382926c727adbbc1d8f986f3e1e (patch)
treec207f298dfc2a87eff4117121604e5f1506f2c4e /sys/dev/ep/if_ep.c
parentdce9639a86a43f0535a19f51a127826679d30455 (diff)
downloadFreeBSD-src-6404cf2aa0d0a382926c727adbbc1d8f986f3e1e.zip
FreeBSD-src-6404cf2aa0d0a382926c727adbbc1d8f986f3e1e.tar.gz
Use bus_child_present() to make sure the card is still there before calling
epstop() in ep_detach(). This fixes a freeze that happens when ejecting a ep(4) pcmcia card.
Diffstat (limited to 'sys/dev/ep/if_ep.c')
-rw-r--r--sys/dev/ep/if_ep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 67785ab..73680a0 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -344,7 +344,8 @@ ep_detach(device_t dev)
device_printf(dev, "already unloaded\n");
return (0);
}
- epstop(sc);
+ if (bus_child_present(dev))
+ epstop(sc);
ifp->if_flags &= ~IFF_RUNNING;
ether_ifdetach(ifp);
OpenPOWER on IntegriCloud