885 Commits

Author SHA1 Message Date
Linus Torvalds
f5e9d31e79 Merge tag 'usb-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB/Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt driver updates for
  6.19-rc1. Nothing major here, just lots of tiny updates for most of
  the common USB drivers. Included in here are:

   - more xhci driver updates and fixes

   - Thunderbolt driver cleanups

   - usb serial driver updates

   - typec driver updates

   - USB tracepoint additions

   - dwc3 driver updates, including support for Apple hardware

   - lots of other smaller driver updates and cleanups

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (161 commits)
  usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt
  USB: serial: option: move Telit 0x10c7 composition in the right place
  USB: serial: option: add Telit Cinterion FE910C04 new compositions
  usb: typec: ucsi: fix use-after-free caused by uec->work
  usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
  usb: dwc3: core: Remove redundant comment in core init
  usb: phy: Initialize struct usb_phy list_head
  USB: serial: option: add Foxconn T99W760
  usb: usb-storage: No additional quirks need to be added to the EL-R12 optical drive.
  usb: typec: hd3ss3220: Enable VBUS based on ID pin state
  dt-bindings: usb: ti,hd3ss3220: Add support for VBUS based on ID state
  usb: typec: anx7411: add WQ_PERCPU to alloc_workqueue users
  USB: add WQ_PERCPU to alloc_workqueue users
  dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform
  drivers/usb/storage: use min() instead of min_t()
  usb: raw-gadget: cap raw_io transfer length to KMALLOC_MAX_SIZE
  usb: ohci-da8xx: remove unused platform data
  usb: gadget: functionfs: use dma_buf_unmap_attachment_unlocked() helper
  usb: uas: reduce time under spinlock
  usb: dwc3: eic7700: Add EIC7700 USB driver
  ...
2025-12-06 18:42:12 -08:00
Alan Borzeszkowski
479d186fc9 thunderbolt: Fix typos in xdomain.c
Fix typos in xdomain.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:24 +01:00
Alan Borzeszkowski
9527d0c543 thunderbolt: Fix typos in usb4.c
Fix typos in usb4.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:24 +01:00
Alan Borzeszkowski
c3d53000d2 thunderbolt: Fix typos in tunnel.c
Fix typos in tunnel.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:24 +01:00
Alan Borzeszkowski
5d463af981 thunderbolt: Fix typos in tmu.c
Fix typos in tmu.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:24 +01:00
Alan Borzeszkowski
836fe732db thunderbolt: Fix typos in tb_regs.h
Fix typos in tb_regs.h. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:24 +01:00
Alan Borzeszkowski
20b2af3128 thunderbolt: Fix typos in tb.h
Fix typos in tb.h. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:24 +01:00
Alan Borzeszkowski
6cdbf50107 thunderbolt: Fix typos in tb.c
Fix typos in tb.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:24 +01:00
Alan Borzeszkowski
cafe5dd8bb thunderbolt: Fix typos in switch.c
Fix typos in switch.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:23 +01:00
Alan Borzeszkowski
6c1e5744e6 thunderbolt: Fix typos in retimer.c
Fix typos in retimer.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:23 +01:00
Alan Borzeszkowski
1c9ad530d3 thunderbolt: Fix typos in nhi.c
Fix typos in nhi.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:23 +01:00
Alan Borzeszkowski
0370b14fd5 thunderbolt: Fix typos in lc.c
Fix typos in lc.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:23 +01:00
Alan Borzeszkowski
91c7b372a3 thunderbolt: Fix typos in icm.c
Fix typos in icm.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:24:23 +01:00
Alan Borzeszkowski
4994e9a711 thunderbolt: Fix typos in domain.c
Fix typos in domain.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:22:51 +01:00
Alan Borzeszkowski
b719f112d2 thunderbolt: Fix typos in debugfs.c
Fix typos in debugfs.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:22:51 +01:00
Alan Borzeszkowski
d0d7c4062d thunderbolt: Fix typos in ctl.c
Fix typos in ctl.c. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-17 08:22:51 +01:00
Marco Crivellari
9393a3a420 thunderbolt: Replace use of system_wq with system_percpu_wq
Currently if a user enqueues a work item using schedule_delayed_work() the
used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.

This lack of consistency cannot be addressed without refactoring the API.

This patch continues the effort to refactor worqueue APIs, which has begun
with the change introducing new workqueues and a new alloc_workqueue flag:

commit 128ea9f6cc ("workqueue: Add system_percpu_wq and system_dfl_wq")
commit 930c2ea566 ("workqueue: Add new WQ_PERCPU flag")

Replace system_wq with system_percpu_wq, keeping the old behavior.
The old wq (system_wq) will be kept for a few release cycles.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-07 10:41:51 +01:00
Alan Borzeszkowski
8ab64d711b thunderbolt: Update deprecated firmware update site in icm.c
Update leftover reference to Thunderbolt firmware upgrade site
(thunderbolttechnology.net) with the preferred method described in
Documentation/admin-guide/thunderbolt.rst.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-11-03 12:01:53 +01:00
Alan Borzeszkowski
3575254546 thunderbolt: Add support for Intel Wildcat Lake
Intel Wildcat Lake derives its Thunderbolt/USB4 controller from Lunar
Lake platform. Add Wildcat Lake PCI ID to the driver list of supported
devices.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-10-20 08:20:34 +02:00
Dominik Karol Piątkowski
56bcf64b61 thunderbolt: Fix typo in tb_eeprom_ctl_read documentation
Fix presumed copy-paste typo of tb_eeprom_ctl_read documentation
referring to tb_eeprom_ctl_write.

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-10-20 08:17:36 +02:00
Duoming Zhou
67600ccfc4 thunderbolt: Fix use-after-free in tb_dp_dprx_work
The original code relies on cancel_delayed_work() in tb_dp_dprx_stop(),
which does not ensure that the delayed work item tunnel->dprx_work has
fully completed if it was already running. This leads to use-after-free
scenarios where tb_tunnel is deallocated by tb_tunnel_put(), while
tunnel->dprx_work remains active and attempts to dereference tb_tunnel
in tb_dp_dprx_work().

A typical race condition is illustrated below:

CPU 0                            | CPU 1
tb_dp_tunnel_active()            |
  tb_deactivate_and_free_tunnel()| tb_dp_dprx_start()
    tb_tunnel_deactivate()       |   queue_delayed_work()
      tb_dp_activate()           |
        tb_dp_dprx_stop()        | tb_dp_dprx_work() //delayed worker
          cancel_delayed_work()  |
    tb_tunnel_put(tunnel);       |
                                 |   tunnel = container_of(...); //UAF
                                 |   tunnel-> //UAF

Replacing cancel_delayed_work() with cancel_delayed_work_sync() is
not feasible as it would introduce a deadlock: both tb_dp_dprx_work()
and the cleanup path acquire tb->lock, and cancel_delayed_work_sync()
would wait indefinitely for the work item that cannot proceed.

Instead, implement proper reference counting:
- If cancel_delayed_work() returns true (work is pending), we release
  the reference in the stop function.
- If it returns false (work is executing or already completed), the
  reference is released in delayed work function itself.

This ensures the tb_tunnel remains valid during work item execution
while preventing memory leaks.

This bug was found by static analysis.

Fixes: d6d458d42e ("thunderbolt: Handle DisplayPort tunnel activation asynchronously")
Cc: stable@vger.kernel.org
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-23 17:16:38 +02:00
Alan Borzeszkowski
81a1962cb2 thunderbolt: Update xdomain.c function documentation
Make xdomain.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:33:00 +02:00
Alan Borzeszkowski
a2ba553cd4 thunderbolt: Update usb4_port.c function documentation
Make usb4_port.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:33:00 +02:00
Alan Borzeszkowski
9a5abaf8be thunderbolt: Update usb4.c function documentation
Make usb4.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:33:00 +02:00
Alan Borzeszkowski
e262b91b22 thunderbolt: Update tunnel.h function documentation
Make tunnel.h function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:33:00 +02:00
Alan Borzeszkowski
6f3ed985b7 thunderbolt: Update tunnel.c function documentation
Make tunnel.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:33:00 +02:00
Alan Borzeszkowski
371c237444 thunderbolt: Update tmu.c function documentation
Make tmu.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
b30234f273 thunderbolt: Add missing documentation in tb.h
Add missing parameters and struct/enum description in tb.h kernel-doc
comments. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
978a3d608f thunderbolt: Update tb.h function documentation
Make tb.h function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
d05cc39d1d thunderbolt: Update tb.c function documentation
Make tb.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
207b8a2605 thunderbolt: Update switch.c function documentation
Make switch.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
f72f4d5cdb thunderbolt: Update retimer.c function documentation
Make retimer.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
d015642ad3 thunderbolt: Update property.c function documentation
Make property.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
a6e3f939ad thunderbolt: Update path.c function documentation
Make path.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
fe83a27383 thunderbolt: Update nvm.c function documentation
Make nvm.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
bbbca9bfd1 thunderbolt: Add missing documentation in nhi_regs.h ring_desc structure
Add missing description of fields in ring_desc struct found in
"nhi_regs.h". No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
a385238050 thunderbolt: Update nhi.c function documentation
Make nhi.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
4815b7548c thunderbolt: Update lc.c function documentation
Make lc.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
728ab0e4a0 thunderbolt: Update eeprom.c function documentation
Make eeprom.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:59 +02:00
Alan Borzeszkowski
250afc7f39 thunderbolt: Update domain.c function documentation
Make domain.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:58 +02:00
Alan Borzeszkowski
a84be45d33 thunderbolt: Update dma_port.c function documentation
Make dma_port.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:58 +02:00
Alan Borzeszkowski
12cb68e486 thunderbolt: Add missing documentation in ctl.h tb_cfg_request struct
Add missing @request field description in tb_cfg_request struct
kernel-doc. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:58 +02:00
Alan Borzeszkowski
38f33b8e2c thunderbolt: Update ctl.c function documentation
Make ctl.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:58 +02:00
Alan Borzeszkowski
66cf14cc9f thunderbolt: Update clx.c function documentation
Make clx.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:58 +02:00
Alan Borzeszkowski
c0a078d7bc thunderbolt: Update cap.c function documentation
Make cap.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:58 +02:00
Alan Borzeszkowski
1fac4d003f thunderbolt: Update acpi.c function documentation
Make acpi.c function documentation compliant with current kernel-doc
standards. No functional changes.

Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-09-17 07:32:58 +02:00
Chelsy Ratnawat
b06578497e thunderbolt: Use string choices helpers
Use string_choices.h helpers instead of hard-coded strings.

Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-08-26 07:59:41 +02:00
Lukas Wunner
5d03847175 thunderbolt: Use is_pciehp instead of is_hotplug_bridge
The thunderbolt driver sets up device link dependencies from hotplug ports
to the Host Router (aka Native Host Interface, NHI).  When resuming from
system sleep, this allows the Host Router to re-establish tunnels to
attached Thunderbolt devices before the hotplug ports resume.

To identify the hotplug ports, the driver utilizes the is_hotplug_bridge
flag which also encompasses ACPI slots handled by the ACPI hotplug driver.

Thunderbolt hotplug ports are always Hot-Plug Capable PCIe ports, so it is
more apt to identify them with the is_pciehp flag.

Similarly, hotplug ports on older Thunderbolt controllers have broken MSI
support and are quirked to use legacy INTx interrupts instead.  The quirk
identifies them with is_hotplug_bridge, even though all affected ports are
also matched by is_pciehp.  So use is_pciehp here as well.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-08-14 06:34:12 +02:00
Mika Westerberg
aaa76d1cbd thunderbolt: Use Linux Foundation IDs for XDomain discovery
There are other vendors now that have their own USB4 host router
hardware so using the Intel donated IDs may confuse users. For this
reason switch to use USB IDs provided by the Linux Foundation for
XDomain discovery.

Link: https://lore.kernel.org/linux-usb/20250722175026.1994846-1-Raju.Rangoju@amd.com/
Cc: Raju Rangoju <Raju.Rangoju@amd.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-08-13 10:07:30 +02:00
Eric Biggers
0eff12ce88 thunderbolt: Use HMAC-SHA256 library instead of crypto_shash
Use the hmac_sha256_usingrawkey() library function instead of the
"hmac(sha256)" crypto_shash.  This is simpler and faster.

As a cleanup, change the input data parameters from "challenge,
sizeof(hmac)" to "challenge, sizeof(challenge)", so that the size is
being taken of the correct buffer.  This is not a functional change,
since it happens that sizeof(hmac) == sizeof(challenge).

Replace the selection of CRYPTO and CRYPTO_HASH with CRYPTO_LIB_SHA256
and CRYPTO_LIB_UTILS.  The latter is needed for crypto_memneq() which
was previously being pulled in via CRYPTO.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2025-08-11 07:56:14 +02:00