1. 19 Feb, 2014 4 commits
    • stephen hemminger's avatar
      netfilter: remove double colon · 3d0a0620
      stephen hemminger authored
      This is C not shell script
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      3d0a0620
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 1e8d6421
      David S. Miller authored
      Conflicts:
      	drivers/net/bonding/bond_3ad.h
      	drivers/net/bonding/bond_main.c
      
      Two minor conflicts in bonding, both of which were overlapping
      changes.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e8d6421
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 960dfc4e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Lots of little small things, nothing too major: nouveau regression
        fixes, vmware fixes for the new hw support, memory leaks in error path
        fixes"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits)
        drm/radeon/ni: fix typo in dpm sq ramping setup
        drm/radeon/si: fix typo in dpm sq ramping setup
        drm/radeon: fix CP semaphores on CIK
        drm/radeon: delete a stray tab
        drm/radeon: fix display tiling setup on SI
        drm/radeon/dpm: reduce r7xx vblank mclk threshold to 200
        drm/radeon: fill in DRM_CAPs for cursor size
        drm: add DRM_CAPs for cursor size
        drm/radeon: unify bpc handling
        drm/ttm: Fix memory leak in ttm_agp_backend.c
        drm/ttm: declare 'struct device' in ttm_page_alloc.h
        drm/nouveau: fix TTM_PL_TT memtype on pre-nv50
        drm/nv50/disp: use correct register to determine DP display bpp
        drm/nouveau/fb: use correct ram oclass for nv1a hardware
        drm/nv50/gr: add missing nv_error parameter priv
        drm/nouveau: fix ENG_RUNLIST register address
        drm/nv4c/bios: disallow retrieving from prom on nv4x igp's
        drm/nv4c/vga: decode register is in a different place on nv4x igp's
        drm/nv4c/mc: nv4x igp's have a different msi rearm register
        drm/nouveau: set irq_enabled manually
        ...
      960dfc4e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 525b8709
      Linus Torvalds authored
      Pull HID update from Jiri Kosina:
      
       - fixes for several bugs in incorrect allocations of buffers by David
         Herrmann and Benjamin Tissoires.
      
       - support for a few new device IDs by Archana Patni, Benjamin
         Tissoires, Huei-Horng Yo, Reyad Attiyat and Yufeng Shen
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: hyperv: make sure input buffer is big enough
        HID: Bluetooth: hidp: make sure input buffers are big enough
        HID: hid-sensor-hub: quirk for STM Sensor hub
        HID: apple: add Apple wireless keyboard 2011 JIS model support
        HID: fix buffer allocations
        HID: multitouch: add FocalTech FTxxxx support
        HID: microsoft: Add ID's for Surface Type/Touch Cover 2
        HID: usbhid: quirk for CY-TM75 75 inch Touch Overlay
      525b8709
  2. 18 Feb, 2014 36 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · b0d3f6d4
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) kvaser CAN driver has fixed limits of some of it's table, validate
          that we won't exceed those limits at probe time.  Fix from Olivier
          Sobrie.
      
       2) Fix rtl8192ce disabling interrupts for too long, from Olivier
          Langlois.
      
       3) Fix botched shift in ath5k driver, from Dan Carpenter.
      
       4) Fix corruption of deferred packets in TIPC, from Erik Hugne.
      
       5) Fix newlink error path in macvlan driver, from Cong Wang.
      
       6) Fix netpoll deadlock in bonding, from Ding Tianhong.
      
       7) Handle GSO packets properly in forwarding path when fragmentation is
          necessary on egress, from Florian Westphal.
      
       8) Fix axienet build errors, from Michal Simek.
      
       9) Fix refcounting of ubufs on tx in vhost net driver, from Michael S
          Tsirkin.
      
      10) Carrier status isn't set properly in hyperv driver, from Haiyang
          Zhang.
      
      11) Missing pci_disable_device() in tulip_remove_one), from Ingo Molnar.
      
      12) AF_PACKET qdisc bypass mode doesn't adhere to driver provided TX
          queue selection method.  Add a fallback method mechanism to fix this
          bug, from Daniel Borkmann.
      
      13) Fix regression in link local route handling on GRE tunnels, from
          Nicolas Dichtel.
      
      14) Bonding can assign dup aggregator IDs in some sequences of
          configuration, fix by making the allocation counter per-bond instead
          of global.  From Jiri Bohac.
      
      15) sctp_connectx() needs compat translations, from Daniel Borkmann.
      
      16) Fix of_mdio PHY interrupt parsing, from Ben Dooks
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (62 commits)
        MAINTAINERS: add entry for the PHY library
        of_mdio: fix phy interrupt passing
        net: ethernet: update dependency and help text of mvneta
        NET: fec: only enable napi if we are successful
        af_packet: remove a stray tab in packet_set_ring()
        net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode
        ipv4: fix counter in_slow_tot
        irtty-sir.c: Do not set_termios() on irtty_close()
        bonding: 802.3ad: make aggregator_identifier bond-private
        usbnet: remove generic hard_header_len check
        gre: add link local route when local addr is any
        batman-adv: fix potential kernel paging error for unicast transmissions
        batman-adv: avoid double free when orig_node initialization fails
        batman-adv: free skb on TVLV parsing success
        batman-adv: fix TT CRC computation by ensuring byte order
        batman-adv: fix potential orig_node reference leak
        batman-adv: avoid potential race condition when adding a new neighbour
        batman-adv: properly check pskb_may_pull return value
        batman-adv: release vlan object after checking the CRC
        batman-adv: fix TT-TVLV parsing on OGM reception
        ...
      b0d3f6d4
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 91c6c8dc
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A range of ARM fixes.  Biggest change is the stage-2 attributes used
        for for hyp mode which were wrong.  I've killed some bits in a couple
        of DT files which turned out not to be required, and a few other
        fixes.
      
        One fix touches code outside of arch/arm, which is related to sorting
        out the DMA masks correctly.  There is a long standing issue with the
        conversion from PFNs to addresses where people assume that shifting an
        unsigned long left by PAGE_SHIFT results in a correct address.  This
        is not the case with C: the integer promotion happens at assignment
        after evaluation.  This fixes the recently introduced dma_max_pfn()
        function, but there's a number of other places where we try this
        directly on an unsigned long in the mm code"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 7957/1: add DSB after icache flush in __flush_icache_all()
        Fix uses of dma_max_pfn() when converting to a limiting address
        ARM: 7955/1: spinlock: ensure we have a compiler barrier before sev
        ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
        ARM: 7952/1: mm: Fix the memblock allocation for LPAE machines
        ARM: 7950/1: mm: Fix stage-2 device memory attributes
        ARM: dts: fix spdif pinmux configuration
      91c6c8dc
    • Linus Torvalds's avatar
      Merge tag 'jfs-3.14-rc4' of git://github.com/kleikamp/linux-shaggy · 341bbdc5
      Linus Torvalds authored
      Pull jfs fix from David Kleikamp:
       "Another ACL regression. This one more subtle"
      
      * tag 'jfs-3.14-rc4' of git://github.com/kleikamp/linux-shaggy:
        jfs: set i_ctime when setting ACL
      341bbdc5
    • Jiri Pirko's avatar
      rtnl: make ifla_policy static · f7b12606
      Jiri Pirko authored
      The only place this is used outside rtnetlink.c is veth. So provide
      wrapper function for this usage.
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7b12606
    • Joe Perches's avatar
      hsr: Use ether_addr_copy · e83abe37
      Joe Perches authored
      It's slightly smaller/faster for some architectures.
      Make sure def_multicast_addr is __aligned(2)
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e83abe37
    • Florian Fainelli's avatar
      MAINTAINERS: add entry for the PHY library · 22f08ad9
      Florian Fainelli authored
      The PHY library has been subject to some changes, new drivers and DT
      interactions over the past few months. Add myself as a maintainer for
      the core PHY library parts and drivers. Make sure the PHY library entry
      also covers the Device Tree files which have a close interaction with
      the MDIO bus, PHY connection and Ethernet PHY mode parsing.
      
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Shaohui Xie <shaohui.xie@freescale.com>
      CC: Andy Fleming <afleming@gmail.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22f08ad9
    • Ben Dooks's avatar
      of_mdio: fix phy interrupt passing · f15c586d
      Ben Dooks authored
      The of_mdiobus_register_phy() is not setting phy->irq thus causing
      some drivers to incorrectly assume that the PHY does not have an
      IRQ associated with it. Not only do some drivers report no IRQ
      they do not install an interrupt handler for the PHY.
      
      Simplify the code setting irq and set the phy->irq at the same
      time so that we cover the following issues, which should cover
      all the cases the code will find:
      
      - Set phy->irq if node has irq property and mdio->irq is NULL
      - Set phy->irq if node has no irq and mdio->irq is not NULL
      - Leave phy->irq as PHY_POLL default if none of the above
      
      This fixes the issue:
       net eth0: attached PHY 1 (IRQ -1) to driver Micrel KSZ8041RNLI
      
      to the correct:
       net eth0: attached PHY 1 (IRQ 416) to driver Micrel KSZ8041RNLI
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f15c586d
    • Florent Fourcot's avatar
      ipv6: remove some unused include in flowlabel · 42621fd3
      Florent Fourcot authored
      These include are here since kernel 2.2.7, but probably never used.
      Signed-off-by: default avatarFlorent Fourcot <florent.fourcot@enst-bretagne.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42621fd3
    • Phoebe Buckheister's avatar
      ieee802154: fix faulty check in set_phy_params api · 1c8272bd
      Phoebe Buckheister authored
      phy_set_csma_params has a redundant (and impossible) check for
      "retries", found by smatch. The check was supposed to be for
      frame_retries, but wasn't moved during development when
      phy_set_frame_retries was introduced. Also, maxBE >= 3 as required by
      the standard is not enforced.
      
      Remove the redundant check, assure max_be >= 3 and check -1 <=
      frame_retries <= 7 in the correct function.
      Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c8272bd
    • Thomas Petazzoni's avatar
      net: ethernet: update dependency and help text of mvneta · 4b636b53
      Thomas Petazzoni authored
      With the introduction of the support for Armada 375 and Armada 38x,
      the hidden Kconfig option MACH_ARMADA_370_XP is being renamed to
      MACH_MVEBU_V7. Therefore, the dependency that was used for the mvneta
      driver can no longer work. This commit replaces this dependency by a
      dependency on PLAT_ORION, which is used similarly for the mv643xx_eth
      driver.
      
      In addition to this, it takes this opportunity to adjust the
      description and help text to indicate that the driver can is also used
      for Armada 38x. Note that Armada 375 cannot use this driver as it has
      a completely different networking unit, which will require a separate
      driver.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b636b53
    • Russell King's avatar
      NET: fec: only enable napi if we are successful · ce5eaf02
      Russell King authored
      If napi is left enabled after a failed attempt to bring the interface
      up, we BUG:
      
      fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
      libphy: PHY fixed-0:00 not found
      fec 2188000.ethernet eth0: could not attach to PHY
      ------------[ cut here ]------------
      kernel BUG at include/linux/netdevice.h:502!
      Internal error: Oops - BUG: 0 [#1] SMP ARM
      ...
      PC is at fec_enet_open+0x4d0/0x500
      LR is at __dev_open+0xa4/0xfc
      
      Only enable napi after we are past all the failure paths.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ce5eaf02
    • Dan Carpenter's avatar
      af_packet: remove a stray tab in packet_set_ring() · d7cf0c34
      Dan Carpenter authored
      At first glance it looks like there is a missing curly brace but
      actually the code works the same either way.  I have adjusted the
      indenting but left the code the same.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7cf0c34
    • Florian Fainelli's avatar
      Documentation: broadcom-bcmgenet: fix address and cells properties · 9e5f040d
      Florian Fainelli authored
      This patch fixes a typo in the Device Tree binding for the
      leading '#'.
      Reported-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e5f040d
    • Ying Xue's avatar
      tipc: align tipc function names with common naming practice in the network · 247f0f3c
      Ying Xue authored
      Rename the following functions, which are shorter and more in line
      with common naming practice in the network subsystem.
      
      tipc_bclink_send_msg->tipc_bclink_xmit
      tipc_bclink_recv_pkt->tipc_bclink_rcv
      tipc_disc_recv_msg->tipc_disc_rcv
      tipc_link_send_proto_msg->tipc_link_proto_xmit
      link_recv_proto_msg->tipc_link_proto_rcv
      link_send_sections_long->tipc_link_iovec_long_xmit
      tipc_link_send_sections_fast->tipc_link_iovec_xmit_fast
      tipc_link_send_sync->tipc_link_sync_xmit
      tipc_link_recv_sync->tipc_link_sync_rcv
      tipc_link_send_buf->__tipc_link_xmit
      tipc_link_send->tipc_link_xmit
      tipc_link_send_names->tipc_link_names_xmit
      tipc_named_recv->tipc_named_rcv
      tipc_link_recv_bundle->tipc_link_bundle_rcv
      tipc_link_dup_send_queue->tipc_link_dup_queue_xmit
      link_send_long_buf->tipc_link_frag_xmit
      
      tipc_multicast->tipc_port_mcast_xmit
      tipc_port_recv_mcast->tipc_port_mcast_rcv
      tipc_port_reject_sections->tipc_port_iovec_reject
      tipc_port_recv_proto_msg->tipc_port_proto_rcv
      tipc_connect->tipc_port_connect
      __tipc_connect->__tipc_port_connect
      __tipc_disconnect->__tipc_port_disconnect
      tipc_disconnect->tipc_port_disconnect
      tipc_shutdown->tipc_port_shutdown
      tipc_port_recv_msg->tipc_port_rcv
      tipc_port_recv_sections->tipc_port_iovec_rcv
      
      release->tipc_release
      accept->tipc_accept
      bind->tipc_bind
      get_name->tipc_getname
      poll->tipc_poll
      send_msg->tipc_sendmsg
      send_packet->tipc_send_packet
      send_stream->tipc_send_stream
      recv_msg->tipc_recvmsg
      recv_stream->tipc_recv_stream
      connect->tipc_connect
      listen->tipc_listen
      shutdown->tipc_shutdown
      setsockopt->tipc_setsockopt
      getsockopt->tipc_getsockopt
      
      Above changes have no impact on current users of the functions.
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      247f0f3c
    • Sergei Shtylyov's avatar
      sh_eth: add device tree support · b356e978
      Sergei Shtylyov authored
      Add support of the device tree probing for the Renesas SH-Mobile SoCs
      documenting the device tree binding as necessary.
      
      This work is loosely based on the original patch by Nobuhiro Iwamatsu
      <nobuhiro.iwamatsu.yj@renesas.com>.
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b356e978
    • Dave Airlie's avatar
      Merge tag 'ttm-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux into drm-fixes · 75936c65
      Dave Airlie authored
      Pull request of 2014-02-18
      
      One compile fix and one memory leak.
      
      * tag 'ttm-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux:
        drm/ttm: Fix memory leak in ttm_agp_backend.c
        drm/ttm: declare 'struct device' in ttm_page_alloc.h
      75936c65
    • Dave Airlie's avatar
      Merge tag 'vmwgfx-fixes-3.14-2014-02-18' of... · 9830e44f
      Dave Airlie authored
      Merge tag 'vmwgfx-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux into drm-fixes
      
      Pull request of 2014-02-18.
      
      Nothing special. The biggest change is adding a couple of command defines and
      packing the command data correctly.
      
      * tag 'vmwgfx-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux:
        drm/vmwgfx: Fix command defines and checks
        drm/vmwgfx: Fix possible integer overflow
        drm/vmwgfx: Remove stray const
        drm/vmwgfx: unlock on error path in vmw_execbuf_process()
        drm/vmwgfx: Get maximum mob size from register SVGA_REG_MOB_MAX_SIZE
        drm/vmwgfx: Fix a couple of sparse warnings and errors
      9830e44f
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 560591f1
      Dave Airlie authored
      Fix for 128x128 cursors, along with some misc fixes.
      
      * 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon/ni: fix typo in dpm sq ramping setup
        drm/radeon/si: fix typo in dpm sq ramping setup
        drm/radeon: fix CP semaphores on CIK
        drm/radeon: delete a stray tab
        drm/radeon: fix display tiling setup on SI
        drm/radeon/dpm: reduce r7xx vblank mclk threshold to 200
        drm/radeon: fill in DRM_CAPs for cursor size
        drm: add DRM_CAPs for cursor size
        drm/radeon: unify bpc handling
      560591f1
    • Sergei Shtylyov's avatar
      DT: net: document Ethernet bindings in one place · e8f08ee0
      Sergei Shtylyov authored
      This patch is an attempt to gather the Ethernet related bindings in one file,
      like it's done in the MMC and some other subsystems. It should save some of
      the trouble of documenting several properties over and over in each binding
      document, instead only making reference to the main file.
      
      I have used the Embedded Power Architecture(TM) Platform Requirements (ePAPR)
      standard as a base for the properties description, also documenting some ad-hoc
      properties that have been introduced over time despite having direct analogs in
      ePAPR.
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8f08ee0
    • Justin van Wijngaarden's avatar
      Drivers: net: ethernet: 3com: 3c589_cs fixed coding style issues · 6df3efcc
      Justin van Wijngaarden authored
      checkpatch.pl clean-up, from 14 error/ 277 warnings, to 0 errors, 7 warnings
      Signed-off-by: default avatarJustin van Wijngaarden <justinvanwijngaarden@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6df3efcc
    • David S. Miller's avatar
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · d3ec67c0
      David S. Miller authored
      John W. Linville says:
      
      ====================
      Please pull this batch of fixes intended for the 3.14 stream...
      
      For the iwlwifi one, Emmanuel says:
      
      "As explicitly written in the commit message, we prefer to disable Tx
      AMPDU on NICs supported by iwldvm. This feature gives a big boost in
      Tx performance, but the firmware is buggy and we can't rely on it.
      Our hope is that most of the users out there want wifi to surf on
      the web which means that they care more for Rx traffic than for Tx.
      People who want to enable it can do so with the help of a module
      parameter."
      
      On top of that...
      
      Dan Carpenter fixes a typo/thinko in ath5k.
      
      Olivier Langlois fixes a couple of rtlwifi issues, one which leaves
      IRQs disabled too long (causing a variety of problems elsewhere),
      and one which fixes an incorrect return code when failing to enable
      the NIC.
      
      Russell King fixes a NULL pointer dereference in hostap.
      
      Stanislaw Gruszka fixes a DMA coherence issue in the rtl8187 driver.
      
      Please let me know if there are problems!
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3ec67c0
    • David S. Miller's avatar
      Merge branch 'bonding' · 82f148e9
      David S. Miller authored
      Veaceslav Falico says:
      
      ====================
      bonding: add an option to rely on unvalidated arp packets
      
      v4 -> v5:
      Again per Nik's advise correct the bond_opts restrictions for arp_validate
      - set it the same as arp_interval.
      
      v3 -> v4:
      Per Nikolay's advise, remove the new bond_opts restriction on modes setting
      for arp_validate.
      
      v2 -> v3:
      Per Jay's advise, use the 'filter' keyword instead of 'arp' one, and use
      his text for documentation. Also, rebase on the latest net-next. Sorry for
      the delay, didn't manage to send it before net-next was closed.
      
      v1 -> v2:
      Don't remove the 'all traffic' functionality - rather, add new arp_validate
      options to specify that we want *only* unvalidated arps.
      
      Currently, if arp_validate is off (0), slave_last_rx() returns the
      slave->dev->last_rx, which is always updated on *any* packet received by
      slave, and not only arps. This means that, if the validation of arps is
      off, we're treating *any* incoming packet as a proof of slave being up, and
      not only arps.
      
      This might seem logical at the first glance, however it can cause a lot of
      troubles and false-positives, one example would be:
      
      The arp_ip_target is NOT accessible, however someone in the broadcast domain
      spams with any broadcast traffic. This way bonding will be tricked that the
      slave is still up (as in - can access arp_ip_target), while it's not.
      
      The net_device->last_rx is already used in a lot of drivers (even though the
      comment states to NOT do it :)), and it's also ugly to modify it from bonding.
      
      However, some loadbalance setups might rely on the fact that even non-arp
      traffic is a sign of slave being up - and we definitely can't break anyones
      config - so an extension to arp_validate is needed.
      
      So, to fix this, add an option for the user to specify if he wants to
      filter out non-arp traffic on unvalidated slaves, remove the last_rx from
      bonding, *always* call bond_arp_rcv() in slave's rx_handler (which is
      bond_handle_frame), and if we spot an arp there with this option on - update
      the slave->last_arp_rx - and use it instead of net_device->last_rx. Finally,
      rename last_arp_rx to last_rx to reflect the changes.
      
      Also rename slave->jiffies to ->last_link_up, to reflect better its
      meaning, add the new option's documentation and update the arp_validate one
      to be a bit more descriptive.
      ====================
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      82f148e9
    • Veaceslav Falico's avatar
      bonding: rename last_arp_rx to last_rx · 49f17de7
      Veaceslav Falico authored
      To reflect the new meaning.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49f17de7
    • Veaceslav Falico's avatar
      bonding: trivial: rename slave->jiffies to ->last_link_up · 8e603460
      Veaceslav Falico authored
      slave->jiffies is updated every time the slave becomes active, which, for
      bonding, means that its link is 'up'.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e603460
    • Veaceslav Falico's avatar
      bonding: remove useless updating of slave->dev->last_rx · f8ff080d
      Veaceslav Falico authored
      Now that all the logic is handled via last_arp_rx, we don't need to use
      last_rx.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8ff080d
    • Veaceslav Falico's avatar
      bonding: use last_arp_rx in bond_loadbalance_arp_mon() · ff71529d
      Veaceslav Falico authored
      Now that last_arp_rx correctly show the last time we've received an ARP, we
      can use it safely instead of slave->dev->last_rx.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff71529d
    • Veaceslav Falico's avatar
      bonding: use last_arp_rx in slave_last_rx() · 9f242738
      Veaceslav Falico authored
      Now that last_arp_rx really has the last time we've received any (validated or
      not) ARP, we can use it in slave_last_rx() instead of slave->dev->last_rx.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9f242738
    • Veaceslav Falico's avatar
      bonding: use the new options to correctly set last_arp_rx · f2cb691a
      Veaceslav Falico authored
      Now that the options are in place - arp_validate can be set to receive all
      the traffic or only arp packets to verify if the slave is up, when the
      slave isn't validated.
      
      CC: Rob Landley <rob@landley.net>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Nikolay Aleksandrov <nikolay@redhat.com>
      CC: Ding Tianhong <dingtianhong@huawei.com>
      CC: Neil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f2cb691a
    • Veaceslav Falico's avatar
      bonding: document the new _arp options for arp_validate · 52f65ef3
      Veaceslav Falico authored
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52f65ef3
    • Veaceslav Falico's avatar
      bonding: extend arp_validate to be able to receive unvalidated arp-only traffic · 896149ff
      Veaceslav Falico authored
      Currently we can either receive any traffic as a proff of slave being up,
      or only *validated* arp traffic (i.e. with src/dst ip checked).
      
      Add an option to be able to specify if we want to receive non-validated arp
      traffic only.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      896149ff
    • Veaceslav Falico's avatar
      bonding: always set recv_probe to bond_arp_rcv in arp monitor · 3fe68df9
      Veaceslav Falico authored
      Currently we only set bond_arp_rcv() if we're using arp_validate, however
      this makes us skip updating last_arp_rx if we're not validating incoming
      ARPs - thus, if arp_validate is off, last_arp_rx will never be updated.
      
      Fix this by always setting up recv_probe = bond_arp_rcv, even if we're not
      using arp_validate.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fe68df9
    • Veaceslav Falico's avatar
      bonding: always update last_arp_rx on packet recieve · 6db4a545
      Veaceslav Falico authored
      Currently we're updating the last_arp_rx only when we've validate the
      packet, however afterwards we use it as 'ANY last packet received', but not
      only validated ARPs.
      
      Fix this by updating it in case of any packet received. It won't break the
      arp_validation=0 because we, anyway, return the correct slave->dev->last_rx in
      slave_last_rx().
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6db4a545
    • Veaceslav Falico's avatar
      bonding: permit using arp_validate with non-ab modes · 13ac34a8
      Veaceslav Falico authored
      Currently it's disabled because it's sometimes hard, in typical configs, to
      make it work - because of the nature how the loadbalance modes work - as
      it's hard to deliver valid arp replies to correct slaves by the switch.
      
      However we still can use arp_validation in loadbalance with several other
      configs, per example with arp_validate == 2 for backup with one broadcast
      domain, without the switch(es) doing any balancing - this way we'd be (a
      bit more) sure that the slave is up.
      
      So, enable it to let users decide which one works/suits them best. Also
      correct the mode limitation from BOND_OPT_ARP_VALIDATE.
      
      CC: Nikolay Aleksandrov <nikolay@redhat.com>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Acked-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13ac34a8
    • Veaceslav Falico's avatar
      bonding: remove bond->lock from bond_arp_rcv · 3b7d636b
      Veaceslav Falico authored
      We're always called with rcu_read_lock() held (bond_arp_rcv() is only
      called from bond_handle_frame(), which is rx_handler and always called
      under rcu from __netif_receive_skb_core() ).
      
      The slave active/passive and/or bonding params can change in-flight, however
      we don't really care about that - we only modify the last time packet was
      received, which is harmless.
      
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Acked-by: default avatarDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b7d636b
    • David S. Miller's avatar
      Merge branch 'r8152' · 814ce148
      David S. Miller authored
      Hayes Wang says:
      
      ====================
      r8152: improvement and new features
      
      Change some flows or behavior to improve the efficiency or make the
      code readable. Besides, support WOL and runtime suspend.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      814ce148
    • hayeswang's avatar
      r8152: support get_msglevel and set_msglevel · a5ec27c1
      hayeswang authored
      Support get_msglevel and set_msglevel.
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5ec27c1