1. 13 Oct, 2015 3 commits
    • Gerlando Falauto's avatar
      net/fsl_pq_mdio: fix computed address for the TBI register · 3bb35ac4
      Gerlando Falauto authored
      commit afae5ad7
        "net/fsl_pq_mdio: streamline probing of MDIO nodes"
      
      added support for different types of MDIO devices:
      1) Gianfar MDIO nodes that only map the MII registers
      2) Gianfar MDIO nodes that map the full MDIO register set
      3) eTSEC2 MDIO nodes (which map the full MDIO register set)
      4) QE MDIO nodes (which map only the MII registers)
      
      However, the implementation for types 1 and 4 would mistakenly assume
      a mapping of the full MDIO register set, thereby computing the address
      for the TBI register starting from the containing structure.
      The TBI register would therefore be accessed at a wrong (much bigger)
      address, not giving the expected result at all.
      This patch restores the correct behavior we had prior to the above one.
      
      The consequences of this bug are apparent when trying to access a PHY
      with the same address as the value contained in the initial value of
      the TBI register (normally 0); in that case you'll get answers from the
      internal TBI device (even though MDIO/MDC pins are actually *also*
      toggling on the physical bus!).
      Beware that you also need to add a fake tbi node to your device tree
      with an unused address.
      
      Notice how this fix is related to commit
      22066949
        "powerpc: Add TBI PHY node to first MDIO bus"
      
      which fixed the behavior in kernel 3.3, which was later broken by the
      above commit on kernel 3.7.
      Signed-off-by: default avatarGerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Timur Tabi <timur@tabi.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3bb35ac4
    • Gerlando Falauto's avatar
      net/fsl_pq_mdio: check TBI address for consistency with mapped range · 3dd03e52
      Gerlando Falauto authored
      When configuring the MDIO subsystem it is also necessary to configure
      the TBI register. Make sure the TBI is contained within the mapped
      register range in order to:
      a) make sure the address is computed correctly
      b) make users aware that we're actually accessing that register
      
      In case of error, print a message but continue anyway.
      Signed-off-by: default avatarGerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Timur Tabi <timur@tabi.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3dd03e52
    • Arad, Ronen's avatar
      rtnetlink: fix gcc -Wconversion warning · e8444637
      Arad, Ronen authored
      RTA_ALIGNTO is currently define as 4. It has to be 4U to prevent warning
      for RTA_ALIGN and RTA_DATA expansions when -Wconversion gcc option is
      enabled.
      This follows NLMSG_ALIGNTO definition in <include/uapi/linux/netlink.h>.
      Signed-off-by: default avatarRonen Arad <ronen.arad@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8444637
  2. 11 Oct, 2015 7 commits
  3. 09 Oct, 2015 5 commits
  4. 08 Oct, 2015 6 commits
  5. 07 Oct, 2015 15 commits
  6. 06 Oct, 2015 1 commit
  7. 05 Oct, 2015 3 commits
    • Pravin B Shelar's avatar
      openvswitch: Fix ovs_vport_get_stats() · 83ffe99f
      Pravin B Shelar authored
      Not every device has dev->tstats set. So when OVS tries to calculate
      vport stats it causes kernel panic. Following patch fixes it by
      using standard API to get net-device stats.
      
      ---8<---
      Unable to handle kernel paging request at virtual address 766b4008
      Internal error: Oops: 96000005 [#1] PREEMPT SMP
      Modules linked in: vport_vxlan vxlan ip6_udp_tunnel udp_tunnel tun bridge stp llc openvswitch ipv6
      CPU: 7 PID: 1108 Comm: ovs-vswitchd Not tainted 4.3.0-rc3+ #82
      PC is at ovs_vport_get_stats+0x150/0x1f8 [openvswitch]
      <snip>
      Call trace:
       [<ffffffbffc0859f8>] ovs_vport_get_stats+0x150/0x1f8 [openvswitch]
       [<ffffffbffc07cdb0>] ovs_vport_cmd_fill_info+0x140/0x1e0 [openvswitch]
       [<ffffffbffc07cf0c>] ovs_vport_cmd_dump+0xbc/0x138 [openvswitch]
       [<ffffffc00045a5ac>] netlink_dump+0xb8/0x258
       [<ffffffc00045ace0>] __netlink_dump_start+0x120/0x178
       [<ffffffc00045dd9c>] genl_family_rcv_msg+0x2d4/0x308
       [<ffffffc00045de58>] genl_rcv_msg+0x88/0xc4
       [<ffffffc00045cf24>] netlink_rcv_skb+0xd4/0x100
       [<ffffffc00045dab0>] genl_rcv+0x30/0x48
       [<ffffffc00045c830>] netlink_unicast+0x154/0x200
       [<ffffffc00045cc9c>] netlink_sendmsg+0x308/0x364
       [<ffffffc00041e10c>] sock_sendmsg+0x14/0x2c
       [<ffffffc000420d58>] SyS_sendto+0xbc/0xf0
      Code: aa1603e1 f94037a4 aa1303e2 aa1703e0 (f9400465)
      Reported-by: default avatarTomasz Sawicki <tomasz.sawicki@objectiveintegration.uk>
      Fixes: 8c876639 ("openvswitch: Remove vport stats.")
      Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83ffe99f
    • Nicolas Schichan's avatar
      ARM: net: make BPF_LD | BPF_IND instruction trigger r_X initialisation to 0. · 8690f47d
      Nicolas Schichan authored
      Without this patch, if the only instructions using r_X are of the
      BPF_LD | BPF_IND type, r_X would not be reset to 0, using whatever
      value was there when entering the jited code. With this patch, r_X
      will be correctly marked as used so it will be reset to 0 in the
      prologue code.
      
      This fix also makes the test "LD_IND byte default X" pass in the
      test_bpf module when the ARM JIT is enabled.
      Signed-off-by: default avatarNicolas Schichan <nschichan@freebox.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8690f47d
    • Konstantin Khlebnikov's avatar
      ovs: do not allocate memory from offline numa node · 598c12d0
      Konstantin Khlebnikov authored
      When openvswitch tries allocate memory from offline numa node 0:
      stats = kmem_cache_alloc_node(flow_stats_cache, GFP_KERNEL | __GFP_ZERO, 0)
      It catches VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES || !node_online(nid))
      [ replaced with VM_WARN_ON(!node_online(nid)) recently ] in linux/gfp.h
      This patch disables numa affinity in this case.
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      598c12d0