1. 23 Sep, 2020 34 commits
  2. 17 Sep, 2020 6 commits
    • Greg Kroah-Hartman's avatar
    • Peter Oberparleiter's avatar
      gcov: add support for GCC 10.1 · 87bf8f87
      Peter Oberparleiter authored
      [ Upstream commit 40249c69 ]
      
      Using gcov to collect coverage data for kernels compiled with GCC 10.1
      causes random malfunctions and kernel crashes.  This is the result of a
      changed GCOV_COUNTERS value in GCC 10.1 that causes a mismatch between
      the layout of the gcov_info structure created by GCC profiling code and
      the related structure used by the kernel.
      
      Fix this by updating the in-kernel GCOV_COUNTERS value.  Also re-enable
      config GCOV_KERNEL for use with GCC 10.
      Reported-by: default avatarColin Ian King <colin.king@canonical.com>
      Reported-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
      Tested-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Tested-and-Acked-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      87bf8f87
    • Heikki Krogerus's avatar
      usb: typec: ucsi: acpi: Check the _DEP dependencies · 923e11ef
      Heikki Krogerus authored
      commit 1f3546ff upstream.
      
      Failing probe with -EPROBE_DEFER until all dependencies
      listed in the _DEP (Operation Region Dependencies) object
      have been met.
      
      This will fix an issue where on some platforms UCSI ACPI
      driver fails to probe because the address space handler for
      the operation region that the UCSI ACPI interface uses has
      not been loaded yet.
      
      Fixes: 8243edf4 ("usb: typec: ucsi: Add ACPI driver")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Link: https://lore.kernel.org/r/20200904110918.51546-1-heikki.krogerus@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      923e11ef
    • Mathias Nyman's avatar
      usb: Fix out of sync data toggle if a configured device is reconfigured · f744c85a
      Mathias Nyman authored
      commit cfd54fa8 upstream.
      
      Userspace drivers that use a SetConfiguration() request to "lightweight"
      reset an already configured usb device might cause data toggles to get out
      of sync between the device and host, and the device becomes unusable.
      
      The xHCI host requires endpoints to be dropped and added back to reset the
      toggle. If USB core notices the new configuration is the same as the
      current active configuration it will avoid these extra steps by calling
      usb_reset_configuration() instead of usb_set_configuration().
      
      A SetConfiguration() request will reset the device side data toggles.
      Make sure usb_reset_configuration() function also drops and adds back the
      endpoints to ensure data toggles are in sync.
      
      To avoid code duplication split the current usb_disable_device() function
      and reuse the endpoint specific part.
      
      Cc: stable <stable@vger.kernel.org>
      Tested-by: default avatarMartin Thierer <mthierer@gmail.com>
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Link: https://lore.kernel.org/r/20200901082528.12557-1-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f744c85a
    • Aleksander Morgado's avatar
      USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules · a7c77545
      Aleksander Morgado authored
      commit 1ac69879 upstream.
      
      These modules have 2 different USB layouts:
      
      The default layout with PID 0x9205 (AT+CUSBSELNV=1) exposes 4 TTYs and
      an ECM interface:
      
        T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  6 Spd=480 MxCh= 0
        D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
        P:  Vendor=1e0e ProdID=9205 Rev=00.00
        S:  Manufacturer=SimTech, Incorporated
        S:  Product=SimTech SIM7080
        S:  SerialNumber=1234567890ABCDEF
        C:  #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA
        I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
        I:  If#=0x5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      
      The purpose of each TTY is as follows:
       * ttyUSB0: DIAG/QCDM port.
       * ttyUSB1: GNSS data.
       * ttyUSB2: AT-capable port (control).
       * ttyUSB3: AT-capable port (data).
      
      In the secondary layout with PID=0x9206 (AT+CUSBSELNV=86) the module
      exposes 6 TTY ports:
      
        T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  8 Spd=480 MxCh= 0
        D:  Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
        P:  Vendor=1e0e ProdID=9206 Rev=00.00
        S:  Manufacturer=SimTech, Incorporated
        S:  Product=SimTech SIM7080
        S:  SerialNumber=1234567890ABCDEF
        C:  #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA
        I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
        I:  If#=0x5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      
      The purpose of each TTY is as follows:
       * ttyUSB0: DIAG/QCDM port.
       * ttyUSB1: GNSS data.
       * ttyUSB2: AT-capable port (control).
       * ttyUSB3: QFLOG interface.
       * ttyUSB4: DAM interface.
       * ttyUSB5: AT-capable port (data).
      Signed-off-by: default avatarAleksander Morgado <aleksander@aleksander.es>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a7c77545
    • Bjørn Mork's avatar
      USB: serial: option: support dynamic Quectel USB compositions · 1539e447
      Bjørn Mork authored
      commit 2bb70f0a upstream.
      
      The USB composition, defining the set of exported functions, is dynamic
      in newer Quectel modems.  Default functions can be disabled and
      alternative functions can be enabled instead.  The alternatives
      includes class functions using interface pairs, which should be
      handled by the respective class drivers.
      
      Active interfaces are numbered consecutively, so static
      blacklisting based on interface numbers will fail when the
      composition changes.  An example of such an error, where the
      option driver has bound to the CDC ECM data interface,
      preventing cdc_ether from handling this function:
      
       T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
       D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
       P: Vendor=2c7c ProdID=0125 Rev= 3.18
       S: Manufacturer=Quectel
       S: Product=EC25-AF
       C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
       A: FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
       I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
       E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 4 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none)
       E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
       I:* If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=option
       I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=option
       E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Another device with the same id gets correct drivers, since the
      interface of the network function happens to be blacklisted by option:
      
       T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
       D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
       P: Vendor=2c7c ProdID=0125 Rev= 3.18
       S: Manufacturer=Android
       S: Product=Android
       C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
       I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
       E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
       E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
       E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
       E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
       E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
       E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Change rules for EC21, EC25, BG96 and EG95 to match vendor specific
      serial functions only, to prevent binding to class functions. Require
      2 endpoints on ff/ff/ff functions, avoiding the 3 endpoint QMI/RMNET
      network functions.
      
      Cc: AceLan Kao <acelan.kao@canonical.com>
      Cc: Sebastian Sjoholm <ssjoholm@mac.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1539e447