Skip to content
  1. May 25, 2022
  2. May 18, 2022
    • Greg Kroah-Hartman's avatar
    • Yang Yingliang's avatar
      tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe() · 8fcefb43
      Yang Yingliang authored
      commit 447ee151 upstream.
      
      It will cause null-ptr-deref when using 'res', if platform_get_resource()
      returns NULL, so move using 'res' after devm_ioremap_resource() that
      will check it to avoid null-ptr-deref.
      And use devm_platform_get_and_ioremap_resource() to simplify code.
      
      Fixes: 5930cb35
      
       ("serial: driver for Conexant Digicolor USART")
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Reviewed-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Cc: stable <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20220505124621.1592697-1-yangyingliang@huawei.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8fcefb43
    • Nicolas Dichtel's avatar
      ping: fix address binding wrt vrf · 6d80857c
      Nicolas Dichtel authored
      commit e1a7ac6f upstream.
      
      When ping_group_range is updated, 'ping' uses the DGRAM ICMP socket,
      instead of an IP raw socket. In this case, 'ping' is unable to bind its
      socket to a local address owned by a vrflite.
      
      Before the patch:
      $ sysctl -w net.ipv4.ping_group_range='0  2147483647'
      $ ip link add blue type vrf table 10
      $ ip link add foo type dummy
      $ ip link set foo master blue
      $ ip link set foo up
      $ ip addr add 192.168.1.1/24 dev foo
      $ ip addr add 2001::1/64 dev foo
      $ ip vrf exec blue ping -c1 -I 192.168.1.1 192.168.1.2
      ping: bind: Cannot assign requested address
      $ ip vrf exec blue ping6 -c1 -I 2001::1 2001::2
      ping6: bind icmp socket: Cannot assign requested address
      
      CC: stable@vger.kernel.org
      Fixes: 1b69c6d0
      
       ("net: Introduce L3 Master device abstraction")
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6d80857c
    • Mike Rapoport's avatar
      arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map · 7845532a
      Mike Rapoport authored
      commit 260364d1 upstream.
      
      The semantics of pfn_valid() is to check presence of the memory map for a
      PFN and not whether a PFN is covered by the linear map.  The memory map
      may be present for NOMAP memory regions, but they won't be mapped in the
      linear mapping.  Accessing such regions via __va() when they are
      memremap()'ed will cause a crash.
      
      On v5.4.y the crash happens on qemu-arm with UEFI [1]:
      
      <1>[    0.084476] 8<--- cut here ---
      <1>[    0.084595] Unable to handle kernel paging request at virtual address dfb76000
      <1>[    0.084938] pgd = (ptrval)
      <1>[    0.085038] [dfb76000] *pgd=5f7fe801, *pte=00000000, *ppte=00000000
      
      ...
      
      <4>[    0.093923] [<c0ed6ce8>] (memcpy) from [<c16a06f8>] (dmi_setup+0x60/0x418)
      <4>[    0.094204] [<c16a06f8>] (dmi_setup) from [<c16a38d4>] (arm_dmi_init+0x8/0x10)
      <4>[    0.094408] [<c16a38d4>] (arm_dmi_init) from [<c0302e9c>] (do_one_initcall+0x50/0x228)
      <4>[    0.094619] [<c0302e9c>] (do_one_initcall) from [<c16011e4>] (kernel_init_freeable+0x15c/0x1f8)
      <4>[    0.094841] [<c16011e4>] (kernel_init_freeable) from [<c0f028cc>] (kernel_init+0x8/0x10c)
      <4>[    0.095057] [<c0f028cc>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
      
      On kernels v5.10.y and newer the same crash won't reproduce on ARM because
      commit b10d6bca ("arch, drivers: replace for_each_membock() with
      for_each_mem_range()") changed the way memory regions are registered in
      the resource tree, but that merely covers up the problem.
      
      On ARM64 memory resources registered in yet another way and there the
      issue of wrong usage of pfn_valid() to ensure availability of the linear
      map is also covered.
      
      Implement arch_memremap_can_ram_remap() on ARM and ARM64 to prevent access
      to NOMAP regions via the linear mapping in memremap().
      
      Link: https://lore.kernel.org/all/Yl65zxGgFzF1Okac@sirena.org.uk
      Link: https://lkml.kernel.org/r/20220426060107.7618-1-rppt@kernel.org
      
      
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Reported-by: default avatar"kernelci.org bot" <bot@kernelci.org>
      Tested-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarArd Biesheuvel <ardb@kernel.org>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: <stable@vger.kernel.org>	[5.4+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7845532a
    • Francesco Dolcini's avatar
      net: phy: Fix race condition on link status change · c0b735fe
      Francesco Dolcini authored
      commit 91a7cda1 upstream.
      
      This fixes the following error caused by a race condition between
      phydev->adjust_link() and a MDIO transaction in the phy interrupt
      handler. The issue was reproduced with the ethernet FEC driver and a
      micrel KSZ9031 phy.
      
      [  146.195696] fec 2188000.ethernet eth0: MDIO read timeout
      [  146.201779] ------------[ cut here ]------------
      [  146.206671] WARNING: CPU: 0 PID: 571 at drivers/net/phy/phy.c:942 phy_error+0x24/0x6c
      [  146.214744] Modules linked in: bnep imx_vdoa imx_sdma evbug
      [  146.220640] CPU: 0 PID: 571 Comm: irq/128-2188000 Not tainted 5.18.0-rc3-00080-gd569e86915b7 #9
      [  146.229563] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      [  146.236257]  unwind_backtrace from show_stack+0x10/0x14
      [  146.241640]  show_stack from dump_stack_lvl+0x58/0x70
      [  146.246841]  dump_stack_lvl from __warn+0xb4/0x24c
      [  146.251772]  __warn from warn_slowpath_fmt+0x5c/0xd4
      [  146.256873]  warn_slowpath_fmt from phy_error+0x24/0x6c
      [  146.262249]  phy_error from kszphy_handle_interrupt+0x40/0x48
      [  146.268159]  kszphy_handle_interrupt from irq_thread_fn+0x1c/0x78
      [  146.274417]  irq_thread_fn from irq_thread+0xf0/0x1dc
      [  146.279605]  irq_thread from kthread+0xe4/0x104
      [  146.284267]  kthread from ret_from_fork+0x14/0x28
      [  146.289164] Exception stack(0xe6fa1fb0 to 0xe6fa1ff8)
      [  146.294448] 1fa0:                                     00000000 00000000 00000000 00000000
      [  146.302842] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [  146.311281] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
      [  146.318262] irq event stamp: 12325
      [  146.321780] hardirqs last  enabled at (12333): [<c01984c4>] __up_console_sem+0x50/0x60
      [  146.330013] hardirqs last disabled at (12342): [<c01984b0>] __up_console_sem+0x3c/0x60
      [  146.338259] softirqs last  enabled at (12324): [<c01017f0>] __do_softirq+0x2c0/0x624
      [  146.346311] softirqs last disabled at (12319): [<c01300ac>] __irq_exit_rcu+0x138/0x178
      [  146.354447] ---[ end trace 0000000000000000 ]---
      
      With the FEC driver phydev->adjust_link() calls fec_enet_adjust_link()
      calls fec_stop()/fec_restart() and both these function reset and
      temporary disable the FEC disrupting any MII transaction that
      could be happening at the same time.
      
      fec_enet_adjust_link() and phy_read() can be running at the same time
      when we have one additional interrupt before the phy_state_machine() is
      able to terminate.
      
      Thread 1 (phylib WQ)       | Thread 2 (phy interrupt)
                                 |
                                 | phy_interrupt()            <-- PHY IRQ
                                 |  handle_interrupt()
                                 |   phy_read()
                                 |   phy_trigger_machine()
                                 |    --> schedule phylib WQ
                                 |
                                 |
      phy_state_machine()        |
       phy_check_link_status()   |
        phy_link_change()        |
         phydev->adjust_link()   |
          fec_enet_adjust_link() |
           --> FEC reset         | phy_interrupt()            <-- PHY IRQ
                                 |  phy_read()
                                 |
      
      Fix this by acquiring the phydev lock in phy_interrupt().
      
      Link: https://lore.kernel.org/all/20220422152612.GA510015@francesco-nb.int.toradex.com/
      Fixes: c974bdbc
      
       ("net: phy: Use threaded IRQ, to allow IRQ from sleeping devices")
      cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarFrancesco Dolcini <francesco.dolcini@toradex.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20220506060815.327382-1-francesco.dolcini@toradex.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      [fd: backport: adapt locking before did_interrupt()/ack_interrupt()
       callbacks removal ]
      Signed-off-by: default avatarFrancesco Dolcini <francesco.dolcini@toradex.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c0b735fe
    • Sudip Mukherjee's avatar
      MIPS: fix build with gcc-12 · a60def75
      Sudip Mukherjee authored
      
      
      Some mips builds with gcc-12 fails with the error:
      arch/mips/jz4740/setup.c:64:25: error: comparison between two arrays
      	[-Werror=array-compare]
         	64 |         if (__dtb_start != __dtb_end)
      
      'd24f48767d5e ("MIPS: Use address-of operator on section symbols")' has
      been applied which fixes most of the error, but it missed one file which
      was not available upstream when the change was done.
      
      Fixes: d24f48767d5e ("MIPS: Use address-of operator on section symbols")
      Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a60def75
    • Zack Rusin's avatar
      drm/vmwgfx: Initialize drm_mode_fb_cmd2 · a3112d5d
      Zack Rusin authored
      commit 3059d9b9 upstream.
      
      Transition to drm_mode_fb_cmd2 from drm_mode_fb_cmd left the structure
      unitialized. drm_mode_fb_cmd2 adds a few additional members, e.g. flags
      and modifiers which were never initialized. Garbage in those members
      can cause random failures during the bringup of the fbcon.
      
      Initializing the structure fixes random blank screens after bootup due
      to flags/modifiers mismatches during the fbcon bring up.
      
      Fixes: dabdcdc9
      
       ("drm/vmwgfx: Switch to mode_cmd2")
      Signed-off-by: default avatarZack Rusin <zackr@vmware.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      Reviewed-by: default avatarMartin Krastev <krastevm@vmware.com>
      Reviewed-by: default avatarMaaz Mombasawala <mombasawalam@vmware.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220302152426.885214-7-zack@kde.org
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a3112d5d
    • Waiman Long's avatar
      cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp() · 463c7431
      Waiman Long authored
      commit 2685027f
      
       upstream.
      
      There are 3 places where the cpu and node masks of the top cpuset can
      be initialized in the order they are executed:
       1) start_kernel -> cpuset_init()
       2) start_kernel -> cgroup_init() -> cpuset_bind()
       3) kernel_init_freeable() -> do_basic_setup() -> cpuset_init_smp()
      
      The first cpuset_init() call just sets all the bits in the masks.
      The second cpuset_bind() call sets cpus_allowed and mems_allowed to the
      default v2 values. The third cpuset_init_smp() call sets them back to
      v1 values.
      
      For systems with cgroup v2 setup, cpuset_bind() is called once.  As a
      result, cpu and memory node hot add may fail to update the cpu and node
      masks of the top cpuset to include the newly added cpu or node in a
      cgroup v2 environment.
      
      For systems with cgroup v1 setup, cpuset_bind() is called again by
      rebind_subsystem() when the v1 cpuset filesystem is mounted as shown
      in the dmesg log below with an instrumented kernel.
      
        [    2.609781] cpuset_bind() called - v2 = 1
        [    3.079473] cpuset_init_smp() called
        [    7.103710] cpuset_bind() called - v2 = 0
      
      smp_init() is called after the first two init functions.  So we don't
      have a complete list of active cpus and memory nodes until later in
      cpuset_init_smp() which is the right time to set up effective_cpus
      and effective_mems.
      
      To fix this cgroup v2 mask setup problem, the potentially incorrect
      cpus_allowed & mems_allowed setting in cpuset_init_smp() are removed.
      For cgroup v2 systems, the initial cpuset_bind() call will set the masks
      correctly.  For cgroup v1 systems, the second call to cpuset_bind()
      will do the right setup.
      
      cc: stable@vger.kernel.org
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Tested-by: default avatarFeng Tang <feng.tang@intel.com>
      Reviewed-by: default avatarMichal Koutný <mkoutny@suse.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      463c7431
    • Xiaomeng Tong's avatar
      i40e: i40e_main: fix a missing check on list iterator · f25145c3
      Xiaomeng Tong authored
      commit 3f95a747 upstream.
      
      The bug is here:
      	ret = i40e_add_macvlan_filter(hw, ch->seid, vdev->dev_addr, &aq_err);
      
      The list iterator 'ch' will point to a bogus position containing
      HEAD if the list is empty or no element is found. This case must
      be checked before any use of the iterator, otherwise it will
      lead to a invalid memory access.
      
      To fix this bug, use a new variable 'iter' as the list iterator,
      while use the origin variable 'ch' as a dedicated pointer to
      point to the found element.
      
      Cc: stable@vger.kernel.org
      Fixes: 1d8d80b4
      
       ("i40e: Add macvlan support on i40e")
      Signed-off-by: default avatarXiaomeng Tong <xiam0nd.tong@gmail.com>
      Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Link: https://lore.kernel.org/r/20220510204846.2166999-1-anthony.l.nguyen@intel.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f25145c3
    • Robin Murphy's avatar
      drm/nouveau/tegra: Stop using iommu_present() · 17c74471
      Robin Murphy authored
      commit 87fd2b09
      
       upstream.
      
      Even if some IOMMU has registered itself on the platform "bus", that
      doesn't necessarily mean it provides translation for the device we
      care about. Replace iommu_present() with a more appropriate check.
      
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
      [added cc for stable]
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Cc: stable@vger.kernel.org # v5.0+
      Link: https://patchwork.freedesktop.org/patch/msgid/70d40ea441da3663c2824d54102b471e9a621f8a.1649168494.git.robin.murphy@arm.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      17c74471
    • AngeloGioacchino Del Regno's avatar
      serial: 8250_mtk: Fix register address for XON/XOFF character · c8f567c4
      AngeloGioacchino Del Regno authored
      commit e1bfdbc7 upstream.
      
      The XON1/XOFF1 character registers are at offset 0xa0 and 0xa8
      respectively, so we cannot use the definition in serial_port.h.
      
      Fixes: bdbd0a7f
      
       ("serial: 8250-mtk: modify baudrate setting")
      Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Cc: stable <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20220427132328.228297-4-angelogioacchino.delregno@collabora.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c8f567c4
    • AngeloGioacchino Del Regno's avatar
      serial: 8250_mtk: Fix UART_EFR register address · aa3ea745
      AngeloGioacchino Del Regno authored
      commit bb0b197a upstream.
      
      On MediaTek SoCs, the UART IP is 16550A compatible, but there are some
      specific quirks: we are declaring a register shift of 2, but this is
      only valid for the majority of the registers, as there are some that
      are out of the standard layout.
      
      Specifically, this driver is using definitions from serial_reg.h, where
      we have a UART_EFR register defined as 2: this results in a 0x8 offset,
      but there we have the FCR register instead.
      
      The right offset for the EFR register on MediaTek UART is at 0x98,
      so, following the decimal definition convention in serial_reg.h and
      accounting for the register left shift of two, add and use the correct
      register address for this IP, defined as decimal 38, so that the final
      calculation results in (0x26 << 2) = 0x98.
      
      Fixes: bdbd0a7f
      
       ("serial: 8250-mtk: modify baudrate setting")
      Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Cc: stable <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20220427132328.228297-2-angelogioacchino.delregno@collabora.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aa3ea745
    • Miaoqian Lin's avatar
      slimbus: qcom: Fix IRQ check in qcom_slim_probe · 031fda28
      Miaoqian Lin authored
      commit fe503887 upstream.
      
      platform_get_irq() returns non-zero IRQ number on success,
      negative error number on failure.
      And the doc of platform_get_irq() provides a usage example:
      
          int irq = platform_get_irq(pdev, 0);
          if (irq < 0)
              return irq;
      
      Fix the check of return value to catch errors correctly.
      
      Fixes: ad7fcbc3
      
       ("slimbus: qcom: Add Qualcomm Slimbus controller driver")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Link: https://lore.kernel.org/r/20220429164917.5202-2-srinivas.kandagatla@linaro.org
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      031fda28
    • Sven Schwermer's avatar
      USB: serial: option: add Fibocom MA510 modem · 7de6f305
      Sven Schwermer authored
      commit 07989eb9
      
       upstream.
      
      The MA510 modem has 3 USB configurations that are configurable via the AT
      command AT+GTUSBMODE={30,31,32} which make the modem enumerate with the
      following interfaces, respectively:
      
      30: Diag + QDSS + Modem + RMNET
      31: Diag + Modem + AT + ECM
      32: Modem + AT + ECM
      
      The first configuration (30) reuses u-blox R410M's VID/PID with
      identical interface configuration.
      
      A detailed description of the USB configuration for each mode follows:
      
      +GTUSBMODE: 30
      --------------
      T:  Bus=03 Lev=01 Prnt=01 Port=06 Cnt=04 Dev#= 19 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=05c6 ProdID=90b2 Rev= 0.00
      S:  Manufacturer=Fibocom MA510 Modem
      S:  Product=Fibocom MA510 Modem
      S:  SerialNumber=55e2695b
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 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= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
      E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      +GTUSBMODE: 31
      --------------
      T:  Bus=03 Lev=01 Prnt=01 Port=06 Cnt=04 Dev#= 99 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=2cb7 ProdID=0106 Rev= 0.00
      S:  Manufacturer=Fibocom MA510 Modem
      S:  Product=Fibocom MA510 Modem
      S:  SerialNumber=55e2695b
      C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
      A:  FirstIf#= 3 IfCount= 2 Cls=02(comm.) Sub=00 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=ff Prot=ff Driver=option
      E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=83(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=fe Prot=ff Driver=option
      E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=85(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= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
      E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      I:  If#= 4 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      I:* If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      +GTUSBMODE: 32
      --------------
      T:  Bus=03 Lev=01 Prnt=01 Port=06 Cnt=04 Dev#=100 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=2cb7 ProdID=010a Rev= 0.00
      S:  Manufacturer=Fibocom MA510 Modem
      S:  Product=Fibocom MA510 Modem
      S:  SerialNumber=55e2695b
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
      A:  FirstIf#= 2 IfCount= 2 Cls=02(comm.) Sub=00 Prot=00
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=82(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=fe Prot=ff Driver=option
      E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=84(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= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
      E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      I:  If#= 3 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      I:* If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Signed-off-by: default avatarSven Schwermer <sven.schwermer@disruptive-technologies.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7de6f305
    • Sven Schwermer's avatar
      USB: serial: option: add Fibocom L610 modem · 65732f62
      Sven Schwermer authored
      commit 714adff9
      
       upstream.
      
      The L610 modem has 3 USB configurations that are configurable via the AT
      command AT+GTUSBMODE={31,32,33} which make the modem enumerate with the
      following interfaces, respectively:
      
      31: Modem + NV + MOS + Diag + LOG + AT + AT
      32: ECM + Modem + NV + MOS + Diag + LOG + AT + AT
      33: RNDIS + Modem + NV + MOS + Diag + LOG + AT + AT
      
      A detailed description of the USB configuration for each mode follows:
      
      +GTUSBMODE: 31
      --------------
      T:  Bus=03 Lev=01 Prnt=01 Port=06 Cnt=04 Dev#=124 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1782 ProdID=4d10 Rev= 0.00
      S:  Manufacturer=FIBOCOM
      S:  Product=L610
      C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=400mA
      I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 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= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      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= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=83(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= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=84(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= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      +GTUSBMODE: 32
      --------------
      T:  Bus=03 Lev=01 Prnt=01 Port=06 Cnt=04 Dev#=122 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1782 ProdID=4d11 Rev= 0.00
      S:  Manufacturer=FIBOCOM
      S:  Product=L610
      C:* #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=400mA
      A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
      I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
      I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      +GTUSBMODE: 33
      --------------
      T:  Bus=03 Lev=01 Prnt=01 Port=06 Cnt=04 Dev#=126 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1782 ProdID=4d11 Rev= 0.00
      S:  Manufacturer=FIBOCOM
      S:  Product=L610
      C:* #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=400mA
      A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
      I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
      E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=4096ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Signed-off-by: default avatarSven Schwermer <sven.schwermer@disruptive-technologies.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      65732f62
    • Ethan Yang's avatar
      USB: serial: qcserial: add support for Sierra Wireless EM7590 · 6c78537f
      Ethan Yang authored
      commit 870b1eee
      
       upstream.
      
      Add support for Sierra Wireless EM7590 0xc080/0xc081 compositions.
      
      Signed-off-by: default avatarEthan Yang <etyang@sierrawireless.com>
      Link: https://lore.kernel.org/r/20220425055840.5693-1-etyang@sierrawireless.com
      
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6c78537f
    • Scott Chen's avatar
      USB: serial: pl2303: add device id for HP LM930 Display · e40d0049
      Scott Chen authored
      commit 26a08f8b
      
       upstream.
      
      Add the device id for the HPLM930Display which is a PL2303GC based
      device.
      
      Signed-off-by: default avatarScott Chen <scott@labau.com.tw>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e40d0049
    • Uwe Kleine-König's avatar
      usb: typec: tcpci: Don't skip cleanup in .remove() on error · 056a56f8
      Uwe Kleine-König authored
      commit bbc126ae upstream.
      
      Returning an error value in an i2c remove callback results in an error
      message being emitted by the i2c core, but otherwise it doesn't make a
      difference. The device goes away anyhow and the devm cleanups are
      called.
      
      In this case the remove callback even returns early without stopping the
      tcpm worker thread and various timers. A work scheduled on the work
      queue, or a firing timer after tcpci_remove() returned probably results
      in a use-after-free situation because the regmap and driver data were
      freed. So better make sure that tcpci_unregister_port() is called even
      if disabling the irq failed.
      
      Also emit a more specific error message instead of the i2c core's
      "remove failed (EIO), will be ignored" and return 0 to suppress the
      core's warning.
      
      This patch is (also) a preparation for making i2c remove callbacks
      return void.
      
      Fixes: 3ba76256
      
       ("usb: typec: tcpci: mask event interrupts when remove driver")
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: stable <stable@vger.kernel.org>
      Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Link: https://lore.kernel.org/r/20220502080456.21568-1-u.kleine-koenig@pengutronix.de
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      056a56f8