<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/thunderbolt, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-05-31T07:37:21Z</updated>
<entry>
<title>thunderbolt: Mask ring interrupt on Intel hardware as well</title>
<updated>2023-05-31T07:37:21Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-05-30T05:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f9666e65359d5047089aef97ac87c50f624ecb0'/>
<id>urn:sha1:9f9666e65359d5047089aef97ac87c50f624ecb0</id>
<content type='text'>
When resuming from system sleep states the driver issues following
warning on Intel hardware:

  thunderbolt 0000:07:00.0: interrupt for TX ring 0 is already enabled

The reason for this is that the commit in question did not mask the ring
interrupt on Intel hardware leaving the interrupt active. Fix this by
masking it also in Intel hardware.

Reported-by: beld zhang &lt;beldzhang@gmail.com&gt;
Tested-by: beld zhang &lt;beldzhang@gmail.com&gt;
Closes: https://lore.kernel.org/linux-usb/ZHKW5NeabmfhgLbY@debian.me/
Fixes: c4af8e3fecd0 ("thunderbolt: Clear registers properly when auto clear isn't in use")
Cc: stable@vger.kernel.org
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Do not touch CL state configuration during discovery</title>
<updated>2023-05-29T09:49:16Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-05-24T10:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fe95742af29b8b4eccab2ba94bc521805c6e10c'/>
<id>urn:sha1:3fe95742af29b8b4eccab2ba94bc521805c6e10c</id>
<content type='text'>
If the boot firmware has already established tunnels, especially ones
that have special requirements from the link such as DisplayPort, we
should not blindly enable CL states (nor change the TMU configuration).
Otherwise the existing tunnels may not work as expected.

For this reason, skip the CL state enabling when we go over the existing
topology. This will also keep the TMU settings untouched because we do
not change the TMU configuration when CL states are not enabled.

Reported-by: Koba Ko &lt;koba.ko@canonical.com&gt;
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7831
Cc: stable@vger.kernel.org # v6.0+
Acked-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: Increase DisplayPort Connection Manager handshake timeout</title>
<updated>2023-05-29T09:49:00Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-05-24T07:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6d572aeb58a5e0be86bd51ea514c4feba996cc4'/>
<id>urn:sha1:b6d572aeb58a5e0be86bd51ea514c4feba996cc4</id>
<content type='text'>
It turns out that when plugging in VGA cable through USB-C to VGA/DVI
dongle the Connection Manager handshake can take longer time, at least
on Intel Titan Ridge based docks such as Dell WD91TB. This leads to
following error in the dmesg:

  thunderbolt 0000:00:0d.3: 3:10: DP tunnel activation failed, aborting

and the display stays blank (because we failed to establish the tunnel).
For this reason increase the timeout to 3s.

Reported-by: Koba Ko &lt;koba.ko@canonical.com&gt;
Cc: stable@vger.kernel.org
Acked-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: dma_test: Use correct value for absent rings when creating paths</title>
<updated>2023-05-22T05:57:50Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2023-03-29T10:23:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70c2e03e9aaf17496c63f6e42333c012f5ae5307'/>
<id>urn:sha1:70c2e03e9aaf17496c63f6e42333c012f5ae5307</id>
<content type='text'>
Both tb_xdomain_enable_paths() and tb_xdomain_disable_paths() expect -1,
not 0, if the corresponding ring is not needed. For this reason change
the driver to use correct value for the rings that are not needed.

Fixes: 180b0689425c ("thunderbolt: Allow multiple DMA tunnels over a single XDomain connection")
Cc: stable@vger.kernel.org
Reported-by: Pengfei Xu &lt;pengfei.xu@intel.com&gt;
Tested-by: Pengfei Xu &lt;pengfei.xu@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Clear registers properly when auto clear isn't in use</title>
<updated>2023-05-09T06:39:03Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2023-04-24T19:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4af8e3fecd03b0aedcd38145955605cfebe7e3a'/>
<id>urn:sha1:c4af8e3fecd03b0aedcd38145955605cfebe7e3a</id>
<content type='text'>
When `QUIRK_AUTO_CLEAR_INT` isn't set, interrupt masking should be
cleared by writing to Interrupt Mask Clear (IMR) and interrupt
status should be cleared properly at shutdown/init.

This fixes an error where interrupts are left enabled during resume
from hibernation with `CONFIG_USB4=y`.

Fixes: 468c49f44759 ("thunderbolt: Disable interrupt auto clear for rings")
Cc: stable@vger.kernel.org # v6.3
Reported-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217343
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'thunderbolt-for-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next</title>
<updated>2023-04-19T09:42:44Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-04-19T09:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ced7c981f382fc34b941ee3b861d49bdd9180af4'/>
<id>urn:sha1:ced7c981f382fc34b941ee3b861d49bdd9180af4</id>
<content type='text'>
Mika writes:

thunderbolt: Changes for v6.4 merge window

This includes following Thunderbolt/USB4 changes for the v6.4 merge
window:

  - Refactoring of DROM read code paths
  - Convert to use SI units from units.h
  - A couple of cleanups

All these have been in linux-next with no reported issues.

* tag 'thunderbolt-for-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: Introduce usb4_port_sb_opcode_err_to_errno() helper
  thunderbolt: Make use of SI units from units.h
  thunderbolt: Get rid of redundant 'else'
  thunderbolt: Refactor DROM reading
  thunderbolt: use `tb_eeprom_get_drom_offset` to discover DROM offset
</content>
</entry>
<entry>
<title>thunderbolt: Introduce usb4_port_sb_opcode_err_to_errno() helper</title>
<updated>2023-04-03T05:37:18Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-30T10:23:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f15af76784cc902a1fe85e864c7ddf3d74b4130'/>
<id>urn:sha1:1f15af76784cc902a1fe85e864c7ddf3d74b4130</id>
<content type='text'>
The usb4_port_sb_opcode_err_to_errno() converts from USB4 error codes
to the Linux errno space. In particular, this makes the intention
of the repeating usb4_port_retimer_read() call in the
usb4_port_retimer_nvm_authenticate_status() clearer.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Make use of SI units from units.h</title>
<updated>2023-03-29T08:05:05Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-27T17:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d88366807fce55ab5bd1bf94055e1d1d0032604'/>
<id>urn:sha1:5d88366807fce55ab5bd1bf94055e1d1d0032604</id>
<content type='text'>
In a couple of places it seems reasonable to use MEGA intead
of explicit number. It makes code more readable and robust.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Get rid of redundant 'else'</title>
<updated>2023-03-29T08:05:05Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-27T17:20:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e99c98e3071bd7fd4d7f20440f1a5c3bf533149'/>
<id>urn:sha1:4e99c98e3071bd7fd4d7f20440f1a5c3bf533149</id>
<content type='text'>
In the snippets like the following

	if (...)
		return / goto / break / continue ...;
	else
		...

the 'else' is redundant. Get rid of it.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Rename shadowed variables bit to interrupt_bit and auto_clear_bit</title>
<updated>2023-03-20T17:00:58Z</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2023-03-15T22:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58cdfe6f58b35f17f56386f5fcf937168a423ad1'/>
<id>urn:sha1:58cdfe6f58b35f17f56386f5fcf937168a423ad1</id>
<content type='text'>
cppcheck reports
drivers/thunderbolt/nhi.c:74:7: style: Local variable 'bit' shadows outer variable [shadowVariable]
  int bit;
      ^
drivers/thunderbolt/nhi.c:66:6: note: Shadowed declaration
 int bit = ring_interrupt_index(ring) &amp; 31;
     ^
drivers/thunderbolt/nhi.c:74:7: note: Shadow variable
  int bit;
      ^
For readablity rename the outer to interrupt_bit and the innner
to auto_clear_bit.

Fixes: 468c49f44759 ("thunderbolt: Disable interrupt auto clear for ring")
Cc: stable@vger.kernel.org
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
</feed>
