1. 08 Jun, 2015 35 commits
  2. 07 Jun, 2015 5 commits
    • Fugang Duan's avatar
      net: fec: ptp: correct the ENET_ATCOR value · 34270f5f
      Fugang Duan authored
      The current driver adjust freq formula is:
      fe * diff = ppb * pc
      Note:
        fe: ENET ref clock frequency in Hz
        diff = inc_corr - inc: difference between default increment and correction increment
        ppb: parts per billion adjustment from base
        pc: correction period (in number of fe clock cycles)
      
      The correction increment will be used after N cycles of regular increments,
      not every N cycles (with N being the correction period). For example, set ENET_ATCOR=4,
      INC=8, INC_CORR=9, there will be 4 increments of 8 (ENET_ATINC[INC]) , followed by 1
      increment of 9 (ENET_ATINC[INC_CORR]).
      
      So, the correct formula is:
      	fe * diff = ppb * (pc + 1)
      
      For ENET_ATCOR, a value 0 disables the correction counter and no corrections occur.
      So base on the origin formula, set pc = pc > 1 ? pc - 1 : pc.
      Signed-off-by: default avatarFugang Duan <B38611@freescale.com>
      Signed-off-by: default avatarFrank Li <Frank.Li@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34270f5f
    • Michal Simek's avatar
      net: ll_temac: Remove sparse warnings · 84ea0ded
      Michal Simek authored
      Remove sparse warnings:
      drivers/net/ethernet/xilinx/ll_temac_main.c:65:16: warning: cast removes
      address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:70:9: warning: cast removes
      address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:127:16: warning: cast
      removes address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:137:9: warning: cast removes
      address space of expression
      drivers/net/ethernet/xilinx/ll_temac_main.c:409:3: warning: symbol
      'temac_options' was not declared. Should it be static?
      drivers/net/ethernet/xilinx/ll_temac_main.c:590:6: warning: symbol
      'temac_adjust_link' was not declared. Should it be static?
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84ea0ded
    • Eric Dumazet's avatar
      tcp: get_cookie_sock() consolidation · b80c0e78
      Eric Dumazet authored
      IPv4 and IPv6 share same implementation of get_cookie_sock(),
      and there is no point inlining it.
      
      We add tcp_ prefix to the common helper name and export it.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b80c0e78
    • Florian Fainelli's avatar
      net: bcmgenet: improve TX timeout · 13ea6578
      Florian Fainelli authored
      Dump useful ring statistics along with interrupt status, software
      maintained pointers and hardware registers to help troubleshoot TX queue
      stalls.
      
      When a timeout occurs, disable TX NAPI for the rings, dump their states
      while interrupts are disabled, re-enable interrupts, NAPI and queue flow
      control to help with the recovery.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13ea6578
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Fix deadlock by double lock · 80edb722
      Andrew Lunn authored
      ethtool -S on a DSA interface can deadlock for some switches because
      the same lock is taken twice. Use the register read function which
      expects the lock to be already held.
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Fixes: 31888234 ("net: dsa: mv88e6xxx: Replace stats mutex with SMI mutex")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80edb722