1. 21 Dec, 2019 35 commits
  2. 05 Dec, 2019 5 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.9.206 · de84c554
      Greg Kroah-Hartman authored
      de84c554
    • Chuhong Yuan's avatar
      net: fec: fix clock count mis-match · d961a58d
      Chuhong Yuan authored
      commit a31eda65 upstream.
      
      pm_runtime_put_autosuspend in probe will call runtime suspend to
      disable clks automatically if CONFIG_PM is defined. (If CONFIG_PM
      is not defined, its implementation will be empty, then runtime
      suspend will not be called.)
      
      Therefore, we can call pm_runtime_get_sync to runtime resume it
      first to enable clks, which matches the runtime suspend. (Only when
      CONFIG_PM is defined, otherwise pm_runtime_get_sync will also be
      empty, then runtime resume will not be called.)
      
      Then it is fine to disable clks without causing clock count mis-match.
      
      Fixes: c43eab3e ("net: fec: add missed clk_disable_unprepare in remove")
      Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
      Acked-by: default avatarFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d961a58d
    • Hans de Goede's avatar
      platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer · 15d6d766
      Hans de Goede authored
      commit 16245db1 upstream.
      
      The HP WMI calls may take up to 128 bytes of data as input, and
      the AML methods implementing the WMI calls, declare a couple of fields for
      accessing input in different sizes, specifycally the HWMC method contains:
      
              CreateField (Arg1, 0x80, 0x0400, D128)
      
      Even though we do not use any of the WMI command-types which need a buffer
      of this size, the APCI interpreter still tries to create it as it is
      declared in generoc code at the top of the HWMC method which runs before
      the code looks at which command-type is requested.
      
      This results in many of these errors on many different HP laptop models:
      
      [   14.459261] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20170303/dsopcode-236)
      [   14.459268] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8edcc61507f8), AE_AML_BUFFER_LIMIT (20170303/psparse-543)
      [   14.459279] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8edcc61523c0), AE_AML_BUFFER_LIMIT (20170303/psparse-543)
      
      This commit increases the size of the data element of the bios_args struct
      to 128 bytes fixing these errors.
      
      Cc: stable@vger.kernel.org
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      15d6d766
    • Lionel Debieve's avatar
      hwrng: stm32 - fix unbalanced pm_runtime_enable · 665eb2db
      Lionel Debieve authored
      commit af0d4442 upstream.
      
      No remove function implemented yet in the driver.
      Without remove function, the pm_runtime implementation
      complains when removing and probing again the driver.
      Signed-off-by: default avatarLionel Debieve <lionel.debieve@st.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      665eb2db
    • Candle Sun's avatar
      HID: core: check whether Usage Page item is after Usage ID items · 08d5c69a
      Candle Sun authored
      commit 1cb0d2ae upstream.
      
      Upstream commit 58e75155 ("HID: core: move Usage Page concatenation
      to Main item") adds support for Usage Page item after Usage ID items
      (such as keyboards manufactured by Primax).
      
      Usage Page concatenation in Main item works well for following report
      descriptor patterns:
      
          USAGE_PAGE (Keyboard)                   05 07
          USAGE_MINIMUM (Keyboard LeftControl)    19 E0
          USAGE_MAXIMUM (Keyboard Right GUI)      29 E7
          LOGICAL_MINIMUM (0)                     15 00
          LOGICAL_MAXIMUM (1)                     25 01
          REPORT_SIZE (1)                         75 01
          REPORT_COUNT (8)                        95 08
          INPUT (Data,Var,Abs)                    81 02
      
      -------------
      
          USAGE_MINIMUM (Keyboard LeftControl)    19 E0
          USAGE_MAXIMUM (Keyboard Right GUI)      29 E7
          LOGICAL_MINIMUM (0)                     15 00
          LOGICAL_MAXIMUM (1)                     25 01
          REPORT_SIZE (1)                         75 01
          REPORT_COUNT (8)                        95 08
          USAGE_PAGE (Keyboard)                   05 07
          INPUT (Data,Var,Abs)                    81 02
      
      But it makes the parser act wrong for the following report
      descriptor pattern(such as some Gamepads):
      
          USAGE_PAGE (Button)                     05 09
          USAGE (Button 1)                        09 01
          USAGE (Button 2)                        09 02
          USAGE (Button 4)                        09 04
          USAGE (Button 5)                        09 05
          USAGE (Button 7)                        09 07
          USAGE (Button 8)                        09 08
          USAGE (Button 14)                       09 0E
          USAGE (Button 15)                       09 0F
          USAGE (Button 13)                       09 0D
          USAGE_PAGE (Consumer Devices)           05 0C
          USAGE (Back)                            0a 24 02
          USAGE (HomePage)                        0a 23 02
          LOGICAL_MINIMUM (0)                     15 00
          LOGICAL_MAXIMUM (1)                     25 01
          REPORT_SIZE (1)                         75 01
          REPORT_COUNT (11)                       95 0B
          INPUT (Data,Var,Abs)                    81 02
      
      With Usage Page concatenation in Main item, parser recognizes all the
      11 Usages as consumer keys, it is not the HID device's real intention.
      
      This patch checks whether Usage Page is really defined after Usage ID
      items by comparing usage page using status.
      
      Usage Page concatenation on currently defined Usage Page will always
      do in local parsing when Usage ID items encountered.
      
      When Main item is parsing, concatenation will do again with last
      defined Usage Page if this page has not been used in the previous
      usages concatenation.
      Signed-off-by: default avatarCandle Sun <candle.sun@unisoc.com>
      Signed-off-by: default avatarNianfu Bai <nianfu.bai@unisoc.com>
      Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Cc: Siarhei Vishniakou <svv@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      08d5c69a