1. 01 7月, 2010 2 次提交
    • A
      gianfar: Implement workaround for eTSEC76 erratum · deb90eac
      Anton Vorontsov 提交于
      MPC8313ECE says:
      
      "For TOE=1 huge or jumbo frames, the data required to generate the
       checksum may exceed the 2500-byte threshold beyond which the controller
       constrains itself to one memory fetch every 256 eTSEC system clocks.
      
       This throttling threshold is supposed to trigger only when the
       controller has sufficient data to keep transmit active for the duration
       of the memory fetches. The state machine handling this threshold,
       however, fails to take large TOE frames into account. As a result,
       TOE=1 frames larger than 2500 bytes often see excess delays before start
       of transmission."
      
      This patch implements the workaround as suggested by the errata
      document, i.e.:
      
      "Limit TOE=1 frames to less than 2500 bytes to avoid excess delays due to
       memory throttling.
       When using packets larger than 2700 bytes, it is recommended to turn TOE
       off."
      
      To be sure, we limit the TOE frames to 2500 bytes, and do software
      checksumming instead.
      Signed-off-by: NAnton Vorontsov <avorontsov@mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      deb90eac
    • A
      gianfar: Implement workaround for eTSEC74 erratum · 7d350977
      Anton Vorontsov 提交于
      MPC8313ECE says:
      
      "If MACCFG2[Huge Frame]=0 and the Ethernet controller receives frames
       which are larger than MAXFRM, the controller truncates the frames to
       length MAXFRM and marks RxBD[TR]=1 to indicate the error. The controller
       also erroneously marks RxBD[TR]=1 if the received frame length is MAXFRM
       or MAXFRM-1, even though those frames are not truncated.
       No truncation or truncation error occurs if MACCFG2[Huge Frame]=1."
      
      There are two options to workaround the issue:
      
      "1. Set MACCFG2[Huge Frame]=1, so no truncation occurs for invalid large
       frames. Software can determine if a frame is larger than MAXFRM by
       reading RxBD[LG] or RxBD[Data Length].
      
       2. Set MAXFRM to 1538 (0x602) instead of the default 1536 (0x600), so
       normal-length frames are not marked as truncated. Software can examine
       RxBD[Data Length] to determine if the frame was larger than MAXFRM-2."
      
      This patch implements the first workaround option by setting HUGEFRAME
      bit, and gfar_clean_rx_ring() already checks the RxBD[Data Length].
      Signed-off-by: NAnton Vorontsov <avorontsov@mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d350977
  2. 13 4月, 2010 2 次提交
    • M
      gianfar: Add hardware TX timestamping support · f0ee7acf
      Manfred Rudigier 提交于
      If a packet has the skb_shared_tx->hardware flag set the device is
      instructed to generate a TX timestamp and write it back to memory after
      the frame is transmitted. During the clean_tx_ring operation the
      timestamp will be extracted and copied into the skb_shared_hwtstamps
      struct of the skb.
      
      TX timestamping is enabled by setting the tx_type to something else
      than HWTSTAMP_TX_OFF with the SIOCSHWTSTAMP ioctl command. It is only
      supported by eTSEC devices.
      Signed-off-by: NManfred Rudigier <manfred.rudigier@omicron.at>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f0ee7acf
    • M
      gianfar: Add hardware RX timestamping support · cc772ab7
      Manfred Rudigier 提交于
      The device is configured to insert hardware timestamps into all
      received packets. The RX timestamps are extracted from the padding
      alingment bytes during the clean_rx_ring operation and copied into the
      skb_shared_hwtstamps struct of the skb. This extraction only happens if
      the rx_filter was set to something else than HWTSTAMP_FILTER_NONE with
      the SIOCSHWTSTAMP ioctl command.
      
      Hardware timestamping is only supported for eTSEC devices. To indicate
      device support the new FSL_GIANFAR_DEV_HAS_TIMER flag was introduced.
      Signed-off-by: NManfred Rudigier <manfred.rudigier@omicron.at>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc772ab7
  3. 27 3月, 2010 1 次提交
  4. 19 12月, 2009 3 次提交
  5. 08 11月, 2009 1 次提交
    • A
      gianfar: Fix compiler and sparse warnings · 18294ad1
      Anton Vorontsov 提交于
      commit fba4ed03 ("gianfar: Add Multiple
      Queue Support") introduced the following warnings:
      
        CHECK   gianfar.c
      gianfar.c:333:8: warning: incorrect type in assignment (different address spaces)
      gianfar.c:333:8:    expected unsigned int [usertype] *baddr
      gianfar.c:333:8:    got unsigned int [noderef] <asn:2>*<noident>
      [... 67 lines skipped ...]
      gianfar.c:2565:3: warning: incorrect type in argument 1 (different type sizes)
      gianfar.c:2565:3:    expected unsigned long const *addr
      gianfar.c:2565:3:    got unsigned int *<noident>
        CC      gianfar.o
      gianfar.c: In function 'gfar_probe':
      gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c: In function 'gfar_configure_coalescing':
      gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c: In function 'gfar_poll':
      gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type
      gianfar.c:2566: warning: passing argument 2 of 'test_bit' from incompatible pointer type
      gianfar.c:2585: warning: passing argument 2 of 'set_bit' from incompatible pointer type
      
      Following warnings left unfixed (looks like sparse doesn't like
      locks in loops, so __acquires/__releases() doesn't help):
      
      gianfar.c:441:40: warning: context imbalance in 'lock_rx_qs': wrong count at exit
      gianfar.c:441:40:    context '<noident>': wanted 0, got 1
      gianfar.c:449:40: warning: context imbalance in 'lock_tx_qs': wrong count at exit
      gianfar.c:449:40:    context '<noident>': wanted 0, got 1
      gianfar.c:458:3: warning: context imbalance in 'unlock_rx_qs': __context__ statement expected different context
      gianfar.c:458:3:    context '<noident>': wanted >= 0, got -1
      gianfar.c:466:3: warning: context imbalance in 'unlock_tx_qs': __context__ statement expected different context
      gianfar.c:466:3:    context '<noident>': wanted >= 0, got -1
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18294ad1
  6. 03 11月, 2009 6 次提交
  7. 13 10月, 2009 1 次提交
  8. 27 5月, 2009 1 次提交
  9. 27 4月, 2009 1 次提交
  10. 02 4月, 2009 1 次提交
  11. 19 3月, 2009 1 次提交
  12. 05 2月, 2009 3 次提交
  13. 01 2月, 2009 1 次提交
    • A
      gianfar: Fix sparse warnings · b2f66d18
      Anton Vorontsov 提交于
      This patch fixes following sparse warnings:
      
        CHECK   gianfar_ethtool.c
      gianfar_ethtool.c:610:26: warning: symbol 'gfar_ethtool_ops' was not declared. Should it be static?
        CHECK   gianfar_mii.c
      gianfar_mii.c:108:35: warning: cast adds address space to expression (<asn:2>)
      gianfar_mii.c:119:35: warning: cast adds address space to expression (<asn:2>)
      gianfar_mii.c:128:35: warning: cast adds address space to expression (<asn:2>)
      gianfar_mii.c:272:5: warning: cast removes address space of expression
      gianfar_mii.c:271:15: warning: cast adds address space to expression (<asn:2>)
      gianfar_mii.c:340:11: warning: cast adds address space to expression (<asn:2>)
        CHECK   gianfar_sysfs.c
      gianfar_sysfs.c:84:1: warning: symbol 'dev_attr_bd_stash' was not declared. Should it be static?
      gianfar_sysfs.c:133:1: warning: symbol 'dev_attr_rx_stash_size' was not declared. Should it be static?
      gianfar_sysfs.c:175:1: warning: symbol 'dev_attr_rx_stash_index' was not declared. Should it be static?
      gianfar_sysfs.c:213:1: warning: symbol 'dev_attr_fifo_threshold' was not declared. Should it be static?
      gianfar_sysfs.c:250:1: warning: symbol 'dev_attr_fifo_starve' was not declared. Should it be static?
      gianfar_sysfs.c:287:1: warning: symbol 'dev_attr_fifo_starve_off' was not declared. Should it be static?
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b2f66d18
  14. 18 12月, 2008 3 次提交
  15. 17 12月, 2008 5 次提交
  16. 27 8月, 2008 1 次提交
    • S
      net: don't grab a mutex within a timer context in gianfar · ab939905
      Sebastian Siewior 提交于
      I got the following backtrace while network was unavailble:
      
      |NETDEV WATCHDOG: eth0: transmit timed out
      |BUG: sleeping function called from invalid context at /home/bigeasy/git/linux-2.6-powerpc/kernel/mutex.c:87
      |in_atomic():1, irqs_disabled():0
      |Call Trace:
      |[c0383d90] [c0006dd8] show_stack+0x48/0x184 (unreliable)
      |[c0383db0] [c001e938] __might_sleep+0xe0/0xf4
      |[c0383dc0] [c025a43c] mutex_lock+0x24/0x3c
      |[c0383de0] [c019005c] phy_stop+0x20/0x70
      |[c0383df0] [c018d4ec] stop_gfar+0x28/0xf4
      |[c0383e10] [c018e8c4] gfar_timeout+0x30/0x60
      |[c0383e20] [c01fe7c0] dev_watchdog+0xa8/0x144
      |[c0383e30] [c002f93c] run_timer_softirq+0x148/0x1c8
      |[c0383e60] [c002b084] __do_softirq+0x5c/0xc4
      |[c0383e80] [c00046fc] do_softirq+0x3c/0x54
      |[c0383e90] [c002ac60] irq_exit+0x3c/0x5c
      |[c0383ea0] [c000b378] timer_interrupt+0xe0/0xf8
      |[c0383ec0] [c000e5ac] ret_from_except+0x0/0x18
      |[c0383f80] [c000804c] cpu_idle+0xcc/0xdc
      |[c0383fa0] [c025c07c] etext+0x7c/0x90
      |[c0383fc0] [c0338960] start_kernel+0x294/0x2a8
      |[c0383ff0] [c00003dc] skpinv+0x304/0x340
      |------------[ cut here ]------------
      
      The phylock was once a spinlock but got changed into a mutex via
      commit 35b5f6b1 aka [PHYLIB: Locking fixes for PHY I/O potentially sleeping]
      Signed-off-by: NSebastian Siewior <bigeasy@linutronix.de>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      ab939905
  17. 17 7月, 2008 1 次提交
  18. 11 7月, 2008 1 次提交
  19. 07 5月, 2008 1 次提交
  20. 29 4月, 2008 1 次提交
  21. 17 4月, 2008 1 次提交
  22. 26 3月, 2008 2 次提交