1. 27 Jul, 2015 3 commits
    • Wei-Chun Chao's avatar
      ipv6: fix crash over flow-based vxlan device · 48fb6b55
      Wei-Chun Chao authored
      Similar check was added in ip_rcv but not in ipv6_rcv.
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<ffffffff81734e0a>] ipv6_rcv+0xfa/0x500
      Call Trace:
      [<ffffffff816c9786>] ? ip_rcv+0x296/0x400
      [<ffffffff817732d2>] ? packet_rcv+0x52/0x410
      [<ffffffff8168e99f>] __netif_receive_skb_core+0x63f/0x9a0
      [<ffffffffc02b34a0>] ? br_handle_frame_finish+0x580/0x580 [bridge]
      [<ffffffff8109912c>] ? update_rq_clock.part.81+0x1c/0x40
      [<ffffffff8168ed18>] __netif_receive_skb+0x18/0x60
      [<ffffffff8168fa1f>] process_backlog+0x9f/0x150
      
      Fixes: ee122c79 (vxlan: Flow based tunneling)
      Signed-off-by: default avatarWei-Chun Chao <weichunc@plumgrid.com>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48fb6b55
    • Florian Fainelli's avatar
      net: bcmgenet: Register link_update callback for all MoCA PHYs · 6ac9de5f
      Florian Fainelli authored
      Commit 8d88c6eb ("net: bcmgenet: enable MoCA link state change
      detection") added a fixed PHY link_update callback for MoCA PHYs when
      registered using platform_data exclusively, this change is also
      applicable to systems using Device Tree as their primary configuration
      interface.
      
      In order for this to work, move the link_update assignment into
      bcmgenet_moca_phy_setup() where we know for sure that we are running on
      a MoCA GENET instance, and do not override phydev->link since this is:
      
      - properly taken care of by the PHY library by getting the link UP/DOWN
        interrupts
      - this now runs everytime we call bcmgenet_open(), so we need to
        preserve whatever we detected before we went administratively DOWN and
        then UP
      - we need to make sure that MoCA PHYs start with a link DOWN during
        probe in order to force a link transition to occur
      
      To avoid a forward declaration, move bcmgenet_fixed_phy_link_update()
      above its caller.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ac9de5f
    • Florian Fainelli's avatar
      net: bcmgenet: Remove checks on clock handles · 7d5d3075
      Florian Fainelli authored
      Instead of multiplying the number of checks for IS_ERR(priv->clk),
      simply NULLify the 'struct clk' pointer which is something the Linux
      common clock framework perfectly deals with and does early return for
      each and every single clk_* API functions.
      
      Having every single function check for !IS_ERR(priv->clk) is both
      redundant and error prone, as it turns out, we were doing it for the
      main GENET clock: priv->clk, but not for the Wake-on-LAN or EEE clock,
      so let's just be consistent here.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarPetri Gynther <pgynther@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d5d3075
  2. 26 Jul, 2015 7 commits
    • KY Srinivasan's avatar
      hv_netvsc: Wait for sub-channels to be processed during probe · b3e6b82a
      KY Srinivasan authored
      The current code returns from probe without waiting for the proper handling
      of subchannels that may be requested. If the netvsc driver were to be rapidly
      loaded/unloaded, we can  trigger a panic as the unload will be tearing
      down state that may not have been fully setup yet. We fix this issue by making
      sure that we return from the probe call only after ensuring that the
      sub-channel offers in flight are properly handled.
      
      Reviewed-and-tested-by: Haiyang Zhang <haiyangz@microsoft.com
      Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3e6b82a
    • Hariprasad Shenai's avatar
      cxgb4: Allow firmware flash, only if cxgb4 is the master driver · 402b7645
      Hariprasad Shenai authored
      Adapter can go for a toss, if cxgb4 is loaded as slave and we try to
      upgrade the firmware. So add a check for the same before flashing
      firmware using ethtool.
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      402b7645
    • Thomas Graf's avatar
      vxlan: Use proper endian type for vni in vxlan[6]_xmit_skb · 6b6948dd
      Thomas Graf authored
      Silences the following sparse warnings:
      drivers/net/vxlan.c:1818:21: warning: incorrect type in assignment (different base types)
      drivers/net/vxlan.c:1818:21:    expected restricted __be32 [usertype] vx_vni
      drivers/net/vxlan.c:1818:21:    got unsigned int [unsigned] [usertype] vni
      drivers/net/vxlan.c:2014:58: warning: incorrect type in argument 11 (different base types)
      drivers/net/vxlan.c:2014:58:    expected unsigned int [unsigned] [usertype] vni
      drivers/net/vxlan.c:2014:58:    got restricted __be32 [usertype] <noident>
      
      Fixes: 614732ea ("openvswitch: Use regular VXLAN net_device device")
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6b6948dd
    • David S. Miller's avatar
      Merge branch 'tipc' · 1d70ec70
      David S. Miller authored
      Jon Maloy says:
      
      ====================
      tipc: clean up socket message reception
      
      Despite recent improvements the message reception code in socket.c is
      perceived as obscure and hard to follow, especially regarding the logics
      for message rejection. With the commits in this series we try to remedy
      this situation.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d70ec70
    • Jon Paul Maloy's avatar
      tipc: clean up socket layer message reception · cda3696d
      Jon Paul Maloy authored
      When a message is received in a socket, one of the call chains
      tipc_sk_rcv()->tipc_sk_enqueue()->filter_rcv()(->tipc_sk_proto_rcv())
      or
      tipc_sk_backlog_rcv()->filter_rcv()(->tipc_sk_proto_rcv())
      are followed. At each of these levels we may encounter situations
      where the message may need to be rejected, or a new message
      produced for transfer back to the sender. Despite recent
      improvements, the current code for doing this is perceived
      as awkward and hard to follow.
      
      Leveraging the two previous commits in this series, we now
      introduce a more uniform handling of such situations. We
      let each of the functions in the chain itself produce/reverse
      the message to be returned to the sender, but also perform the
      actual forwarding. This simplifies the necessary logics within
      each function.
      Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cda3696d
    • Jon Paul Maloy's avatar
      tipc: introduce new tipc_sk_respond() function · bcd3ffd4
      Jon Paul Maloy authored
      Currently, we use the code sequence
      
      if (msg_reverse())
         tipc_link_xmit_skb()
      
      at numerous locations in socket.c. The preparation of arguments
      for these calls, as well as the sequence itself, makes the code
      unecessarily complex.
      
      In this commit, we introduce a new function, tipc_sk_respond(),
      that performs this call combination. We also replace some, but not
      yet all, of these explicit call sequences with calls to the new
      function. Notably, we let the function tipc_sk_proto_rcv() use
      the new function to directly send out PROBE_REPLY messages,
      instead of deferring this to the calling tipc_sk_rcv() function,
      as we do now.
      Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcd3ffd4
    • Jon Paul Maloy's avatar
      tipc: let function tipc_msg_reverse() expand header when needed · 29042e19
      Jon Paul Maloy authored
      The shortest TIPC message header, for cluster local CONNECTED messages,
      is 24 bytes long. With this format, the fields "dest_node" and
      "orig_node" are optimized away, since they in reality are redundant
      in this particular case.
      
      However, the absence of these fields leads to code inconsistencies
      that are difficult to handle in some cases, especially when we need
      to reverse or reject messages at the socket layer.
      
      In this commit, we concentrate the handling of the absent fields
      to one place, by letting the function tipc_msg_reverse() reallocate
      the buffer and expand the header to 32 bytes when necessary. This
      means that the socket code now can assume that the two previously
      absent fields are present in the header when a message needs to be
      rejected. This opens up for some further simplifications of the
      socket code.
      Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29042e19
  3. 25 Jul, 2015 3 commits
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · a69e5a0d
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-07-23
      
      This series contains updates to e1000e, igb, ixgbevf, i40e and i40evf.
      
      Emil extends the reporting of the RSS key and hash table by adding support
      for x550 VFs.
      
      Jia-Ju Bai fixes a QoS issue in e1000e where the error handling lacked a
      call to pm_qos_remove_request() to cleanup the QoS request made in
      e1000_open().
      
      Todd updates igb to report unsupported for ethtool coalesce settings
      that are not supported.  Also updated the driver to use the ARRAY_SIZE()
      macro.
      
      Carolyn fixes and refactors the dynamic ITR code for i40e and i40evf
      which would never change dynamically.  So update the switch() statement
      to have a default case and switch on "new_latency_range" versus the
      current ITR setting.
      
      Shannon cleans up i40e code, where there were un-needed goto's.  Also
      clean up error status messages that were causing some confusion in
      PHY and FCoE setup error reports.
      
      Mitch updates the virtual channel interface to prepare for the x722 device
      and other future devices, so that the VF driver can report what its
      capable of supporting to the PF driver.  Updates the i40evf driver to
      handle resets like Core or EMP resets, where the device is reinitialized
      and the VF will not get the same VSI.
      
      Jesse updates the i40e and i40evf driver to use the kernel BIT() and
      BIT_ULL() macros.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a69e5a0d
    • Rosen, Rami's avatar
      bridge: Fix setting a flag in br_fill_ifvlaninfo_range(). · 6ca91c60
      Rosen, Rami authored
      This patch fixes setting of vinfo.flags in the br_fill_ifvlaninfo_range() method. The
      assignment of vinfo.flags &= ~BRIDGE_VLAN_INFO_RANGE_BEGIN has no effect and is
      unneeded, as vinfo.flags value is overriden by the  immediately following
      vinfo.flags = flags | BRIDGE_VLAN_INFO_RANGE_END assignement.
      Signed-off-by: default avatarRami Rosen <rami.rosen@intel.com>
      Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6ca91c60
    • Sriharsha Basavapatna's avatar
      be2net: support ndo_get_phys_port_id() · a155a5db
      Sriharsha Basavapatna authored
      Add be_get_phys_port_id() function to report physical port id. The port id
      should be unique across different be2net devices in the system. We use the
      chip serial number along with the physical port number for this.
      Signed-off-by: default avatarSriharsha Basavapatna <sriharsha.basavapatna@avagotech.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a155a5db
  4. 23 Jul, 2015 17 commits
  5. 22 Jul, 2015 10 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · c5dfd654
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Don't use shared bluetooth antenna in iwlwifi driver for management
          frames, from Emmanuel Grumbach.
      
       2) Fix device ID check in ath9k driver, from Felix Fietkau.
      
       3) Off by one in xen-netback BUG checks, from Dan Carpenter.
      
       4) Fix IFLA_VF_PORT netlink attribute validation, from Daniel Borkmann.
      
       5) Fix races in setting peeked bit flag in SKBs during datagram
          receive.  If it's shared we have to clone it otherwise the value can
          easily be corrupted.  Fix from Herbert Xu.
      
       6) Revert fec clock handling change, causes regressions.  From Fabio
          Estevam.
      
       7) Fix use after free in fq_codel and sfq packet schedulers, from WANG
          Cong.
      
       8) ipvlan bug fixes (memory leaks, missing rcu_dereference_bh, etc.)
          from WANG Cong and Konstantin Khlebnikov.
      
       9) Memory leak in act_bpf packet action, from Alexei Starovoitov.
      
      10) ARM bpf JIT bug fixes from Nicolas Schichan.
      
      11) Fix backwards compat of ANY_LAYOUT in virtio_net driver, from
          Michael S Tsirkin.
      
      12) Destruction of bond with different ARP header types not handled
          correctly, fix from Nikolay Aleksandrov.
      
      13) Revert GRO receive support in ipv6 SIT tunnel driver, causes
          regressions because the GRO packets created cannot be processed
          properly on the GSO side if we forward the frame.  From Herbert Xu.
      
      14) TCCR update race and other fixes to ravb driver from Sergei
          Shtylyov.
      
      15) Fix SKB leaks in caif_queue_rcv_skb(), from Eric Dumazet.
      
      16) Fix panics on packet scheduler filter replace, from Daniel Borkmann.
      
      17) Make sure AF_PACKET sees properly IP headers in defragmented frames
          (via PACKET_FANOUT_FLAG_DEFRAG option), from Edward Hyunkoo Jee.
      
      18) AF_NETLINK cannot hold mutex in RCU callback, fix from Florian
          Westphal.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (84 commits)
        ravb: fix ring memory allocation
        net: phy: dp83867: Fix warning check for setting the internal delay
        openvswitch: allocate nr_node_ids flow_stats instead of num_possible_nodes
        netlink: don't hold mutex in rcu callback when releasing mmapd ring
        ARM: net: fix vlan access instructions in ARM JIT.
        ARM: net: handle negative offsets in BPF JIT.
        ARM: net: fix condition for load_order > 0 when translating load instructions.
        tcp: suppress a division by zero warning
        drivers: net: cpsw: remove tx event processing in rx napi poll
        inet: frags: fix defragmented packet's IP header for af_packet
        net: mvneta: fix refilling for Rx DMA buffers
        stmmac: fix setting of driver data in stmmac_dvr_probe
        sched: cls_flow: fix panic on filter replace
        sched: cls_flower: fix panic on filter replace
        sched: cls_bpf: fix panic on filter replace
        net/mdio: fix mdio_bus_match for c45 PHY
        net: ratelimit warnings about dst entry refcount underflow or overflow
        caif: fix leaks and race in caif_queue_rcv_skb()
        qmi_wwan: add the second QMI/network interface for Sierra Wireless MC7305/MC7355
        ravb: fix race updating TCCR
        ...
      c5dfd654
    • Thomas Graf's avatar
      ip_tunnel: Provide tunnel metadata API for CONFIG_INET=n · 05283187
      Thomas Graf authored
      Account for the configuration FIB_RULES=y && INET=n as FIB_RULES can
      be selected by IPV6 or DECNET without INET.
      
      Fixes: e7030878 ("fib: Add fib rule match on tunnel id")
      Fixes: 3093fbe7 ("route: Per route IP tunnel metadata via lightweight tunnel")
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05283187
    • Erik Kline's avatar
      ipv6: sysctl to restrict candidate source addresses · 3985e8a3
      Erik Kline authored
      Per RFC 6724, section 4, "Candidate Source Addresses":
      
          It is RECOMMENDED that the candidate source addresses be the set
          of unicast addresses assigned to the interface that will be used
          to send to the destination (the "outgoing" interface).
      
      Add a sysctl to enable this behaviour.
      Signed-off-by: default avatarErik Kline <ek@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3985e8a3
    • hayeswang's avatar
      r8152: support the new RTL8153 chip · fb02eb4a
      hayeswang authored
      Support the new USB gigabit ethernet.
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb02eb4a
    • Roopa Prabhu's avatar
      mpls_iptunnel: fix sparse warn: remove incorrect rcu_dereference · de18547d
      Roopa Prabhu authored
      fix for:
      net/mpls/mpls_iptunnel.c:73:19: sparse: incompatible types in comparison
      expression (different address spaces)
      
      remove incorrect rcu_dereference possibly left over from
      earlier revisions of the code.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de18547d
    • David S. Miller's avatar
      Merge branch 'bnx2x-next' · 70c9bb8b
      David S. Miller authored
      Yuval Mintz says:
      
      ====================
      bnx2x: update FW, rebrand and more
      
      This patch series does several things - it updates the bnx2x FW into
      7.12.30 which both contains some small fixes as well as opening the door
      for several new features for the device - mainly vxlan/geneve offloads
      and vlan filtering offload.
      It then adds a new Multi-function mode [BD] which requires this FW in
      order to operate.
      
      In addition, this finally rebrands the driver from a 'broadcom' driver
      into a 'qlogic' driver [although it would still reside under Broadcom's
      tree in the kernel].
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70c9bb8b
    • Yuval Mintz's avatar
      3a375e3c
    • Yuval Mintz's avatar
      bnx2x: Add MFW dump support · c48f350f
      Yuval Mintz authored
      Devices with up-to-date management FW will be able to store register dumps
      on their persistent storage - in case management FW identifies a fatal
      error it would gather and store such dumps, which could later be retrieved
      using specific debug tools.
      
      This patch adds the necessary part in the driver in order to make the
      feature operational, as well as update users [under debug] during load
      in case their device contains a dump of a previous crash.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c48f350f
    • Yuval Mintz's avatar
      bnx2x: new Multi-function mode - BD · 230d00eb
      Yuval Mintz authored
      This adds support to a new multi-function mode, enabling driver to
      initialize such devices and correctly interacting with management FW
      for fully utilizing their features.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      230d00eb
    • Yaniv Rosner's avatar
      bnx2x: Add 84858 phy support · 924c6216
      Yaniv Rosner authored
      This adds support to a new copper phy.
      Signed-off-by: default avatarYaniv Rosner <Yaniv.Rosner@qlogic.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      924c6216