<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/thunderbolt/switch.c, branch v5.15.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-08-24T13:31:33+00:00</updated>
<entry>
<title>Merge tag 'thunderbolt-for-v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next</title>
<updated>2021-08-24T13:31:33+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-08-24T13:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bfa109d761a46d5116f3d4f216152653d8b4815b'/>
<id>urn:sha1:bfa109d761a46d5116f3d4f216152653d8b4815b</id>
<content type='text'>
Mika writes:

thunderbolt: Changes for v5.15 merge window

This includes following Thunderbolt/USB4 changes for the v5.15 merge
window:

  * Include authorized value in the KOBJ_CHANGE event of a device router
  * A couple of improvements to get the driver working also with the AMD
    USB4 host controller.

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

* tag 'thunderbolt-for-v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: Fix port linking by checking all adapters
  thunderbolt: Do not read control adapter config space
  thunderbolt: Handle ring interrupt by reading interrupt status register
  thunderbolt: Add vendor specific NHI quirk for auto-clearing interrupt status
  thunderbolt: Add authorized value to the KOBJ_CHANGE uevent
</content>
</entry>
<entry>
<title>thunderbolt: Fix port linking by checking all adapters</title>
<updated>2021-08-09T11:58:29+00:00</updated>
<author>
<name>Sanjay R Mehta</name>
<email>sanju.mehta@amd.com</email>
</author>
<published>2021-08-03T12:34:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42716425ad7e1b6529ec61c260c11176841f4b5f'/>
<id>urn:sha1:42716425ad7e1b6529ec61c260c11176841f4b5f</id>
<content type='text'>
In tb_switch_default_link_ports(), while linking of ports,
only odd-numbered ports (1,3,5..) are considered and even-numbered
ports are not considered.

AMD host router has lane adapters at 2 and 3 and link ports at adapter 2
is not considered due to which lane bonding gets disabled.

Hence added a fix such that all ports are considered during
linking of ports.

Signed-off-by: Basavaraj Natikar &lt;Basavaraj.Natikar@amd.com&gt;
Signed-off-by: Sanjay R Mehta &lt;sanju.mehta@amd.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Do not read control adapter config space</title>
<updated>2021-08-09T11:58:29+00:00</updated>
<author>
<name>Sanjay R Mehta</name>
<email>sanju.mehta@amd.com</email>
</author>
<published>2021-08-03T12:34:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb7a89ad2f048489605611801d480c7bb9d03f94'/>
<id>urn:sha1:fb7a89ad2f048489605611801d480c7bb9d03f94</id>
<content type='text'>
Adapter 0 is the control adapter and as per USB4 spec in section 2.2.6.2
control Adapters do not have an adapter configuration space.

For this reason skip reading adapter config space in tb_port_init() when
the port number is 0. This actually simplifies the rest of the function
as we don't need to check for the port-&gt;port == 0 anymore.

While there drop the extra empty line at the end of the function.

Signed-off-by: Basavaraj Natikar &lt;Basavaraj.Natikar@amd.com&gt;
Signed-off-by: Sanjay R Mehta &lt;sanju.mehta@amd.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add authorized value to the KOBJ_CHANGE uevent</title>
<updated>2021-08-02T15:03:36+00:00</updated>
<author>
<name>Rajat Jain</name>
<email>rajatja@google.com</email>
</author>
<published>2021-07-30T23:53:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1651d9e7810e79500b4940122e192b8aaeb2d63c'/>
<id>urn:sha1:1651d9e7810e79500b4940122e192b8aaeb2d63c</id>
<content type='text'>
For security reasons, we would like to monitor and track when the
Thunderbolt devices are authorized and deauthorized (i.e. when the
Thunderbolt sysfs "authorized" attribute changes). Currently the
userspace gets a udev change notification when there is a change, but
the state may have changed (again) by the time we look at the authorized
attribute in sysfs. So an authorization event may go unnoticed. Thus
make it easier by informing the actual change (new value of authorized
attribute) in the udev change notification.

The change is included as a key value "authorized=&lt;val&gt;" where &lt;val&gt;
is the new value of sysfs attribute "authorized", and is described at
Documentation/ABI/testing/sysfs-bus-thunderbolt under
/sys/bus/thunderbolt/devices/.../authorized.

Signed-off-by: Rajat Jain &lt;rajatja@google.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels"</title>
<updated>2021-07-27T16:14:25+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2021-07-27T14:25:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e3341257e3b5774ec8cd3ef1ba0c0d3fada322b'/>
<id>urn:sha1:8e3341257e3b5774ec8cd3ef1ba0c0d3fada322b</id>
<content type='text'>
This reverts commit 6f3badead6a078cf3c71f381f9d84ac922984a00.

It turns out bolt depends on having authorized attribute visible under
each device. Hiding it makes bolt crash as several people have reported
on various bug trackers. For this reason revert the commit.

Link: https://gitlab.freedesktop.org/bolt/bolt/-/issues/174
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1979765
Link: https://bugs.archlinux.org/task/71569
Cc: stable@vger.kernel.org
Cc: Christian Kellner &lt;ckellner@redhat.com&gt;
Fixes: 6f3badead6a0 ("thunderbolt: Hide authorized attribute if router does not support PCIe tunnels")
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210727142501.27476-1-mika.westerberg@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Allow router NVM authenticate separately</title>
<updated>2021-06-01T07:53:32+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2021-04-12T12:25:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1cbf680f7687f55ae5a1405556519bc70d66a616'/>
<id>urn:sha1:1cbf680f7687f55ae5a1405556519bc70d66a616</id>
<content type='text'>
It may be useful if the actual NVM authentication can be delayed to be
run later, for instance when the user logs out. For this reason add a
new NVM operation (AUHENTICATE_ONLY) that just triggers the authentication
procedure over whatever was written to the NVM storage.

This is not supported with Thunderbolt 1-3 devices, though.

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: Move nvm_write_ops to tb.h</title>
<updated>2021-06-01T07:53:32+00:00</updated>
<author>
<name>Rajmohan Mani</name>
<email>rajmohan.mani@intel.com</email>
</author>
<published>2021-04-12T11:01:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff3a8306456755689babc7bcc29c60e582738c7b'/>
<id>urn:sha1:ff3a8306456755689babc7bcc29c60e582738c7b</id>
<content type='text'>
Currently these write ops are used for updating router firmware images
only. Moving to tb.h helps the retimers also to use the same ops.

Also add tb_ prefix to the enum while there.

Signed-off-by: Rajmohan Mani &lt;rajmohan.mani@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: Add support for retimer NVM upgrade when there is no link</title>
<updated>2021-06-01T07:53:31+00:00</updated>
<author>
<name>Rajmohan Mani</name>
<email>rajmohan.mani@intel.com</email>
</author>
<published>2021-04-01T15:42:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3fb10ea4ce86d4d06622be894099c59872e92c57'/>
<id>urn:sha1:3fb10ea4ce86d4d06622be894099c59872e92c57</id>
<content type='text'>
With help from platform firmware (ACPI) it is possible to power on
retimers even when there is no USB4 link (e.g nothing is connected to
the USB4 ports). This allows us to bring the USB4 sideband up so that we
can access retimers and upgrade their NVM firmware.

If the platform has support for this, we expose two additional
attributes under USB4 ports: offline and rescan. These can be used to
bring the port offline, rescan for the retimers and put the port online
again. The retimer NVM upgrade itself works the same way than with cable
connected.

Signed-off-by: Rajmohan Mani &lt;rajmohan.mani@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;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@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: Update port credits after bonding is enabled/disabled</title>
<updated>2021-06-01T07:48:59+00:00</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2021-03-22T15:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69fea377e660dcd2f5ab3097b9bd5ed29cfac1fa'/>
<id>urn:sha1:69fea377e660dcd2f5ab3097b9bd5ed29cfac1fa</id>
<content type='text'>
Once lane bonding has been enabled (or disabled) both lane adapters may
update their total credits accordingly. For this reason re-read the port
credits after lane bonding has been enabled or disabled.

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