cvs commit: src/sys/dev/gem if_gem.c

Marius Strobl marius at
Sun Sep 18 06:23:21 PDT 2005

marius      2005-09-18 13:23:20 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/gem          if_gem.c 
  - In gem_ioctl() move the call to ether_ioctl() to the default case of
    the switch statement in order to make this driver more like other
    Ethernet NIC drivers.
  - In gem_attach() call gem_stop() in addition to gem_reset() to make
    sure the chip actually is stopped and not just reset.
  - In gem_stop() also stop the gem_rint_timeout() callout in case the
    driver is compiled with GEM_RINT_TIMEOUT defined.
  Merge some locking improvements from hme(4):
  - Use callout_init_mtx() to close races between gem_stop() and gem_tick()
    as weel as gem_stop() and gem_rint() in case the driver is compiled
    with GEM_RINT_TIMEOUT defined.
  - Use the driver lock instead of Giant in a bus dma callback.
  - Lock the driver lock around mii operations.
  - Cleanup locking in gem_ioctl().
  - Remove redundant assertions that the driver lock is not held in
    gem_attach() and gem_detach() since mtx_lock() will assert that
    already since the driver lock is not recursive.
  - Add callout_drain()'s to gem_detach() after calling gem_stop() to make
    sure that if softclock is running on another CPU and is blocked on our
    driver lock, we will wait until it has acquired the lock, seen that it
    was cancelled, dropped the lock, and awakened us so that we can safely
    destroy the mutex.
  Revision  Changes    Path
  1.35      +29 -47    src/sys/dev/gem/if_gem.c

More information about the cvs-src mailing list