1. 28 Apr, 2016 1 commit
    • Akinobu Mita's avatar
      net: w5100: support W5500 · 35ef7d68
      Akinobu Mita authored
      This adds support for W5500 chip.
      
      W5500 has similar register and memory organization with W5100 and W5200.
      There are a few important differences listed below but it is still
      possible to share common code with W5100 and W5200.
      
      * W5500 register and memory are organized by multiple blocks.  Each one
      is selected by 16bits offset address and 5bits block select bits.
      
      But the existing register access operations take u16 address.  This change
      extends the addess by u32 address and put offset address to lower 16bits
      and block select bits to upper 16bits.
      
      This change also adds the offset addresses for socket register and TX/RX
      memory blocks to the driver private data structure in order to reduce
      conditional switches for each chip.
      
      * W5500 has the different register offset for socket interrupt mask
      register.  Newly added internal functions w5100_enable_intr() and
      w5100_disable_intr() take care of the diffrence.
      
      * W5500 has the different register offset for retry time-value register.
      But this register is only used to verify that the reset value is correctly
      read at initialization.  So move the verification to w5100_hw_reset()
      which already does different things for different chips.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Mike Sinkovsky <msink@permonline.ru>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      35ef7d68
  2. 27 Apr, 2016 3 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · c0cc5316
      David S. Miller authored
      Minor overlapping changes in the conflicts.
      
      In the macsec case, the change of the default ID macro
      name overlapped with the 64-bit netlink attribute alignment
      fixes in net-next.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0cc5316
    • David Ahern's avatar
      net: ipv6: Use passed in table for nexthop lookups · 8c14586f
      David Ahern authored
      Similar to 3bfd8472 ("net: Use passed in table for nexthop lookups")
      for IPv4, if the route spec contains a table id use that to lookup the
      next hop first and fall back to a full lookup if it fails (per the fix
      4c9bcd11 ("net: Fix nexthop lookups")).
      
      Example:
      
          root@kenny:~# ip -6 ro ls table red
          local 2100:1::1 dev lo  proto none  metric 0  pref medium
          2100:1::/120 dev eth1  proto kernel  metric 256  pref medium
          local 2100:2::1 dev lo  proto none  metric 0  pref medium
          2100:2::/120 dev eth2  proto kernel  metric 256  pref medium
          local fe80::e0:f9ff:fe09:3cac dev lo  proto none  metric 0  pref medium
          local fe80::e0:f9ff:fe1c:b974 dev lo  proto none  metric 0  pref medium
          fe80::/64 dev eth1  proto kernel  metric 256  pref medium
          fe80::/64 dev eth2  proto kernel  metric 256  pref medium
          ff00::/8 dev red  metric 256  pref medium
          ff00::/8 dev eth1  metric 256  pref medium
          ff00::/8 dev eth2  metric 256  pref medium
          unreachable default dev lo  metric 240  error -113 pref medium
      
          root@kenny:~# ip -6 ro add table red 2100:3::/64 via 2100:1::64
          RTNETLINK answers: No route to host
      
      Route add fails even though 2100:1::64 is a reachable next hop:
          root@kenny:~# ping6 -I red  2100:1::64
          ping6: Warning: source address might be selected on device other than red.
          PING 2100:1::64(2100:1::64) from 2100:1::1 red: 56 data bytes
          64 bytes from 2100:1::64: icmp_seq=1 ttl=64 time=1.33 ms
      
      With this patch:
          root@kenny:~# ip -6 ro add table red 2100:3::/64 via 2100:1::64
          root@kenny:~# ip -6 ro ls table red
          local 2100:1::1 dev lo  proto none  metric 0  pref medium
          2100:1::/120 dev eth1  proto kernel  metric 256  pref medium
          local 2100:2::1 dev lo  proto none  metric 0  pref medium
          2100:2::/120 dev eth2  proto kernel  metric 256  pref medium
          2100:3::/64 via 2100:1::64 dev eth1  metric 1024  pref medium
          local fe80::e0:f9ff:fe09:3cac dev lo  proto none  metric 0  pref medium
          local fe80::e0:f9ff:fe1c:b974 dev lo  proto none  metric 0  pref medium
          fe80::/64 dev eth1  proto kernel  metric 256  pref medium
          fe80::/64 dev eth2  proto kernel  metric 256  pref medium
          ff00::/8 dev red  metric 256  pref medium
          ff00::/8 dev eth1  metric 256  pref medium
          ff00::/8 dev eth2  metric 256  pref medium
          unreachable default dev lo  metric 240  error -113 pref medium
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c14586f
    • Nicolas Dichtel's avatar
      taskstats: fix nl parsing in accounting/getdelays.c · 570d8e93
      Nicolas Dichtel authored
      The type TASKSTATS_TYPE_NULL should always be ignored.
      
      When jumping to the next attribute, only the length of the current
      attribute should be added, not the length of all nested attributes.
      This last bug was not visible before commit 80df5542, because the
      kernel didn't put more than two nested attributes.
      
      Fixes: a3baf649 ("[PATCH] per-task-delay-accounting: documentation")
      Fixes: 80df5542 ("taskstats: use the libnl API to align nlattr on 64-bit")
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      570d8e93
  3. 26 Apr, 2016 36 commits