1. 26 7月, 2005 5 次提交
  2. 06 7月, 2005 2 次提交
  3. 25 6月, 2005 4 次提交
    • D
      [TG3]: Update driver version and reldate. · 5f70eaa0
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f70eaa0
    • M
      [TG3]: Refinements to new locking strategy. · bbe832c0
      Michael Chan 提交于
      1. Move tp->irq_sync = 0 to before the interrupt mailbox IO in
         tg3_enable_ints() so that the interrupt handler will always see
         irq_sync == 0 when interrupts are enabled.
      
      2. Remove the tg3_enable_ints() call in tg3_reset_hw(). Interrupts are
         always enabled explicitly or through tg3_netif_start(). This is to
         prevent interrupts being enabled while poll is disabled.
      
      3. Update trans_start with jiffies in tg3_netif_stop() to prevent false
         NETDEV WATCHDOG.
      
      4. Pass in the proper irq_sync parameter to tg3_full_lock() depending on
         netif_running() in some of the ethtool set calls.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbe832c0
    • D
      [TG3]: Eliminate all hw IRQ handler spinlocks. · f47c11ee
      David S. Miller 提交于
      Move all driver spinlocks to be taken at sw IRQ
      context only.
      
      This fixes the skb_copy() we were doing with hw
      IRQs disabled (which is illegal and triggers a
      BUG() with HIGHMEM enabled).  It also simplifies
      the locking all over the driver tremendously.
      
      We accomplish this feat by creating a special
      sequence to synchronize with the hw IRQ handler
      using a binary state and synchronize_irq().
      This idea is from Herbert Xu.
      
      Thanks to Michael Chan for helping to track down
      all of the race conditions in initial versions
      of this code.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f47c11ee
    • D
      [TG3]: Fix missing memory barriers and SD_STATUS_UPDATED bit clearing. · cd024c8b
      David S. Miller 提交于
      There must be a rmb() between reading the status block tag
      and calling tg3_has_work().  This was missing in tg3_mis()
      and tg3_interrupt_tagged().  tg3_poll() got it right.
      
      Also, SD_STATUS_UPDATED must be cleared in the status block
      right before we call tg3_has_work().  Only tg3_poll() got this
      wrong.
      
      Based upon patches and commentary from Grant Grundler and
      Michael Chan.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd024c8b
  4. 09 6月, 2005 2 次提交
  5. 07 6月, 2005 3 次提交
  6. 30 5月, 2005 9 次提交
  7. 24 5月, 2005 4 次提交
  8. 19 5月, 2005 4 次提交
    • D
    • D
      [TG3]: Refine DMA boundary setting. · 59e6b434
      David S. Miller 提交于
      Extract DMA boundary bit selection into a seperate
      function, tg3_calc_dma_bndry().  Call this from
      tg3_test_dma().
      
      Make DMA test more reliable by using no DMA boundry
      setting during the test.  If the test passes, then
      use the setting we selected before the test.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      59e6b434
    • D
      [TG3]: Set minimal hw interrupt mitigation. · 15f9850d
      David S. Miller 提交于
      Even though we do software interrupt mitigation
      via NAPI, it still helps to have some minimal
      hw assisted mitigation.
      
      This helps, particularly, on systems where register
      I/O overhead is much greater than the CPU horsepower.
      
      For example, it helps on NUMA systems.  In such cases
      the PIO overhead to disable interrupts for NAPI accounts
      for the majority of the packet processing cost.  The
      CPU is fast enough such that only a single packet is
      processed by each NAPI poll call.
      
      Thanks to Michael Chan for reviewing this patch.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      15f9850d
    • D
      [TG3]: Add tagged status support. · fac9b83e
      David S. Miller 提交于
      When supported, use the TAGGED interrupt processing support
      the chip provides.  In this mode, instead of a "on/off" binary
      semaphore, an incrementing tag scheme is used to ACK interrupts.
      
      All MSI supporting chips support TAGGED mode, so the tg3_msi()
      interrupt handler uses it unconditionally.  This invariant is
      verified when MSI support is tested.
      
      Since we can invoke tg3_poll() multiple times per interrupt under
      high packet load, we fetch a new copy of the tag value in the
      status block right before we actually do the work.
      
      Also, because the tagged status tells the chip exactly which
      work we have processed, we can make two optimizations:
      
      1) tg3_restart_ints() need not check tg3_has_work()
      2) the tg3_timer() need not poke the chip 10 times per
         second to keep from losing interrupt events
      
      Based upon valuable feedback from Michael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fac9b83e
  9. 06 5月, 2005 3 次提交
  10. 29 4月, 2005 1 次提交
  11. 26 4月, 2005 3 次提交
    • M
      [TG3]: Fix tg3_restart_ints() · 04237ddd
      Michael Chan 提交于
      tg3_restart_ints() is called to re-enable interrupts after tg3_poll()
      has finished all the work. It calls tg3_cond_int() to force an interrupt
      if the status block updated bit is set. The updated bit will be set if
      there is a new status block update sometime during tg3_poll() and it can
      be very often. The worst part is that even if all the work has been
      processed, the updated bit remains set and an interrupt will be forced
      unnecessarily.
      
      The fix is to call tg3_has_work() instead to determine if new work is
      posted before forcing an interrupt. The way to force an interrupt is
      also changed to use "coalesce_now" instead of "SETINT". The former is
      generally a safer way to force the interrupt.
      
      Also deleted the first parameter to tg3_has_work() which is unused.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04237ddd
    • M
      [TG3]: Refresh hw index in tg3_rx() · 52f6d697
      Michael Chan 提交于
      This patch refreshes the hw rx producer in tg3_rx() so that additional
      work posted by the hardware can be processed.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52f6d697
    • M
      [TG3]: Fix bug in tg3_rx() · 483ba50b
      Michael Chan 提交于
      This patch fixes a bug that causes tg3_has_work() to always return 1.
      
      rx work is determined by comparing tp->rx_rcb_ptr with the current hw
      producer index. The hw producer index is modulo the ring size, but tp-
      >rx_rcb_ptr is a free running counter that goes up beyond the ring size.
      After the ring wraps around once, tg3_has_work() will always return 1.
      
      The fix is to always do modulo arithmetic on tp->rx_rcb_ptr.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      483ba50b