cvs commit: src/sys/dev/ie if_ie.c if_ie_isa.c if_ievar.h

John Baldwin jhb at FreeBSD.org
Mon Jun 2 19:17:55 UTC 2008


jhb         2008-06-02 19:17:55 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/ie           if_ie.c if_ie_isa.c if_ievar.h 
  Log:
  SVN rev 179491 on 2008-06-02 19:17:40Z by jhb
  
  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
  
  Revision  Changes    Path
  1.109     +69 -60    src/sys/dev/ie/if_ie.c
  1.8       +0 -21     src/sys/dev/ie/if_ie_isa.c
  1.5       +6 -0      src/sys/dev/ie/if_ievar.h


More information about the cvs-src mailing list