1. 21 Jul, 2021 16 commits
    • Artur Petrosyan's avatar
      usb: phy: Fix page fault from usb_phy_uevent · 3d11de2d
      Artur Petrosyan authored
      When the dwc2 platform device is removed, it unregisters the generic
      phy. usb_remove_phy() is called and the dwc2 usb_phy is removed from the
      "phy_list", but the uevent may still attempt to get the usb_phy from the
      list, resulting in a page fault bug. Currently we can't access the usb_phy
      from the "phy_list" after the device is removed. As a fix check to make
      sure that we can get the usb_phy before moving forward with the uevent.
      
      [   84.949345] BUG: unable to handle page fault for address:00000007935688d8
      [   84.949349] #PF: supervisor read access in kernel mode
      [   84.949351] #PF: error_code(0x0000) - not-present page
      [   84.949353] PGD 0 P4D 0
      [   84.949356] Oops: 0000 [#1] SMP PTI
      [   84.949360] CPU: 2 PID: 2081 Comm: rmmod Not tainted 5.13.0-rc4-snps-16547-ga8534cb0-dirty #32
      [   84.949363] Hardware name: Hewlett-Packard HP Z400 Workstation/0B4Ch, BIOS 786G3 v03.54 11/02/2011
      [   84.949365] RIP: 0010:usb_phy_uevent+0x99/0x121
      [   84.949372] Code: 8d 83 f8 00 00 00 48 3d b0 12 22 94 74 05 4c 3b 23
      75 5b 8b 83 9c 00 00 00 be 32 00 00 00 48 8d 7c 24 04 48 c7 c2 d4 5d 7b
      93 <48> 8b 0c c5 e0 88 56 93 e8 0f 63 8a ff 8b 83 98 00 00 00 be 32 00
      [   84.949375] RSP: 0018:ffffa46bc0f2fc70 EFLAGS: 00010246
      [   84.949378] RAX: 00000000ffffffff RBX: ffffffff942211b8 RCX: 0000000000000027
      [   84.949380] RDX: ffffffff937b5dd4 RSI: 0000000000000032 RDI: ffffa46bc0f2fc74
      [   84.949383] RBP: ffff94a306613000 R08: 0000000000000000 R09: 00000000fffeffff
      [   84.949385] R10: ffffa46bc0f2faa8 R11: ffffa46bc0f2faa0 R12: ffff94a30186d410
      [   84.949387] R13: ffff94a32d188a80 R14: ffff94a30029f960 R15: ffffffff93522dd0
      [   84.949389] FS:  00007efdbd417540(0000) GS:ffff94a513a80000(0000) knlGS:0000000000000000
      [   84.949392] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   84.949394] CR2: 00000007935688d8 CR3: 0000000165606000 CR4: 00000000000006e0
      [   84.949396] Call Trace:
      [   84.949401]  dev_uevent+0x190/0x1ad
      [   84.949408]  kobject_uevent_env+0x18e/0x46c
      [   84.949414]  device_release_driver_internal+0x17f/0x18e
      [   84.949418]  bus_remove_device+0xd3/0xe5
      [   84.949421]  device_del+0x1c3/0x31d
      [   84.949425]  ? kobject_put+0x97/0xa8
      [   84.949428]  platform_device_del+0x1c/0x63
      [   84.949432]  platform_device_unregister+0xa/0x11
      [   84.949436]  dwc2_pci_remove+0x1e/0x2c [dwc2_pci]
      [   84.949440]  pci_device_remove+0x31/0x81
      [   84.949445]  device_release_driver_internal+0xea/0x18e
      [   84.949448]  driver_detach+0x68/0x72
      [   84.949450]  bus_remove_driver+0x63/0x82
      [   84.949453]  pci_unregister_driver+0x1a/0x75
      [   84.949457]  __do_sys_delete_module+0x149/0x1e9
      [   84.949462]  ? task_work_run+0x64/0x6e
      [   84.949465]  ? exit_to_user_mode_prepare+0xd4/0x10d
      [   84.949471]  do_syscall_64+0x5d/0x70
      [   84.949475]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [   84.949480] RIP: 0033:0x7efdbd563bcb
      [   84.949482] Code: 73 01 c3 48 8b 0d c5 82 0c 00 f7 d8 64 89 01 48 83
      c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f
      05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 95 82 0c 00 f7 d8 64 89 01 48
      [   84.949485] RSP: 002b:00007ffe944d7d98 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
      [   84.949489] RAX: ffffffffffffffda RBX: 00005651072eb700 RCX: 00007efdbd563bcb
      [   84.949491] RDX: 000000000000000a RSI: 0000000000000800 RDI: 00005651072eb768
      [   84.949493] RBP: 00007ffe944d7df8 R08: 0000000000000000 R09: 0000000000000000
      [   84.949495] R10: 00007efdbd5dfac0 R11: 0000000000000206 R12: 00007ffe944d7fd0
      [   84.949497] R13: 00007ffe944d8610 R14: 00005651072eb2a0 R15: 00005651072eb700
      [   84.949500] Modules linked in: uas configfs dwc2_pci(-) phy_generic fuse crc32c_intel [last unloaded: udc_core]
      [   84.949508] CR2: 00000007935688d8
      [   84.949510] ---[ end trace e40c871ca3e4dc9e ]---
      [   84.949512] RIP: 0010:usb_phy_uevent+0x99/0x121
      
      Fixes: a8534cb0 ("usb: phy: introduce usb_phy device type with its own uevent handler")
      Reviewed-by: default avatarPeter Chen <peter.chen@kernel.org>
      Signed-off-by: default avatarArtur Petrosyan <Arthur.Petrosyan@synopsys.com>
      Signed-off-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
      Link: https://lore.kernel.org/r/20210710092247.D7AFEA005D@mailhost.synopsys.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3d11de2d
    • Greg Thelen's avatar
      usb: xhci: avoid renesas_usb_fw.mem when it's unusable · 0665e387
      Greg Thelen authored
      Commit a66d21d7 ("usb: xhci: Add support for Renesas controller with
      memory") added renesas_usb_fw.mem firmware reference to xhci-pci.  Thus
      modinfo indicates xhci-pci.ko has "firmware: renesas_usb_fw.mem".  But
      the firmware is only actually used with CONFIG_USB_XHCI_PCI_RENESAS.  An
      unusable firmware reference can trigger safety checkers which look for
      drivers with unmet firmware dependencies.
      
      Avoid referring to renesas_usb_fw.mem in circumstances when it cannot be
      loaded (when CONFIG_USB_XHCI_PCI_RENESAS isn't set).
      
      Fixes: a66d21d7 ("usb: xhci: Add support for Renesas controller with memory")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Thelen <gthelen@google.com>
      Link: https://lore.kernel.org/r/20210702071224.3673568-1-gthelen@google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0665e387
    • Colin Ian King's avatar
      usb: gadget: u_serial: remove WARN_ON on null port · 4bb233b7
      Colin Ian King authored
      Loading and then unloading module g_dpgp on a VM that does not
      support the driver currently throws a WARN_ON message because
      the port has not been initialized. Removing an unused driver
      is a valid use-case and the WARN_ON kernel warning is a bit
      excessive, so remove it.
      
      Cleans up:
      
      [27654.638698] ------------[ cut here ]------------
      [27654.638705] WARNING: CPU: 6 PID: 2956336 at drivers/usb/gadget/function/u_serial.c:1201 gserial_free_line+0x7c/0x90 [u_serial]
      [27654.638728] Modules linked in: g_dbgp(-) u_serial usb_f_tcm target_core_mod libcomposite udc_core vmw_vmci mcb i2c_nforce2 i2c_amd756 nfit cx8800 videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 cx88xx tveeprom videobuf2_common videodev mc ccp hid_generic hid intel_ishtp cros_ec mc13xxx_core vfio_mdev mdev i915 i2c_algo_bit kvm ppdev parport zatm eni suni uPD98402 atm rio_scan binder_linux hwmon_vid video ipmi_devintf ipmi_msghandler zstd nls_utf8 decnet qrtr ns sctp ip6_udp_tunnel udp_tunnel fcrypt pcbc nhc_udp nhc_ipv6 nhc_routing nhc_mobility nhc_hop nhc_dest nhc_fragment 6lowpan ts_kmp dccp_ipv6 dccp_ipv4 dccp snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq_dummy snd_seq snd_seq_device xen_front_pgdir_shbuf binfmt_misc nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua intel_rapl_msr intel_rapl_common snd_hda_codec_generic ledtrig_audio snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd rapl soundcore joydev input_leds mac_hid serio_raw efi_pstore
      [27654.638880]  qemu_fw_cfg sch_fq_codel msr virtio_rng autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear qxl drm_ttm_helper crct10dif_pclmul ttm drm_kms_helper syscopyarea sysfillrect sysimgblt virtio_net fb_sys_fops cec net_failover rc_core ahci psmouse drm libahci lpc_ich virtio_blk failover [last unloaded: u_ether]
      [27654.638949] CPU: 6 PID: 2956336 Comm: modprobe Tainted: P           O      5.13.0-9-generic #9
      [27654.638956] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
      [27654.638969] RIP: 0010:gserial_free_line+0x7c/0x90 [u_serial]
      [27654.638981] Code: 20 00 00 00 00 e8 74 1a ba c9 4c 89 e7 e8 8c fe ff ff 48 8b 3d 75 3b 00 00 44 89 f6 e8 3d 7c 69 c9 5b 41 5c 41 5d 41 5e 5d c3 <0f> 0b 4c 89 ef e8 4a 1a ba c9 5b 41 5c 41 5d 41 5e 5d c3 90 0f 1f
      [27654.638986] RSP: 0018:ffffba0b81403da0 EFLAGS: 00010246
      [27654.638992] RAX: 0000000000000000 RBX: ffffffffc0eaf6a0 RCX: 0000000000000000
      [27654.638996] RDX: ffff8e21c0cac8c0 RSI: 0000000000000006 RDI: ffffffffc0eaf6a0
      [27654.639000] RBP: ffffba0b81403dc0 R08: ffffba0b81403de0 R09: fefefefefefefeff
      [27654.639003] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      [27654.639006] R13: ffffffffc0eaf6a0 R14: 0000000000000000 R15: 0000000000000000
      [27654.639010] FS:  00007faa1935e740(0000) GS:ffff8e223bd80000(0000) knlGS:0000000000000000
      [27654.639015] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [27654.639019] CR2: 00007ffc840cd4e8 CR3: 000000000e1ac006 CR4: 0000000000370ee0
      [27654.639028] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [27654.639031] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [27654.639035] Call Trace:
      [27654.639044]  dbgp_exit+0x1c/0xa1a [g_dbgp]
      [27654.639054]  __do_sys_delete_module.constprop.0+0x144/0x260
      [27654.639066]  ? call_rcu+0xe/0x10
      [27654.639073]  __x64_sys_delete_module+0x12/0x20
      [27654.639081]  do_syscall_64+0x61/0xb0
      [27654.639092]  ? exit_to_user_mode_loop+0xec/0x160
      [27654.639098]  ? exit_to_user_mode_prepare+0x37/0xb0
      [27654.639104]  ? syscall_exit_to_user_mode+0x27/0x50
      [27654.639110]  ? __x64_sys_close+0x12/0x40
      [27654.639119]  ? do_syscall_64+0x6e/0xb0
      [27654.639126]  ? exit_to_user_mode_prepare+0x37/0xb0
      [27654.639132]  ? syscall_exit_to_user_mode+0x27/0x50
      [27654.639137]  ? __x64_sys_newfstatat+0x1e/0x20
      [27654.639146]  ? do_syscall_64+0x6e/0xb0
      [27654.639154]  ? exc_page_fault+0x8f/0x170
      [27654.639159]  ? asm_exc_page_fault+0x8/0x30
      [27654.639166]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [27654.639173] RIP: 0033:0x7faa194a4b2b
      [27654.639179] Code: 73 01 c3 48 8b 0d 3d 73 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 0d 73 0c 00 f7 d8 64 89 01 48
      [27654.639185] RSP: 002b:00007ffc840d0578 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
      [27654.639191] RAX: ffffffffffffffda RBX: 000056060f9f4e70 RCX: 00007faa194a4b2b
      [27654.639194] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000056060f9f4ed8
      [27654.639197] RBP: 000056060f9f4e70 R08: 0000000000000000 R09: 0000000000000000
      [27654.639200] R10: 00007faa1951eac0 R11: 0000000000000206 R12: 000056060f9f4ed8
      [27654.639203] R13: 0000000000000000 R14: 000056060f9f4ed8 R15: 00007ffc840d06c8
      [27654.639219] ---[ end trace 8dd0ea0bb32ce94a ]---
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Link: https://lore.kernel.org/r/20210701144305.110078-1-colin.king@canonical.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bb233b7
    • Linyu Yuan's avatar
      usb: dwc3: avoid NULL access of usb_gadget_driver · 40edb522
      Linyu Yuan authored
      we found crash in dwc3_disconnect_gadget(),
      it is because dwc->gadget_driver become NULL before async access.
      7dc0c55e ('USB: UDC core: Add udc_async_callbacks gadget op')
      suggest a common way to avoid such kind of issue.
      
      this change implment the callback in dwc3 and
      change related functions which have callback to usb gadget driver.
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarLinyu Yuan <linyyuan@codeaurora.org>
      Link: https://lore.kernel.org/r/20210629015118.7944-1-linyyuan@codeaurora.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      40edb522
    • Mark Tomlinson's avatar
      usb: max-3421: Prevent corruption of freed memory · b5fdf5c6
      Mark Tomlinson authored
      The MAX-3421 USB driver remembers the state of the USB toggles for a
      device/endpoint. To save SPI writes, this was only done when a new
      device/endpoint was being used. Unfortunately, if the old device was
      removed, this would cause writes to freed memory.
      
      To fix this, a simpler scheme is used. The toggles are read from
      hardware when a URB is completed, and the toggles are always written to
      hardware when any URB transaction is started. This will cause a few more
      SPI transactions, but no causes kernel panics.
      
      Fixes: 2d53139f ("Add support for using a MAX3421E chip as a host driver.")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
      Link: https://lore.kernel.org/r/20210625031456.8632-1-mark.tomlinson@alliedtelesis.co.nzSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b5fdf5c6
    • Zhang Qilong's avatar
      usb: gadget: Fix Unbalanced pm_runtime_enable in tegra_xudc_probe · 5b012481
      Zhang Qilong authored
      Add missing pm_runtime_disable() when probe error out. It could
      avoid pm_runtime implementation complains when removing and probing
      again the driver.
      
      Fixes: 49db4272 ("usb: gadget: Add UDC driver for tegra XUSB device mode controller")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
      Link: https://lore.kernel.org/r/20210618141441.107817-1-zhangqilong3@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5b012481
    • Lukas Bulwahn's avatar
      MAINTAINERS: repair reference in USB IP DRIVER FOR HISILICON KIRIN 970 · a6b12562
      Lukas Bulwahn authored
      Commit 8de6b7ed ("phy: phy-hi3670-usb3: move driver from staging into
      phy") moves phy-hi3670-usb3.c from ./drivers/staging/hikey9xx/ to
      ./drivers/phy/hisilicon/, but the new file entry in MAINTAINERS refers to
      ./drivers/phy/hisilicon/phy-kirin970-usb3.c.
      
      Hence, ./scripts/get_maintainer.pl --self-test=patterns complains:
      
        warning: no file matches  F:  drivers/phy/hisilicon/phy-kirin970-usb3.c
      
      Repair the file entry by referring to the right location.
      
      Fixes: 8de6b7ed ("phy: phy-hi3670-usb3: move driver from staging into phy")
      Acked-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Link: https://lore.kernel.org/r/20210701093903.28733-1-lukas.bulwahn@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a6b12562
    • Amelie Delaunay's avatar
      usb: typec: stusb160x: Don't block probing of consumer of "connector" nodes · 6b633767
      Amelie Delaunay authored
      Similar as with tcpm this patch lets fw_devlink know not to wait on the
      fwnode to be populated as a struct device.
      
      Without this patch, USB functionality can be broken on some previously
      supported boards.
      
      Fixes: 28ec344b ("usb: typec: tcpm: Don't block probing of consumers of "connector" nodes")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@foss.st.com>
      Link: https://lore.kernel.org/r/20210716120718.20398-3-amelie.delaunay@foss.st.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6b633767
    • Amelie Delaunay's avatar
      usb: typec: stusb160x: register role switch before interrupt registration · 86762ad4
      Amelie Delaunay authored
      During interrupt registration, attach state is checked. If attached,
      then the Type-C state is updated with typec_set_xxx functions and role
      switch is set with usb_role_switch_set_role().
      
      If the usb_role_switch parameter is error or null, the function simply
      returns 0.
      
      So, to update usb_role_switch role if a device is attached before the
      irq is registered, usb_role_switch must be registered before irq
      registration.
      
      Fixes: da0cb631 ("usb: typec: add support for STUSB160x Type-C controller family")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@foss.st.com>
      Link: https://lore.kernel.org/r/20210716120718.20398-2-amelie.delaunay@foss.st.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      86762ad4
    • Julian Sikorski's avatar
      USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS · 6abf2fe6
      Julian Sikorski authored
      LaCie Rugged USB3-FW appears to be incompatible with UAS. It generates
      errors like:
      [ 1151.582598] sd 14:0:0:0: tag#16 uas_eh_abort_handler 0 uas-tag 1 inflight: IN
      [ 1151.582602] sd 14:0:0:0: tag#16 CDB: Report supported operation codes a3 0c 01 12 00 00 00 00 02 00 00 00
      [ 1151.588594] scsi host14: uas_eh_device_reset_handler start
      [ 1151.710482] usb 2-4: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
      [ 1151.741398] scsi host14: uas_eh_device_reset_handler success
      [ 1181.785534] scsi host14: uas_eh_device_reset_handler start
      Signed-off-by: default avatarJulian Sikorski <belegdol+github@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20210720171910.36497-1-belegdol+github@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6abf2fe6
    • David Jeffery's avatar
      usb: ehci: Prevent missed ehci interrupts with edge-triggered MSI · 0b605572
      David Jeffery authored
      When MSI is used by the ehci-hcd driver, it can cause lost interrupts which
      results in EHCI only continuing to work due to a polling fallback. But the
      reliance of polling drastically reduces performance of any I/O through EHCI.
      
      Interrupts are lost as the EHCI interrupt handler does not safely handle
      edge-triggered interrupts. It fails to ensure all interrupt status bits are
      cleared, which works with level-triggered interrupts but not the
      edge-triggered interrupts typical from using MSI.
      
      To fix this problem, check if the driver may have raced with the hardware
      setting additional interrupt status bits and clear status until it is in a
      stable state.
      
      Fixes: 306c54d0 ("usb: hcd: Try MSI interrupts on PCI devices")
      Tested-by: default avatarLaurence Oberman <loberman@redhat.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarDavid Jeffery <djeffery@redhat.com>
      Link: https://lore.kernel.org/r/20210715213744.GA44506@redhat
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0b605572
    • Mathias Nyman's avatar
      usb: hub: Disable USB 3 device initiated lpm if exit latency is too high · 1b7f56fb
      Mathias Nyman authored
      The device initiated link power management U1/U2 states should not be
      enabled in case the system exit latency plus one bus interval (125us) is
      greater than the shortest service interval of any periodic endpoint.
      
      This is the case for both U1 and U2 sytstem exit latencies and link states.
      
      See USB 3.2 section 9.4.9 "Set Feature" for more details
      
      Note, before this patch the host and device initiated U1/U2 lpm states
      were both enabled with lpm. After this patch it's possible to end up with
      only host inititated U1/U2 lpm in case the exit latencies won't allow
      device initiated lpm.
      
      If this case we still want to set the udev->usb3_lpm_ux_enabled flag so
      that sysfs users can see the link may go to U1/U2.
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20210715150122.1995966-2-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1b7f56fb
    • Mathias Nyman's avatar
      usb: hub: Fix link power management max exit latency (MEL) calculations · 1bf2761c
      Mathias Nyman authored
      Maximum Exit Latency (MEL) value is used by host to know how much in
      advance it needs to start waking up a U1/U2 suspended link in order to
      service a periodic transfer in time.
      
      Current MEL calculation only includes the time to wake up the path from
      U1/U2 to U0. This is called tMEL1 in USB 3.1 section C 1.5.2
      
      Total MEL = tMEL1 + tMEL2 +tMEL3 + tMEL4 which should additinally include:
      - tMEL2 which is the time it takes for PING message to reach device
      - tMEL3 time for device to process the PING and submit a PING_RESPONSE
      - tMEL4 time for PING_RESPONSE to traverse back upstream to host.
      
      Add the missing tMEL2, tMEL3 and tMEL4 to MEL calculation.
      
      Cc: <stable@kernel.org> # v3.5
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Link: https://lore.kernel.org/r/20210715150122.1995966-1-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1bf2761c
    • Martin Kepplinger's avatar
      usb: typec: tipd: Don't block probing of consumer of "connector" nodes · 57560ee9
      Martin Kepplinger authored
      Similar as with tcpm this patch lets fw_devlink know not to wait on the
      fwnode to be populated as a struct device.
      
      Without this patch, USB functionality can be broken on some previously
      supported boards.
      
      Fixes: 28ec344b ("usb: typec: tcpm: Don't block probing of consumers of "connector" nodes")
      Cc: stable <stable@vger.kernel.org>
      Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarMartin Kepplinger <martin.kepplinger@puri.sm>
      Link: https://lore.kernel.org/r/20210714061807.5737-1-martin.kepplinger@puri.smSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      57560ee9
    • Mathias Nyman's avatar
      xhci: Fix lost USB 2 remote wake · 72f68bf5
      Mathias Nyman authored
      There's a small window where a USB 2 remote wake may be left unhandled
      due to a race between hub thread and xhci port event interrupt handler.
      
      When the resume event is detected in the xhci interrupt handler it kicks
      the hub timer, which should move the port from resume to U0 once resume
      has been signalled for long enough.
      
      To keep the hub "thread" running we set a bus_state->resuming_ports flag.
      This flag makes sure hub timer function kicks itself.
      
      checking this flag was not properly protected by the spinlock. Flag was
      copied to a local variable before lock was taken. The local variable was
      then checked later with spinlock held.
      
      If interrupt is handled right after copying the flag to the local variable
      we end up stopping the hub thread before it can handle the USB 2 resume.
      
      CPU0					CPU1
      (hub thread)				(xhci event handler)
      
      xhci_hub_status_data()
      status = bus_state->resuming_ports;
      					<Interrupt>
      					handle_port_status()
      					spin_lock()
      					bus_state->resuming_ports = 1
      					set_flag(HCD_FLAG_POLL_RH)
      					spin_unlock()
      spin_lock()
      if (!status)
        clear_flag(HCD_FLAG_POLL_RH)
      spin_unlock()
      
      Fix this by taking the lock a bit earlier so that it covers
      the resuming_ports flag copy in the hub thread
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Link: https://lore.kernel.org/r/20210715150651.1996099-2-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      72f68bf5
    • Moritz Fischer's avatar
      Revert "usb: renesas-xhci: Fix handling of unknown ROM state" · 44cf5360
      Moritz Fischer authored
      This reverts commit d143825b.
      
      Justin reports some of his systems now fail as result of this commit:
      
       xhci_hcd 0000:04:00.0: Direct firmware load for renesas_usb_fw.mem failed with error -2
       xhci_hcd 0000:04:00.0: request_firmware failed: -2
       xhci_hcd: probe of 0000:04:00.0 failed with error -2
      
      The revert brings back the original issue the commit tried to solve but
      at least unbreaks existing systems relying on previous behavior.
      
      Cc: stable@vger.kernel.org
      Cc: Mathias Nyman <mathias.nyman@intel.com>
      Cc: Vinod Koul <vkoul@kernel.org>
      Cc: Justin Forbes <jmforbes@linuxtx.org>
      Reported-by: default avatarJustin Forbes <jmforbes@linuxtx.org>
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      Fixes: d143825b ("usb: renesas-xhci: Fix handling of unknown ROM state")
      Link: https://lore.kernel.org/r/20210719070519.41114-1-mdf@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      44cf5360
  2. 12 Jul, 2021 1 commit
    • Alan Stern's avatar
      USB: core: Fix incorrect pipe calculation in do_proc_control() · b0863f19
      Alan Stern authored
      When the user submits a control URB via usbfs, the user supplies the
      bRequestType value and the kernel uses it to compute the pipe value.
      However, do_proc_control() performs this computation incorrectly in
      the case where the bRequestType direction bit is set to USB_DIR_IN and
      the URB's transfer length is 0: The pipe's direction is also set to IN
      but it should be OUT, which is the direction the actual transfer will
      use regardless of bRequestType.
      
      Commit 5cc59c41 ("USB: core: WARN if pipe direction != setup
      packet direction") added a check to compare the direction bit in the
      pipe value to a control URB's actual direction and to WARN if they are
      different.  This can be triggered by the incorrect computation
      mentioned above, as found by syzbot.
      
      This patch fixes the computation, thus avoiding the WARNing.
      
      Reported-and-tested-by: syzbot+72af3105289dcb4c055b@syzkaller.appspotmail.com
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Link: https://lore.kernel.org/r/20210712185436.GB326369@rowland.harvard.eduSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b0863f19
  3. 11 Jul, 2021 11 commits
    • Linus Torvalds's avatar
      Linux 5.14-rc1 · e73f0f0e
      Linus Torvalds authored
      e73f0f0e
    • Hugh Dickins's avatar
      mm/rmap: try_to_migrate() skip zone_device !device_private · 6c855fce
      Hugh Dickins authored
      I know nothing about zone_device pages and !device_private pages; but if
      try_to_migrate_one() will do nothing for them, then it's better that
      try_to_migrate() filter them first, than trawl through all their vmas.
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Link: https://lore.kernel.org/lkml/1241d356-8ec9-f47b-a5ec-9b2bf66d242@google.com/
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c855fce
    • Hugh Dickins's avatar
      mm/rmap: fix new bug: premature return from page_mlock_one() · 023e1a8d
      Hugh Dickins authored
      In the unlikely race case that page_mlock_one() finds VM_LOCKED has been
      cleared by the time it got page table lock, page_vma_mapped_walk_done()
      must be called before returning, either explicitly, or by a final call
      to page_vma_mapped_walk() - otherwise the page table remains locked.
      
      Fixes: cd62734c ("mm/rmap: split try_to_munlock from try_to_unmap")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Link: https://lore.kernel.org/lkml/20210711151446.GB4070@xsang-OptiPlex-9020/
      Link: https://lore.kernel.org/lkml/f71f8523-cba7-3342-40a7-114abc5d1f51@google.com/
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      023e1a8d
    • Hugh Dickins's avatar
      mm/rmap: fix old bug: munlocking THP missed other mlocks · d9770fcc
      Hugh Dickins authored
      The kernel recovers in due course from missing Mlocked pages: but there
      was no point in calling page_mlock() (formerly known as
      try_to_munlock()) on a THP, because nothing got done even when it was
      found to be mapped in another VM_LOCKED vma.
      
      It's true that we need to be careful: Mlocked accounting of pte-mapped
      THPs is too difficult (so consistently avoided); but Mlocked accounting
      of only-pmd-mapped THPs is supposed to work, even when multiple mappings
      are mlocked and munlocked or munmapped.  Refine the tests.
      
      There is already a VM_BUG_ON_PAGE(PageDoubleMap) in page_mlock(), so
      page_mlock_one() does not even have to worry about that complication.
      
      (I said the kernel recovers: but would page reclaim be likely to split
      THP before rediscovering that it's VM_LOCKED? I've not followed that up)
      
      Fixes: 9a73f61b ("thp, mlock: do not mlock PTE-mapped file huge pages")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Link: https://lore.kernel.org/lkml/cfa154c-d595-406-eb7d-eb9df730f944@google.com/
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alistair Popple <apopple@nvidia.com>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d9770fcc
    • Hugh Dickins's avatar
      mm/rmap: fix comments left over from recent changes · 64b586d1
      Hugh Dickins authored
      Parallel developments in mm/rmap.c have left behind some out-of-date
      comments: try_to_migrate_one() also accepts TTU_SYNC (already commented
      in try_to_migrate() itself), and try_to_migrate() returns nothing at
      all.
      
      TTU_SPLIT_FREEZE has just been deleted, so reword the comment about it
      in mm/huge_memory.c; and TTU_IGNORE_ACCESS was removed in 5.11, so
      delete the "recently referenced" comment from try_to_unmap_one() (once
      upon a time the comment was near the removed codeblock, but they drifted
      apart).
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Reviewed-by: default avatarAlistair Popple <apopple@nvidia.com>
      Link: https://lore.kernel.org/lkml/563ce5b2-7a44-5b4d-1dfd-59a0e65932a9@google.com/
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      64b586d1
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 98f7fdce
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "Two fixes:
      
         - Fix a MIPS IRQ handling RCU bug
      
         - Remove a DocBook annotation for a parameter that doesn't exist
           anymore"
      
      * tag 'irq-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry
        genirq/irqdesc: Drop excess kernel-doc entry @lookup
      98f7fdce
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 877029d9
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Three fixes:
      
         - Fix load tracking bug/inconsistency
      
         - Fix a sporadic CFS bandwidth constraints enforcement bug
      
         - Fix a uclamp utilization tracking bug for newly woken tasks"
      
      * tag 'sched-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/uclamp: Ignore max aggregation if rq is idle
        sched/fair: Fix CFS bandwidth hrtimer expiry type
        sched/fair: Sync load_sum with load_avg after dequeue
      877029d9
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 936b664f
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "A fix and a hardware-enablement addition:
      
         - Robustify uncore_snbep's skx_iio_set_mapping()'s error cleanup
      
         - Add cstate event support for Intel ICELAKE_X and ICELAKE_D"
      
      * tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel/uncore: Clean up error handling path of iio mapping
        perf/x86/cstate: Add ICELAKE_X and ICELAKE_D support
      936b664f
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 301c8b1d
      Linus Torvalds authored
      Pull locking fixes from Ingo Molnar:
      
       - Fix a Sparc crash
      
       - Fix a number of objtool warnings
      
       - Fix /proc/lockdep output on certain configs
      
       - Restore a kprobes fail-safe
      
      * tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/atomic: sparc: Fix arch_cmpxchg64_local()
        kprobe/static_call: Restore missing static_call_text_reserved()
        static_call: Fix static_call_text_reserved() vs __init
        jump_label: Fix jump_label_text_reserved() vs __init
        locking/lockdep: Fix meaningless /proc/lockdep output of lock classes on !CONFIG_PROVE_LOCKING
      301c8b1d
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 8b9cc17a
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "This is a set of minor fixes and clean ups in the core and various
        drivers.
      
        The only core change in behaviour is the I/O retry for spinup notify,
        but that shouldn't impact anything other than the failing case"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (23 commits)
        scsi: virtio_scsi: Add validation for residual bytes from response
        scsi: ipr: System crashes when seeing type 20 error
        scsi: core: Retry I/O for Notify (Enable Spinup) Required error
        scsi: mpi3mr: Fix warnings reported by smatch
        scsi: qedf: Add check to synchronize abort and flush
        scsi: MAINTAINERS: Add mpi3mr driver maintainers
        scsi: libfc: Fix array index out of bound exception
        scsi: mvsas: Use DEVICE_ATTR_RO()/RW() macro
        scsi: megaraid_mbox: Use DEVICE_ATTR_ADMIN_RO() macro
        scsi: qedf: Use DEVICE_ATTR_RO() macro
        scsi: qedi: Use DEVICE_ATTR_RO() macro
        scsi: message: mptfc: Switch from pci_ to dma_ API
        scsi: be2iscsi: Fix some missing space in some messages
        scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
        scsi: ufs: Fix build warning without CONFIG_PM
        scsi: bnx2fc: Remove meaningless bnx2fc_abts_cleanup() return value assignment
        scsi: qla2xxx: Add heartbeat check
        scsi: virtio_scsi: Do not overwrite SCSI status
        scsi: libsas: Add LUN number check in .slave_alloc callback
        scsi: core: Inline scsi_mq_alloc_queue()
        ...
      8b9cc17a
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.14-2021-07-10' of... · b1412bd7
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.14-2021-07-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tool updates from Arnaldo Carvalho de Melo:
       "New features:
      
         - Enable use of BPF counters with 'perf stat --for-each-cgroup',
           using per-CPU 'cgroup-switch' events with an attached BPF program
           that does aggregation per-cgroup in the kernel instead of using
           per-cgroup perf events.
      
         - Add Topdown metrics L2 events as default events in 'perf stat' for
           systems having those events.
      
        Hardware tracing:
      
         - Add a config for max loops without consuming a packet in the Intel
           PT packet decoder, set via 'perf config intel-pt.max-loops=N'
      
        Hardware enablement:
      
         - Disable misleading NMI watchdog message in 'perf stat' on hybrid
           systems such as Intel Alder Lake.
      
         - Add a dummy event on hybrid systems to collect metadata records.
      
         - Add 24x7 nest metric events for the Power10 platform.
      
        Fixes:
      
         - Fix event parsing for PMUs starting with the same prefix.
      
         - Fix the 'perf trace' 'trace' alias installation dir.
      
         - Fix buffer size to report iregs in perf script python scripts,
           supporting the extended registers in PowerPC.
      
         - Fix overflow in elf_sec__is_text().
      
         - Fix 's' on source line when disasm is empty in the annotation TUI,
           accessible via 'perf annotate', 'perf report' and 'perf top'.
      
         - Plug leaks in scandir() returned dirent entries in 'perf test' when
           sorting the shell tests.
      
         - Fix --task and --stat with pipe input in 'perf report'.
      
         - Fix 'perf probe' use of debuginfo files by build id.
      
         - If a DSO has both dynsym and symtab ELF sections, read from both
           when loading the symbol table, fixing a problem processing Fedora
           32 glibc DSOs.
      
        Libraries:
      
         - Add grouping of events to libperf, from code in tools/perf,
           allowing libperf users to use that mode.
      
        Misc:
      
         - Filter plt stubs from the 'perf probe --functions' output.
      
         - Update UAPI header copies for asound, DRM, mman-common.h and the
           ones affected by the quotactl_fd syscall"
      
      * tag 'perf-tools-for-v5.14-2021-07-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (29 commits)
        perf test: Add free() calls for scandir() returned dirent entries
        libperf: Add tests for perf_evlist__set_leader()
        libperf: Remove BUG_ON() from library code in get_group_fd()
        libperf: Add group support to perf_evsel__open()
        perf tools: Fix pattern matching for same substring in different PMU type
        perf record: Add a dummy event on hybrid systems to collect metadata records
        perf stat: Add Topdown metrics L2 events as default events
        libperf: Adopt evlist__set_leader() from tools/perf as perf_evlist__set_leader()
        libperf: Move 'nr_groups' from tools/perf to evlist::nr_groups
        libperf: Move 'leader' from tools/perf to perf_evsel::leader
        libperf: Move 'idx' from tools/perf to perf_evsel::idx
        libperf: Change tests to single static and shared binaries
        perf intel-pt: Add a config for max loops without consuming a packet
        perf stat: Disable the NMI watchdog message on hybrid
        perf vendor events power10: Adds 24x7 nest metric events for power10 platform
        perf script python: Fix buffer size to report iregs in perf script
        perf trace: Fix the perf trace link location
        perf top: Fix overflow in elf_sec__is_text()
        perf annotate: Fix 's' on source line when disasm is empty
        perf probe: Do not show @plt function by default
        ...
      b1412bd7
  4. 10 Jul, 2021 12 commits
    • Linus Torvalds's avatar
      Merge tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · de554096
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "Mostly documentation/comment changes and non urgent fixes.
      
         - add or fix SPDX identifiers
      
         - NXP pcf*: fix datasheet URLs
      
         - imxdi: add wakeup support
      
         - pcf2127: handle timestamp interrupts, this fixes a possible
           interrupt storm
      
         - bd70528: Drop BD70528 support"
      
      * tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (33 commits)
        rtc: pcf8523: rename register and bit defines
        rtc: pcf2127: handle timestamp interrupts
        rtc: at91sam9: Remove unnecessary offset variable checks
        rtc: s5m: Check return value of s5m_check_peding_alarm_interrupt()
        rtc: spear: convert to SPDX identifier
        rtc: tps6586x: convert to SPDX identifier
        rtc: tps80031: convert to SPDX identifier
        rtc: rtd119x: Fix format of SPDX identifier
        rtc: sc27xx: Fix format of SPDX identifier
        rtc: palmas: convert to SPDX identifier
        rtc: max6900: convert to SPDX identifier
        rtc: ds1374: convert to SPDX identifier
        rtc: au1xxx: convert to SPDX identifier
        rtc: pcf85063: Update the PCF85063A datasheet revision
        dt-bindings: rtc: ti,bq32k: take maintainership
        rtc: pcf8563: Fix the datasheet URL
        rtc: pcf85063: Fix the datasheet URL
        rtc: pcf2127: Fix the datasheet URL
        dt-bindings: rtc: ti,bq32k: Convert to json-schema
        dt-bindings: rtc: rx8900: Convert to YAML schema
        ...
      de554096
    • Mel Gorman's avatar
      mm/page_alloc: Revert pahole zero-sized workaround · 6bce2443
      Mel Gorman authored
      Commit dbbee9d5 ("mm/page_alloc: convert per-cpu list protection to
      local_lock") folded in a workaround patch for pahole that was unable to
      deal with zero-sized percpu structures.
      
      A superior workaround is achieved with commit a0b8200d ("kbuild:
      skip per-CPU BTF generation for pahole v1.18-v1.21").
      
      This patch reverts the dummy field and the pahole version check.
      
      Fixes: dbbee9d5 ("mm/page_alloc: convert per-cpu list protection to local_lock")
      Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6bce2443
    • Alexandre Belloni's avatar
      rtc: pcf8523: rename register and bit defines · 4aa90c03
      Alexandre Belloni authored
      arch/arm/mach-ixp4xx/include/mach/platform.h now gets included indirectly
      and defines REG_OFFSET. Rename the register and bit definition to something
      specific to the driver.
      
      Fixes: 7fd70c65 ("ARM: irqstat: Get rid of duplicated declaration")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Link: https://lore.kernel.org/r/20210710211431.1393589-1-alexandre.belloni@bootlin.com
      4aa90c03
    • Linus Torvalds's avatar
      Merge tag '5.14-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · 1e16624d
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "13 cifs/smb3 fixes. Most are to address minor issues pointed out by
        Coverity.
      
        Also includes a packet signing enhancement and mount improvement"
      
      * tag '5.14-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal version number
        cifs: prevent NULL deref in cifs_compose_mount_options()
        SMB3.1.1: Add support for negotiating signing algorithm
        cifs: use helpers when parsing uid/gid mount options and validate them
        CIFS: Clarify SMB1 code for POSIX Lock
        CIFS: Clarify SMB1 code for rename open file
        CIFS: Clarify SMB1 code for delete
        CIFS: Clarify SMB1 code for SetFileSize
        smb3: fix typo in header file
        CIFS: Clarify SMB1 code for UnixSetPathInfo
        CIFS: Clarify SMB1 code for UnixCreateSymLink
        cifs: clarify SMB1 code for UnixCreateHardLink
        cifs: make locking consistent around the server session status
      1e16624d
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 67d8d365
      Linus Torvalds authored
      Pull pci fix from Bjorn Helgaas:
       "Revert host bridge window patch that fixed HP EliteDesk 805 G6, but
        broke ppc:sam460ex (Bjorn Helgaas)"
      
      * tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        Revert "PCI: Coalesce host bridge contiguous apertures"
      67d8d365
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · 88bbd8a0
      Linus Torvalds authored
      Pull i3c updates from Alexandre Belloni:
      
       - two small fixes to the svc driver
      
      * tag 'i3c/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        i3c: master: svc: fix doc warning in svc-i3c-master.c
        i3c: master: svc: drop free_irq of devm_request_irq allocated irq
      88bbd8a0
    • Linus Torvalds's avatar
      Merge tag 'thermal-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · f7ea4be4
      Linus Torvalds authored
      Pull thermal updates from Daniel Lezcano:
      
       - Add rk3568 sensor support (Finley Xiao)
      
       - Add missing MODULE_DEVICE_TABLE for the Spreadtrum sensor (Chunyan
         Zhang)
      
       - Export additionnal attributes for the int340x thermal processor
         (Srinivas Pandruvada)
      
       - Add SC7280 compatible for the tsens driver (Rajeshwari Ravindra
         Kamble)
      
       - Fix kernel documentation for thermal_zone_device_unregister() and use
         devm_platform_get_and_ioremap_resource() (Yang Yingliang)
      
       - Fix coefficient calculations for the rcar_gen3 sensor driver (Niklas
         Söderlund)
      
       - Fix shadowing variable rcar_gen3_ths_tj_1 (Geert Uytterhoeven)
      
       - Add missing of_node_put() for the iMX and Spreadtrum sensors
         (Krzysztof Kozlowski)
      
       - Add tegra3 thermal sensor DT bindings (Dmitry Osipenko)
      
       - Stop the thermal zone monitoring when unregistering it to prevent a
         temperature update without the 'get_temp' callback (Dmitry Osipenko)
      
       - Add rk3568 DT bindings, convert bindings to yaml schemas and add the
         corresponding compatible in the Rockchip sensor (Ezequiel Garcia)
      
       - Add the sc8180x compatible for the Qualcomm tsensor (Bjorn Andersson)
      
       - Use the find_first_zero_bit() function instead of custom code (Andy
         Shevchenko)
      
       - Fix the kernel doc for the device cooling device (Yang Li)
      
       - Reorg the processor thermal int340x to set the scene for the PCI mmio
         driver (Srinivas Pandruvada)
      
       - Add PCI MMIO driver for the int340x processor thermal driver
         (Srinivas Pandruvada)
      
       - Add hwmon sensors for the mediatek sensor (Frank Wunderlich)
      
       - Fix warning for return value reported by Smatch for the int340x
         thermal processor (Srinivas Pandruvada)
      
       - Fix wrong register access and decoding for the int340x thermal
         processor (Srinivas Pandruvada)
      
      * tag 'thermal-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (23 commits)
        thermal/drivers/int340x/processor_thermal: Fix tcc setting
        thermal/drivers/int340x/processor_thermal: Fix warning for return value
        thermal/drivers/mediatek: Add sensors-support
        thermal/drivers/int340x/processor_thermal: Add PCI MMIO based thermal driver
        thermal/drivers/int340x/processor_thermal: Split enumeration and processing part
        thermal: devfreq_cooling: Fix kernel-doc
        thermal/drivers/intel/intel_soc_dts_iosf: Switch to use find_first_zero_bit()
        dt-bindings: thermal: tsens: Add sc8180x compatible
        dt-bindings: rockchip-thermal: Support the RK3568 SoC compatible
        dt-bindings: thermal: convert rockchip-thermal to json-schema
        thermal/core/thermal_of: Stop zone device before unregistering it
        dt-bindings: thermal: Add binding for Tegra30 thermal sensor
        thermal/drivers/sprd: Add missing of_node_put for loop iteration
        thermal/drivers/imx_sc: Add missing of_node_put for loop iteration
        thermal/drivers/rcar_gen3_thermal: Do not shadow rcar_gen3_ths_tj_1
        thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations
        thermal/drivers/st: Use devm_platform_get_and_ioremap_resource()
        thermal/core: Correct function name thermal_zone_device_unregister()
        dt-bindings: thermal: tsens: Add compatible string to TSENS binding for SC7280
        thermal/drivers/int340x: processor_thermal: Export additional attributes
        ...
      f7ea4be4
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 81361b83
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Increase the -falign-functions alignment for the debug option.
      
       - Remove ugly libelf checks from the top Makefile.
      
       - Make the silent build (-s) more silent.
      
       - Re-compile the kernel if KBUILD_BUILD_TIMESTAMP is specified.
      
       - Various script cleanups
      
      * tag 'kbuild-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (27 commits)
        scripts: add generic syscallnr.sh
        scripts: check duplicated syscall number in syscall table
        sparc: syscalls: use pattern rules to generate syscall headers
        parisc: syscalls: use pattern rules to generate syscall headers
        nds32: add arch/nds32/boot/.gitignore
        kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set
        kbuild: modpost: Explicitly warn about unprototyped symbols
        kbuild: remove trailing slashes from $(KBUILD_EXTMOD)
        kconfig.h: explain IS_MODULE(), IS_ENABLED()
        kconfig: constify long_opts
        scripts/setlocalversion: simplify the short version part
        scripts/setlocalversion: factor out 12-chars hash construction
        scripts/setlocalversion: add more comments to -dirty flag detection
        scripts/setlocalversion: remove workaround for old make-kpkg
        scripts/setlocalversion: remove mercurial, svn and git-svn supports
        kbuild: clean up ${quiet} checks in shell scripts
        kbuild: sink stdout from cmd for silent build
        init: use $(call cmd,) for generating include/generated/compile.h
        kbuild: merge scripts/mkmakefile to top Makefile
        sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild
        ...
      81361b83
    • Linus Torvalds's avatar
      Merge tag 's390-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · e98e03d0
      Linus Torvalds authored
      Pull more s390 updates from Vasily Gorbik:
      
       - Fix preempt_count initialization.
      
       - Rework call_on_stack() macro to add proper type handling and avoid
         possible register corruption.
      
       - More error prone "register asm" removal and fixes.
      
       - Fix syscall restarting when multiple signals are coming in. This adds
         minimalistic trampolines to vdso so we can return from signal without
         using the stack which requires pgm check handler hacks when NX is
         enabled.
      
       - Remove HAVE_IRQ_EXIT_ON_IRQ_STACK since this is no longer true after
         switch to generic entry.
      
       - Fix protected virtualization secure storage access exception
         handling.
      
       - Make machine check C handler always enter with DAT enabled and move
         register validation to C code.
      
       - Fix tinyconfig boot problem by avoiding MONITOR CALL without
         CONFIG_BUG.
      
       - Increase asm symbols alignment to 16 to make it consistent with
         compilers.
      
       - Enable concurrent access to the CPU Measurement Counter Facility.
      
       - Add support for dynamic AP bus size limit and rework ap_dqap to deal
         with messages greater than recv buffer.
      
      * tag 's390-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (41 commits)
        s390: preempt: Fix preempt_count initialization
        s390/linkage: increase asm symbols alignment to 16
        s390: rename CALL_ON_STACK_NORETURN() to call_on_stack_noreturn()
        s390: add type checking to CALL_ON_STACK_NORETURN() macro
        s390: remove old CALL_ON_STACK() macro
        s390/softirq: use call_on_stack() macro
        s390/lib: use call_on_stack() macro
        s390/smp: use call_on_stack() macro
        s390/kexec: use call_on_stack() macro
        s390/irq: use call_on_stack() macro
        s390/mm: use call_on_stack() macro
        s390: introduce proper type handling call_on_stack() macro
        s390/irq: simplify on_async_stack()
        s390/irq: inline do_softirq_own_stack()
        s390/irq: simplify do_softirq_own_stack()
        s390/ap: get rid of register asm in ap_dqap()
        s390: rename PIF_SYSCALL_RESTART to PIF_EXECVE_PGSTE_RESTART
        s390: move restart of execve() syscall
        s390/signal: remove sigreturn on stack
        s390/signal: switch to using vdso for sigreturn and syscall restart
        ...
      e98e03d0
    • Linus Torvalds's avatar
      Merge tag 'mips_5.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 379cf80a
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fix for accesing gic via vdso
      
       - two build fixes
      
      * tag 'mips_5.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: vdso: Invalid GIC access through VDSO
        mips: disable branch profiling in boot/decompress.o
        mips: always link byteswap helpers into decompressor
      379cf80a
    • Linus Torvalds's avatar
      Merge tag 'arm-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · af4cf6a5
      Linus Torvalds authored
      Pull ARM defconfig updates from "Olof Johansson
       "A set of defconfig changes, we keep them in a separate branch to avoid
        conflicts between topics by separating them out.
      
        These changes are almost exclusively turning on new drivers for
        various platforms, or turning on modules for new drivers for the
        shared generic configs"
      
      * tag 'arm-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (22 commits)
        arm64: defconfig: Enable renesas usb xhci pci host controller
        arm64: defconfig: Visconti: Enable GPIO
        arm64: defconfig: Visconti: Enable PWM
        arm64: defconfig: add drivers needed for DragonBoard410c
        ARM: config: aspeed: Add DEBUG_FS and EXT4
        ARM: ixp4xx_defconfig: add MTD_PHYSMAP
        ARM: ixp4xx_defconfig: add CONFIG_SERIAL_OF_PLATFORM
        ARM: imx_v6_v7_defconfig: Select the Wifi ath10k sdio driver
        ARM: exynos_defconfig: restore framebuffer support
        arm64: defconfig: Enable ARCH_R9A07G044
        ARM: configs: at91_dt_defconfig: configs for sam9x60
        arm64: defconfig: Enable Exynos UFS driver
        arm64: defconfig: qcom: enable interconnect for SM8350
        ARM: tegra_defconfig: Enable CONFIG_DEVFREQ_THERMAL
        arm64: defconfig: Enable usb2_clksel for R-Car Gen3 and RZ/G2
        arm64: defconfig: enable Layerscape EDAC driver
        ARM: omap2plus_defconfig: Add LP5523 LED driver
        ARM: omap2plus_defconfig: Add WL1251 and WEXT modules
        ARM: shmobile: defconfig: Refresh for v5.13-rc1
        arm64: defconfig: Allow Mediatek boards to boot from the mmc
        ...
      af4cf6a5
    • Linus Torvalds's avatar
      Merge tag 'arm-drivers-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 071e5ace
      Linus Torvalds authored
      Pull ARM driver updates from Olof Johansson:
      
       - Reset controllers: Adding support for Microchip Sparx5 Switch.
      
       - Memory controllers: ARM Primecell PL35x SMC memory controller driver
         cleanups and improvements.
      
       - i.MX SoC drivers: Power domain support for i.MX8MM and i.MX8MN.
      
       - Rockchip: RK3568 power domains support + DT binding updates,
         cleanups.
      
       - Qualcomm SoC drivers: Amend socinfo with more SoC/PMIC details,
         including support for MSM8226, MDM9607, SM6125 and SC8180X.
      
       - ARM FFA driver: "Firmware Framework for ARMv8-A", defining management
         interfaces and communication (including bus model) between partitions
         both in Normal and Secure Worlds.
      
       - Tegra Memory controller changes, including major rework to deal with
         identity mappings at boot and integration with ARM SMMU pieces.
      
      * tag 'arm-drivers-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (120 commits)
        firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string
        firmware: turris-mox-rwtm: show message about HWRNG registration
        firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng
        firmware: turris-mox-rwtm: report failures better
        firmware: turris-mox-rwtm: fix reply status decoding function
        soc: imx: gpcv2: add support for i.MX8MN power domains
        dt-bindings: add defines for i.MX8MN power domains
        firmware: tegra: bpmp: Fix Tegra234-only builds
        iommu/arm-smmu: Use Tegra implementation on Tegra186
        iommu/arm-smmu: tegra: Implement SID override programming
        iommu/arm-smmu: tegra: Detect number of instances at runtime
        dt-bindings: arm-smmu: Add Tegra186 compatible string
        firmware: qcom_scm: Add MDM9607 compatible
        soc: qcom: rpmpd: Add MDM9607 RPM Power Domains
        soc: renesas: Add support to read LSI DEVID register of RZ/G2{L,LC} SoC's
        soc: renesas: Add ARCH_R9A07G044 for the new RZ/G2L SoC's
        dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml
        memory: emif: remove unused frequency and voltage notifiers
        memory: fsl_ifc: fix leak of private memory on probe failure
        memory: fsl_ifc: fix leak of IO mapping on probe failure
        ...
      071e5ace