]> git.hungrycats.org Git - linux/commit
[netdrvr tg3] fix NAPI deadlock
authorJeff Garzik <jgarzik@redhat.com>
Tue, 25 Feb 2003 16:50:17 +0000 (11:50 -0500)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 25 Feb 2003 16:50:17 +0000 (11:50 -0500)
commit70a8c581cf8511eedaeba9593e10a54c563cf4c3
tree414359526b7c714a0a302b343d13095324b068c5
parent2b7eab5fed5e7d9f01abbd8ca9f26b1fafc56ca8
[netdrvr tg3] fix NAPI deadlock
* do not hold driver spinlock during RX processing in tg3_poll
  (this is the deadlock fix)
* create netif_poll_{en,dis}able to synchronize against dev->poll()
* create __netif_rx_complete to avoid a third irq-save in tg3_poll
* create tg3_netif_{start,stop} as driver-specific helper functions
  which disable and enable NAPI polling and TX queueing.  Note that
  the TX queueing enable/disable is purely advisory, and is not
  intended to prevent any races.
* remove tg3_halt call from tg3_set_power_state, as all callers
  have already called tg3_halt, making it redundant.  Removing this
  function call also eliminates some locking complications.
* use new helper __netif_rx_complete in tg3_poll
* create tg3_reset_task, as a function that runs in process context
  which resets the NIC.  This is needed because tg3_netif_stop()
  calls schedule() in the process of disabling dev->poll.
* schedule tg3_reset_task from tg3_tx_timeout
* schedule tg3_reset_task from tg3_timer
* wrap several tg3_halt...tg3_init_hw sequences with
  tg3_netif_stop...tg3_netif_start.  In addition to synchronizing
  with dev->poll, this additionally fixes bugs where we were not
  calling netif_wake_queue, when we should have been.
* move netif_start_queue call to very bottom of tg3_open
* add missing tg3_netif_{start,stop} to tg3_{suspend,resume},
  further fixing obvious bugs.
drivers/net/tg3.c
drivers/net/tg3.h