1. 11 10月, 2014 1 次提交
  2. 08 10月, 2014 1 次提交
  3. 06 10月, 2014 1 次提交
  4. 02 10月, 2014 1 次提交
  5. 27 9月, 2014 1 次提交
  6. 23 9月, 2014 2 次提交
    • F
      net: bcmgenet: call bcmgenet_dma_teardown in bcmgenet_fini_dma · 4a0c081e
      Florian Fainelli 提交于
      We should not be manipulaging the DMA_CTRL registers directly by writing
      0 to them to disable DMA. This is an operation that needs to be timed to
      make sure the DMA engines have been properly stopped since their state
      machine stops on a packet boundary, not immediately.
      
      Make sure that tha bcmgenet_fini_dma() calls bcmgenet_dma_teardown() to
      ensure a proper DMA engine state. As a result, we need to reorder the
      function bodies to resolve the use dependency.
      
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a0c081e
    • F
      net: bcmgenet: fix TX reclaim accounting for fragments · 478a010c
      Florian Fainelli 提交于
      The GENET driver supports SKB fragments, and succeeds in transmitting
      them properly, but when reclaiming these transmitted fragments, we will
      only update the count of free buffer descriptors by 1, even for SKBs
      with fragments. This leads to the networking stack thinking it has more
      room than the hardware has when pushing new SKBs, and backing off
      consequently because we return NETDEV_TX_BUSY.
      
      Fix this by accounting for the SKB nr_frags plus one (itself) and update
      ring->free_bds accordingly with that value for each iteration loop in
      __bcmgenet_tx_reclaim().
      
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      478a010c
  7. 20 9月, 2014 1 次提交
  8. 09 9月, 2014 1 次提交
    • F
      net: bcmgenet: check harder for out of memory conditions · b629be5c
      Florian Fainelli 提交于
      There is a potential case where we might be failing to refill a
      control block, leaving it with both a NULL skb pointer *and* a NULL
      dma_unmap_addr.
      
      The way we process incoming packets, by first calling
      dma_unmap_single(), and then only checking for a potential NULL skb can
      lead to situations where do pass a NULL dma_unmap_addr() to
      dma_unmap_single(), resulting in an oops.
      
      Fix this my moving the NULL skb check earlier, since no backing skb
      also means no corresponding DMA mapping for this packet.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b629be5c
  9. 12 8月, 2014 3 次提交
    • F
      net: bcmgenet: correctly resume adapter from Wake-on-LAN · 98bb7399
      Florian Fainelli 提交于
      In case we configured the adapter to be a wake up source from
      Wake-on-LAN, but we never actually woke up using Wake-on-LAN, we will
      leave the adapter in MagicPacket matching mode, which prevents any other
      type of packets from reaching the RX engine. Fix this by calling
      bcmgenet_power_up() with GENET_POWER_WOL_MAGIC to restore the adapter
      configuration in bcmgenet_resume().
      
      The second problem we had was an imbalanced clock disabling in
      bcmgenet_wol_resume(), the Wake-on-LAN slow clock is only enabled in
      bcmgenet_suspend() if we configured Wake-on-LAN, yet we unconditionally
      disabled the clock in bcmgenet_wol_resume().
      
      Fixes: 8c90db72 ("net: bcmgenet: suspend and resume from Wake-on-LAN")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98bb7399
    • F
      net: bcmgenet: correctly suspend and resume PHY device · cc013fb4
      Florian Fainelli 提交于
      Make sure that we properly suspend and resume the PHY device when we
      enter low power modes. We had two calls to bcmgenet_mii_reset() which
      will issue a software-reset to the PHY without using the PHY library,
      get rid of them since they are completely bogus and mess up with the PHY
      library state. Make sure that we reset the PHY library cached values
      (link, pause and duplex) to allow the link adjustment callback to be
      invoked when needed.
      
      Fixes: b6e978e5 ("net: bcmgenet: add suspend/resume callbacks")
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc013fb4
    • F
      net: bcmgenet: request and enable main clock earlier · e4a60a93
      Florian Fainelli 提交于
      bcmgenet_set_hw_params() will read the hardware version and compare it
      with the one we are getting from Device Tree. Due to the clock being
      enabled too late, bcmgenet_set_hw_params() will cause bus errors since
      the GENET hardware block is still gated off by the time
      bcmgenet_set_hw_params() is called, this will also make us fail the
      version check since we will read the value 0 from the hardware.
      
      Fix this by requesting the clock before the first piece of code that
      needs to access hardware register.
      
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4a60a93
  10. 31 7月, 2014 1 次提交
  11. 24 7月, 2014 5 次提交
  12. 23 7月, 2014 1 次提交
  13. 22 7月, 2014 10 次提交
  14. 02 7月, 2014 3 次提交
  15. 14 5月, 2014 1 次提交
  16. 04 4月, 2014 1 次提交
  17. 28 3月, 2014 1 次提交
    • F
      net: bcmgenet: set RBUF_SKIP_FCS based on UniMAC CRC forwarding · ebe5e3c6
      Florian Fainelli 提交于
      When the UniMAC block is configured to forward the CRC as part of the
      Ethernet frame (priv->crc_fwd_en, set by default), enabling the hardware
      RX checksum block unveiled that the dma_rxchk_bit was never set in the
      per-packet status bits (dma_flag in bcmgenet_desc_rx). This would make
      the chksum_ok variable to be never set to 1, and the networking stack
      would have to compute the packet checksums, which takes a substantial
      amount of time.
      
      In order for the RXCHK block to properly compute the packet checksum in
      hardware, we also need to set the RBUF_SKIP_FCS bit accordingly.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebe5e3c6
  18. 21 3月, 2014 4 次提交
  19. 25 2月, 2014 1 次提交