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.
This commit is contained in:
Olivier Houchard 2003-08-19 14:06:42 +00:00
parent ad8fc00c75
commit a7e15683be

View File

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