Maksim Yevmenkin 8a03cf5c82 Reorganize an_detach() a bit. Make sure ether_ifdetach() and if_free()
are called outside of AN_LOCK()/AN_UNLOCK. This fixes the following
WITNESS warning (produced when an(4) PCMCIA card is detached).

taskqueue_drain with the following non-sleepable locks held:
exclusive sleep mutex an0 (network driver) r = 0 (0xc59af168) locked @ /usr/src/sys/dev/an/if_an.c:2836

MFC after:	3 days
Silence from:	current@
2005-07-27 21:03:35 +00:00
..
2005-07-13 20:35:09 +00:00
2005-07-25 10:49:05 +00:00
2005-03-11 22:07:04 +00:00
2005-07-20 13:34:16 +00:00
2005-03-28 18:31:18 +00:00
2005-07-09 18:30:31 +00:00
2005-07-25 10:49:05 +00:00
2005-07-25 12:31:43 +00:00
2005-02-23 22:44:38 +00:00
2005-07-21 11:13:12 +00:00