1. 01 4月, 2015 8 次提交
  2. 13 3月, 2015 1 次提交
    • J
      net/macb: Only adjust tx_clk on link change · 2c29b235
      Jaeden Amero 提交于
      The PHY state machine (in drivers/net/phy/phy.c) will unconditionally
      call phydev->adjust_link (macb_handle_link_change) when polling in the
      PHY_CHANGELINK state. As currently written, macb always ends up
      requesting a new tx_clk frequency in macb_handle_link_change. It is a
      waste of time to request a new tx_clk frequency if the link state hasn't
      changed, as the tx_clk will already be configured properly.
      
      Let's only request a new tx_clk clock frequency when necessary.
      Signed-off-by: NJaeden Amero <jaeden.amero@ni.com>
      Cc: Josh Cartwright <joshc@ni.com>
      Cc: Soren Brinkmann <soren.brinkmann@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c29b235
  3. 11 3月, 2015 1 次提交
  4. 10 3月, 2015 1 次提交
  5. 08 3月, 2015 3 次提交
  6. 07 3月, 2015 2 次提交
  7. 02 3月, 2015 1 次提交
  8. 21 2月, 2015 1 次提交
  9. 06 2月, 2015 1 次提交
  10. 27 1月, 2015 2 次提交
  11. 16 1月, 2015 2 次提交
  12. 14 1月, 2015 1 次提交
    • X
      net/macb: improved ethtool statistics support · 3ff13f1c
      Xander Huff 提交于
      Currently `ethtool -S` simply returns "no stats available". It
      would be more useful to see what the various ethtool statistics
      registers' values are. This change implements get_ethtool_stats,
      get_strings, and get_sset_count functions to accomplish this.
      
      Read all GEM statistics registers and sum them into
      macb.ethtool_stats. Add the necessary infrastructure to make this
      accessible via `ethtool -S`.
      
      Update gem_update_stats to utilize ethtool_stats.
      Signed-off-by: NXander Huff <xander.huff@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ff13f1c
  13. 16 12月, 2014 2 次提交
  14. 13 12月, 2014 1 次提交
    • C
      net/macb: add TX multiqueue support for gem · 02c958dd
      Cyrille Pitchen 提交于
      gem devices designed with multiqueue CANNOT work without this patch.
      
      When probing a gem device, the driver must first prepare and enable the
      peripheral clock before accessing I/O registers. The second step is to read the
      MID register to find whether the device is a gem or an old macb IP.
      For gem devices, it reads the Design Configuration Register 6 (DCFG6) to
      compute to total number of queues, whereas macb devices always have a single
      queue.
      Only then it can call alloc_etherdev_mq() with the correct number of queues.
      This is the reason why the order of some initializations has been changed in
      macb_probe().
      Eventually, the dedicated IRQ and TX ring buffer descriptors are initialized
      for each queue.
      
      For backward compatibility reasons, queue0 uses the legacy registers ISR, IER,
      IDR, IMR, TBQP and RBQP. On the other hand, the other queues use new registers
      ISR[1..7], IER[1..7], IDR[1..7], IMR[1..7], TBQP[1..7] and RBQP[1..7].
      Except this hardware detail there is no real difference between queue0 and the
      others. The driver hides that thanks to the struct macb_queue.
      This structure allows us to share a common set of functions for all the queues.
      
      Besides when a TX error occurs, the gem MUST be halted before writing any of
      the TBQP registers to reset the relevant queue. An immediate side effect is
      that the other queues too aren't processed anymore by the gem.
      So macb_tx_error_task() calls netif_tx_stop_all_queues() to notify the Linux
      network engine that all transmissions are stopped.
      
      Also macb_tx_error_task() now calls spin_lock_irqsave() to prevent the
      interrupt handlers of the other queues from running as each of them may wake
      its associated queue up (please refer to macb_tx_interrupt()).
      
      Finally, as all queues have previously been stopped, they should be restarted
      calling netif_tx_start_all_queues() and setting the TSTART bit into the Network
      Control Register. Before this patch, when dealing with a single queue, the
      driver used to defer the reset of the faulting queue and the write of the
      TSTART bit until the next call of macb_start_xmit().
      As explained before, this bit is now set by macb_tx_error_task() too. That's
      why the faulting queue MUST be reset by setting the TX_USED bit in its first
      buffer descriptor before writing the TSTART bit.
      
      Queue 0 always exits and is the lowest priority when other queues are available.
      The higher the index of the queue is, the higher its priority is.
      
      When transmitting frames, the TX queue is selected by the skb->queue_mapping
      value. So queue discipline can be used to define the queue priority policy.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02c958dd
  15. 12 12月, 2014 1 次提交
  16. 20 10月, 2014 1 次提交
  17. 27 9月, 2014 1 次提交
  18. 14 9月, 2014 1 次提交
  19. 25 7月, 2014 5 次提交
  20. 06 5月, 2014 4 次提交