1. 29 9月, 2006 5 次提交
  2. 23 9月, 2006 3 次提交
  3. 14 9月, 2006 2 次提交
  4. 20 8月, 2006 1 次提交
  5. 08 8月, 2006 2 次提交
    • M
      [TG3]: Fix tx race condition · 1b2a7205
      Michael Chan 提交于
      Fix a subtle race condition between tg3_start_xmit() and tg3_tx()
      discovered by Herbert Xu <herbert@gondor.apana.org.au>:
      
      CPU0					CPU1
      tg3_start_xmit()
      	if (tx_ring_full) {
      		tx_lock
      					tg3_tx()
      						if (!netif_queue_stopped)
      		netif_stop_queue()
      		if (!tx_ring_full)
      						update_tx_ring 
      			netif_wake_queue()
      		tx_unlock
      	}
      
      Even though tx_ring is updated before the if statement in tg3_tx() in
      program order, it can be re-ordered by the CPU as shown above.  This
      scenario can cause the tx queue to be stopped forever if tg3_tx() has
      just freed up the entire tx_ring.  The possibility of this happening
      should be very rare though.
      
      The following changes are made:
      
      1. Add memory barrier to fix the above race condition.
      
      2. Eliminate the private tx_lock altogether and rely solely on
      netif_tx_lock.  This eliminates one spinlock in tg3_start_xmit()
      when the ring is full.
      
      3. Because of 2, use netif_tx_lock in tg3_tx() before calling
      netif_wake_queue().
      
      4. Change TX_BUFFS_AVAIL to an inline function with a memory barrier.
      Herbert and David suggested using the memory barrier instead of
      volatile.
      
      5. Check for the full wake queue condition before getting
      netif_tx_lock in tg3_tx().  This reduces the number of unnecessary
      spinlocks when the tx ring is full in a steady-state condition.
      
      6. Update version to 3.65.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b2a7205
    • C
      [TG3]: skb->dev assignment is done by netdev_alloc_skb · d14cc9a3
      Christoph Hellwig 提交于
      All caller of netdev_alloc_skb need to assign skb->dev shortly
      afterwards.  Move it into common code.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d14cc9a3
  6. 03 8月, 2006 1 次提交
  7. 26 7月, 2006 3 次提交
  8. 09 7月, 2006 1 次提交
  9. 04 7月, 2006 1 次提交
  10. 03 7月, 2006 1 次提交
  11. 01 7月, 2006 6 次提交
  12. 24 6月, 2006 1 次提交
  13. 23 6月, 2006 1 次提交
    • H
      [NET]: Merge TSO/UFO fields in sk_buff · 7967168c
      Herbert Xu 提交于
      Having separate fields in sk_buff for TSO/UFO (tso_size/ufo_size) is not
      going to scale if we add any more segmentation methods (e.g., DCCP).  So
      let's merge them.
      
      They were used to tell the protocol of a packet.  This function has been
      subsumed by the new gso_type field.  This is essentially a set of netdev
      feature bits (shifted by 16 bits) that are required to process a specific
      skb.  As such it's easy to tell whether a given device can process a GSO
      skb: you just have to and the gso_type field and the netdev's features
      field.
      
      I've made gso_type a conjunction.  The idea is that you have a base type
      (e.g., SKB_GSO_TCPV4) that can be modified further to support new features.
      For example, if we add a hardware TSO type that supports ECN, they would
      declare NETIF_F_TSO | NETIF_F_TSO_ECN.  All TSO packets with CWR set would
      have a gso_type of SKB_GSO_TCPV4 | SKB_GSO_TCPV4_ECN while all other TSO
      packets would be SKB_GSO_TCPV4.  This means that only the CWR packets need
      to be emulated in software.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7967168c
  14. 18 6月, 2006 5 次提交
    • M
      [TG3]: Convert to non-LLTX · 00b70504
      Michael Chan 提交于
      Herbert Xu pointed out that it is unsafe to call netif_tx_disable()
      from LLTX drivers because it uses dev->xmit_lock to synchronize
      whereas LLTX drivers use private locks.
      
      Convert tg3 to non-LLTX to fix this issue. tg3 is a lockless driver
      where hard_start_xmit and tx completion handling can run concurrently
      under normal conditions. A tx_lock is only needed to prevent
      netif_stop_queue and netif_wake_queue race condtions when the queue
      is full.
      
      So whether we use LLTX or non-LLTX, it makes practically no
      difference.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00b70504
    • M
      [TG3]: Remove unnecessary tx_lock · c71302d6
      Michael Chan 提交于
      Remove tx_lock where it is unnecessary. tg3 runs lockless and so it
      requires interrupts to be disabled and sync'ed, netif_queue and NAPI
      poll to be stopped before the device can be reconfigured. After
      stopping everything, it is no longer necessary to get the tx_lock.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c71302d6
    • M
      [TG3]: update version and reldate · 9cb3528c
      Michael Chan 提交于
      Update version to 3.60.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9cb3528c
    • M
      [TG3]: Add recovery logic when MMIOs are re-ordered · df3e6548
      Michael Chan 提交于
      Add recovery logic when we suspect that the system is re-ordering
      MMIOs. Re-ordered MMIOs to the send mailbox can cause bogus tx
      completions and hit BUG_ON() in the tx completion path.
      
      tg3 already has logic to handle re-ordered MMIOs by flushing the MMIOs
      that must be strictly ordered (such as the send mailbox).  Determining
      when to enable the flush is currently a manual process of adding known
      chipsets to a list.
      
      The new code replaces the BUG_ON() in the tx completion path with the
      call to tg3_tx_recover(). It will set the TG3_FLAG_MBOX_WRITE_REORDER
      flag and reset the chip later in the workqueue to recover and start
      flushing MMIOs to the mailbox.
      
      A message to report the problem will be printed. We will then decide
      whether or not to add the host bridge to the list of chipsets that do
      re-ordering.
      
      We may add some additional code later to print the host bridge's ID so
      that the user can report it more easily.
      
      The assumption that re-ordering can only happen on x86 systems is also
      removed.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df3e6548
    • M
      [TG3]: Add 5786 PCI ID · 30b6c28d
      Michael Chan 提交于
      Add PCI ID for BCM5786 which is a variant of 5787.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30b6c28d
  15. 10 6月, 2006 1 次提交
    • D
      [TG3]: Handle Sun onboard tg3 chips more correctly. · f49639e6
      David S. Miller 提交于
      Get rid of all the SUN_570X logic and instead:
      
      1) Make sure MEMARB_ENABLE is set when we probe the SRAM
         for config information.  If that is off we will get
         timeouts.
      
      2) Always try to sync with the firmware, if there is no
         firmware running do not treat it as an error and instead
         just report it the first time we notice this condition.
      
      3) If there is no valid SRAM signature, assume the device
         is onboard by setting TG3_FLAG_EEPROM_WRITE_PROT.
      
      Update driver version and release date.
      
      With help from Michael Chan and Fabio Massimo Di Nitto.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f49639e6
  16. 23 5月, 2006 1 次提交
  17. 13 5月, 2006 1 次提交
  18. 10 5月, 2006 1 次提交
  19. 30 4月, 2006 3 次提交