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:
parent
ad8fc00c75
commit
a7e15683be
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user