1. 04 12月, 2012 1 次提交
  2. 31 8月, 2012 3 次提交
    • D
      forcedeth: prevent TX timeouts after reboot · 3f0a1b58
      david decotigny 提交于
      This complements patch "net-forcedeth: fix TX timeout caused by TX
      pause on down link" which ensures that a lock-up sequence is not sent
      to the NIC. Present patch ensures that if a NIC is already locked-up,
      the driver will recover from it when initializing the device.
      
      It does the equivalent of the following recovery sequence:
       - write NVREG_TX_PAUSEFRAME_ENABLE_V1 to eth1's register
         NvRegTxPauseFrame
       - write NVREG_XMITCTL_START to eth1's register
         NvRegTransmitterControl
       - write 0 to eth1's register NvRegTransmitterControl
      (this is at the heart of the "unbricking" sequence mentioned in patch
       "net-forcedeth: fix TX timeout caused by TX pause on down link")
      
      Tested:
       - hardware is MCP55 device id 10de:0373 (rev a3), dual-port
       - reboot a kernel without any of patches mentioned
       - freeze the NIC (details on description for commit "net-forcedeth:
         fix TX timeout caused by TX pause on down link")
       - wait 5mn until ping hangs & TX timeout in dmesg
       - reboot on kernel with present patch
       - host is immediatly operational, no TX timeout
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f0a1b58
    • D
      forcedeth: fix TX timeout caused by TX pause on down link · 1ff39eb6
      david decotigny 提交于
      On some dual-port forcedeth devices such as MCP55 10de:0373 (rev a3),
      when autoneg & TX pause are enabled while port is connected but
      interface is down, the NIC will eventually freeze (TX timeouts,
      network unreachable).
      
      This patch ensures that TX pause is not configured in hardware when
      interface is down. The TX pause request will be honored when interface
      is later configured.
      
      Tested:
       - hardware is MCP55 device id 10de:0373 (rev a3), dual-port
       - eth0 connected and UP, eth1 connected but DOWN
       - without this patch, following sequence would brick NIC:
            ifconfig eth0 down
            ifconfig eth1 up
            ifconfig eth1 down
            ethtool -A eth1 autoneg off rx on tx off
            ifconfig eth1 up
            ifconfig eth1 down
            ethtool -A eth1 autoneg on rx on tx on
            ifconfig eth1 up
            ifconfig eth1 down
            ifup eth0
            sleep 120  # or longer
            ethtool eth1
         Just in case, sequence to un-brick:
            ifconfig eth0 down
            ethtool -A eth1 autoneg off rx on tx off
            ifconfig eth1 up
            ifconfig eth1 down
            ifup eth0
       - with this patch: no TX timeout after "bricking" sequence above
      
      Details:
       - The following register accesses have been identified as the ones
         causing the NIC to freeze in "bricking" sequence above:
          - write NVREG_TX_PAUSEFRAME_ENABLE_V1 to eth1's register NvRegTxPauseFrame
          - write NVREG_MISC1_PAUSE_TX | NVREG_MISC1_FORCE to eth1's register NvRegMisc1
          - write 0 to eth1's register NvRegTransmitterControl
         This is what this patch avoids.
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ff39eb6
    • D
      forcedeth: fix buffer overflow · ba9aa134
      david decotigny 提交于
      Found by manual code inspection.
      
      Tested: compile, reboot, ethtool -d ethX
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba9aa134
  3. 23 7月, 2012 1 次提交
  4. 21 7月, 2012 1 次提交
  5. 11 7月, 2012 2 次提交
  6. 01 5月, 2012 1 次提交
  7. 07 4月, 2012 1 次提交
  8. 29 3月, 2012 1 次提交
  9. 16 2月, 2012 1 次提交
  10. 09 2月, 2012 1 次提交
  11. 03 12月, 2011 1 次提交
  12. 30 11月, 2011 1 次提交
  13. 18 11月, 2011 1 次提交
  14. 17 11月, 2011 7 次提交
  15. 14 11月, 2011 2 次提交
  16. 09 11月, 2011 1 次提交
  17. 08 11月, 2011 5 次提交
    • D
      forcedeth: fix a few sparse warnings (variable shadowing) · e45a6187
      david decotigny 提交于
      This fixes the following sparse warnings:
      drivers/net/ethernet/nvidia/forcedeth.c:2113:7: warning: symbol 'size' shadows an earlier one
      drivers/net/ethernet/nvidia/forcedeth.c:2102:6: originally declared here
      drivers/net/ethernet/nvidia/forcedeth.c:2155:7: warning: symbol 'size' shadows an earlier one
      drivers/net/ethernet/nvidia/forcedeth.c:2102:6: originally declared here
      drivers/net/ethernet/nvidia/forcedeth.c:2227:7: warning: symbol 'size' shadows an earlier one
      drivers/net/ethernet/nvidia/forcedeth.c:2215:6: originally declared here
      drivers/net/ethernet/nvidia/forcedeth.c:2271:7: warning: symbol 'size' shadows an earlier one
      drivers/net/ethernet/nvidia/forcedeth.c:2215:6: originally declared here
      drivers/net/ethernet/nvidia/forcedeth.c:2986:20: warning: symbol 'addr' shadows an earlier one
      drivers/net/ethernet/nvidia/forcedeth.c:2963:6: originally declared here
      Signed-off-by: NDavid Decotigny <david.decotigny@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e45a6187
    • M
      forcedeth: Improve stats counters · 0bdfea8b
      Mandeep Baines 提交于
      Rx byte count was off; instead use the hardware's count.  Tx packet
      count was counting pre-TSO packets; instead count on-the-wire packets.
      Report hardware dropped frame count as rx_fifo_errors.
      
      - The count of transmitted packets reported by the forcedeth driver
        reports pre-TSO (TCP Segmentation Offload) packet counts and not the
        count of the number of packets sent on the wire. This change fixes
        the forcedeth driver to report the correct count. Fixed the code by
        copying the count stored in the NIC H/W to the value reported by the
        driver.
      
      - Count rx_drop_frame errors as rx_fifo_errors:
        We see a lot of rx_drop_frame errors if we disable the rx bottom-halves
        for too long.  Normally, rx_fifo_errors would be counted in this case.
        The rx_drop_frame error count is private to forcedeth and is not
        reported by ifconfig or sysfs.  The rx_fifo_errors count is currently
        unused in the forcedeth driver.  It is reported by ifconfig as overruns.
        This change reports rx_drop_frame errors as rx_fifo_errors.
      Signed-off-by: NDavid Decotigny <david.decotigny@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0bdfea8b
    • D
      forcedeth: remove unneeded stats updates · 4687f3f3
      david decotigny 提交于
      Function ndo_get_stats() updates most of the stats from hardware
      registers, making the manual updates un-needed. This change removes
      these manual updates. Main exception is rx_missed_errors which needs
      manual update.
      
      Another exception is rx_packets, still updated manually in this commit
      to make sure this patch doesn't change behavior of driver. This will
      be addressed by a future patch.
      Signed-off-by: NDavid Decotigny <david.decotigny@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4687f3f3
    • M
      forcedeth: Acknowledge only interrupts that are being processed · 2a4e7a08
      Mike Ditto 提交于
      This is to avoid a race, accidentally acknowledging an interrupt that
      we didn't notice and won't immediately process.  This is based solely
      on code inspection; it is not known if there was an actual bug here.
      Signed-off-by: NDavid Decotigny <david.decotigny@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a4e7a08
    • D
      forcedeth: fix race when unloading module · f9c4082d
      david decotigny 提交于
      When forcedeth module is unloaded, there exists a path that can lead
      to mod_timer() after del_timer_sync(), causing an oops. This patch
      short-circuits this unneeded path, which originates in
      nv_get_ethtool_stats().
      
      Tested:
        x86_64 16-way + 3 ethtool -S infinite loops + 100Mbps incoming traffic
        + rmmod/modprobe/ifconfig in a loop
      
      Initial-Author: Salman Qazi <sqazi@google.com>
      Discussion: http://patchwork.ozlabs.org/patch/123548/Signed-off-by: NDavid Decotigny <david.decotigny@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9c4082d
  18. 19 10月, 2011 1 次提交
  19. 08 10月, 2011 1 次提交
  20. 07 10月, 2011 1 次提交
  21. 31 8月, 2011 1 次提交
  22. 18 8月, 2011 1 次提交
  23. 13 8月, 2011 1 次提交
  24. 28 7月, 2011 1 次提交
  25. 22 7月, 2011 1 次提交
  26. 23 5月, 2011 1 次提交
    • P
      Add appropriate <linux/prefetch.h> include for prefetch users · 70c71606
      Paul Gortmaker 提交于
      After discovering that wide use of prefetch on modern CPUs
      could be a net loss instead of a win, net drivers which were
      relying on the implicit inclusion of prefetch.h via the list
      headers showed up in the resulting cleanup fallout.  Give
      them an explicit include via the following $0.02 script.
      
       =========================================
       #!/bin/bash
       MANUAL=""
       for i in `git grep -l 'prefetch(.*)' .` ; do
       	grep -q '<linux/prefetch.h>' $i
       	if [ $? = 0 ] ; then
       		continue
       	fi
      
       	(	echo '?^#include <linux/?a'
       		echo '#include <linux/prefetch.h>'
       		echo .
       		echo w
       		echo q
       	) | ed -s $i > /dev/null 2>&1
       	if [ $? != 0 ]; then
       		echo $i needs manual fixup
       		MANUAL="$i $MANUAL"
       	fi
       done
       echo ------------------- 8\<----------------------
       echo vi $MANUAL
       =========================================
      Signed-off-by: NPaul <paul.gortmaker@windriver.com>
      [ Fixed up some incorrect #include placements, and added some
        non-network drivers and the fib_trie.c case    - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70c71606