1. 10 6月, 2015 2 次提交
  2. 09 6月, 2015 26 次提交
  3. 08 6月, 2015 12 次提交
    • D
      Merge branch 'phy-micrel' · 65080602
      David S. Miller 提交于
      Jaeden Amero says:
      
      ====================
      net/phy: micrel: Center FLP timing at 16ms
      
      In v2, we add an additional cleanup commit to make an array of strings
      static const and to improve const correctness generally. We also no longer
      unnecessarily initialize the result variable in
      ksz9031_center_flp_timing().
      
      In v3, we remove the unnecessary result variable from ksz9031_config_init()
      introduced by a previous version of "net/phy: micrel: Center FLP timing at
      16ms".
      
      In v4, we modify the commit message of "net/phy: micrel: Center FLP timing
      at 16ms" to replace the awkward quotation of the data sheet's programming
      procedure with an explanation of why we program the FLP burst registers and
      restart auto-negotiation where we do (config_init).
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      65080602
    • J
      net/phy: micrel: Center FLP timing at 16ms · 6270e1ae
      Jaeden Amero 提交于
      Link failures have been observed when using the KSZ9031 with HP 1810-8G
      and HP 1910-8G network switches. Center the FLP timing at 16ms to help
      avoid intermittent link failures.
      
      >From the KSZ9031RNX and KSZ9031MNX data sheets revision 2.2, section
      "Auto-Negotiation Timing":
      	The KSZ9031[RNX or MNX] Fast Link Pulse (FLP) burst-to-burst
      	transmit timing for Auto-Negotiation defaults to 8ms. IEEE 802.3
      	Standard specifies this timing to be 16ms +/-8ms. Some PHY link
      	partners need to receive the FLP with 16ms centered timing;
      	otherwise, there can be intermittent link failures and long
      	link-up times.
      
      The PHY data sheet recommends configuring the FLP burst registers after
      power-up/reset and immediately thereafter restarting auto-negotiation, so
      we center the FLP timing at 16ms and then restart auto-negotiation in the
      config_init for KSZ9031.
      Signed-off-by: NJaeden Amero <jaeden.amero@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6270e1ae
    • J
      net/phy: micrel: Comment MMD address of extended registers · ae6c97bb
      Jaeden Amero 提交于
      There are some defines for a few pad skew related extended registers.
      Specify for which MMD Address (dev_addr) they are for.
      Signed-off-by: NJaeden Amero <jaeden.amero@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae6c97bb
    • J
      net/phy: micrel: Be more const correct · 3c9a9f7f
      Jaeden Amero 提交于
      In a few places in this driver, we weren't using const where we could
      have. Use const more.
      
      In addition, change the arrays of strings in ksz9031_config_init() to be
      not only const, but also static.
      Signed-off-by: NJaeden Amero <jaeden.amero@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c9a9f7f
    • F
      fib_trie: coding style: Use pointer after check · f38b24c9
      Firo Yang 提交于
      As Alexander Duyck pointed out that:
      struct tnode {
              ...
              struct key_vector kv[1];
      }
      The kv[1] member of struct tnode is an arry that refernced by
      a null pointer will not crash the system, like this:
      struct tnode *p = NULL;
      struct key_vector *kv = p->kv;
      As such p->kv doesn't actually dereference anything, it is simply a
      means for getting the offset to the array from the pointer p.
      
      This patch make the code more regular to avoid making people feel
      odd when they look at the code.
      Signed-off-by: NFiro Yang <firogm@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f38b24c9
    • N
      wan: dscc4: use msecs_to_jiffies for conversions · cbab1510
      Nicholas Mc Guire 提交于
      API compliance scanning with coccinelle flagged:
      ./drivers/net/wan/dscc4.c:1036:1-33:
              WARNING: timeout (10) seems HZ dependent
      ./drivers/net/wan/dscc4.c:554:2-34:
              WARNING: timeout (10) seems HZ dependent
      ./drivers/net/wan/dscc4.c:599:2-34:
              WARNING: timeout (10) seems HZ dependent
      
      Numeric constants passed to schedule_timeout_*() make the effective
      timeout HZ dependent which does not seem to be the intent here.
      Fixed up by converting the constant to jiffies with msecs_to_jiffies(),
      passing 100ms (assuming HZ==100 in the original code).
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbab1510
    • N
      cosa: use msecs_to_jiffies for conversions · fb79c066
      Nicholas Mc Guire 提交于
      API compliance scanning with coccinelle flagged:
      ./drivers/net/wan/cosa.c:520:2-18: WARNING:
      	timeout (30) seems HZ dependent
      
      Numeric constants passed to schedule_timeout() make the effective
      timeout HZ dependent which makes little sense in a device probe.
      Fixed up by converting the constant to jiffies with msecs_to_jiffies()
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb79c066
    • M
      net/mlx5_core: Fix static checker warnings around system guid query flow · 7cf7fa52
      Majd Dibbiny 提交于
      Fix static checker warnings in the flow of system guid query.
      
      Fixes: 707c4602 ('net/mlx5_core: Add new query HCA vport commands')
      Signed-off-by: NMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cf7fa52
    • V
      isdn/hisax: Convert use of __constant_cpu_to_le16 to cpu_to_le16 · 4e2987a1
      Vaishali Thakkar 提交于
      In big endian cases, macro cpu_to_le16 unfolds to __swab16 which
      provides special case for constants. In little endian cases,
      __constant_cpu_to_le16 and cpu_to_le16 expand directly to the
      same expression. So, replace __constant_cpu_to_le16 with
      cpu_to_le16 with the goal of getting rid of the definition of
      __constant_cpu_to_le16 completely.
      
      The semantic patch that performs this transformation is as follows:
      
      @@expression x;@@
      
      - __constant_cpu_to_le16(x)
      + cpu_to_le16(x)
      Signed-off-by: NVaishali Thakkar <vthakkar1994@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e2987a1
    • A
      ethernet: micrel: use time_is_before_eq_jiffies · addae62e
      Antonio Murdaca 提交于
      use time_is_before_eq_jiffies macro for time comparison
      Signed-off-by: NAntonio Murdaca <antonio.murdaca@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      addae62e
    • F
      net: fec: ptp: correct the ENET_ATCOR value · 34270f5f
      Fugang Duan 提交于
      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: NFugang Duan <B38611@freescale.com>
      Signed-off-by: NFrank Li <Frank.Li@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34270f5f
    • M
      net: ll_temac: Remove sparse warnings · 84ea0ded
      Michal Simek 提交于
      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: NMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84ea0ded