<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/thunderbolt/debugfs.c, 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-08-22T04:32:06+00:00</updated>
<entry>
<title>thunderbolt: Improve software receiver lane margining</title>
<updated>2024-08-22T04:32:06+00:00</updated>
<author>
<name>R Kannappan</name>
<email>r.kannappan@intel.com</email>
</author>
<published>2024-07-19T18:37:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10904df3f20cf36e418e78ab73c2fbcecda512b8'/>
<id>urn:sha1:10904df3f20cf36e418e78ab73c2fbcecda512b8</id>
<content type='text'>
USB4 specification defines the metadata needed to perform software
margining, as well as the necessary steps which include waiting for
dwell time.

- Add dwell_time attribute to set the wait time while performing
  margining and checking for link errors.
- Add error_counter attribute to configure error counter prior to
  margining test.
- Add voltage_time_offset attribute to set the voltage or time offset
  steps before performing the software margining test.
- Perform software margining test for dwell duration, break if there are
  link errors, stop the clocks and provide results.

Below is a minimalistic example how this can be used. Note these values
are just examples. The exact values in practice depend on host specific
capabilities and the type of measurement to be performed.

  # cd /sys/kernel/debug/thunderbolt/ROUTER/portX/margining/
  # echo software &gt; mode
  # echo 400 &gt; dwell_time
  # echo 1 &gt; run

As usual the results attribute contains the results of a succesfull run.

Signed-off-by: R Kannappan &lt;r.kannappan@intel.com&gt;
Co-developed-by: Rene Sapiens &lt;rene.sapiens@intel.com&gt;
Signed-off-by: Rene Sapiens &lt;rene.sapiens@intel.com&gt;
Co-developed-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Signed-off-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add optional voltage offset range for receiver lane margining</title>
<updated>2024-08-22T04:32:06+00:00</updated>
<author>
<name>Rene Sapiens</name>
<email>rene.sapiens@intel.com</email>
</author>
<published>2024-07-19T18:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9fafd46b39d140b7359b77e5fcc4c3130788df42'/>
<id>urn:sha1:9fafd46b39d140b7359b77e5fcc4c3130788df42</id>
<content type='text'>
Add optional extended voltage offset range support for software and
hardware margining as defined by the USB4 specification.

If supported, it can be enabled like below:

 # cd /sys/kernel/debug/thunderbolt/ROUTER/portX/margining/
 # echo Y &gt; optional_voltage_offset

Signed-off-by: Rene Sapiens &lt;rene.sapiens@intel.com&gt;
Co-developed-by: R Kannappan &lt;r.kannappan@intel.com&gt;
Signed-off-by: R Kannappan &lt;r.kannappan@intel.com&gt;
Co-developed-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Signed-off-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Consolidate margining parameters into a structure</title>
<updated>2024-08-22T04:32:06+00:00</updated>
<author>
<name>Rene Sapiens</name>
<email>rene.sapiens@intel.com</email>
</author>
<published>2024-07-19T18:37:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=81f848d28787b1f98f0526345c8f45f6dc1baf9e'/>
<id>urn:sha1:81f848d28787b1f98f0526345c8f45f6dc1baf9e</id>
<content type='text'>
Consolidate the hardware and software margining parameters into a single
structure to reduce the number of parameters passed to the margining
functions.

Signed-off-by: Rene Sapiens &lt;rene.sapiens@intel.com&gt;
Co-developed-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Signed-off-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add missing usb4_port_sb_read() to usb4_port_sw_margin()</title>
<updated>2024-08-22T04:32:06+00:00</updated>
<author>
<name>Aapo Vienamo</name>
<email>aapo.vienamo@linux.intel.com</email>
</author>
<published>2024-07-19T18:37:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24edc397047180210ace0da60577b4a3e3d2af39'/>
<id>urn:sha1:24edc397047180210ace0da60577b4a3e3d2af39</id>
<content type='text'>
Synchronize the operation completion by reading back the software
margining operation completion metadata into margining-&gt;results.

Signed-off-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Co-developed-by: R Kannappan &lt;r.kannappan@intel.com&gt;
Signed-off-by: R Kannappan &lt;r.kannappan@intel.com&gt;
Co-developed-by: Rene Sapiens &lt;rene.sapiens@intel.com&gt;
Signed-off-by: Rene Sapiens &lt;rene.sapiens@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Fix memory leaks in {port|retimer}_sb_regs_write()</title>
<updated>2024-08-02T06:59:51+00:00</updated>
<author>
<name>Aapo Vienamo</name>
<email>aapo.vienamo@linux.intel.com</email>
</author>
<published>2024-06-20T10:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab3de2c7ec91db6a3cf5fc07765852c81ca7d6ef'/>
<id>urn:sha1:ab3de2c7ec91db6a3cf5fc07765852c81ca7d6ef</id>
<content type='text'>
Add missing free_page() call for the memory allocated by
validate_and_copy_from_user().

Fixes: 6d241fa00159 ("thunderbolt: Add sideband register access to debugfs")
Signed-off-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: debugfs: Use FIELD_GET()</title>
<updated>2024-06-19T04:30:20+00:00</updated>
<author>
<name>Aapo Vienamo</name>
<email>aapo.vienamo@linux.intel.com</email>
</author>
<published>2024-05-21T08:02:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49056c95df448c1fa870c8688f34e5d1abffb154'/>
<id>urn:sha1:49056c95df448c1fa870c8688f34e5d1abffb154</id>
<content type='text'>
Use the FIELD_GET() macro instead of open coding the masks and shifts.
This makes the code more compact and improves readability as it avoids
the need to wrap excessively long lines.

Signed-off-by: Aapo Vienamo &lt;aapo.vienamo@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add receiver lane margining support for retimers</title>
<updated>2024-06-17T09:47:12+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-03-21T09:40:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff6ab055e070d819f51196622e08f8941b6d2a4b'/>
<id>urn:sha1:ff6ab055e070d819f51196622e08f8941b6d2a4b</id>
<content type='text'>
Retimers support lane margining as well so make this available through
debugfs in the same way as we do for the USB4 ports. When this is
enabled we also expose retimers on the other side of the cable because
typically margining is implemented only on direction towards the cable.
However, for the retimers on the other side of the cable we do not allow
NVM upgrade to avoid confusing the existing userspace (the same retimer
may now appear twice with different name) and is probably not a good
idea anyway.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Make margining functions accept target and retimer index</title>
<updated>2024-06-17T09:47:12+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-03-21T08:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0890fc36c70c8d5e80dc128c3a9d7a9122646869'/>
<id>urn:sha1:0890fc36c70c8d5e80dc128c3a9d7a9122646869</id>
<content type='text'>
In order to add lane margining support for retimers make the margining
functions take sideband target and retimer index as parameters. This
makes it possible to access both router and retimer sideband using the
same functions.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Split out margining from USB4 port</title>
<updated>2024-06-17T09:47:11+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-03-14T16:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec6f888ed08aeceaebfdd7d344ae0cd91a1b9a1b'/>
<id>urn:sha1:ec6f888ed08aeceaebfdd7d344ae0cd91a1b9a1b</id>
<content type='text'>
We are going to expand lane margining support for retimers too so split
out the generic margining functionality out of being specific to USB4
ports.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add sideband register access to debugfs</title>
<updated>2024-06-17T09:47:11+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-03-20T11:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d241fa0015969a8c8a185e9245b53e9fb681285'/>
<id>urn:sha1:6d241fa0015969a8c8a185e9245b53e9fb681285</id>
<content type='text'>
This makes it possible to read and write USB4 port and retimer sideband
registers through debugfs which is useful for debugging and manufacturing
purposes. We add "sb_regs" debugfs attribute under each USB4 port and
retimer that is used to access the sideband.

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