Commit 79160a60 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB / Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt patches for 5.14-rc1.

  Nothing major here just lots of little changes for new hardware and
  features. Highlights are:

   - more USB 4 support added to the thunderbolt core

   - build warning fixes all over the place

   - usb-serial driver updates and new device support

   - mtu3 driver updates

   - gadget driver updates

   - dwc3 driver updates

   - dwc2 driver updates

   - isp1760 host driver updates

   - musb driver updates

   - lots of other tiny things.

  Full details are in the shortlog.

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

* tag 'usb-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (223 commits)
  phy: qcom-qusb2: Add configuration for SM4250 and SM6115
  dt-bindings: phy: qcom,qusb2: document sm4250/6115 compatible
  dt-bindings: usb: qcom,dwc3: Add bindings for sm6115/4250
  USB: cdc-acm: blacklist Heimann USB Appset device
  usb: xhci-mtk: allow multiple Start-Split in a microframe
  usb: ftdi-elan: remove redundant continue statement in a while-loop
  usb: class: cdc-wdm: return the correct errno code
  xhci: remove redundant continue statement
  usb: dwc3: Fix debugfs creation flow
  usb: gadget: hid: fix error return code in hid_bind()
  usb: gadget: eem: fix echo command packet response issue
  usb: gadget: f_hid: fix endianness issue with descriptors
  Revert "USB: misc: Add onboard_usb_hub driver"
  Revert "of/platform: Add stubs for of_platform_device_create/destroy()"
  Revert "usb: host: xhci-plat: Create platform device for onboard hubs in probe()"
  Revert "arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub"
  xhci: solve a double free problem while doing s4
  xhci: handle failed buffer copy to URB sg list and fix a W=1 copiler warning
  xhci: Add adaptive interrupt rate for isoch TRBs with XHCI_AVOID_BEI quirk
  xhci: Remove unused defines for ERST_SIZE and ERST_ENTRIES
  ...
parents c932ed0a 7756f1d6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ Description:
		c_chmask   capture channel mask
		c_srate    capture sampling rate
		c_ssize    capture sample size (bytes)
		c_sync     capture synchronization type (async/adaptive)
		fb_max     maximum extra bandwidth in async mode
		p_chmask   playback channel mask
		p_srate    playback sampling rate
		p_ssize    playback sample size (bytes)
+59 −23
Original line number Diff line number Diff line
@@ -213,12 +213,15 @@ Description: When new NVM image is written to the non-active NVM
		restarted with the new NVM firmware. If the image
		verification fails an error code is returned instead.

		This file will accept writing values "1" or "2"
		This file will accept writing values "1", "2" or "3".

		- Writing "1" will flush the image to the storage
		  area and authenticate the image in one action.
		- Writing "2" will run some basic validation on the image
		  and flush it to the storage area.
		- Writing "3" will authenticate the image that is
		  currently written in the storage area. This is only
		  supported with USB4 devices and retimers.

		When read holds status of the last authentication
		operation if an error occurred during the process. This
@@ -226,6 +229,20 @@ Description: When new NVM image is written to the non-active NVM
		based mailbox before the device is power cycled. Writing
		0 here clears the status.

What:		/sys/bus/thunderbolt/devices/.../nvm_authenticate_on_disconnect
Date:		Oct 2020
KernelVersion:	v5.9
Contact:	Mario Limonciello <mario.limonciello@dell.com>
Description:	For supported devices, automatically authenticate the new Thunderbolt
		image when the device is disconnected from the host system.

		This file will accept writing values "1" or "2"

		- Writing "1" will flush the image to the storage
		  area and prepare the device for authentication on disconnect.
		- Writing "2" will run some basic validation on the image
		  and flush it to the storage area.

What:		/sys/bus/thunderbolt/devices/<xdomain>.<service>/key
Date:		Jan 2018
KernelVersion:	4.15
@@ -276,6 +293,39 @@ Contact: thunderbolt-software@lists.01.org
Description:	This contains XDomain service specific settings as
		bitmask. Format: %x

What:		/sys/bus/thunderbolt/devices/usb4_portX/link
Date:		Sep 2021
KernelVersion:	v5.14
Contact:	Mika Westerberg <mika.westerberg@linux.intel.com>
Description:	Returns the current link mode. Possible values are
		"usb4", "tbt" and "none".

What:		/sys/bus/thunderbolt/devices/usb4_portX/offline
Date:		Sep 2021
KernelVersion:	v5.14
Contact:	Rajmohan Mani <rajmohan.mani@intel.com>
Description:	Writing 1 to this attribute puts the USB4 port into
		offline mode. Only allowed when there is nothing
		connected to the port (link attribute returns "none").
		Once the port is in offline mode it does not receive any
		hotplug events. This is used to update NVM firmware of
		on-board retimers. Writing 0 puts the port back to
		online mode.

		This attribute is only visible if the platform supports
		powering on retimers when there is no cable connected.

What:		/sys/bus/thunderbolt/devices/usb4_portX/rescan
Date:		Sep 2021
KernelVersion:	v5.14
Contact:	Rajmohan Mani <rajmohan.mani@intel.com>
Description:	When the USB4 port is in offline mode writing 1 to this
		attribute forces rescan of the sideband for on-board
		retimers. Each retimer appear under the USB4 port as if
		the USB4 link was up. These retimers act in the same way
		as if the cable was connected so upgrading their NVM
		firmware can be done the usual way.

What:		/sys/bus/thunderbolt/devices/<device>:<port>.<index>/device
Date:		Oct 2020
KernelVersion:	v5.9
@@ -308,17 +358,3 @@ Date: Oct 2020
KernelVersion:	v5.9
Contact:	Mika Westerberg <mika.westerberg@linux.intel.com>
Description:	Retimer vendor identifier read from the hardware.

What:		/sys/bus/thunderbolt/devices/.../nvm_authenticate_on_disconnect
Date:		Oct 2020
KernelVersion:	v5.9
Contact:	Mario Limonciello <mario.limonciello@dell.com>
Description:	For supported devices, automatically authenticate the new Thunderbolt
		image when the device is disconnected from the host system.

		This file will accept writing values "1" or "2"

		- Writing "1" will flush the image to the storage
		  area and prepare the device for authentication on disconnect.
		- Writing "2" will run some basic validation on the image
		  and flush it to the storage area.
+0 −11
Original line number Diff line number Diff line
@@ -154,17 +154,6 @@ Description:
		files hold a string value (enable or disable) indicating whether
		or not USB3 hardware LPM U1 or U2 is enabled for the device.

What:		/sys/bus/usb/devices/.../removable
Date:		February 2012
Contact:	Matthew Garrett <mjg@redhat.com>
Description:
		Some information about whether a given USB device is
		physically fixed to the platform can be inferred from a
		combination of hub descriptor bits and platform-specific data
		such as ACPI. This file will read either "removable" or
		"fixed" if the information is available, and "unknown"
		otherwise.

What:		/sys/bus/usb/devices/.../ltm_capable
Date:		July 2012
Contact:	Sarah Sharp <sarah.a.sharp@linux.intel.com>
+18 −0
Original line number Diff line number Diff line
What:		/sys/devices/.../removable
Date:		May 2021
Contact:	Rajat Jain <rajatxjain@gmail.com>
Description:
		Information about whether a given device can be removed from the
		platform by the	user. This is determined by its subsystem in a
		bus / platform-specific way. This attribute is only present for
		devices that can support determining such information:

		"removable": device can be removed from the platform by the user
		"fixed":     device is fixed to the platform / cannot be removed
			     by the user.
		"unknown":   The information is unavailable / cannot be deduced.

		Currently this is only supported by USB (which infers the
		information from a combination of hub descriptor bits and
		platform-specific data such as ACPI) and PCI (which gets this
		from ACPI / device tree).
+29 −0
Original line number Diff line number Diff line
@@ -256,6 +256,35 @@ Note names of the NVMem devices ``nvm_activeN`` and ``nvm_non_activeN``
depend on the order they are registered in the NVMem subsystem. N in
the name is the identifier added by the NVMem subsystem.

Upgrading on-board retimer NVM when there is no cable connected
---------------------------------------------------------------
If the platform supports, it may be possible to upgrade the retimer NVM
firmware even when there is nothing connected to the USB4
ports. When this is the case the ``usb4_portX`` devices have two special
attributes: ``offline`` and ``rescan``. The way to upgrade the firmware
is to first put the USB4 port into offline mode::

  # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/offline

This step makes sure the port does not respond to any hotplug events,
and also ensures the retimers are powered on. The next step is to scan
for the retimers::

  # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/rescan

This enumerates and adds the on-board retimers. Now retimer NVM can be
upgraded in the same way than with cable connected (see previous
section). However, the retimer is not disconnected as we are offline
mode) so after writing ``1`` to ``nvm_authenticate`` one should wait for
5 or more seconds before running rescan again::

  # echo 1 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/rescan

This point if everything went fine, the port can be put back to
functional state again::

  # echo 0 > /sys/bus/thunderbolt/devices/0-0/usb4_port1/offline

Upgrading NVM when host controller is in safe mode
--------------------------------------------------
If the existing NVM is not properly authenticated (or is missing) the
Loading