1. 31 5月, 2019 40 次提交
    • L
      iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion · d7c77341
      Lars-Peter Clausen 提交于
      [ Upstream commit df1d80aee963480c5c2938c64ec0ac3e4a0df2e0 ]
      
      For devices from the SigmaDelta family we need to keep CS low when doing a
      conversion, since the device will use the MISO line as a interrupt to
      indicate that the conversion is complete.
      
      This is why the driver locks the SPI bus and when the SPI bus is locked
      keeps as long as a conversion is going on. The current implementation gets
      one small detail wrong though. CS is only de-asserted after the SPI bus is
      unlocked. This means it is possible for a different SPI device on the same
      bus to send a message which would be wrongfully be addressed to the
      SigmaDelta device as well. Make sure that the last SPI transfer that is
      done while holding the SPI bus lock de-asserts the CS signal.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NAlexandru Ardelean <Alexandru.Ardelean@analog.com>
      Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      d7c77341
    • W
      drm/pl111: fix possible object reference leak · ce59174d
      Wen Yang 提交于
      [ Upstream commit bc29d3a69d4c1bd1a103e8b3c1ed81b807c1870b ]
      
      The call to of_find_matching_node_and_match returns a node pointer with
      refcount incremented thus it must be explicitly decremented after the
      last usage.
      
      Detected by coccinelle with the following warnings:
      drivers/gpu/drm/pl111/pl111_versatile.c:333:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 317, but without a corresponding object release within this function.
      drivers/gpu/drm/pl111/pl111_versatile.c:340:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 317, but without a corresponding object release within this function.
      drivers/gpu/drm/pl111/pl111_versatile.c:346:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 317, but without a corresponding object release within this function.
      drivers/gpu/drm/pl111/pl111_versatile.c:354:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 317, but without a corresponding object release within this function.
      drivers/gpu/drm/pl111/pl111_versatile.c:395:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 317, but without a corresponding object release within this function.
      drivers/gpu/drm/pl111/pl111_versatile.c:402:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 317, but without a corresponding object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Cc: Eric Anholt <eric@anholt.net> (supporter:DRM DRIVER FOR ARM PL111 CLCD)
      Cc: David Airlie <airlied@linux.ie> (maintainer:DRM DRIVERS)
      Cc: Daniel Vetter <daniel@ffwll.ch> (maintainer:DRM DRIVERS)
      Cc: dri-devel@lists.freedesktop.org (open list:DRM DRIVERS)
      Cc: linux-kernel@vger.kernel.org (open list)
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/1554307455-40361-6-git-send-email-wen.yang99@zte.com.cnSigned-off-by: NSasha Levin <sashal@kernel.org>
      ce59174d
    • K
      x86/build: Keep local relocations with ld.lld · e758471b
      Kees Cook 提交于
      [ Upstream commit 7c21383f3429dd70da39c0c7f1efa12377a47ab6 ]
      
      The LLVM linker (ld.lld) defaults to removing local relocations, which
      causes KASLR boot failures. ld.bfd and ld.gold already handle this
      correctly. This adds the explicit instruction "--discard-none" during
      the link phase. There is no change in output for ld.bfd and ld.gold,
      but ld.lld now produces an image with all the needed relocations.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: clang-built-linux@googlegroups.com
      Cc: x86-ml <x86@kernel.org>
      Link: https://lkml.kernel.org/r/20190404214027.GA7324@beast
      Link: https://github.com/ClangBuiltLinux/linux/issues/404Signed-off-by: NSasha Levin <sashal@kernel.org>
      e758471b
    • D
      block: sed-opal: fix IOC_OPAL_ENABLE_DISABLE_MBR · 2b18febc
      David Kozub 提交于
      [ Upstream commit 78bf47353b0041865564deeed257a54f047c2fdc ]
      
      The implementation of IOC_OPAL_ENABLE_DISABLE_MBR handled the value
      opal_mbr_data.enable_disable incorrectly: enable_disable is expected
      to be one of OPAL_MBR_ENABLE(0) or OPAL_MBR_DISABLE(1). enable_disable
      was passed directly to set_mbr_done and set_mbr_enable_disable where
      is was interpreted as either OPAL_TRUE(1) or OPAL_FALSE(0). The end
      result was that calling IOC_OPAL_ENABLE_DISABLE_MBR with OPAL_MBR_ENABLE
      actually disabled the shadow MBR and vice versa.
      
      This patch adds correct conversion from OPAL_MBR_DISABLE/ENABLE to
      OPAL_FALSE/TRUE. The change affects existing programs using
      IOC_OPAL_ENABLE_DISABLE_MBR but this is typically used only once when
      setting up an Opal drive.
      Acked-by: NJon Derrick <jonathan.derrick@intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NScott Bauer <sbauer@plzdonthack.me>
      Signed-off-by: NDavid Kozub <zub@linux.fjfi.cvut.cz>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      2b18febc
    • W
      cpufreq: kirkwood: fix possible object reference leak · 9d8b1d5d
      Wen Yang 提交于
      [ Upstream commit 7c468966f05ac9c17bb5948275283d34e6fe0660 ]
      
      The call to of_get_child_by_name returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      ./drivers/cpufreq/kirkwood-cpufreq.c:127:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 118, but without a corresponding object release within this function.
      ./drivers/cpufreq/kirkwood-cpufreq.c:133:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 118, but without a corresponding object release within this function.
      
      and also do some cleanup:
      - of_node_put(np);
      - np = NULL;
      ...
      of_node_put(np);
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      9d8b1d5d
    • W
      cpufreq: pmac32: fix possible object reference leak · f9ead9f4
      Wen Yang 提交于
      [ Upstream commit 8d10dc28a9ea6e8c02e825dab28699f3c72b02d9 ]
      
      The call to of_find_node_by_name returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      ./drivers/cpufreq/pmac32-cpufreq.c:557:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 552, but without a corresponding object release within this function.
      ./drivers/cpufreq/pmac32-cpufreq.c:569:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 552, but without a corresponding object release within this function.
      ./drivers/cpufreq/pmac32-cpufreq.c:598:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 587, but without a corresponding object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linux-pm@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      f9ead9f4
    • W
      cpufreq/pasemi: fix possible object reference leak · 513a7f8e
      Wen Yang 提交于
      [ Upstream commit a9acc26b75f652f697e02a9febe2ab0da648a571 ]
      
      The call to of_get_cpu_node returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      ./drivers/cpufreq/pasemi-cpufreq.c:212:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 147, but without a corresponding object release within this function.
      ./drivers/cpufreq/pasemi-cpufreq.c:220:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 147, but without a corresponding object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      513a7f8e
    • W
      cpufreq: ppc_cbe: fix possible object reference leak · 9612f404
      Wen Yang 提交于
      [ Upstream commit 233298032803f2802fe99892d0de4ab653bfece4 ]
      
      The call to of_get_cpu_node returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      ./drivers/cpufreq/ppc_cbe_cpufreq.c:89:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 76, but without a corresponding object release within this function.
      ./drivers/cpufreq/ppc_cbe_cpufreq.c:89:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 76, but without a corresponding object release within this function.
      Signed-off-by: NWen Yang <wen.yang99@zte.com.cn>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      9612f404
    • K
      qmi_wwan: Add quirk for Quectel dynamic config · f8a91441
      Kristian Evensen 提交于
      [ Upstream commit e4bf63482c309287ca84d91770ffa7dcc18e37eb ]
      
      Most, if not all, Quectel devices use dynamic interface numbers, and
      users are able to change the USB configuration at will. Matching on for
      example interface number is therefore not possible.
      
      Instead, the QMI device can be identified by looking at the interface
      class, subclass and protocol (all 0xff), as well as the number of
      endpoints. The reason we need to look at the number of endpoints, is
      that the diagnostic port interface has the same class, subclass and
      protocol as QMI. However, the diagnostic port only has two endpoints,
      while QMI has three.
      
      Until now, we have identified the QMI device by combining a match on
      class, subclass and protocol, with a call to the function
      quectel_diag_detect(). In quectel_diag_detect(), we check if the number
      of endpoints matches for known Quectel vendor/product ids.
      
      Adding new vendor/product ids to quectel_diag_detect() is not a good
      long-term solution. This commit replaces the function with a quirk, and
      applies the quirk to affected Quectel devices that I have been able to
      test the change with (EP06, EM12 and EC25). If the quirk is set and the
      number of endpoints equal two, we return from qmi_wwan_probe() with
      -ENODEV.
      Signed-off-by: NKristian Evensen <kristian.evensen@gmail.com>
      Acked-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      f8a91441
    • R
      selftests: cgroup: fix cleanup path in test_memcg_subtree_control() · 1b6141cd
      Roman Gushchin 提交于
      [ Upstream commit e14d314c7a489f060d6d691866fef5f131281718 ]
      
      Dan reported, that cleanup path in test_memcg_subtree_control()
      triggers a static checker warning:
        ./tools/testing/selftests/cgroup/test_memcontrol.c:76 \
        test_memcg_subtree_control()
        error: uninitialized symbol 'child2'.
      
      Fix this by initializing child2 and parent2 variables and
      split the cleanup path into few stages.
      Signed-off-by: NRoman Gushchin <guro@fb.com>
      Fixes: 84092dbc ("selftests: cgroup: add memory controller self-tests")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Shuah Khan (Samsung OSG) <shuah@kernel.org>
      Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
      Signed-off-by: NShuah Khan <shuah@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      1b6141cd
    • A
      s390: cio: fix cio_irb declaration · 9c594cae
      Arnd Bergmann 提交于
      [ Upstream commit e91012ee855ad9f5ef2ab106a3de51db93fe4d0c ]
      
      clang points out that the declaration of cio_irb does not match the
      definition exactly, it is missing the alignment attribute:
      
      ../drivers/s390/cio/cio.c:50:1: warning: section does not match previous declaration [-Wsection]
      DEFINE_PER_CPU_ALIGNED(struct irb, cio_irb);
      ^
      ../include/linux/percpu-defs.h:150:2: note: expanded from macro 'DEFINE_PER_CPU_ALIGNED'
              DEFINE_PER_CPU_SECTION(type, name, PER_CPU_ALIGNED_SECTION)     \
              ^
      ../include/linux/percpu-defs.h:93:9: note: expanded from macro 'DEFINE_PER_CPU_SECTION'
              extern __PCPU_ATTRS(sec) __typeof__(type) name;                 \
                     ^
      ../include/linux/percpu-defs.h:49:26: note: expanded from macro '__PCPU_ATTRS'
              __percpu __attribute__((section(PER_CPU_BASE_SECTION sec)))     \
                                      ^
      ../drivers/s390/cio/cio.h:118:1: note: previous attribute is here
      DECLARE_PER_CPU(struct irb, cio_irb);
      ^
      ../include/linux/percpu-defs.h:111:2: note: expanded from macro 'DECLARE_PER_CPU'
              DECLARE_PER_CPU_SECTION(type, name, "")
              ^
      ../include/linux/percpu-defs.h:87:9: note: expanded from macro 'DECLARE_PER_CPU_SECTION'
              extern __PCPU_ATTRS(sec) __typeof__(type) name
                     ^
      ../include/linux/percpu-defs.h:49:26: note: expanded from macro '__PCPU_ATTRS'
              __percpu __attribute__((section(PER_CPU_BASE_SECTION sec)))     \
                                      ^
      Use DECLARE_PER_CPU_ALIGNED() here, to make the two match.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: NSebastian Ott <sebott@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      9c594cae
    • T
      s390/mm: silence compiler warning when compiling without CONFIG_PGSTE · c3c61438
      Thomas Huth 提交于
      [ Upstream commit 81a8f2beb32a5951ecf04385301f50879abc092b ]
      
      If CONFIG_PGSTE is not set (e.g. when compiling without KVM), GCC complains:
      
        CC      arch/s390/mm/pgtable.o
      arch/s390/mm/pgtable.c:413:15: warning: ‘pmd_alloc_map’ defined but not
       used [-Wunused-function]
       static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr)
                     ^~~~~~~~~~~~~
      
      Wrap the function with "#ifdef CONFIG_PGSTE" to silence the warning.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      c3c61438
    • B
      x86/microcode: Fix the ancient deprecated microcode loading method · a07de9b9
      Borislav Petkov 提交于
      [ Upstream commit 24613a04ad1c0588c10f4b5403ca60a73d164051 ]
      
      Commit
      
        2613f36e ("x86/microcode: Attempt late loading only when new microcode is present")
      
      added the new define UCODE_NEW to denote that an update should happen
      only when newer microcode (than installed on the system) has been found.
      
      But it missed adjusting that for the old /dev/cpu/microcode loading
      interface. Fix it.
      
      Fixes: 2613f36e ("x86/microcode: Attempt late loading only when new microcode is present")
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Jann Horn <jannh@google.com>
      Link: https://lkml.kernel.org/r/20190405133010.24249-3-bp@alien8.deSigned-off-by: NSasha Levin <sashal@kernel.org>
      a07de9b9
    • A
      s390: zcrypt: initialize variables before_use · a3713f2c
      Arnd Bergmann 提交于
      [ Upstream commit 913140e221567b3ecd21b4242257a7e3fa279026 ]
      
      The 'func_code' variable gets printed in debug statements without
      a prior initialization in multiple functions, as reported when building
      with clang:
      
      drivers/s390/crypto/zcrypt_api.c:659:6: warning: variable 'func_code' is used uninitialized whenever 'if' condition is true
            [-Wsometimes-uninitialized]
              if (mex->outputdatalength < mex->inputdatalength) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/s390/crypto/zcrypt_api.c:725:29: note: uninitialized use occurs here
              trace_s390_zcrypt_rep(mex, func_code, rc,
                                         ^~~~~~~~~
      drivers/s390/crypto/zcrypt_api.c:659:2: note: remove the 'if' if its condition is always false
              if (mex->outputdatalength < mex->inputdatalength) {
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/s390/crypto/zcrypt_api.c:654:24: note: initialize the variable 'func_code' to silence this warning
              unsigned int func_code;
                                    ^
      
      Add initializations to all affected code paths to shut up the warning
      and make the warning output consistent.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      a3713f2c
    • D
      clk: rockchip: Make rkpwm a critical clock on rk3288 · e9114698
      Douglas Anderson 提交于
      [ Upstream commit dfe7fb21cd9e730230d55a79bc72cf2ece67cdd5 ]
      
      Most rk3288-based boards are derived from the EVB and thus use a PWM
      regulator for the logic rail.  However, most rk3288-based boards don't
      specify the PWM regulator in their device tree.  We'll deal with that
      by making it critical.
      
      NOTE: it's important to make it critical and not just IGNORE_UNUSED
      because all PWMs in the system share the same clock.  We don't want
      another PWM user to turn the clock on and off and kill the logic rail.
      
      This change is in preparation for actually having the PWMs in the
      rk3288 device tree actually point to the proper PWM clock.  Up until
      now they've all pointed to the clock for the old IP block and they've
      all worked due to the fact that rkpwm was IGNORE_UNUSED and that the
      clock rates for both clocks were the same.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e9114698
    • C
      extcon: arizona: Disable mic detect if running when driver is removed · c9aa87e5
      Charles Keepax 提交于
      [ Upstream commit 00053de52231117ddc154042549f2256183ffb86 ]
      
      Microphone detection provides the button detection features on the
      Arizona CODECs as such it will be running if the jack is currently
      inserted. If the driver is unbound whilst the jack is still inserted
      this will cause warnings from the regulator framework as the MICVDD
      regulator is put but was never disabled.
      
      Correct this by disabling microphone detection on driver removal and if
      the microphone detection was running disable the regulator and put the
      runtime reference that was currently held.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      c9aa87e5
    • D
      clk: rockchip: Fix video codec clocks on rk3288 · 82234265
      Douglas Anderson 提交于
      [ Upstream commit 00c0cd9e59d265b393553e9afa54fee8b10e8158 ]
      
      It appears that there is a typo in the rk3288 TRM.  For
      GRF_SOC_CON0[7] it says that 0 means "vepu" and 1 means "vdpu".  It's
      the other way around.
      
      How do I know?  Here's my evidence:
      
      1. Prior to commit 4d3e84f9 ("clk: rockchip: describe aclk_vcodec
         using the new muxgrf type on rk3288") we always pretended that we
         were using "aclk_vdpu" and the comment in the code said that this
         matched the default setting in the system.  In fact the default
         setting is 0 according to the TRM and according to reading memory
         at bootup.  In addition rk3288-based Chromebooks ran like this and
         the video codecs worked.
      2. With the existing clock code if you boot up and try to enable the
         new VIDEO_ROCKCHIP_VPU as a module (and without "clk_ignore_unused"
         on the command line), you get errors like "failed to get ack on
         domain 'pd_video', val=0x80208".  After flipping vepu/vdpu things
         init OK.
      3. If I export and add both the vepu and vdpu to the list of clocks
         for RK3288_PD_VIDEO I can get past the power domain errors, but now
         I freeze when the vpu_mmu gets initted.
      4. If I just mark the "vdpu" as IGNORE_UNUSED then everything boots up
         and probes OK showing that somehow the "vdpu" was important to keep
         enabled.  This is because we were actually using it as a parent.
      5. After this change I can hack "aclk_vcodec_pre" to parent from
         "aclk_vepu" using assigned-clocks and the video codec still probes
         OK.
      6. Rockchip has said so on the mailing list [1].
      
      ...so let's fix it.
      
      Let's also add CLK_SET_RATE_PARENT to "aclk_vcodec_pre" as suggested
      by Jonas Karlman.  Prior to the same commit you could do
      clk_set_rate() on "aclk_vcodec" and it would change "aclk_vdpu".
      That's because "aclk_vcodec" was a simple gate clock (always gets
      CLK_SET_RATE_PARENT) and its direct parent was "aclk_vdpu".  After
      that commit "aclk_vcodec_pre" gets in the way so we need to add
      CLK_SET_RATE_PARENT to it too.
      
      [1] https://lkml.kernel.org/r/1d17b015-9e17-34b9-baf8-c285dc1957aa@rock-chips.com
      
      Fixes: 4d3e84f9 ("clk: rockchip: describe aclk_vcodec using the new muxgrf type on rk3288")
      Suggested-by: NJonas Karlman <jonas@kwiboo.se>
      Suggested-by: NRandy Li <ayaka@soulik.info>
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      82234265
    • U
      PM / core: Propagate dev->power.wakeup_path when no callbacks · cbaab786
      Ulf Hansson 提交于
      [ Upstream commit dc351d4c5f4fe4d0f274d6d660227be0c3a03317 ]
      
      The dev->power.direct_complete flag may become set in device_prepare() in
      case the device don't have any PM callbacks (dev->power.no_pm_callbacks is
      set). This leads to a broken behaviour, when there is child having wakeup
      enabled and relies on its parent to be used in the wakeup path.
      
      More precisely, when the direct complete path becomes selected for the
      child in __device_suspend(), the propagation of the dev->power.wakeup_path
      becomes skipped as well.
      
      Let's address this problem, by checking if the device is a part the wakeup
      path or has wakeup enabled, then prevent the direct complete path from
      being used.
      Reported-by: NLoic Pallardy <loic.pallardy@st.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      [ rjw: Comment cleanup ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      cbaab786
    • C
      drm/amdgpu: fix old fence check in amdgpu_fence_emit · d8a36f84
      Christian König 提交于
      [ Upstream commit 3d2aca8c8620346abdba96c6300d2c0b90a1d0cc ]
      
      We don't hold a reference to the old fence, so it can go away
      any time we are waiting for it to signal.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NChunming Zhou <david1.zhou@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      d8a36f84
    • Y
      mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support · e107bc69
      Yinbo Zhu 提交于
      [ Upstream commit 05cb6b2a66fa7837211a060878e91be5eb10cb07 ]
      
      eSDHC-A001: The data timeout counter (SYSCTL[DTOCV]) is not
      reliable for DTOCV values 0x4(2^17 SD clock), 0x8(2^21 SD clock),
      and 0xC(2^25 SD clock). The data timeout counter can count from
      2^13–2^27, but for values 2^17, 2^21, and 2^25, the timeout
      counter counts for only 2^13 SD clocks.
      A-008358: The data timeout counter value loaded into the timeout
      counter is less than expected and can result into early timeout
      error in case of eSDHC data transactions. The table below shows
      the expected vs actual timeout period for different values of
      SYSCTL[DTOCV]:
      these two erratum has the same quirk to control it, and set
      SDHCI_QUIRK_RESET_AFTER_REQUEST to fix above issue.
      Signed-off-by: NYinbo Zhu <yinbo.zhu@nxp.com>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e107bc69
    • Y
      mmc: sdhci-of-esdhc: add erratum A-009204 support · 019ca0bf
      Yinbo Zhu 提交于
      [ Upstream commit 5dd195522562542bc6ebe6e7bd47890d8b7ca93c ]
      
      In the event of that any data error (like, IRQSTAT[DCE]) occurs
      during an eSDHC data transaction where DMA is used for data
      transfer to/from the system memory, setting the SYSCTL[RSTD]
      register may cause a system hang. If software sets the register
      SYSCTL[RSTD] to 1 for error recovery while DMA transferring is
      not complete, eSDHC may hang the system bus. This happens because
      the software register SYSCTL[RSTD] resets the DMA engine without
      waiting for the completion of pending system transactions. This
      erratum is to fix this issue.
      Signed-off-by: NYinbo Zhu <yinbo.zhu@nxp.com>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      019ca0bf
    • Y
      mmc: sdhci-of-esdhc: add erratum eSDHC5 support · 80118cba
      Yinbo Zhu 提交于
      [ Upstream commit a46e42712596b51874f04c73f1cdf1017f88df52 ]
      
      Software writing to the Transfer Type configuration register
      (system clock domain) can cause a setup/hold violation in the
      CRC flops (card clock domain), which can cause write accesses
      to be sent with corrupt CRC values. This issue occurs only for
      write preceded by read. this erratum is to fix this issue.
      Signed-off-by: NYinbo Zhu <yinbo.zhu@nxp.com>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      80118cba
    • K
      mmc_spi: add a status check for spi_sync_locked · fa291e89
      Kangjie Lu 提交于
      [ Upstream commit 611025983b7976df0183390a63a2166411d177f1 ]
      
      In case spi_sync_locked fails, the fix reports the error and
      returns the error code upstream.
      Signed-off-by: NKangjie Lu <kjlu@umn.edu>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      fa291e89
    • A
      mmc: core: make pwrseq_emmc (partially) support sleepy GPIO controllers · 059c2f53
      Andrea Merello 提交于
      [ Upstream commit 002ee28e8b322d4d4b7b83234b5d0f4ebd428eda ]
      
      pwrseq_emmc.c implements a HW reset procedure for eMMC chip by driving a
      GPIO line.
      
      It registers the .reset() cb on mmc_pwrseq_ops and it registers a system
      restart notification handler; both of them perform reset by unconditionally
      calling gpiod_set_value().
      
      If the eMMC reset line is tied to a GPIO controller whose driver can sleep
      (i.e. I2C GPIO controller), then the kernel would spit warnings when trying
      to reset the eMMC chip by means of .reset() mmc_pwrseq_ops cb (that is
      exactly what I'm seeing during boot).
      
      Furthermore, on system reset we would gets to the system restart
      notification handler with disabled interrupts - local_irq_disable() is
      called in machine_restart() at least on ARM/ARM64 - and we would be in
      trouble when the GPIO driver tries to sleep (which indeed doesn't happen
      here, likely because in my case the machine specific code doesn't call
      do_kernel_restart(), I guess..).
      
      This patch fixes the .reset() cb to make use of gpiod_set_value_cansleep(),
      so that the eMMC gets reset on boot without complaints, while, since there
      isn't that much we can do, we avoid register the restart handler if the
      GPIO controller has a sleepy driver (and we spit a dev_notice() message to
      let people know)..
      
      This had been tested on a downstream 4.9 kernel with backported
      commit 83f37ee7ba33 ("mmc: pwrseq: Add reset callback to the struct
      mmc_pwrseq_ops") and commit ae60fb031cf2 ("mmc: core: Don't do eMMC HW
      reset when resuming the eMMC card"), because I couldn't boot my board
      otherwise. Maybe worth to RFT.
      Signed-off-by: NAndrea Merello <andrea.merello@gmail.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      059c2f53
    • J
      scsi: libsas: Do discovery on empty PHY to update PHY info · aa06e612
      John Garry 提交于
      [ Upstream commit d8649fc1c5e40e691d589ed825998c36a947491c ]
      
      When we discover the PHY is empty in sas_rediscover_dev(), the PHY
      information (like negotiated linkrate) is not updated.
      
      As such, for a user examining sysfs for that PHY, they would see
      incorrect values:
      
      root@(none)$ cd /sys/class/sas_phy/phy-0:0:20
      root@(none)$ more negotiated_linkrate
      3.0 Gbit
      root@(none)$ echo 0 > enable
      root@(none)$ more negotiated_linkrate
      3.0 Gbit
      
      So fix this, simply discover the PHY again, even though we know it's empty;
      in the above example, this gives us:
      
      root@(none)$ more negotiated_linkrate
      Phy disabled
      
      We must do this after unregistering the device associated with the PHY
      (in sas_unregister_devs_sas_addr()).
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      aa06e612
    • G
      hwmon: (f71805f) Use request_muxed_region for Super-IO accesses · 4e98f3b1
      Guenter Roeck 提交于
      [ Upstream commit 73e6ff71a7ea924fb7121d576a2d41e3be3fc6b5 ]
      
      Super-IO accesses may fail on a system with no or unmapped LPC bus.
      
      Unable to handle kernel paging request at virtual address ffffffbffee0002e
      pgd = ffffffc1d68d4000
      [ffffffbffee0002e] *pgd=0000000000000000, *pud=0000000000000000
      Internal error: Oops: 94000046 [#1] PREEMPT SMP
      Modules linked in: f71805f(+) hwmon
      CPU: 3 PID: 1659 Comm: insmod Not tainted 4.5.0+ #88
      Hardware name: linux,dummy-virt (DT)
      task: ffffffc1f6665400 ti: ffffffc1d6418000 task.ti: ffffffc1d6418000
      PC is at f71805f_find+0x6c/0x358 [f71805f]
      
      Also, other drivers may attempt to access the LPC bus at the same time,
      resulting in undefined behavior.
      
      Use request_muxed_region() to ensure that IO access on the requested
      address space is supported, and to ensure that access by multiple
      drivers is synchronized.
      
      Fixes: e53004e2 ("hwmon: New f71805f driver")
      Reported-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Reported-by: NJohn Garry <john.garry@huawei.com>
      Cc: John Garry <john.garry@huawei.com>
      Acked-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      4e98f3b1
    • G
      hwmon: (pc87427) Use request_muxed_region for Super-IO accesses · 8cfe000d
      Guenter Roeck 提交于
      [ Upstream commit 755a9b0f8aaa5639ba5671ca50080852babb89ce ]
      
      Super-IO accesses may fail on a system with no or unmapped LPC bus.
      
      Also, other drivers may attempt to access the LPC bus at the same time,
      resulting in undefined behavior.
      
      Use request_muxed_region() to ensure that IO access on the requested
      address space is supported, and to ensure that access by multiple drivers
      is synchronized.
      
      Fixes: ba224e2c ("hwmon: New PC87427 hardware monitoring driver")
      Reported-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Reported-by: NJohn Garry <john.garry@huawei.com>
      Cc: John Garry <john.garry@huawei.com>
      Acked-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      8cfe000d
    • G
      hwmon: (smsc47b397) Use request_muxed_region for Super-IO accesses · 48b31e8a
      Guenter Roeck 提交于
      [ Upstream commit 8c0826756744c0ac1df600a5e4cca1a341b13101 ]
      
      Super-IO accesses may fail on a system with no or unmapped LPC bus.
      
      Also, other drivers may attempt to access the LPC bus at the same time,
      resulting in undefined behavior.
      
      Use request_muxed_region() to ensure that IO access on the requested
      address space is supported, and to ensure that access by multiple drivers
      is synchronized.
      
      Fixes: 8d5d45fb ("I2C: Move hwmon drivers (2/3)")
      Reported-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Reported-by: NJohn Garry <john.garry@huawei.com>
      Cc: John Garry <john.garry@huawei.com>
      Acked-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      48b31e8a
    • G
      hwmon: (smsc47m1) Use request_muxed_region for Super-IO accesses · e7dbe597
      Guenter Roeck 提交于
      [ Upstream commit d6410408ad2a798c4cc685252c1baa713be0ad69 ]
      
      Super-IO accesses may fail on a system with no or unmapped LPC bus.
      
      Also, other drivers may attempt to access the LPC bus at the same time,
      resulting in undefined behavior.
      
      Use request_muxed_region() to ensure that IO access on the requested
      address space is supported, and to ensure that access by multiple drivers
      is synchronized.
      
      Fixes: 8d5d45fb ("I2C: Move hwmon drivers (2/3)")
      Reported-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Reported-by: NJohn Garry <john.garry@huawei.com>
      Cc: John Garry <john.garry@huawei.com>
      Acked-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e7dbe597
    • G
      hwmon: (vt1211) Use request_muxed_region for Super-IO accesses · fbdce79e
      Guenter Roeck 提交于
      [ Upstream commit 14b97ba5c20056102b3dd22696bf17b057e60976 ]
      
      Super-IO accesses may fail on a system with no or unmapped LPC bus.
      
      Also, other drivers may attempt to access the LPC bus at the same time,
      resulting in undefined behavior.
      
      Use request_muxed_region() to ensure that IO access on the requested
      address space is supported, and to ensure that access by multiple drivers
      is synchronized.
      
      Fixes: 2219cd81 ("hwmon/vt1211: Add probing of alternate config index port")
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      fbdce79e
    • K
      perf/x86/intel/cstate: Add Icelake support · 1cd4902d
      Kan Liang 提交于
      [ Upstream commit f08c47d1f86c6dc666c7e659d94bf6d4492aa9d7 ]
      
      Icelake uses the same C-state residency events as Sandy Bridge.
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: acme@kernel.org
      Cc: jolsa@kernel.org
      Link: https://lkml.kernel.org/r/20190402194509.2832-10-kan.liang@linux.intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      1cd4902d
    • K
      perf/x86/intel/rapl: Add Icelake support · ea6ff1bb
      Kan Liang 提交于
      [ Upstream commit b3377c3acb9e54cf86efcfe25f2e792bca599ed4 ]
      
      Icelake support the same RAPL counters as Skylake.
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: acme@kernel.org
      Cc: jolsa@kernel.org
      Link: https://lkml.kernel.org/r/20190402194509.2832-11-kan.liang@linux.intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      ea6ff1bb
    • K
      perf/x86/msr: Add Icelake support · 3a9a1fd1
      Kan Liang 提交于
      [ Upstream commit cf50d79a8cfe5adae37fec026220b009559bbeed ]
      
      Icelake is the same as the existing Skylake parts.
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: acme@kernel.org
      Cc: jolsa@kernel.org
      Link: https://lkml.kernel.org/r/20190402194509.2832-12-kan.liang@linux.intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      3a9a1fd1
    • C
      RDMA/cxgb4: Fix null pointer dereference on alloc_skb failure · 9754bab2
      Colin Ian King 提交于
      [ Upstream commit a6d2a5a92e67d151c98886babdc86d530d27111c ]
      
      Currently if alloc_skb fails to allocate the skb a null skb is passed to
      t4_set_arp_err_handler and this ends up dereferencing the null skb.  Avoid
      the NULL pointer dereference by checking for a NULL skb and returning
      early.
      
      Addresses-Coverity: ("Dereference null return")
      Fixes: b38a0ad8 ("RDMA/cxgb4: Set arp error handler for PASS_ACCEPT_RPL messages")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NPotnuri Bharat Teja <bharat@chelsio.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      9754bab2
    • V
      arm64: vdso: Fix clock_getres() for CLOCK_REALTIME · b0f6ac8c
      Vincenzo Frascino 提交于
      [ Upstream commit 81fb8736dd81da3fe94f28968dac60f392ec6746 ]
      
      clock_getres() in the vDSO library has to preserve the same behaviour
      of posix_get_hrtimer_res().
      
      In particular, posix_get_hrtimer_res() does:
      
          sec = 0;
          ns = hrtimer_resolution;
      
      where 'hrtimer_resolution' depends on whether or not high resolution
      timers are enabled, which is a runtime decision.
      
      The vDSO incorrectly returns the constant CLOCK_REALTIME_RES. Fix this
      by exposing 'hrtimer_resolution' in the vDSO datapage and returning that
      instead.
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NVincenzo Frascino <vincenzo.frascino@arm.com>
      [will: Use WRITE_ONCE(), move adr off COARSE path, renumber labels, use 'w' reg]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      b0f6ac8c
    • K
      ACPI/IORT: Reject platform device creation on NUMA node mapping failure · 9082058b
      Kefeng Wang 提交于
      [ Upstream commit 36a2ba07757df790b4a874efb1a105b9330a9ae7 ]
      
      In a system where, through IORT firmware mappings, the SMMU device is
      mapped to a NUMA node that is not online, the kernel bootstrap results
      in the following crash:
      
        Unable to handle kernel paging request at virtual address 0000000000001388
        Mem abort info:
          ESR = 0x96000004
          Exception class = DABT (current EL), IL = 32 bits
          SET = 0, FnV = 0
          EA = 0, S1PTW = 0
        Data abort info:
          ISV = 0, ISS = 0x00000004
          CM = 0, WnR = 0
        [0000000000001388] user address but active_mm is swapper
        Internal error: Oops: 96000004 [#1] SMP
        Modules linked in:
        CPU: 5 PID: 1 Comm: swapper/0 Not tainted 5.0.0 #15
        pstate: 80c00009 (Nzcv daif +PAN +UAO)
        pc : __alloc_pages_nodemask+0x13c/0x1068
        lr : __alloc_pages_nodemask+0xdc/0x1068
        ...
        Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____))
        Call trace:
         __alloc_pages_nodemask+0x13c/0x1068
         new_slab+0xec/0x570
         ___slab_alloc+0x3e0/0x4f8
         __slab_alloc+0x60/0x80
         __kmalloc_node_track_caller+0x10c/0x478
         devm_kmalloc+0x44/0xb0
         pinctrl_bind_pins+0x4c/0x188
         really_probe+0x78/0x2b8
         driver_probe_device+0x64/0x110
         device_driver_attach+0x74/0x98
         __driver_attach+0x9c/0xe8
         bus_for_each_dev+0x84/0xd8
         driver_attach+0x30/0x40
         bus_add_driver+0x170/0x218
         driver_register+0x64/0x118
         __platform_driver_register+0x54/0x60
         arm_smmu_driver_init+0x24/0x2c
         do_one_initcall+0xbc/0x328
         kernel_init_freeable+0x304/0x3ac
         kernel_init+0x18/0x110
         ret_from_fork+0x10/0x1c
        Code: f90013b5 b9410fa1 1a9f0694 b50014c2 (b9400804)
        ---[ end trace dfeaed4c373a32da ]--
      
      Change the dev_set_proximity() hook prototype so that it returns a
      value and make it return failure if the PXM->NUMA-node mapping
      corresponds to an offline node, fixing the crash.
      Acked-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Link: https://lore.kernel.org/linux-arm-kernel/20190315021940.86905-1-wangkefeng.wang@huawei.com/Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      9082058b
    • N
      i40e: don't allow changes to HW VLAN stripping on active port VLANs · 4a9c8449
      Nicholas Nunley 提交于
      [ Upstream commit bfb0ebed53857cfc57f11c63fa3689940d71c1c8 ]
      
      Modifying the VLAN stripping options when a port VLAN is configured
      will break traffic for the VSI, and conceptually doesn't make sense,
      so don't allow this.
      Signed-off-by: NNicholas Nunley <nicholas.d.nunley@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      4a9c8449
    • A
      i40e: Able to add up to 16 MAC filters on an untrusted VF · e3e8cdac
      Adam Ludkiewicz 提交于
      [ Upstream commit 06b6e2a2333eb3581567a7ac43ca465ef45f4daa ]
      
      This patch fixes the problem with the driver being able to add only 7
      multicast MAC address filters instead of 16. The problem is fixed by
      changing the maximum number of MAC address filters to 16+1+1 (two extra
      are needed because the driver uses 1 for unicast MAC address and 1 for
      broadcast).
      Signed-off-by: NAdam Ludkiewicz <adam.ludkiewicz@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      e3e8cdac
    • A
      phy: mapphone-mdm6600: add gpiolib dependency · 267b3c6b
      Arnd Bergmann 提交于
      [ Upstream commit 208d3423ee463ab257908456f6bbca4024ab63f7 ]
      
      gcc points out that when CONFIG_GPIOLIB is disabled,
      gpiod_get_array_value_cansleep() returns 0 but fails to set its output:
      
      drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':
      drivers/phy/motorola/phy-mapphone-mdm6600.c:220:24: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]
      
      This could be fixed more generally in gpiolib by returning a failure
      code, but for this specific case, the easier workaround is to add a
      gpiolib dependency.
      
      Fixes: 5d1ebbda ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      267b3c6b
    • P
      phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral mode · 3ecda688
      Paul Kocialkowski 提交于
      [ Upstream commit e6f32efb1b128344a2c7df9875bc1a1abaa1d395 ]
      
      On platforms where the MUSB and HCI controllers share PHY0, PHY passby
      is required when using the HCI controller with the PHY, but it must be
      disabled when the MUSB controller is used instead.
      
      Without this, PHY0 passby is always enabled, which results in broken
      peripheral mode on such platforms (e.g. H3/H5).
      
      Fixes: ba4bdc9e ("PHY: sunxi: Add driver for sunxi usb phy")
      Signed-off-by: NPaul Kocialkowski <paul.kocialkowski@bootlin.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      3ecda688