1. 21 7月, 2015 2 次提交
  2. 12 7月, 2015 1 次提交
  3. 08 6月, 2015 1 次提交
  4. 02 4月, 2015 1 次提交
    • P
      net: bcmgenet: enable MoCA link state change detection · 8d88c6eb
      Petri Gynther 提交于
      Currently, MoCA fixed PHYs are always in link-up state, regardless of
      whether the link is actually up or not.
      
      Add code to properly detect MoCA link state changes and to reflect the
      new state in MoCA fixed PHY. Only GENET V3 and V4 MACs are capable of
      detecting MoCA link state changes.
      
      The code works as follows:
      1. GENET MAC detects MoCA link state change and issues UMAC_IRQ_LINK_UP
         or UMAC_IRQ_LINK_DOWN interrupt.
      2. Link up/down interrupt is processed in bcmgenet_irq_task(), which
         calls phy_mac_interrupt().
      3. phy_mac_interrupt() updates the fixed PHY phydev->link and kicks
         the PHY state machine.
      4. PHY state machine proceeds to read the fixed PHY link status
         register.
      5. When the fixed PHY link status register is being read, the new
         function bcmgenet_fixed_phy_link_update() gets called. It copies
         the fixed PHY phydev->link value to the fixed PHY status->link.
      6. PHY state machine receives the new link state of the fixed PHY.
      7. MoCA fixed PHY link state now correctly reflects the real MoCA
         hardware link state.
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d88c6eb
  5. 01 4月, 2015 5 次提交
  6. 28 3月, 2015 7 次提交
  7. 24 3月, 2015 3 次提交
  8. 16 3月, 2015 1 次提交
  9. 14 3月, 2015 3 次提交
  10. 12 3月, 2015 1 次提交
  11. 10 3月, 2015 1 次提交
  12. 08 3月, 2015 1 次提交
    • P
      net: bcmgenet: rework Rx queue init · 6f5a272c
      Petri Gynther 提交于
      In preparation for supporting multiple Rx queues:
      1. Move the initialization of priv->num_rx_bds, priv->rx_bds, and
         priv->rx_cbs from bcmgenet_init_rx_ring() to bcmgenet_init_dma()
         since they are not specific to a single Rx queue. Mimics the Tx
         init model where priv->num_tx_bds, priv->tx_bds, and priv->tx_cbs
         are initialized in bcmgenet_init_dma().
      2. Program DMA_MBUF_DONE_THRESH = 1 so that future Rx queues Q0-Q15
         will get per-packet Rx interrupt.
      3. Group DMA_START_ADDR, RDMA_READ_PTR, RDMA_WRITE_PTR, and DMA_END_ADDR
         initialization together. Mimics the Tx init model.
      4. There is 1-to-1 mapping between RxCBs and RxBDs.
         Precalculate RxCB->bd_addr so that it can be used in the future.
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f5a272c
  13. 07 3月, 2015 3 次提交
  14. 05 3月, 2015 1 次提交
    • P
      net: bcmgenet: simplify __bcmgenet_tx_reclaim() · 66d06757
      Petri Gynther 提交于
      1. Use c_index and ring->c_index to determine how many TxCBs/TxBDs are
         ready for cleanup
         - c_index = the current value of TDMA_CONS_INDEX
         - TDMA_CONS_INDEX is HW-incremented and auto-wraparound (0x0-0xFFFF)
         - ring->c_index = __bcmgenet_tx_reclaim() cleaned up to this point on
           the previous invocation
      
      2. Add bcmgenet_tx_ring->clean_ptr
         - index of the next TxCB to be cleaned
         - incremented as TxCBs/TxBDs are processed
         - value always in range [ring->cb_ptr, ring->end_ptr]
      
      3. Fix incrementing of dev->stats.tx_packets
         - should be incremented only when tx_cb_ptr->skb != NULL
      
      These changes simplify __bcmgenet_tx_reclaim(). Furthermore, Tx ring size
      can now be any value.
      
      With the old code, Tx ring size had to be a power-of-2:
         num_tx_bds = ring->size;
         c_index &= (num_tx_bds - 1);
         last_c_index &= (num_tx_bds - 1);
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      66d06757
  15. 02 3月, 2015 1 次提交
    • F
      net: bcmgenet: fix software maintained statistics · f62ba9c1
      Florian Fainelli 提交于
      Commit 44c8bc3c ("net: bcmgenet: log RX buffer allocation and RX/TX dma
      failures") added a few software maintained statistics using
      BCMGENET_STAT_MIB_RX and BCMGENET_STAT_MIB_TX. These statistics are read from
      the hardware MIB counters, such that bcmgenet_update_mib_counters() was trying
      to read from a non-existing MIB offset for these counters.
      
      Fix this by introducing a special type: BCMGENET_STAT_SOFT, similar to
      BCMGENET_STAT_NETDEV, such that bcmgenet_get_ethtool_stats will read from the
      software mib.
      
      Fixes: 44c8bc3c ("net: bcmgenet: log RX buffer allocation and RX/TX dma failures")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f62ba9c1
  16. 01 3月, 2015 1 次提交
  17. 25 2月, 2015 4 次提交
  18. 09 12月, 2014 2 次提交
  19. 27 11月, 2014 1 次提交