1. 03 5月, 2017 40 次提交
    • N
      ibmvnic: Updated reset handling · ed651a10
      Nathan Fontenot 提交于
      The ibmvnic driver has multiple handlers for resetting the driver
      depending on the reason the reset is needed (failover, lpm,
      fatal erors,...). All of the reset handlers do essentially the same
      thing, this patch moves this work to a common reset handler.
      
      By doing this we also allow the driver to better handle situations
      where we can get a reset while handling a reset.
      
      The updated reset handling works by adding a reset work item to the
      list of resets and then scheduling work to perform the reset. This
      step is necessary because we can receive a reset in interrupt context
      and we want to handle the reset out of interrupt context.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed651a10
    • N
      ibmvnic: Replace is_closed with state field · 90c8014c
      Nathan Fontenot 提交于
      Replace the is_closed flag in the ibmvnic adapter strcut with a
      more comprehensive state field that tracks the current state of
      the driver.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90c8014c
    • N
      ibmvnic: Move resource initialization to its own routine · bfc32f29
      Nathan Fontenot 提交于
      Move all of the calls to initialize resources for the driver to
      a separate routine.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bfc32f29
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · 4d89ac2d
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS/OVS fixes for net
      
      The following patchset contains a rather large batch of Netfilter, IPVS
      and OVS fixes for your net tree. This includes fixes for ctnetlink, the
      userspace conntrack helper infrastructure, conntrack OVS support,
      ebtables DNAT target, several leaks in error path among other. More
      specifically, they are:
      
      1) Fix reference count leak in the CT target error path, from Gao Feng.
      
      2) Remove conntrack entry clashing with a matching expectation, patch
         from Jarno Rajahalme.
      
      3) Fix bogus EEXIST when registering two different userspace helpers,
         from Liping Zhang.
      
      4) Don't leak dummy elements in the new bitmap set type in nf_tables,
         from Liping Zhang.
      
      5) Get rid of module autoload from conntrack update path in ctnetlink,
         we don't need autoload at this late stage and it is happening with
         rcu read lock held which is not good. From Liping Zhang.
      
      6) Fix deadlock due to double-acquire of the expect_lock from conntrack
         update path, this fixes a bug that was introduced when the central
         spinlock got removed. Again from Liping Zhang.
      
      7) Safe ct->status update from ctnetlink path, from Liping. The expect_lock
         protection that was selected when the central spinlock was removed was
         not really protecting anything at all.
      
      8) Protect sequence adjustment under ct->lock.
      
      9) Missing socket match with IPv6, from Peter Tirsek.
      
      10) Adjust skb->pkt_type of DNAT'ed frames from ebtables, from
          Linus Luessing.
      
      11) Don't give up on evaluating the expression on new entries added via
          dynset expression in nf_tables, from Liping Zhang.
      
      12) Use skb_checksum() when mangling icmpv6 in IPv6 NAT as this deals
          with non-linear skbuffs.
      
      13) Don't allow IPv6 service in IPVS if no IPv6 support is available,
          from Paolo Abeni.
      
      14) Missing mutex release in error path of xt_find_table_lock(), from
          Dan Carpenter.
      
      15) Update maintainers files, Netfilter section. Add Florian to the
          file, refer to nftables.org and change project status from Supported
          to Maintained.
      
      16) Bail out on mismatching extensions in element updates in nf_tables.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d89ac2d
    • G
      netfilter: conntrack: Force inlining of build check to prevent build failure · ab71632c
      Geert Uytterhoeven 提交于
      If gcc (e.g. 4.1.2) decides not to inline total_extension_size(), the
      build will fail with:
      
          net/built-in.o: In function `nf_conntrack_init_start':
          (.text+0x9baf6): undefined reference to `__compiletime_assert_1893'
      
      or
      
          ERROR: "__compiletime_assert_1893" [net/netfilter/nf_conntrack.ko] undefined!
      
      Fix this by forcing inlining of total_extension_size().
      
      Fixes: b3a5db10 ("netfilter: conntrack: use u8 for extension sizes again")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab71632c
    • G
      test_bpf: Use ULL suffix for 64-bit constants · 86f8e247
      Geert Uytterhoeven 提交于
      On 32-bit:
      
          lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4772: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4773: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4773: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4787: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4787: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4801: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4801: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4802: warning: integer constant is too large for ‘unsigned long’ type
          lib/test_bpf.c:4802: warning: integer constant is too large for ‘unsigned long’ type
      
      On 32-bit systems, "long" is only 32-bit.
      Replace the "UL" suffix by "ULL" to fix this.
      
      Fixes: 85f68fe8 ("bpf, arm64: implement jiting of BPF_XADD")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86f8e247
    • D
      net: usb: qmi_wwan: add Telit ME910 support · 4c54dc02
      Daniele Palmas 提交于
      This patch adds support for Telit ME910 PID 0x1100.
      Signed-off-by: NDaniele Palmas <dnlplm@gmail.com>
      Acked-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4c54dc02
    • Y
      tg3: don't clear stats while tg3_close · 37a7fdf2
      YueHaibing 提交于
      Now tg3 NIC's stats will be cleared after ifdown/ifup. bond_get_stats traverse
      its salves to get statistics,cumulative the increment.If a tg3 NIC is added to
      bonding as a slave,ifdown/ifup will cause bonding's stats become tremendous value
      (ex.1638.3 PiB) because of negative increment.
      
      Fixes: 92feeabf ("tg3: Save stats across chip resets")
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37a7fdf2
    • A
      selftests/bpf: get rid of -D__x86_64__ · 1c2dd16a
      Alexei Starovoitov 提交于
      -D__x86_64__ workaround was used to make /usr/include/features.h
      to follow expected path through the system include headers.
      This is not portable.
      Instead define dummy stubs.h which is used by 'clang -target bpf'
      
      Fixes: 6882804c ("selftests/bpf: add a test for overlapping packet range checks")
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c2dd16a
    • Y
      selftests/bpf: add a test case to check verifier pointer arithmetic · 6ead18fb
      Yonghong Song 提交于
      With clang/llvm 4.0+, the test case is able to generate
      the following pattern:
      ....
      440: (b7) r1 = 15
      441: (05) goto pc+73
      515: (79) r6 = *(u64 *)(r10 -152)
      516: (bf) r7 = r10
      517: (07) r7 += -112
      518: (bf) r2 = r7
      519: (0f) r2 += r1
      520: (71) r1 = *(u8 *)(r8 +0)
      521: (73) *(u8 *)(r2 +45) = r1
      ....
      
      commit 332270fd ("bpf: enhance verifier to understand stack
      pointer arithmetic") improved verifier to handle such a pattern.
      This patch adds a C test case to actually generate such a pattern.
      A dummy tracepoint interface is used to load the program
      into the kernel.
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ead18fb
    • D
      xdp: use common helper for netlink extended ack reporting · 4d463c4d
      Daniel Borkmann 提交于
      Small follow-up to d74a32ac ("xdp: use netlink extended ACK reporting")
      in order to let drivers all use the same NL_SET_ERR_MSG_MOD() helper macro
      for reporting. This also ensures that we consistently add the driver's
      prefix for dumping the report in user space to indicate that the error
      message is driver specific and not coming from core code. Furthermore,
      NL_SET_ERR_MSG_MOD() now reuses NL_SET_ERR_MSG() and thus makes all macros
      check the pointer as suggested.
      
      References: https://www.spinics.net/lists/netdev/msg433267.htmlSigned-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d463c4d
    • D
      net: ipv6: Do not duplicate DAD on link up · 6d717134
      David Ahern 提交于
      Andrey reported a warning triggered by the rcu code:
      
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 5911 at lib/debugobjects.c:289
      debug_print_object+0x175/0x210
      ODEBUG: activate active (active state 1) object type: rcu_head hint:
              (null)
      Modules linked in:
      CPU: 1 PID: 5911 Comm: a.out Not tainted 4.11.0-rc8+ #271
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:16
       dump_stack+0x192/0x22d lib/dump_stack.c:52
       __warn+0x19f/0x1e0 kernel/panic.c:549
       warn_slowpath_fmt+0xe0/0x120 kernel/panic.c:564
       debug_print_object+0x175/0x210 lib/debugobjects.c:286
       debug_object_activate+0x574/0x7e0 lib/debugobjects.c:442
       debug_rcu_head_queue kernel/rcu/rcu.h:75
       __call_rcu.constprop.76+0xff/0x9c0 kernel/rcu/tree.c:3229
       call_rcu_sched+0x12/0x20 kernel/rcu/tree.c:3288
       rt6_rcu_free net/ipv6/ip6_fib.c:158
       rt6_release+0x1ea/0x290 net/ipv6/ip6_fib.c:188
       fib6_del_route net/ipv6/ip6_fib.c:1461
       fib6_del+0xa42/0xdc0 net/ipv6/ip6_fib.c:1500
       __ip6_del_rt+0x100/0x160 net/ipv6/route.c:2174
       ip6_del_rt+0x140/0x1b0 net/ipv6/route.c:2187
       __ipv6_ifa_notify+0x269/0x780 net/ipv6/addrconf.c:5520
       addrconf_ifdown+0xe60/0x1a20 net/ipv6/addrconf.c:3672
      ...
      
      Andrey's reproducer program runs in a very tight loop, calling
      'unshare -n' and then spawning 2 sets of 14 threads running random ioctl
      calls. The relevant networking sequence:
      
      1. New network namespace created via unshare -n
      - ip6tnl0 device is created in down state
      
      2. address added to ip6tnl0
      - equivalent to ip -6 addr add dev ip6tnl0 fd00::bb/1
      - DAD is started on the address and when it completes the host
        route is inserted into the FIB
      
      3. ip6tnl0 is brought up
      - the new fixup_permanent_addr function restarts DAD on the address
      
      4. exit namespace
      - teardown / cleanup sequence starts
      - once in a blue moon, lo teardown appears to happen BEFORE teardown
        of ip6tunl0
        + down on 'lo' removes the host route from the FIB since the dst->dev
          for the route is loobback
        + host route added to rcu callback list
          * rcu callback has not run yet, so rt is NOT on the gc list so it has
            NOT been marked obsolete
      
      5. in parallel to 4. worker_thread runs addrconf_dad_completed
      - DAD on the address on ip6tnl0 completes
      - calls ipv6_ifa_notify which inserts the host route
      
      All of that happens very quickly. The result is that a host route that
      has been deleted from the IPv6 FIB and added to the RCU list is re-inserted
      into the FIB.
      
      The exit namespace eventually gets to cleaning up ip6tnl0 which removes the
      host route from the FIB again, calls the rcu function for cleanup -- and
      triggers the double rcu trace.
      
      The root cause is duplicate DAD on the address -- steps 2 and 3. Arguably,
      DAD should not be started in step 2. The interface is in the down state,
      so it can not really send out requests for the address which makes starting
      DAD pointless.
      
      Since the second DAD was introduced by a recent change, seems appropriate
      to use it for the Fixes tag and have the fixup function only start DAD for
      addresses in the PREDAD state which occurs in addrconf_ifdown if the
      address is retained.
      
      Big thanks to Andrey for isolating a reliable reproducer for this problem.
      Fixes: f1705ec1 ("net: ipv6: Make address flushing on ifdown optional")
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d717134
    • D
      smsc911x: Adding support for Micochip LAN9250 Ethernet controller · f6fec61e
      David Cai 提交于
      Adding support for Microchip LAN9250 Ethernet controller.
      Signed-off-by: NDavid Cai <david.cai@microchip.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6fec61e
    • D
      Merge branch 'sample-bpf-loader-fixes' · 8b8e3ad0
      David S. Miller 提交于
      Jesper Dangaard Brouer says:
      
      ====================
      Improve bpf ELF-loader under samples/bpf
      
      This series improves and fixes bpf ELF loader and programs under
      samples/bpf.  The bpf_load.c created some hard to debug issues when
      the struct (bpf_map_def) used in the ELF maps section format changed
      in commit fb30d4b7 ("bpf: Add tests for map-in-map").
      
      This was hotfixed in commit 409526bea3c3 ("samples/bpf: bpf_load.c
      detect and abort if ELF maps section size is wrong") by detecting the
      issue and aborting the program.
      
      In most situations the bpf-loader should be able to handle these kind
      of changes to the struct size.  This patch series aim to do proper
      backward and forward compabilility handling when loading ELF files.
      
      This series also adjust the callback that was introduced in commit
      9fd63d05 ("bpf: Allow bpf sample programs (*_user.c) to change
      bpf_map_def") to use the new bpf_map_data structure, before more users
      start to use this callback.
      
      Hoping these changes can make the merge window, as above mentioned
      commits have not been merged yet, and it would be good to avoid users
      hitting these issues.
      ====================
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b8e3ad0
    • J
      samples/bpf: export map_data[] for more info on maps · 9178b4c1
      Jesper Dangaard Brouer 提交于
      Giving *_user.c side tools access to map_data[] provides easier
      access to information on the maps being loaded.  Still provide
      the guarantee that the order maps are being defined in inside the
      _kern.c file corresponds with the order in the array.  Now user
      tools are not blind, but can inspect and verify the maps that got
      loaded from the ELF binary.
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9178b4c1
    • J
      samples/bpf: load_bpf.c make callback fixup more flexible · 6979bcc7
      Jesper Dangaard Brouer 提交于
      Do this change before others start to use this callback.
      Change map_perf_test_user.c which seems to be the only user.
      
      This patch extends capabilities of commit 9fd63d05 ("bpf:
      Allow bpf sample programs (*_user.c) to change bpf_map_def").
      
      Give fixup callback access to struct bpf_map_data, instead of
      only stuct bpf_map_def.  This add flexibility to allow userspace
      to reassign the map file descriptor.  This is very useful when
      wanting to share maps between several bpf programs.
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6979bcc7
    • J
      samples/bpf: make bpf_load.c code compatible with ELF maps section changes · 156450d9
      Jesper Dangaard Brouer 提交于
      This patch does proper parsing of the ELF "maps" section, in-order to
      be both backwards and forwards compatible with changes to the map
      definition struct bpf_map_def, which gets compiled into the ELF file.
      
      The assumption is that new features with value zero, means that they
      are not in-use.  For backward compatibility where loading an ELF file
      with a smaller struct bpf_map_def, only copy objects ELF size, leaving
      rest of loaders struct zero.  For forward compatibility where ELF file
      have a larger struct bpf_map_def, only copy loaders own struct size
      and verify that rest of the larger struct is zero, assuming this means
      the newer feature was not activated, thus it should be safe for this
      older loader to load this newer ELF file.
      
      Fixes: fb30d4b7 ("bpf: Add tests for map-in-map")
      Fixes: 409526bea3c3 ("samples/bpf: bpf_load.c detect and abort if ELF maps section size is wrong")
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      156450d9
    • J
      samples/bpf: adjust rlimit RLIMIT_MEMLOCK for traceex2, tracex3 and tracex4 · 55de1703
      Jesper Dangaard Brouer 提交于
      Needed to adjust max locked memory RLIMIT_MEMLOCK for testing these bpf samples
      as these are using more and larger maps than can fit in distro default 64Kbytes limit.
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55de1703
    • P
      netfilter: nf_tables: check if same extensions are set when adding elements · 9744a6fc
      Pablo Neira Ayuso 提交于
      If no NLM_F_EXCL is set and the element already exists in the set, make
      sure that both elements have the same extensions.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      9744a6fc
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial · 89c9fea3
      Linus Torvalds 提交于
      Pull trivial tree updates from Jiri Kosina.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
        tty: fix comment for __tty_alloc_driver()
        init/main: properly align the multi-line comment
        init/main: Fix double "the" in comment
        Fix dead URLs to ftp.kernel.org
        drivers: Clean up duplicated email address
        treewide: Fix typo in xml/driver-api/basics.xml
        tools/testing/selftests/powerpc: remove redundant CFLAGS in Makefile: "-Wall -O2 -Wall" -> "-O2 -Wall"
        selftests/timers: Spelling s/privledges/privileges/
        HID: picoLCD: Spelling s/REPORT_WRTIE_MEMORY/REPORT_WRITE_MEMORY/
        net: phy: dp83848: Fix Typo
        UBI: Fix typos
        Documentation: ftrace.txt: Correct nice value of 120 priority
        net: fec: Fix typo in error msg and comment
        treewide: Fix typos in printk
      89c9fea3
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching · 76f1948a
      Linus Torvalds 提交于
      Pull livepatch updates from Jiri Kosina:
      
       - a per-task consistency model is being added for architectures that
         support reliable stack dumping (extending this, currently rather
         trivial set, is currently in the works).
      
         This extends the nature of the types of patches that can be applied
         by live patching infrastructure. The code stems from the design
         proposal made [1] back in November 2014. It's a hybrid of SUSE's
         kGraft and RH's kpatch, combining advantages of both: it uses
         kGraft's per-task consistency and syscall barrier switching combined
         with kpatch's stack trace switching. There are also a number of
         fallback options which make it quite flexible.
      
         Most of the heavy lifting done by Josh Poimboeuf with help from
         Miroslav Benes and Petr Mladek
      
         [1] https://lkml.kernel.org/r/20141107140458.GA21774@suse.cz
      
       - module load time patch optimization from Zhou Chengming
      
       - a few assorted small fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
        livepatch: add missing printk newlines
        livepatch: Cancel transition a safe way for immediate patches
        livepatch: Reduce the time of finding module symbols
        livepatch: make klp_mutex proper part of API
        livepatch: allow removal of a disabled patch
        livepatch: add /proc/<pid>/patch_state
        livepatch: change to a per-task consistency model
        livepatch: store function sizes
        livepatch: use kstrtobool() in enabled_store()
        livepatch: move patching functions into patch.c
        livepatch: remove unnecessary object loaded check
        livepatch: separate enabled and patched states
        livepatch/s390: add TIF_PATCH_PENDING thread flag
        livepatch/s390: reorganize TIF thread flag bits
        livepatch/powerpc: add TIF_PATCH_PENDING thread flag
        livepatch/x86: add TIF_PATCH_PENDING thread flag
        livepatch: create temporary klp_update_patch_state() stub
        x86/entry: define _TIF_ALLWORK_MASK flags explicitly
        stacktrace/x86: add function for detecting reliable stack traces
      76f1948a
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 7af4c727
      Linus Torvalds 提交于
      Pull HID subsystem updates from Jiri Kosina:
      
       - The need for HID_QUIRK_NO_INIT_REPORTS per-device quirk has been
         growing dramatically during past years, so the time has come to
         switch over the default, and perform the pro-active reading only in
         cases where it's really needed (multitouch, wacom).
      
         The only place where this behavior is (in some form) preserved is
         hiddev so that we don't introduce userspace-visible change of
         behavior.
      
         From Benjamin Tissoires
      
       - HID++ support for power_supply / baterry reporting.
      
         From Benjamin Tissoires and Bastien Nocera
      
       - Vast improvements / rework of DS3 and DS4 in Sony driver.
      
         From Roderick Colenbrander
      
       - Improvment (in terms of getting closer to the Microsoft's
         interpretation of slightly ambiguous specification) of logical range
         interpretation in case null-state is set in the rdesc.
      
         From Valtteri Heikkilä and Tomasz Kramkowski
      
       - A lot of newly supported device IDs and small assorted fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (71 commits)
        HID: usbhid: Add HID_QUIRK_NOGET for Aten CS-1758 KVM switch
        HID: asus: support backlight on USB keyboards
        HID: wacom: Move wacom_remote_irq and wacom_remote_status_irq
        HID: wacom: generic: sync pad events only for actual packets
        HID: sony: remove redundant check for -ve err
        HID: sony: Make sure to unregister sensors on failure
        HID: sony: Make DS4 bt poll interval adjustable
        HID: sony: Set proper bit flags on DS4 output report
        HID: sony: DS4 use brighter LED colors
        HID: sony: Improve navigation controller axis/button mapping
        HID: sony: Use DS3 MAC address as unique identifier on USB
        HID: logitech-hidpp: add a sysfs file to tell we support power_supply
        HID: logitech-hidpp: enable HID++ 1.0 battery reporting
        HID: logitech-hidpp: add support for battery status for the K750
        HID: logitech-hidpp: battery: provide CAPACITY_LEVEL
        HID: logitech-hidpp: rename battery level into capacity
        HID: logitech-hidpp: battery: provide ONLINE property
        HID: logitech-hidpp: notify battery on connect
        HID: logitech-hidpp: return an error if the queried feature is not present
        HID: logitech-hidpp: create the battery for all types of HID++ devices
        ...
      7af4c727
    • L
      Merge tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 68fed41e
      Linus Torvalds 提交于
      Pull pin control updates from Linus Walleij:
       "This is the bulk of pin control changes for the v4.12 cycle.
      
        The extra week before the merge window actually resulted in some of
        the type of fixes that usually arrive after the merge window already
        starting to trickle in from eager developers using -next, I'm
        impressed.
      
        I have recruited a Samsung subsubsystem maintainer (Krzysztof) to deal
        with the onset of Samsung patches. It works great.
      
        Apart from that it is a boring round, just incremental updates and
        fixes all over the place, no serious core changes or anything exciting
        like that. The most pleasing to see is Julia Cartwrights work to audit
        the irqchip-providing drivers for realtime locking compliance. It's
        one of those "I should really get around to looking into that" things
        that have been on my TODO list since forever.
      
        Summary:
      
        Core changes:
      
         - add bi-directional and output-enable pin configurations to the
           generic bindings and generic pin controlling core.
      
        New drivers or subdrivers:
      
         - Armada 37xx SoC pin controller and GPIO support.
      
         - Axis ARTPEC-6 SoC pin controller support.
      
         - AllWinner A64 R_PIO controller support, and opening up the
           AllWinner sunxi driver for ARM64 use.
      
         - Rockchip RK3328 support.
      
         - Renesas R-Car H3 ES2.0 support.
      
         - STM32F469 support in the STM32 driver.
      
         - Aspeed G4 and G5 pin controller support.
      
        Improvements:
      
         - a whole slew of realtime improvements to drivers implementing
           irqchips: BCM, AMD, SiRF, sunxi, rockchip.
      
         - switch meson driver to get the GPIO ranges from the device tree.
      
         - input schmitt trigger support on the Rockchip driver.
      
         - enable the sunxi (AllWinner) driver to also be used on ARM64
           silicon.
      
         - name the Qualcomm QDF2xxx GPIO lines.
      
         - support GMMR GPIO regions on the Intel Cherryview. This fixes a
           serialization problem on these platforms.
      
         - pad retention support for the Samsung Exynos 5433.
      
         - handle suspend-to-ram in the AT91-pio4 driver.
      
         - pin configuration support in the Aspeed driver.
      
        Cleanups:
      
         - the final name of Rockchip RK1108 was RV1108 so rename the driver
           and variables to stay consistent"
      
      * tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (80 commits)
        pinctrl: mediatek: Add missing pinctrl bindings for mt7623
        pinctrl: artpec6: Fix return value check in artpec6_pmx_probe()
        pinctrl: artpec6: Remove .owner field for driver
        pinctrl: tegra: xusb: Silence sparse warnings
        ARM: at91/at91-pinctrl documentation: fix spelling mistake: "contoller" -> "controller"
        pinctrl: make artpec6 explicitly non-modular
        pinctrl: aspeed: g5: Add pinconf support
        pinctrl: aspeed: g4: Add pinconf support
        pinctrl: aspeed: Add core pinconf support
        pinctrl: aspeed: Document pinconf in devicetree bindings
        pinctrl: Add st,stm32f469-pinctrl compatible to stm32-pinctrl
        pinctrl: stm32: Add STM32F469 MCU support
        Documentation: dt: Remove ngpios from stm32-pinctrl binding
        pinctrl: stm32: replace device_initcall() with arch_initcall()
        pinctrl: stm32: add possibility to use gpio-ranges to declare bank range
        pinctrl: armada-37xx: Add gpio support
        pinctrl: armada-37xx: Add pin controller support for Armada 37xx
        pinctrl: dt-bindings: Add documentation for Armada 37xx pin controllers
        pinctrl: core: Make pinctrl_init_controller() static
        pinctrl: generic: Add bi-directional and output-enable
        ...
      68fed41e
    • L
      Merge tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · be580e75
      Linus Torvalds 提交于
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Continue to re-factor code to prepare for eMMC CMDQ and blkmq support
         - Introduce queue semantics to prepare for eMMC CMDQ and blkmq support
         - Add helper functions to manage temporary enable/disable of eMMC CMDQ
         - Improve wait-busy detection for SDIO
      
        MMC host:
         - cavium: Add driver to support Cavium controllers
         - cavium: Extend Cavium driver to support Octeon and ThunderX SOCs
         - bcm2835: Add new driver for Broadcom BCM2835 controller
         - sdhci-xenon: Add driver to support Marvell Xenon SDHCI controller
         - sdhci-tegra: Add support for the Tegra186 variant
         - sdhci-of-esdhc: Support for UHS-I SD cards
         - sdhci-of-esdhc: Support for eMMC HS200 cards
         - sdhci-cadence: Add eMMC HS400 enhanced strobe support
         - sdhci-esdhc-imx: Reset tuning circuit when needed
         - sdhci-pci: Modernize and clean-up some PM related code
         - sdhci-pci: Avoid re-tuning at runtime PM for some Intel devices
         - sdhci-pci|acpi: Use aggressive PM for some Intel BYT controllers
         - sdhci: Re-factoring and modernizations
         - sdhci: Optimize delay loops
         - sdhci: Improve register dump print format
         - sdhci: Add support for the Command Queue Engine
         - meson-gx: Various improvements and clean-ups
         - meson-gx: Add support for CMD23
         - meson-gx: Basic tuning support to avoid CRC errors
         - s3cmci: Enable probing via DT
         - mediatek: Improve tuning support for eMMC HS200 and HS400 mode
         - tmio: Improve DMA support
         - tmio: Use correct response for CMD12
         - dw_mmc: Minor improvements and clean-ups"
      
      * tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (148 commits)
        mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a
        mmc: sdhci-of-esdhc: poll ESDHC_CLOCK_STABLE bit with udelay
        mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY
        mmc: sdhci-xenon: Fix the work flow in xenon_remove().
        MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC
        mmc: sdhci-xenon: Remove redundant dev_err call in get_dt_pad_ctrl_data()
        mmc: cavium: Use module_pci_driver to simplify the code
        mmc: cavium: Add MMC support for Octeon SOCs.
        mmc: cavium: Fix detection of block or byte addressing.
        mmc: core: Export API to allow hosts to get the card address
        mmc: sdio: Fix sdio wait busy implement limitation
        mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card
        clk: apn806: fix spelling mistake: "mising" -> "missing"
        mmc: sdhci-of-esdhc: add delay between tuning cycles
        mmc: sdhci: Control the delay between tuning commands
        mmc: sdhci-of-esdhc: add tuning support
        mmc: sdhci-of-esdhc: add support for signal voltage switch
        mmc: sdhci-of-esdhc: add peripheral clock support
        mmc: sdhci-pci: Allow for 3 bytes from Intel DSM
        mmc: cavium: Fix a shift wrapping bug
        ...
      be580e75
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · 8d65b08d
      Linus Torvalds 提交于
      Pull networking updates from David Millar:
       "Here are some highlights from the 2065 networking commits that
        happened this development cycle:
      
         1) XDP support for IXGBE (John Fastabend) and thunderx (Sunil Kowuri)
      
         2) Add a generic XDP driver, so that anyone can test XDP even if they
            lack a networking device whose driver has explicit XDP support
            (me).
      
         3) Sparc64 now has an eBPF JIT too (me)
      
         4) Add a BPF program testing framework via BPF_PROG_TEST_RUN (Alexei
            Starovoitov)
      
         5) Make netfitler network namespace teardown less expensive (Florian
            Westphal)
      
         6) Add symmetric hashing support to nft_hash (Laura Garcia Liebana)
      
         7) Implement NAPI and GRO in netvsc driver (Stephen Hemminger)
      
         8) Support TC flower offload statistics in mlxsw (Arkadi Sharshevsky)
      
         9) Multiqueue support in stmmac driver (Joao Pinto)
      
        10) Remove TCP timewait recycling, it never really could possibly work
            well in the real world and timestamp randomization really zaps any
            hint of usability this feature had (Soheil Hassas Yeganeh)
      
        11) Support level3 vs level4 ECMP route hashing in ipv4 (Nikolay
            Aleksandrov)
      
        12) Add socket busy poll support to epoll (Sridhar Samudrala)
      
        13) Netlink extended ACK support (Johannes Berg, Pablo Neira Ayuso,
            and several others)
      
        14) IPSEC hw offload infrastructure (Steffen Klassert)"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2065 commits)
        tipc: refactor function tipc_sk_recv_stream()
        tipc: refactor function tipc_sk_recvmsg()
        net: thunderx: Optimize page recycling for XDP
        net: thunderx: Support for XDP header adjustment
        net: thunderx: Add support for XDP_TX
        net: thunderx: Add support for XDP_DROP
        net: thunderx: Add basic XDP support
        net: thunderx: Cleanup receive buffer allocation
        net: thunderx: Optimize CQE_TX handling
        net: thunderx: Optimize RBDR descriptor handling
        net: thunderx: Support for page recycling
        ipx: call ipxitf_put() in ioctl error path
        net: sched: add helpers to handle extended actions
        qed*: Fix issues in the ptp filter config implementation.
        qede: Fix concurrency issue in PTP Tx path processing.
        stmmac: Add support for SIMATIC IOT2000 platform
        net: hns: fix ethtool_get_strings overflow in hns driver
        tcp: fix wraparound issue in tcp_lp
        bpf, arm64: fix jit branch offset related to ldimm64
        bpf, arm64: implement jiting of BPF_XADD
        ...
      8d65b08d
    • L
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 5a0387a8
      Linus Torvalds 提交于
      Pull crypto updates from Herbert Xu:
       "Here is the crypto update for 4.12:
      
        API:
         - Add batch registration for acomp/scomp
         - Change acomp testing to non-unique compressed result
         - Extend algorithm name limit to 128 bytes
         - Require setkey before accept(2) in algif_aead
      
        Algorithms:
         - Add support for deflate rfc1950 (zlib)
      
        Drivers:
         - Add accelerated crct10dif for powerpc
         - Add crc32 in stm32
         - Add sha384/sha512 in ccp
         - Add 3des/gcm(aes) for v5 devices in ccp
         - Add Queue Interface (QI) backend support in caam
         - Add new Exynos RNG driver
         - Add ThunderX ZIP driver
         - Add driver for hardware random generator on MT7623 SoC"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (101 commits)
        crypto: stm32 - Fix OF module alias information
        crypto: algif_aead - Require setkey before accept(2)
        crypto: scomp - add support for deflate rfc1950 (zlib)
        crypto: scomp - allow registration of multiple scomps
        crypto: ccp - Change ISR handler method for a v5 CCP
        crypto: ccp - Change ISR handler method for a v3 CCP
        crypto: crypto4xx - rename ce_ring_contol to ce_ring_control
        crypto: testmgr - Allow ecb(cipher_null) in FIPS mode
        Revert "crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT"
        crypto: ccp - Disable interrupts early on unload
        crypto: ccp - Use only the relevant interrupt bits
        hwrng: mtk - Add driver for hardware random generator on MT7623 SoC
        dt-bindings: hwrng: Add Mediatek hardware random generator bindings
        crypto: crct10dif-vpmsum - Fix missing preempt_disable()
        crypto: testmgr - replace compression known answer test
        crypto: acomp - allow registration of multiple acomps
        hwrng: n2 - Use devm_kcalloc() in n2rng_probe()
        crypto: chcr - Fix error handling related to 'chcr_alloc_shash'
        padata: get_next is never NULL
        crypto: exynos - Add new Exynos RNG driver
        ...
      5a0387a8
    • D
      Merge branch 'tipc-refactor-socket-receive-functions' · 5d15af67
      David S. Miller 提交于
      Jon Maloy says:
      
      ====================
      tipc: refactor socket receive functions
      
      We try to make the functions tipc_sk_recvmsg() and
      tipc_sk_recvstream() more readable.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d15af67
    • J
      tipc: refactor function tipc_sk_recv_stream() · ec8a09fb
      Jon Paul Maloy 提交于
      We try to make this function more readable by improving variable names
      and comments, using more stack variables, and doing some smaller changes
      to the logics. We also rename the function to make it consistent with
      naming conventions used elsewhere in the code.
      Reviewed-by: NParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec8a09fb
    • J
      tipc: refactor function tipc_sk_recvmsg() · e9f8b101
      Jon Paul Maloy 提交于
      We try to make this function more readable by improving variable names
      and comments, plus some minor changes to the logics.
      Reviewed-by: NParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9f8b101
    • D
      Merge branch 'thunderx-xdp' · b0e92279
      David S. Miller 提交于
      Sunil Goutham says:
      
      ====================
      net: thunderx: Adds XDP support
      
      This patch series adds support for XDP to ThunderX NIC driver
      which is used on CN88xx, CN81xx and CN83xx platforms.
      
      Patches 1-4 are performance improvement and cleanup patches
      which are done keeping XDP performance bottlenecks in view.
      Rest of the patches adds actual XDP support.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0e92279
    • S
      net: thunderx: Optimize page recycling for XDP · 77322538
      Sunil Goutham 提交于
      Driver follows a method of taking one extra reference on the
      page for recycling which is fine in usual packet path where
      each 64KB page is segmented into multiple receive buffers.
      
      But in XDP mode since there is just one receive buffer per
      page taking extra page reference itself becomes big bottleneck
      consuming ~50% of CPU cycles due to atomic operations.
      
      This patch adds a internal ref count in pgcache for each
      page and additional page references are taken in a batch
      instead of just one at a time. Internal i.e 'pgcache->ref_count'
      and page's i.e 'page->_refcount' counters are compared to check
      page's recyclability.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77322538
    • S
      net: thunderx: Support for XDP header adjustment · e3d06ff9
      Sunil Goutham 提交于
      When in XDP mode reserve XDP_PACKET_HEADROOM bytes at the start
      of receive buffer for XDP program to modify headers and adjust
      packet start. Additional code changes done to handle such packets.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3d06ff9
    • S
      net: thunderx: Add support for XDP_TX · 16f2bccd
      Sunil Goutham 提交于
      Adds support for XDP_TX i.e transmits packet out of
      the XDP TX queue mapped to the corresponding Rx queue
      on which packet is received.
      
      Since SQ for XDP TX will be used only on a single cpu i.e
      SQ description creation and freeing, using atomic free count
      is not necessary and will become a bottleneck. Hence added
      a separate 'xdp_free_cnt' used for SQs designated for XDP
      to track descriptor free count.
      
      Changes also include
      - A new entry 'xdp_page' is added to save transmitted packet's
        page pointer for later cleanup.
      - XDP Tx SQ's doorbell is ringed once per NAPI instance.
      - Retrieving designated SQ for packets being sent out by stack
        via 'nicvf_xmit'.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16f2bccd
    • S
      net: thunderx: Add support for XDP_DROP · c56d91ce
      Sunil Goutham 提交于
      Adds support for XDP_DROP.
      Also since in XDP mode there is just a single buffer per page,
      made changes to recycle DMA mapping info as well along with pages.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c56d91ce
    • S
      net: thunderx: Add basic XDP support · 05c773f5
      Sunil Goutham 提交于
      Adds basic XDP support i.e attaching a BPF program to an
      interface. Also takes care of allocating separate Tx queues
      for XDP path and for network stack packet transmission.
      
      This patch doesn't support handling of any of the XDP actions,
      all are treated as XDP_PASS i.e packets will be handed over to
      the network stack.
      
      Changes also involve allocating one receive buffer per page in XDP
      mode and multiple in normal mode i.e when no BPF program is attached.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05c773f5
    • S
      net: thunderx: Cleanup receive buffer allocation · 927987f3
      Sunil Goutham 提交于
      Get rid of unnecessary double pointer references and type casting
      in receive buffer allocation code.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      927987f3
    • S
      net: thunderx: Optimize CQE_TX handling · 0dada88b
      Sunil Goutham 提交于
      Optimized CQE handling with below changes
      - Feeing descriptors back to SQ in bulk i.e once per NAPI
        instance instead for every CQE_TX, this will reduce number
        of atomic updates to 'sq->free_cnt'.
      - Checking errors in CQE_TX and CQE_RX before calling appropriate
        fn()s to update error stats i.e reduce branching.
      
      Also removed debug messages in packet handling path which otherwise
      causes issues if DEBUG is enabled.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0dada88b
    • S
      net: thunderx: Optimize RBDR descriptor handling · 5e848e4c
      Sunil Goutham 提交于
      Receive buffer's physical address or iova will anyway not
      go beyond 49bits, since it is the max supported HW address.
      As per perf, updating bitfields i.e buf_addr:42 in RBDR
      descriptor entry consumes lots of cpu cycles, hence changed
      it to a 64bit field with alignment requirements taken care of.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5e848e4c
    • S
      net: thunderx: Support for page recycling · 5836b442
      Sunil Goutham 提交于
      Adds support for page recycling for allocating receive buffers
      to reduce cost of refilling RBDR ring. Also got rid of using
      compound pages when pagesize is 4K, only order-0 pages now.
      
      Only page is recycled, DMA mappings still needs to be done for
      every receive buffer allocated due to following constraints
      - Cannot have just one receive buffer per 64KB page.
      - There is just one buffer ring shared across 8 Rx queues, so
        buffers of same page can go to any Rx queue.
      - HW gives buffer address where packet has been DMA'ed and not
        the index into buffer ring.
      This makes it not possible to resue DMA mapping info. So unfortunately
      have to go through costly mapping route for every buffer.
      Signed-off-by: NSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5836b442
    • D
      ipx: call ipxitf_put() in ioctl error path · ee0d8d84
      Dan Carpenter 提交于
      We should call ipxitf_put() if the copy_to_user() fails.
      Reported-by: N李强 <liqiang6-s@360.cn>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee0d8d84