<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/thunderbolt/Makefile, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-02-26T07:12:24+00:00</updated>
<entry>
<title>thunderbolt: Add trace events support for the control channel</title>
<updated>2024-02-26T07:12:24+00:00</updated>
<author>
<name>Gil Fine</name>
<email>gil.fine@linux.intel.com</email>
</author>
<published>2023-02-12T22:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0c45b0b6ce23bc1cd6737ecd34df6c4a422a3ae'/>
<id>urn:sha1:a0c45b0b6ce23bc1cd6737ecd34df6c4a422a3ae</id>
<content type='text'>
Sometimes it is useful to see the traffic happening inside the control
channel, especially when debugging a possible problem. This adds
tracepoints close to the hardware which can be enabled dynamically as
needed using the standard Linux trace events facility.

Signed-off-by: Gil Fine &lt;gil.fine@linux.intel.com&gt;
Co-developed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Move CLx support functions into clx.c</title>
<updated>2023-06-09T09:07:23+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2022-10-07T15:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12a14f2fca32332d065b64f6f654fa332c90475e'/>
<id>urn:sha1:12a14f2fca32332d065b64f6f654fa332c90475e</id>
<content type='text'>
There really don't belong to switch.c so move them into their own file.
As we do this rename the functions to match the conventions used
elsewhere in the driver.

No functional changes.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: build kunit tests without structleak plugin</title>
<updated>2021-10-06T23:53:49+00:00</updated>
<author>
<name>Brendan Higgins</name>
<email>brendanhiggins@google.com</email>
</author>
<published>2021-09-29T21:27:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33d4951e021bb67ebd6bdb01f3d437c0f45b3c0c'/>
<id>urn:sha1:33d4951e021bb67ebd6bdb01f3d437c0f45b3c0c</id>
<content type='text'>
The structleak plugin causes the stack frame size to grow immensely when
used with KUnit:

drivers/thunderbolt/test.c:1529:1: error: the frame size of 1176 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Turn it off in this file.

Linus already split up tests in this file, so this change *should* be
redundant now.

Signed-off-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add USB4 port devices</title>
<updated>2021-06-01T07:53:31+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2021-04-01T14:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cae5f5151d76635f6b5c08133184c48048346e63'/>
<id>urn:sha1:cae5f5151d76635f6b5c08133184c48048346e63</id>
<content type='text'>
Create devices for each USB4 port. This is needed when we add retimer
access when there is no device connected but may be useful for other
purposes too following what USB subsystem does. This exports a single
attribute "link" that shows the type of the USB4 link (or "none" if
there is no cable connected).

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add DMA traffic test driver</title>
<updated>2020-11-11T07:20:16+00:00</updated>
<author>
<name>Isaac Hazan</name>
<email>isaac.hazan@intel.com</email>
</author>
<published>2020-09-24T08:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=edc0f494ed966e39e5619be7cdaeb9873e1f4fe1'/>
<id>urn:sha1:edc0f494ed966e39e5619be7cdaeb9873e1f4fe1</id>
<content type='text'>
This driver allows sending DMA traffic over XDomain connection.
Specifically over a loopback connection using either a Thunderbolt/USB4
cable that is connected back to the host router port, or a special
loopback dongle that has RX and TX lines crossed. This can be useful at
manufacturing floor to check whether Thunderbolt/USB4 ports are
functional.

The driver exposes debugfs directory under the XDomain service that can
be used to configure the driver, start the test and check the results.

If a loopback dongle is used the steps to send and receive 1000 packets
can be done like:

  # modprobe thunderbolt_dma_test
  # echo 1000 &gt; /sys/kernel/debug/thunderbolt/&lt;service_id&gt;/dma_test/packets_to_receive
  # echo 1000 &gt; /sys/kernel/debug/thunderbolt/&lt;service_id&gt;/dma_test/packets_to_send
  # echo 1 &gt; /sys/kernel/debug/thunderbolt/&lt;service_id&gt;/dma_test/test
  # cat /sys/kernel/debug/thunderbolt/&lt;service_id&gt;/dma_test/status

When a cable is connected back to host then there are two Thunderbolt
services, one is configured for receiving (does not matter which one):

  # modprobe thunderbolt_dma_test
  # echo 1000 &gt; /sys/kernel/debug/thunderbolt/&lt;service_a&gt;/dma_test/packets_to_receive
  # echo 1 &gt; /sys/kernel/debug/thunderbolt/&lt;service_a&gt;/dma_test/test

The other one for sending:

  # echo 1000 &gt; /sys/kernel/debug/thunderbolt/&lt;service_b&gt;/dma_test/packets_to_send
  # echo 1 &gt; /sys/kernel/debug/thunderbolt/&lt;service_b&gt;/dma_test/test

Results can be read from both services status attributes.

Signed-off-by: Isaac Hazan &lt;isaac.hazan@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Allow KUnit tests to be built also when CONFIG_USB4=m</title>
<updated>2020-09-16T11:57:46+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2020-08-24T09:46:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c6ea4e2cefe2e86af782a5b8e1070f4d434f2f2'/>
<id>urn:sha1:2c6ea4e2cefe2e86af782a5b8e1070f4d434f2f2</id>
<content type='text'>
This adds a bit more build coverage for the tests even though these are
not expected to be enabled by normal users and distros. In order to make
this working we need to open-code kunit_test_suite() and call the
relevant functions directly in the driver init/exit hook.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add debugfs interface</title>
<updated>2020-09-03T09:21:08+00:00</updated>
<author>
<name>Gil Fine</name>
<email>gil.fine@intel.com</email>
</author>
<published>2020-06-29T17:30:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54e418106c765c5f3c378c770b0f8518632830da'/>
<id>urn:sha1:54e418106c765c5f3c378c770b0f8518632830da</id>
<content type='text'>
This adds debugfs interface that can be used for debugging possible
issues in hardware/software. It exposes router and adapter config spaces
through files like this:

  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/path
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT1&gt;/counters
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/regs
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/path
  /sys/kernel/debug/thunderbolt/&lt;DEVICE&gt;/&lt;PORT2&gt;/counters
  ...

The "regs" is either the router or port configuration space register
dump. The "path" is the port path configuration space and "counters" is
the optional counters configuration space.

These files contains one register per line so it should be easy to use
normal filtering tools to find the registers of interest if needed.

The router and adapter regs file becomes writable when
CONFIG_USB4_DEBUGFS_WRITE is enabled (which is not supposed to be done
in production systems) and in this case the developer can write "offset
value" lines there to modify the hardware directly. For convenience this
also supports the long format the read side produces (but ignores the
additional fields). The counters file can be written even when
CONFIG_USB4_DEBUGFS_WRITE is not enabled and it is only used to clear
the counter values.

Signed-off-by: Gil Fine &lt;gil.fine@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Create device links from ACPI description</title>
<updated>2020-09-03T09:06:42+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2019-04-02T12:26:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b2be2b05cf3b1c7b499d3b05decdcc524879fea7'/>
<id>urn:sha1:b2be2b05cf3b1c7b499d3b05decdcc524879fea7</id>
<content type='text'>
The new way to describe relationship between tunneled ports and USB4 NHI
(Native Host Interface) is with ACPI _DSD looking like below for a PCIe
downstream port:

    Scope (\_SB.PCI0)
    {
        Device (NHI0) { } // Thunderbolt NHI

        Device (DSB0) // Hotplug downstream port
        {
            Name (_DSD, Package () {
                ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
                Package () {
                    Package () {"usb4-host-interface", \_SB.PCI0.NHI0},
                    ...
                }
            })
        }
    }

This is "documented" in these [1] USB-IF slides and being used on
systems that ship with Windows.

The _DSD can be added to tunneled USB3 and PCIe ports, and is needed to
make sure the USB4 NHI is resumed before any of the tunneled ports so
the protocol tunnels get established properly before the actual port
itself is resumed. Othwerwise the USB/PCI core find the link may not be
established and starts tearing down the device stack.

This parses the ACPI description each time NHI is probed and tries to
find devices that has the property and it references the NHI in
question. For each matching device a device link from that device to the
NHI is created.

Since USB3 ports themselves do not get runtime suspended with the parent
device (hub) we do not add the link from the USB3 port to USB4 NHI but
instead we add the link from the xHCI device. This makes the device link
usable for runtime PM as well.

[1] https://www.usb.org/sites/default/files/D1T2-2%20-%20USB4%20on%20Windows.pdf

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add support for authenticate on disconnect</title>
<updated>2020-07-01T10:51:49+00:00</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@dell.com</email>
</author>
<published>2020-06-23T16:14:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1cb36293833766e048cba2026dd860687a2851d9'/>
<id>urn:sha1:1cb36293833766e048cba2026dd860687a2851d9</id>
<content type='text'>
Some external devices can support completing thunderbolt authentication
when they are unplugged. For this to work though, the link controller must
remain operational.

The only device known to support this right now is the Dell WD19TB, so add
a quirk for this.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@dell.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add support for on-board retimers</title>
<updated>2020-06-22T16:58:32+00:00</updated>
<author>
<name>Kranthi Kuntala</name>
<email>kranthi.kuntala@intel.com</email>
</author>
<published>2020-03-05T14:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dacb12877d9222e0281b8391e3361fd4c7a7435a'/>
<id>urn:sha1:dacb12877d9222e0281b8391e3361fd4c7a7435a</id>
<content type='text'>
USB4 spec specifies standard access to retimers (both on-board and
cable) through USB4 port sideband access. This makes it possible to
upgrade their firmware in the same way than we already do with the
routers.

This enumerates on-board retimers under each USB4 port when the link
comes up and adds them to the bus under the router the retimer belongs
to. Retimers are exposed in sysfs with name like &lt;device&gt;:&lt;port&gt;.&lt;index&gt;
where device is the router the retimer belongs to, port is the USB4 port
the retimer is connected to and index is the retimer index under that
port (starting from 1). This applies to the upstream USB4 port as well
so if there is on-board retimer between the port and the router it is
also added accordingly.

At this time we do not add cable retimers but there is no techincal
restriction to do so in the future if needed. It is not clear whether it
makes sense to upgrade their firmwares and at least Thunderbolt 3 cables
it has not been done outside of lab environments.

The sysfs interface is made to follow the router NVM upgrade to make it
easy to extend the existing userspace (fwupd) to handle these as well.

Signed-off-by: Kranthi Kuntala &lt;kranthi.kuntala@intel.com&gt;
Co-developed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
</feed>
