]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
thunderbolt: Add USB4 router operation proxy for firmware connection manager
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 3 Nov 2020 11:55:32 +0000 (13:55 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 30 Nov 2020 11:39:24 +0000 (14:39 +0300)
commit9039387e166edab35c89ddcc057529e332cc4089
treed477b2636bc2258ffe50707407903b89fe2424ae
parent579f14217c952975e7d11e300c669af0c47bfe04
thunderbolt: Add USB4 router operation proxy for firmware connection manager

Intel Maple Ridge and Tiger Lake connection manager firmware implements
a USB4 router operation proxy that should be used instead of direct
register access to avoid races with the firmware. This is supported in
all firmwares where the protocol version field returned in the driver
ready response is 3 (or higher).

This adds the USB4 router proxy operations support to the driver so that
we first check the protocol version and if it is 3 (or higher) the USB4
router operation is run through the firmware provided proxy. Otherwise
the native version is used.

Most USB4 router proxy operations are pretty straightforward except
NVM_AUTH where the firmware only responds once the router is restarted
but before it sends device connected notification. To support this we
split the operation so that the reply is received asynchronously and
stored to struct icm. This last reply is then returned in
icm_usb4_switch_nvm_authenticate_status() if available.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/icm.c
drivers/thunderbolt/tb_msgs.h