freebsd-skq/sys/dev/ie
John Baldwin 00f1da89ab Make ie(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device.
- Setup the interrupt handler in the common code instead of in each front
  end and do it after ether_ifattach().
- Use ie_stop() and ieinit_locked() in iereset() rather than frobbing IFF_UP
  and invoking ieioctl().
- Use DELAY() to implement a spin loop on a register with a timeout rather
  than scheduling a timeout and then doing a tight spin on the register.
  In the non-MPSAFE case this would never have worked because the spinning
  code held Giant and the timeout routine would have been blocked on Giant
  forever.  The same approach would not worke in the MPSAFE case either for
  the same reason, hence use a loop around DELAY().
- Clear IFF_DRV_(RUNNING|OACTIVE) in ie_stop() rather than in callers.
- Call ieinit_locked() directly rather than ieioctl(!) from ie_mc_reset().
- Don't leak the rx frame buffer on detach.

Tested by:	Thierry Herbelot  thierry of herbelot.com
2008-06-02 19:17:40 +00:00
..
if_ie507.h
if_ie_isa.c Make ie(4) MPSAFE: 2008-06-02 19:17:40 +00:00
if_ie.c Make ie(4) MPSAFE: 2008-06-02 19:17:40 +00:00
if_iee16.h
if_iereg.h
if_ievar.h Make ie(4) MPSAFE: 2008-06-02 19:17:40 +00:00