Skip to content
  1. Aug 06, 2020
    • Adrian Hunter's avatar
      perf intel-pt: Add support for decoding FUP/TIP only · 7c1b16ba
      Adrian Hunter authored
      
      
      Use the new itrace 'q' option to add support for a mode of decoding that
      ignores TNT, does not walk object code, but gets the ip from FUP and TIP
      packets.
      
      Example:
      
       $ perf record -e intel_pt//u grep -rI pudding drivers
       [ perf record: Woken up 52 times to write data ]
       [ perf record: Captured and wrote 57.870 MB perf.data ]
       $ time perf script --itrace=bi | wc -l
       58948289
      
       real    1m23.863s
       user    1m23.251s
       sys     0m7.452s
       $ time perf script --itrace=biq | wc -l
       3385694
      
       real    0m4.453s
       user    0m4.455s
       sys     0m0.328s
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-12-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7c1b16ba
    • Adrian Hunter's avatar
      perf auxtrace: Add itrace 'q' option for quicker, less detailed decoding · 51971536
      Adrian Hunter authored
      
      
      The 'q' option is for modes of decoding that are quicker because they
      skip or omit decoding some aspects of trace data.
      
      If supported, the 'q' option may be repeated to increase the effect.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-11-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      51971536
    • Adrian Hunter's avatar
      perf intel-pt: Time filter logged perf events · d4575f5f
      Adrian Hunter authored
      
      
      Change the debug logging (when used with the --time option) to time
      filter logged perf events, but allow that to be overridden by using
      "d+a" instead of plain "d".
      
      That can reduce the size of the log file.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-10-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d4575f5f
    • Adrian Hunter's avatar
      perf intel-pt: Use itrace debug log flags to suppress some messages · 8b83fccd
      Adrian Hunter authored
      
      
      The "d" option may be followed by flags which affect what debug messages
      will or will not be logged. Each flag must be preceded by either '+' or
      '-'. The flags support by Intel PT are:
      
      		-a	Suppress logging of perf events
      
      Suppressing perf events is useful for decreasing the size of the log.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-9-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8b83fccd
    • Adrian Hunter's avatar
      perf auxtrace: Add optional log flags to the itrace 'd' option · 935aac2d
      Adrian Hunter authored
      
      
      Allow the 'd' option to be followed by flags which will affect what debug
      messages will or will not be reported. Each flag must be preceded by either
      '+' or '-'. The flags are:
      	a	all perf events
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-8-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      935aac2d
    • Adrian Hunter's avatar
      perf intel-pt: Use itrace error flags to suppress some errors · 1d846aeb
      Adrian Hunter authored
      
      
      The itrace "e" option may be followed by flags which affect what errors
      will or will not be reported.  Each flag must be preceded by either '+' or '-'.
      The flags supported by Intel PT are:
      
      		-o	Suppress overflow errors
      		-l	Suppress trace data lost errors
      For example, for errors but not overflow or data lost errors:
      
      	--itrace=e-o-l
      
      Suppressing those errors can be useful for testing and debugging because
      they are not due to decoding.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-7-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1d846aeb
    • Adrian Hunter's avatar
      perf auxtrace: Add optional error flags to the itrace 'e' option · cb971438
      Adrian Hunter authored
      
      
      Allow the 'e' option to be followed by flags which will affect what errors
      will or will not be reported. Each flag must be preceded by either '+' or
      '-'. The flags are:
      	o	overflow
      	l	trace data lost
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-6-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cb971438
    • Adrian Hunter's avatar
      perf auxtrace: Add missing itrace options to help text · 1e8f7869
      Adrian Hunter authored
      
      
      Add missing itrace options o, G and L.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-5-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1e8f7869
    • Adrian Hunter's avatar
      perf tools: Improve aux_output not supported error · 2c9a11af
      Adrian Hunter authored
      
      
      For example:
      
       Before:
         $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l
         Error:
         branch-loads: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'
      
       After:
         $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l
         Error:
         branch-loads: PMU Hardware doesn't support 'aux_output' feature
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200710151104.15137-4-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2c9a11af
    • Adrian Hunter's avatar
      perf intel-pt: Fix duplicate branch after CBR · a58a057c
      Adrian Hunter authored
      CBR events can result in a duplicate branch event, because the state
      type defaults to a branch. Fix by clearing the state type.
      
      Example: trace 'sleep' and hope for a frequency change
      
       Before:
      
         $ perf record -e intel_pt//u sleep 0.1
         [ perf record: Woken up 1 times to write data ]
         [ perf record: Captured and wrote 0.034 MB perf.data ]
         $ perf script --itrace=bpe > before.txt
      
       After:
      
         $ perf script --itrace=bpe > after.txt
         $ diff -u before.txt after.txt
         --- before.txt  2020-07-07 14:42:18.191508098 +0300
         +++ after.txt   2020-07-07 14:42:36.587891753 +0300
         @@ -29673,7 +29673,6 @@
                     sleep 93431 [007] 15411.619905:          1  branches:u:                 0 [unknown] ([unknown]) =>     7f0818abb2e0 clock_nanosleep@@GLIBC_2.17+0x0 (/usr/lib/x86_64-linux-gnu/libc-2.31.so)
                     sleep 93431 [007] 15411.619905:          1  branches:u:      7f0818abb30c clock_nanosleep@@GLIBC_2.17+0x2c (/usr/lib/x86_64-linux-gnu/libc-2.31.so) =>                0 [unknown] ([unknown])
                     sleep 93431 [007] 15411.720069:         cbr:  cbr: 15 freq: 1507 MHz ( 56%)         7f0818abb30c clock_nanosleep@@GLIBC_2.17+0x2c (/usr/lib/x86_64-linux-gnu/libc-2.31.so)
         -           sleep 93431 [007] 15411.720069:          1  branches:u:      7f0818abb30c clock_nanosleep@@GLIBC_2.17+0x2c (/usr/lib/x86_64-linux-gnu/libc-2.31.so) =>                0 [unknown] ([unknown])
                     sleep 93431 [007] 15411.720076:          1  branches:u:                 0 [unknown] ([unknown]) =>     7f0818abb30e clock_nanosleep@@GLIBC_2.17+0x2e (/usr/lib/x86_64-linux-gnu/libc-2.31.so)
                     sleep 93431 [007] 15411.720077:          1  branches:u:      7f0818abb323 clock_nanosleep@@GLIBC_2.17+0x43 (/usr/lib/x86_64-linux-gnu/libc-2.31.so) =>     7f0818ac0eb7 __nanosleep+0x17 (/usr/lib/x86_64-linux-gnu/libc-2.31.so)
                     sleep 93431 [007] 15411.720077:          1  branches:u:      7f0818ac0ebf __nanosleep+0x1f (/usr/lib/x86_64-linux-gnu/libc-2.31.so) =>     55cb7e4c2827 rpl_nanosleep+0x97 (/usr/bin/sleep)
      
      Fixes: 91de8684 ("perf intel-pt: Cater for CBR change in PSB+")
      Fixes: abe5a1d3
      
       ("perf intel-pt: Decoder to output CBR changes immediately")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200710151104.15137-3-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a58a057c
    • Adrian Hunter's avatar
      perf intel-pt: Fix FUP packet state · 401136bb
      Adrian Hunter authored
      
      
      While walking code towards a FUP ip, the packet state is
      INTEL_PT_STATE_FUP or INTEL_PT_STATE_FUP_NO_TIP. That was mishandled
      resulting in the state becoming INTEL_PT_STATE_IN_SYNC prematurely.  The
      result was an occasional lost EXSTOP event.
      
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@vger.kernel.org
      Link: http://lore.kernel.org/lkml/20200710151104.15137-2-adrian.hunter@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      401136bb
    • Arnaldo Carvalho de Melo's avatar
      Mgerge remote-tracking branch 'torvalds/master' into perf/core · 94fb1afb
      Arnaldo Carvalho de Melo authored
      
      
      To sync headers, for instance, in this case tools/perf was ahead of
      upstream till Linus merged tip/perf/core to get the
      PERF_RECORD_TEXT_POKE changes:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h'
        diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      94fb1afb
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 47ec5303
      Linus Torvalds authored
      Pull networking updates from David Miller:
      
       1) Support 6Ghz band in ath11k driver, from Rajkumar Manoharan.
      
       2) Support UDP segmentation in code TSO code, from Eric Dumazet.
      
       3) Allow flashing different flash images in cxgb4 driver, from Vishal
          Kulkarni.
      
       4) Add drop frames counter and flow status to tc flower offloading,
          from Po Liu.
      
       5) Support n-tuple filters in cxgb4, from Vishal Kulkarni.
      
       6) Various new indirect call avoidance, from Eric Dumazet and Brian
          Vazquez.
      
       7) Fix BPF verifier failures on 32-bit pointer arithmetic, from
          Yonghong Song.
      
       8) Support querying and setting hardware address of a port function via
          devlink, use this in mlx5, from Parav Pandit.
      
       9) Support hw ipsec offload on bonding slaves, from Jarod Wilson.
      
      10) Switch qca8k driver over to phylink, from Jonathan McDowell.
      
      11) In bpftool, show list of processes holding BPF FD references to
          maps, programs, links, and btf objects. Fro...
      47ec5303
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2020-08-06' of git://anongit.freedesktop.org/drm/drm · 81867496
      Linus Torvalds authored
      Pull drm updates from Dave Airlie:
       "New xilinx displayport driver, AMD support for two new GPUs (more
        header files), i915 initial support for RocketLake and some work on
        their DG1 (discrete chip).
      
        The core also grew some lockdep annotations to try and constrain what
        drivers do with dma-fences, and added some documentation on why the
        idea of indefinite fences doesn't work.
      
        The long list is below.
      
        I do have some fixes trees outstanding, but I'll follow up with those
        later.
      
        core:
         - add user def flag to cmd line modes
         - dma_fence_wait added might_sleep
         - dma-fence lockdep annotations
         - indefinite fences are bad documentation
         - gem CMA functions used in more drivers
         - struct mutex removal
         - more drm_ debug macro usage
         - set/drop master api fixes
         - fix for drm/mm hole size comparison
         - drm/mm remove invalid entry optimization
         - optimise drm/mm hole handling
         - VRR debugfs added
         - uncompressed AFBC modifier support
         - multiple display id blocks in EDID
         - multiple driver sg handling fixes
         - __drm_atomic_helper_crtc_reset in all drivers
         - managed vram helpers
      
        ttm:
         - ttm_mem_reg handling cleanup
         - remove bo offset field
         - drop CMA memtype flag
         - drop mappable flag
      
        xilinx:
         - New Xilinx ZynqMP DisplayPort Subsystem driver
      
        nouveau:
         - add CRC support
         - start using NVIDIA published class header files
         - convert all push buffer emission to new macros
         - Proper push buffer space management for EVO/NVD channels.
         - firmware loading fixes
         - 2MiB system memory pages support on Pascal and newer
      
        vkms:
         - larger cursor support
      
        i915:
         - Rocketlake platform enablement
         - Early DG1 enablement
         - Numerous GEM refactorings
         - DP MST fixes
         - FBC, PSR, Cursor, Color, Gamma fixes
         - TGL, RKL, EHL workaround updates
         - TGL 8K display support fixes
         - SDVO/HDMI/DVI fixes
      
        amdgpu:
         - Initial support for Sienna Cichlid GPU
         - Initial support for Navy Flounder GPU
         - SI UVD/VCE support
         - expose rotation property
         - Add support for unique id on Arcturus
         - Enable runtime PM on vega10 boards that support BACO
         - Skip BAR resizing if the bios already did id
         - Major swSMU code cleanup
         - Fixes for DCN bandwidth calculations
      
        amdkfd:
         - Track SDMA usage per process
         - SMI events interface
      
        radeon:
         - Default to on chip GART for AGP boards on all arches
         - Runtime PM reference count fixes
      
        msm:
         - headers regenerated causing churn
         - a650/a640 display and GPU enablement
         - dpu dither support for 6bpc panels
         - dpu cursor fix
         - dsi/mdp5 enablement for sdm630/sdm636/sdm66
      
        tegra:
         - video capture prep support
         - reflection support
      
        mediatek:
         - convert mtk_dsi to bridge API
      
        meson:
         - FBC support
      
        sun4i:
         - iommu support
      
        rockchip:
         - register locking fix
         - per-pixel alpha support PX30 VOP
      
        mgag200:
         - ported to simple and shmem helpers
         - device init cleanups
         - use managed pci functions
         - dropped hw cursor support
      
        ast:
         - use managed pci functions
         - use managed VRAM helpers
         - rework cursor support
      
        malidp:
         - dev_groups support
      
        hibmc:
         - refactor hibmc_drv_vdac:
      
        vc4:
         - create TXP CRTC
      
        imx:
         - error path fixes and cleanups
      
        etnaviv:
         - clock handling and error handling cleanups
         - use pin_user_pages"
      
      * tag 'drm-next-2020-08-06' of git://anongit.freedesktop.org/drm/drm: (1747 commits)
        drm/msm: use kthread_create_worker instead of kthread_run
        drm/msm/mdp5: Add MDP5 configuration for SDM636/660
        drm/msm/dsi: Add DSI configuration for SDM660
        drm/msm/mdp5: Add MDP5 configuration for SDM630
        drm/msm/dsi: Add phy configuration for SDM630/636/660
        drm/msm/a6xx: add A640/A650 hwcg
        drm/msm/a6xx: hwcg tables in gpulist
        drm/msm/dpu: add SM8250 to hw catalog
        drm/msm/dpu: add SM8150 to hw catalog
        drm/msm/dpu: intf timing path for displayport
        drm/msm/dpu: set missing flush bits for INTF_2 and INTF_3
        drm/msm/dpu: don't use INTF_INPUT_CTRL feature on sdm845
        drm/msm/dpu: move some sspp caps to dpu_caps
        drm/msm/dpu: update UBWC config for sm8150 and sm8250
        drm/msm/dpu: use right setup_blend_config for sm8150 and sm8250
        drm/msm/a6xx: set ubwc config for A640 and A650
        drm/msm/adreno: un-open-code some packets
        drm/msm: sync generated headers
        drm/msm/a6xx: add build_bw_table for A640/A650
        drm/msm/a6xx: fix crashstate capture for A650
        ...
      81867496
    • Linus Torvalds's avatar
      Merge tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds · e4a7b2dc
      Linus Torvalds authored
      Pull LED updates from Pavel Machek:
       "Okay, so... this one is interesting. RGB LEDs are very common, and we
        need to have some kind of support for them. Multicolor is for
        arbitrary set of LEDs in one package, RGB is for LEDs that can produce
        full range of colors. We do not have real multicolor LED that is not
        RGB in the pipeline, so that one is disabled for now.
      
        You can expect this saga to continue with next pull requests"
      
      * tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (37 commits)
        MAINTAINERS: Remove myself as LED subsystem maintainer
        leds: disallow /sys/class/leds/*:multi:* for now
        leds: add RGB color option, as that is different from multicolor.
        Make LEDS_LP55XX_COMMON depend on I2C to fix build errors:
        Documentation: ABI: leds-turris-omnia: document sysfs attribute
        leds: initial support for Turris Omnia LEDs
        dt-bindings: leds: add cznic,turris-omnia-leds binding
        leds: pattern trigger -- check pattern for validity
        leds: Replace HTTP links with HTTPS ones
        leds: trigger: add support for LED-private device triggers
        leds: lp5521: Add multicolor framework multicolor brightness support
        leds: lp5523: Update the lp5523 code to add multicolor brightness function
        leds: lp55xx: Add multicolor framework support to lp55xx
        leds: lp55xx: Convert LED class registration to devm_*
        dt-bindings: leds: Convert leds-lp55xx to yaml
        leds: multicolor: Introduce a multicolor class definition
        leds: Add multicolor ID to the color ID list
        dt: bindings: Add multicolor class dt bindings documention
        leds: lp5523: Fix various formatting issues in the code
        leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros
        ...
      e4a7b2dc
    • Dean Nelson's avatar
      net: thunderx: initialize VF's mailbox mutex before first usage · c1055b76
      Dean Nelson authored
      A VF's mailbox mutex is not getting initialized by nicvf_probe() until after
      it is first used. And such usage is resulting in...
      
      [   28.270927] ------------[ cut here ]------------
      [   28.270934] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
      [   28.270980] WARNING: CPU: 9 PID: 675 at kernel/locking/mutex.c:938 __mutex_lock+0xdac/0x12f0
      [   28.270985] Modules linked in: ast(+) nicvf(+) i2c_algo_bit drm_vram_helper drm_ttm_helper ttm nicpf(+) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm ixgbe(+) sg thunder_bgx mdio i2c_thunderx mdio_thunder thunder_xcv mdio_cavium dm_mirror dm_region_hash dm_log dm_mod
      [   28.271064] CPU: 9 PID: 675 Comm: systemd-udevd Not tainted 4.18.0+ #1
      [   28.271070] Hardware name: GIGABYTE R120-T34-00/MT30-GS2-00, BIOS F02 08/06/2019
      [   28.271078] pstate: 60000005 (nZCv daif -PAN -UAO)
      [   28.271086] pc : __mutex_lock+0xdac/0x12f0
      [   28.271092] lr : __mutex_lock+0xdac/0x12f0
      [   28.271097] sp : ffff800d42146fb0
      [   28.271103] x29: ffff800d42146fb0 x28: 0000000000000000
      [   28.271113] x27: ffff800d24361180 x26: dfff200000000000
      [   28.271122] x25: 0000000000000000 x24: 0000000000000002
      [   28.271132] x23: ffff20001597cc80 x22: ffff2000139e9848
      [   28.271141] x21: 0000000000000000 x20: 1ffff001a8428e0c
      [   28.271151] x19: ffff200015d5d000 x18: 1ffff001ae0f2184
      [   28.271160] x17: 0000000000000000 x16: 0000000000000000
      [   28.271170] x15: ffff800d70790c38 x14: ffff20001597c000
      [   28.271179] x13: ffff20001597cc80 x12: ffff040002b2f779
      [   28.271189] x11: 1fffe40002b2f778 x10: ffff040002b2f778
      [   28.271199] x9 : 0000000000000000 x8 : 00000000f1f1f1f1
      [   28.271208] x7 : 00000000f2f2f2f2 x6 : 0000000000000000
      [   28.271217] x5 : 1ffff001ae0f2186 x4 : 1fffe400027eb03c
      [   28.271227] x3 : dfff200000000000 x2 : ffff1001a8428dbe
      [   28.271237] x1 : c87fdfac7ea11d00 x0 : 0000000000000000
      [   28.271246] Call trace:
      [   28.271254]  __mutex_lock+0xdac/0x12f0
      [   28.271261]  mutex_lock_nested+0x3c/0x50
      [   28.271297]  nicvf_send_msg_to_pf+0x40/0x3a0 [nicvf]
      [   28.271316]  nicvf_register_misc_interrupt+0x20c/0x328 [nicvf]
      [   28.271334]  nicvf_probe+0x508/0xda0 [nicvf]
      [   28.271344]  local_pci_probe+0xc4/0x180
      [   28.271352]  pci_device_probe+0x3ec/0x528
      [   28.271363]  driver_probe_device+0x21c/0xb98
      [   28.271371]  device_driver_attach+0xe8/0x120
      [   28.271379]  __driver_attach+0xe0/0x2a0
      [   28.271386]  bus_for_each_dev+0x118/0x190
      [   28.271394]  driver_attach+0x48/0x60
      [   28.271401]  bus_add_driver+0x328/0x558
      [   28.271409]  driver_register+0x148/0x398
      [   28.271416]  __pci_register_driver+0x14c/0x1b0
      [   28.271437]  nicvf_init_module+0x54/0x10000 [nicvf]
      [   28.271447]  do_one_initcall+0x18c/0xc18
      [   28.271457]  do_init_module+0x18c/0x618
      [   28.271464]  load_module+0x2bc0/0x4088
      [   28.271472]  __se_sys_finit_module+0x110/0x188
      [   28.271479]  __arm64_sys_finit_module+0x70/0xa0
      [   28.271490]  el0_svc_handler+0x15c/0x380
      [   28.271496]  el0_svc+0x8/0xc
      [   28.271502] irq event stamp: 52649
      [   28.271513] hardirqs last  enabled at (52649): [<ffff200011b4d790>] _raw_spin_unlock_irqrestore+0xc0/0xd8
      [   28.271522] hardirqs last disabled at (52648): [<ffff200011b4d3c4>] _raw_spin_lock_irqsave+0x3c/0xf0
      [   28.271530] softirqs last  enabled at (52330): [<ffff200010082af4>] __do_softirq+0xacc/0x117c
      [   28.271540] softirqs last disabled at (52313): [<ffff20001019b354>] irq_exit+0x3cc/0x500
      [   28.271545] ---[ end trace a9b90324c8a0d4ee ]---
      
      This problem is resolved by moving the call to mutex_init() up earlier
      in nicvf_probe().
      
      Fixes: 609ea65c
      
       ("net: thunderx: add mutex to protect mailbox from concurrent calls for same VF")
      Signed-off-by: default avatarDean Nelson <dnelson@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1055b76
    • David S. Miller's avatar
      Merge branch 'misc-bug-fixes-for-the-hso-driver' · 0063fc3d
      David S. Miller authored
      
      
      Oliver Neukum says:
      
      ====================
      misc bug fixes for the hso driver
      
      1. Code reuse led to an unregistration of a net driver that has not been
      registered
      2. The kernel complains generically if kmalloc with GFP_KERNEL fails
      3. A race that can lead to an URB that is in use being reused or
      a use after free
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0063fc3d
    • Oliver Neukum's avatar
      usb: hso: remove bogus check for EINPROGRESS · abaf00ff
      Oliver Neukum authored
      
      
      This check an inherent race. It opens a race where
      an error code has already been set or cleared yet
      the URB has not been given back. We cannot do
      such an optimization and must unlink unconditionally.
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      abaf00ff
    • Oliver Neukum's avatar
      usb: hso: no complaint about kmalloc failure · 11c5f6d2
      Oliver Neukum authored
      
      
      If this fails, kmalloc() will print a report including
      a stack trace. There is no need for a separate complaint.
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11c5f6d2
    • Oliver Neukum's avatar
      hso: fix bailout in error case of probe · 5fcfb6d0
      Oliver Neukum authored
      
      
      The driver tries to reuse code for disconnect in case
      of a failed probe.
      If resources need to be freed after an error in probe, the
      netdev must not be freed because it has never been registered.
      Fix it by telling the helper which path we are in.
      
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5fcfb6d0
    • Jacek Anaszewski's avatar
      MAINTAINERS: Remove myself as LED subsystem maintainer · bba37471
      Jacek Anaszewski authored
      
      
      It don't have enough time for reviewing patches and thus don't
      want to be listed as regular LED maintainer. Nonetheless I may still
      give a review from time to time.
      
      Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
      Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
      bba37471
    • Linus Torvalds's avatar
      Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · fffe3ae0
      Linus Torvalds authored
      Pull hmm updates from Jason Gunthorpe:
       "Ralph has been working on nouveau's use of hmm_range_fault() and
        migrate_vma() which resulted in this small series. It adds reporting
        of the page table order from hmm_range_fault() and some optimization
        of migrate_vma():
      
         - Report the size of the page table mapping out of hmm_range_fault().
      
           This makes it easier to establish a large/huge/etc mapping in the
           device's page table.
      
         - Allow devices to ignore the invalidations during migration in cases
           where the migration is not going to change pages.
      
           For instance migrating pages to a device does not require the
           device to invalidate pages already in the device.
      
         - Update nouveau and hmm_tests to use the above"
      
      * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        mm/hmm/test: use the new migration invalidation
        nouveau/svm: use the new migration invalidation
        mm/notifier: add migration invalidation type
        mm/migrate: add a flags parameter to migrate_vma
        nouveau: fix storing invalid ptes
        nouveau/hmm: support mapping large sysmem pages
        nouveau: fix mapping 2MB sysmem pages
        nouveau/hmm: fault one page at a time
        mm/hmm: add tests for hmm_pfn_to_map_order()
        mm/hmm: provide the page mapping order in hmm_range_fault()
      fffe3ae0
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 8f7be629
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
      
         - Add a new host cap bit and a corresponding DT property, to support
           power cycling of the card by FW at system suspend/resume.
      
         - Fix clock rate setting for SDIO in SDR12/SDR25 speed-mode
      
         - Fix switch to 1/4-bit mode at system suspend/resume for SD-combo
           cards
      
         - Convert the mmc-pwrseq DT bindings to the json-schema
      
         - Always allow the card detect uevent to be consumed by userspace
      
        MMC host controllers:
      
         - Convert a few DT bindings to the json-schema
      
         - mtk-sd:
            - Add support for command queue through cqhci
            - Add support for the MT6779 variant
      
         - renesas_sdhi_internal_dmac:
            - Fix dma unmapping in the error path
      
         - sdhci_am654:
            - Add support for the AM65x PG2.0 variant
            - Extend support for phys/clocks
      
         - sdhci-cadence:
            - Drop incorrect HW tuning for SD mode
      
         - sdhci-msm:
            - Add support for interconnect bandwidth scaling
            - Enable internal voltage control
            - Enable low power state for pinctrls
      
         - sdhci-of-at91:
            - Ludovic Desroches handovers maintenance to Eugen Hristev
      
         - sdhci-pci-gli:
            - Improve clock handling for GL975x
      
         - sdhci-pci-o2micro:
            - Add HW tuning for SDR104 mode
            - Fix support for O2 host controller Seabird1"
      
      * tag 'mmc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (66 commits)
        mmc: mediatek: make function msdc_cqe_disable() static
        MAINTAINERS: mmc: sdhci-of-at91: handover maintenance to Eugen Hristev
        dt-bindings: mmc: mediatek: Add document for mt6779
        mmc: mediatek: command queue support
        mmc: mediatek: refine msdc timeout api
        mmc: mediatek: add MT6779 MMC driver support
        mmc: sdhci-pci-o2micro: Add HW tuning for SDR104 mode
        mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1
        mmc: via-sdmmc: use generic power management
        memstick: jmb38x_ms: use generic power management
        mmc: sdhci-cadence: do not use hardware tuning for SD mode
        mmc: sdhci-pci-gli: Set SDR104's clock to 205MHz and enable SSC for GL975x
        mmc: cqhci: Fix a print format for the task descriptor
        mmc: sdhci-of-arasan: fix timings allocation code
        mmc: sdhci: Fix a potential uninitialized variable
        dt-bindings: mmc: renesas,sdhi: convert to YAML
        dt-bindings: mmc: convert arasan sdhci bindings to yaml
        mmc: sdhci: Fix potential null pointer access while accessing vqmmc
        mmc: core: Add MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND
        dt-bindings: mmc: Add full-pwr-cycle-in-suspend property
        ...
      8f7be629
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 9aebd325
      Linus Torvalds authored
      Pull hwmon updates from Guenter Roeck:
       "Highlights:
         - New driver for Sparx5 SoC temperature sensot
         - New driver for Corsair Commander Pro
         - MAX20710 support added to max20730 driver
      
        Enhancements:
         - max6697: Allow max6581 to create tempX_offset attributes
         - gsc (Gateworks System Controller): add 16bit pre-scaled voltage mode
         - adm1275: Enable adm1278 ADM1278_TEMP1_EN
         - dell-smm: Add Latitude 5480 to fan control whitelist
      
        Fixes:
         - adc128d818: Fix advanced configuration register init
         - pmbus/core: Use s64 instead of long for calculations to fix
           overflow issues with 32-bit architectures
      
        Plus various cleanups in several drivers"
      
      * tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (32 commits)
        hwmon: (adc128d818) Fix advanced configuration register init
        hwmon: (axi-fan-control) remove duplicate macros
        hwmon: (i5k_amb, vt8231) Drop uses of pci_read_config_*() return value
        hwmon: (sparx5) Make symbol 's5_temp_match' static
        hwmon: (corsair-cpro) add reading pwm values
        hwmon: sparx5: Add Sparx5 SoC temperature driver
        dt-bindings: hwmon: Add Sparx5 temperature sensor
        hwmon: (tmp401) Replace HTTP links with HTTPS ones
        hwmon: (lm95234) Replace HTTP links with HTTPS ones
        hwmon: (lm90) Replace HTTP links with HTTPS ones
        hwmon: (k8temp) Replace HTTP links with HTTPS ones
        hwmon: (jc42) Replace HTTP links with HTTPS ones
        hwmon: (ina2xx) Replace HTTP links with HTTPS ones
        hwmon: (ina209) Replace HTTP links with HTTPS ones
        hwmon: Replace HTTP links with HTTPS ones
        docs: hwmon: Replace HTTP links with HTTPS ones
        hwmon: (adm1025) Replace HTTP links with HTTPS ones
        hwmon: add Corsair Commander Pro driver
        hwmon: (max6697) Allow max6581 to create tempX_offset
        hwmon: (tmmp513) Replace HTTP links with HTTPS links
        ...
      9aebd325
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 44197797
      Linus Torvalds authored
      Pull Devicetree updates from Rob Herring:
      
       - Improve device links cycle detection and breaking. Add more bindings
         for device link dependencies.
      
       - Refactor parsing 'no-map' in __reserved_mem_alloc_size()
      
       - Improve DT unittest 'ranges' and 'dma-ranges' test case to check
         differing cell sizes
      
       - Various http to https link conversions
      
       - Add a schema check to prevent 'syscon' from being used by itself
         without a more specific compatible
      
       - A bunch more DT binding conversions to schema
      
      * tag 'devicetree-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits)
        of: reserved-memory: remove duplicated call to of_get_flat_dt_prop() for no-map node
        of: unittest: Use bigger address cells to catch parser regressions
        dt-bindings: memory-controllers: Convert mmdc to json-schema
        dt-bindings: mtd: Convert imx nand to json-schema
        dt-bindings: mtd: Convert gpmi nand to json-schema
        dt-bindings: iio: io-channel-mux: Fix compatible string in example code
        of: property: Add device link support for pinctrl-0 through pinctrl-8
        of: property: Add device link support for multiple DT bindings
        dt-bindings: phy: ti: phy-gmii-sel: convert bindings to json-schema
        dt-bindings: mux: mux.h: drop a duplicated word
        dt-bindings: misc: Convert olpc,xo1.75-ec to json-schema
        dt-bindings: aspeed-lpc: Replace HTTP links with HTTPS ones
        dt-bindings: drm/bridge: Replace HTTP links with HTTPS ones
        drm/tilcdc: Replace HTTP links with HTTPS ones
        dt-bindings: iommu: renesas,ipmmu-vmsa: Add r8a774e1 support
        dt-bindings: fpga: Replace HTTP links with HTTPS ones
        dt-bindings: virtio: Replace HTTP links with HTTPS ones
        dt-bindings: media: imx274: Add optional input clock and supplies
        dt-bindings: i2c-gpio: Use 'deprecated' keyword on deprecated properties
        dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml
        ...
      44197797
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 1d8ce0e0
      Linus Torvalds authored
      Pull GPIO updates from Linus Walleij:
       "This is the bulk of GPIO changes for the v5.9 kernel cycle.
      
        There is nothing too exciting in it, but a new macro that fixes a
        build failure on a minor ARM32 platform that appeared yesterday is
        part of it so we better merge it.
      
        Core changes:
      
         - Introduce the for_each_requested_gpio() macro to help in dependent
           code all over the place. Also patch a few locations to use it while
           we are at it.
      
         - Split out the sysfs code into its own file.
      
         - Split out the character device code into its own file, then make a
           set of refactorings and improvements to this code. We are setting
           the stage to revamp the userspace API a bit in the next cycle.
      
         - Fix a whole slew of kerneldoc that was wrong or missing.
      
        New drivers:
      
         - The PCA953x driver now supports the PCAL9535.
      
        Driver improvements:
      
         - A host of incremental modernizations and improvements to the
           PCA953x driver.
      
         - Incremental improvements to the Xilinx Zynq driver.
      
         - Some improvements to the GPIO aggregator driver.
      
         - I ran all over the place switching all threaded and other drivers
           requesting their own IRQ while using the core GPIO IRQ helpers to
           pass the GPIO irq chip as a template instead of calling the
           explicit set-up functions. Next merge window we may retire the old
           code altogether"
      
      * tag 'gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (97 commits)
        gpio: wcove: Request IRQ after all initialisation done
        gpio: crystalcove: Free IRQ on error path
        gpio: pca953x: Request IRQ after all initialisation done
        gpio: don't use same lockdep class for all devm_gpiochip_add_data users
        gpio: max732x: Use irqchip template
        gpio: stmpe: Move chip registration
        gpio: rcar: Use irqchip template
        gpio: regmap: fix type clash
        gpio: Correct kernel-doc inconsistency
        gpio: pci-idio-16: Use irqchip template
        gpio: pcie-idio-24: Use irqchip template
        gpio: 104-idio-16: Use irqchip template
        gpio: 104-idi-48: Use irqchip template
        gpio: 104-dio-48e: Use irqchip template
        gpio: ws16c48: Use irqchip template
        gpio: omap: improve coding style for pin config flags
        gpio: dln2: Use irqchip template
        gpio: sch: Add a blank line between declaration and code
        gpio: sch: changed every 'unsigned' to 'unsigned int'
        gpio: ich: changed every 'unsigned' to 'unsigned int'
        ...
      1d8ce0e0
    • Linus Torvalds's avatar
      random: random.h should include archrandom.h, not the other way around · 58552408
      Linus Torvalds authored
      
      
      This is hopefully the final piece of the crazy puzzle with random.h
      dependencies.
      
      And by "hopefully" I obviously mean "Linus is a hopeless optimist".
      
      Reported-and-tested-by: default avatarDaniel Díaz <daniel.diaz@linaro.org>
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      58552408
    • Stefano Brivio's avatar
      ip_tunnel_core: Fix build for archs without _HAVE_ARCH_IPV6_CSUM · 8ed54f16
      Stefano Brivio authored
      
      
      On architectures defining _HAVE_ARCH_IPV6_CSUM, we get
      csum_ipv6_magic() defined by means of arch checksum.h headers. On
      other architectures, we actually need to include net/ip6_checksum.h
      to be able to use it.
      
      Without this include, building with defconfig breaks at least for
      s390.
      
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Fixes: 4cb47a86
      
       ("tunnels: PMTU discovery support for directly bridged IP packets")
      Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ed54f16
    • Willem de Bruijn's avatar
      selftests/net: relax cpu affinity requirement in msg_zerocopy test · 16f6458f
      Willem de Bruijn authored
      The msg_zerocopy test pins the sender and receiver threads to separate
      cores to reduce variance between runs.
      
      But it hardcodes the cores and skips core 0, so it fails on machines
      with the selected cores offline, or simply fewer cores.
      
      The test mainly gives code coverage in automated runs. The throughput
      of zerocopy ('-z') and non-zerocopy runs is logged for manual
      inspection.
      
      Continue even when sched_setaffinity fails. Just log to warn anyone
      interpreting the data.
      
      Fixes: 07b65c5b
      
       ("test: add msg_zerocopy test")
      Reported-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16f6458f
    • Paolo Abeni's avatar
      mptcp: be careful on subflow creation · adf73410
      Paolo Abeni authored
      
      
      Nicolas reported the following oops:
      
      [ 1521.392541] BUG: kernel NULL pointer dereference, address: 00000000000000c0
      [ 1521.394189] #PF: supervisor read access in kernel mode
      [ 1521.395376] #PF: error_code(0x0000) - not-present page
      [ 1521.396607] PGD 0 P4D 0
      [ 1521.397156] Oops: 0000 [#1] SMP PTI
      [ 1521.398020] CPU: 0 PID: 22986 Comm: kworker/0:2 Not tainted 5.8.0-rc4+ #109
      [ 1521.399618] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
      [ 1521.401728] Workqueue: events mptcp_worker
      [ 1521.402651] RIP: 0010:mptcp_subflow_create_socket+0xf1/0x1c0
      [ 1521.403954] Code: 24 08 89 44 24 04 48 8b 7a 18 e8 2a 48 d4 ff 8b 44 24 04 85 c0 75 7a 48 8b 8b 78 02 00 00 48 8b 54 24 08 48 8d bb 80 00 00 00 <48> 8b 89 c0 00 00 00 48 89 8a c0 00 00 00 48 8b 8b 78 02 00 00 8b
      [ 1521.408201] RSP: 0000:ffffabc4002d3c60 EFLAGS: 00010246
      [ 1521.409433] RAX: 0000000000000000 RBX: ffffa0b9ad8c9a00 RCX: 0000000000000000
      [ 1521.411096] RDX: ffffa0b9ae78a300 RSI: 00000000fffffe01 RDI: ffffa0b9ad8c9a80
      [ 1521.412734] RBP: ffffa0b9adff2e80 R08: ffffa0b9af02d640 R09: ffffa0b9ad923a00
      [ 1521.414333] R10: ffffabc4007139f8 R11: fefefefefefefeff R12: ffffabc4002d3cb0
      [ 1521.415918] R13: ffffa0b9ad91fa58 R14: ffffa0b9ad8c9f9c R15: 0000000000000000
      [ 1521.417592] FS:  0000000000000000(0000) GS:ffffa0b9af000000(0000) knlGS:0000000000000000
      [ 1521.419490] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1521.420839] CR2: 00000000000000c0 CR3: 000000002951e006 CR4: 0000000000160ef0
      [ 1521.422511] Call Trace:
      [ 1521.423103]  __mptcp_subflow_connect+0x94/0x1f0
      [ 1521.425376]  mptcp_pm_create_subflow_or_signal_addr+0x200/0x2a0
      [ 1521.426736]  mptcp_worker+0x31b/0x390
      [ 1521.431324]  process_one_work+0x1fc/0x3f0
      [ 1521.432268]  worker_thread+0x2d/0x3b0
      [ 1521.434197]  kthread+0x117/0x130
      [ 1521.435783]  ret_from_fork+0x22/0x30
      
      on some unconventional configuration.
      
      The MPTCP protocol is trying to create a subflow for an
      unaccepted server socket. That is allowed by the RFC, even
      if subflow creation will likely fail.
      Unaccepted sockets have still a NULL sk_socket field,
      avoid the issue by failing earlier.
      
      Reported-and-tested-by: default avatarNicolas Rybowski <nicolas.rybowski@tessares.net>
      Fixes: 7d14b0d2
      
       ("mptcp: set correct vfs info for subflows")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      adf73410
    • David S. Miller's avatar
      Merge branch 'selftests-rtnetlink-Fix-for-false-negative-return-values' · 889579d0
      David S. Miller authored
      
      
      Po-Hsu Lin says:
      
      ====================
      selftests: rtnetlink: Fix for false-negative return values
      
      This patchset will address the false-negative return value issue
      caused by the following:
        1. The return value "ret" in this script will be reset to 0 from
           the beginning of each sub-test in rtnetlink.sh, therefore this
           rtnetlink test will always pass if the last sub-test has passed.
        2. The test result from two sub-tests in kci_test_encap() were not
           being processed, thus they will not affect the final test result
           of this test.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      889579d0
    • Po-Hsu Lin's avatar
      selftests: rtnetlink: make kci_test_encap() return sub-test result · 72f70c15
      Po-Hsu Lin authored
      
      
      kci_test_encap() is actually composed by two different sub-tests,
      kci_test_encap_vxlan() and kci_test_encap_fou()
      
      Therefore we should check the test result of these two in
      kci_test_encap() to let the script be aware of the pass / fail status.
      Otherwise it will generate false-negative result like below:
          $ sudo ./test.sh
          PASS: policy routing
          PASS: route get
          PASS: preferred_lft addresses have expired
          PASS: promote_secondaries complete
          PASS: tc htb hierarchy
          PASS: gre tunnel endpoint
          PASS: gretap
          PASS: ip6gretap
          PASS: erspan
          PASS: ip6erspan
          PASS: bridge setup
          PASS: ipv6 addrlabel
          PASS: set ifalias 5b193daf-0a08-46d7-af2c-e7aadd422ded for test-dummy0
          PASS: vrf
          PASS: vxlan
          FAIL: can't add fou port 7777, skipping test
          PASS: macsec
          PASS: bridge fdb get
          PASS: neigh get
          $ echo $?
          0
      
      Signed-off-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72f70c15
    • Po-Hsu Lin's avatar
      selftests: rtnetlink: correct the final return value for the test · c2a4d274
      Po-Hsu Lin authored
      
      
      The return value "ret" will be reset to 0 from the beginning of each
      sub-test in rtnetlink.sh, therefore this test will always pass if the
      last sub-test has passed:
          $ sudo ./rtnetlink.sh
          PASS: policy routing
          PASS: route get
          PASS: preferred_lft addresses have expired
          PASS: promote_secondaries complete
          PASS: tc htb hierarchy
          PASS: gre tunnel endpoint
          PASS: gretap
          PASS: ip6gretap
          PASS: erspan
          PASS: ip6erspan
          PASS: bridge setup
          PASS: ipv6 addrlabel
          PASS: set ifalias a39ee707-e36b-41d3-802f-63179ed4d580 for test-dummy0
          PASS: vrf
          PASS: vxlan
          FAIL: can't add fou port 7777, skipping test
          PASS: macsec
          PASS: ipsec
          3,7c3,7
          < sa[0]    spi=0x00000009 proto=0x32 salt=0x64636261 crypt=1
          < sa[0]    key=0x31323334 35363738 39303132 33343536
          < sa[1] rx ipaddr=0x00000000 00000000 00000000 c0a87b03
          < sa[1]    spi=0x00000009 proto=0x32 salt=0x64636261 crypt=1
          < sa[1]    key=0x31323334 35363738 39303132 33343536
          ---
          > sa[0]    spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1
          > sa[0]    key=0x34333231 38373635 32313039 36353433
          > sa[1] rx ipaddr=0x00000000 00000000 00000000 037ba8c0
          > sa[1]    spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1
          > sa[1]    key=0x34333231 38373635 32313039 36353433
          FAIL: ipsec_offload incorrect driver data
          FAIL: ipsec_offload
          PASS: bridge fdb get
          PASS: neigh get
          $ echo $?
          0
      
      Make "ret" become a local variable for all sub-tests.
      Also, check the sub-test results in kci_test_rtnl() and return the
      final result for this test.
      
      Signed-off-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2a4d274
    • Vladimir Oltean's avatar
      net: dsa: sja1105: use detected device id instead of DT one on mismatch · 0b0e2997
      Vladimir Oltean authored
      
      
      Although we can detect the chip revision 100% at runtime, it is useful
      to specify it in the device tree compatible string too, because
      otherwise there would be no way to assess the correctness of device tree
      bindings statically, without booting a board (only some switch versions
      have internal RGMII delays and/or an SGMII port).
      
      But for testing the P/Q/R/S support, what I have is a reworked board
      with the SJA1105T replaced by a pin-compatible SJA1105Q, and I don't
      want to keep a separate device tree blob just for this one-off board.
      Since just the chip has been replaced, its RGMII delay setup is
      inherently the same (meaning: delays added by the PHY on the slave
      ports, and by PCB traces on the fixed-link CPU port).
      
      For this board, I'd rather have the driver shout at me, but go ahead and
      use what it found even if it doesn't match what it's been told is there.
      
      [    2.970826] sja1105 spi0.1: Device tree specifies chip SJA1105T but found SJA1105Q, please fix it!
      [    2.980010] sja1105 spi0.1: Probed switch chip: SJA1105Q
      [    3.005082] sja1105 spi0.1: Enabled switch tagging
      
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b0e2997
    • David S. Miller's avatar
      Merge branch 'net-fix-a-mcast-issue-for-tipc-udp-media' · 273d405b
      David S. Miller authored
      
      
      Xin Long says:
      
      ====================
      net: fix a mcast issue for tipc udp media
      
      Patch 1 is to add a function to get the dev by source address,
      which will be used by Patch 2.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      273d405b
    • Xin Long's avatar
      tipc: set ub->ifindex for local ipv6 address · 5a6f6f57
      Xin Long authored
      
      
      Without ub->ifindex set for ipv6 address in tipc_udp_enable(),
      ipv6_sock_mc_join() may make the wrong dev join the multicast
      address in enable_mcast(). This causes that tipc links would
      never be created.
      
      So fix it by getting the right netdev and setting ub->ifindex,
      as it does for ipv4 address.
      
      Reported-by: default avatarShuang Li <shuali@redhat.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a6f6f57
    • Xin Long's avatar
      ipv6: add ipv6_dev_find() · 81f6cb31
      Xin Long authored
      
      
      This is to add an ip_dev_find like function for ipv6, used to find
      the dev by saddr.
      
      It will be used by TIPC protocol. So also export it.
      
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81f6cb31
    • Linus Torvalds's avatar
      Merge tag 'usb-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · ecfd7940
      Linus Torvalds authored
      Pull USB/Thunderbolt updates from Greg KH:
       "Here is the large set of USB and Thunderbolt patches for 5.9-rc1.
      
        Nothing really magic/major in here, just lots of little changes and
        updates:
      
         - clean up language usages in USB core and some drivers
      
         - Thunderbolt driver updates and additions
      
         - USB Gadget driver updates
      
         - dwc3 driver updates (like always...)
      
         - build with "W=1" warning fixups
      
         - mtu3 driver updates
      
         - usb-serial driver updates and device ids
      
         - typec additions and updates for new hardware
      
         - xhci debug code updates for future platforms
      
         - cdns3 driver updates
      
         - lots of other minor driver updates and fixes and cleanups
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (330 commits)
        usb: common: usb-conn-gpio: Register charger
        usb: mtu3: simplify mtu3_req_complete()
        usb: mtu3: clear dual mode of u3port when disable device
        usb: mtu3: use MTU3_EP_WEDGE flag
        usb: mtu3: remove useless member @busy in mtu3_ep struct
        usb: mtu3: remove repeated error log
        usb: mtu3: add ->udc_set_speed()
        usb: mtu3: introduce a funtion to check maximum speed
        usb: mtu3: clear interrupts status when disable interrupts
        usb: mtu3: reinitialize CSR registers
        usb: mtu3: fix macro for maximum number of packets
        usb: mtu3: remove unnecessary pointer checks
        usb: xhci: Fix ASMedia ASM1142 DMA addressing
        usb: xhci: define IDs for various ASMedia host controllers
        usb: musb: convert to devm_platform_ioremap_resource_byname
        usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname
        usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname
        usb: dwc3: convert to devm_platform_ioremap_resource_byname
        usb: cdns3: convert to devm_platform_ioremap_resource_byname
        usb: phy: am335x: convert to devm_platform_ioremap_resource_byname
        ...
      ecfd7940
    • Tonghao Zhang's avatar
      net: openvswitch: silence suspicious RCU usage warning · 5845589e
      Tonghao Zhang authored
      ovs_flow_tbl_destroy always is called from RCU callback
      or error path. It is no need to check if rcu_read_lock
      or lockdep_ovsl_is_held was held.
      
      ovs_dp_cmd_fill_info always is called with ovs_mutex,
      So use the rcu_dereference_ovsl instead of rcu_dereference
      in ovs_flow_tbl_masks_cache_size.
      
      Fixes: 9bf24f59
      
       ("net: openvswitch: make masks cache size configurable")
      Cc: Eelco Chaudron <echaudro@redhat.com>
      Reported-by: default avatar <syzbot+c0eb9e7cdde04e4eb4be@syzkaller.appspotmail.com>
      Reported-by: default avatar <syzbot+f612c02823acb02ff9bc@syzkaller.appspotmail.com>
      Signed-off-by: default avatarTonghao Zhang <xiangxia.m.yue@gmail.com>
      Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5845589e
    • Hangbin Liu's avatar
      Revert "vxlan: fix tos value before xmit" · a0dced17
      Hangbin Liu authored
      This reverts commit 71130f29.
      
      In commit 71130f29 ("vxlan: fix tos value before xmit") we want to
      make sure the tos value are filtered by RT_TOS() based on RFC1349.
      
             0     1     2     3     4     5     6     7
          +-----+-----+-----+-----+-----+-----+-----+-----+
          |   PRECEDENCE    |          TOS          | MBZ |
          +-----+-----+-----+-----+-----+-----+-----+-----+
      
      But RFC1349 has been obsoleted by RFC2474. The new DSCP field defined like
      
             0     1     2     3     4     5     6     7
          +-----+-----+-----+-----+-----+-----+-----+-----+
          |          DS FIELD, DSCP           | ECN FIELD |
          +-----+-----+-----+-----+-----+-----+-----+-----+
      
      So with
      
      IPTOS_TOS_MASK          0x1E
      RT_TOS(tos)		((tos)&IPTOS_TOS_MASK)
      
      the first 3 bits DSCP info will get lost.
      
      To take all the DSCP info in xmit, we should revert the patch and just push
      all tos bits to ip_tunnel_ecn_encap(), which will handling ECN field later.
      
      Fixes: 71130f29
      
       ("vxlan: fix tos value before xmit")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Acked-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0dced17