<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/thunderbolt/eeprom.c, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-09-09T11:00:56Z</updated>
<entry>
<title>thunderbolt: Retry DROM read once if parsing fails</title>
<updated>2020-09-09T11:00:56Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2020-09-07T09:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f022ff7bf377ca94367be05de61277934d42ea74'/>
<id>urn:sha1:f022ff7bf377ca94367be05de61277934d42ea74</id>
<content type='text'>
Kai-Heng reported that sometimes DROM parsing of ASUS PA27AC Thunderbolt 3
monitor fails. This makes the driver to fail to add the device so only
DisplayPort tunneling is functional.

It is not clear what exactly happens but waiting for 100 ms and retrying
the read seems to work this around so we do that here.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=206493
Reported-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Tested-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add support for authenticate on disconnect</title>
<updated>2020-07-01T10:51:49Z</updated>
<author>
<name>Mario Limonciello</name>
</author>
<published>2020-06-23T16:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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: eeprom: Replace zero-length array with flexible-array member</title>
<updated>2020-02-14T12:07:03Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2020-02-11T23:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2a9fca17e4c021e526cc52b78e0f30105024b82'/>
<id>urn:sha1:c2a9fca17e4c021e526cc52b78e0f30105024b82</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertenly introduced[3] to the codebase from now on.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add initial support for USB4</title>
<updated>2019-12-18T14:38:55Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2019-12-17T12:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b04079837b2094f09e145676eec4b9a56ae8a6aa'/>
<id>urn:sha1:b04079837b2094f09e145676eec4b9a56ae8a6aa</id>
<content type='text'>
USB4 is the public specification based on Thunderbolt 3 protocol. There
are some differences in register layouts and flows. In addition to PCIe
and DP tunneling, USB4 supports tunneling of USB 3.x. USB4 is also
backward compatible with Thunderbolt 3 (and older generations but the
spec only talks about 3rd generation). USB4 compliant devices can be
identified by checking USB4 version field in router configuration space.

This patch adds initial support for USB4 compliant hosts and devices
which enables following features provided by the existing functionality
in the driver:

  - PCIe tunneling
  - Display Port tunneling
  - Host and device NVM firmware upgrade
  - P2P networking

This brings the USB4 support to the same level that we already have for
Thunderbolt 1, 2 and 3 devices.

Note the spec talks about host and device "routers" but in the driver we
still use term "switch" in most places. Both can be used interchangeably.

Co-developed-by: Rajmohan Mani &lt;rajmohan.mani@intel.com&gt;
Signed-off-by: Rajmohan Mani &lt;rajmohan.mani@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20191217123345.31850-5-mika.westerberg@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Call tb_eeprom_get_drom_offset() from tb_eeprom_read_n()</title>
<updated>2019-12-18T14:34:24Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2019-12-17T12:33:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4deb200d34a779aa336ddcd213e39eb6104eb78a'/>
<id>urn:sha1:4deb200d34a779aa336ddcd213e39eb6104eb78a</id>
<content type='text'>
We are going to re-use tb_drom_read() for USB4 DROM reading as well.
USB4 has separate router operations for this which does not need the
drom_offset. Therefore we move call to tb_eeprom_get_drom_offset() into
tb_eeprom_read_n() where it is needed.

While there change return -ENOSYS to -ENODEV because the former is only
supposed to be used with system calls (invalid syscall nr).

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20191217123345.31850-3-mika.westerberg@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add default linking between lane adapters if not provided by DROM</title>
<updated>2019-11-02T09:13:31Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2019-08-26T15:19:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d46c08d1ed4f7bb283c7315824f2bfe2c5e0fa9'/>
<id>urn:sha1:0d46c08d1ed4f7bb283c7315824f2bfe2c5e0fa9</id>
<content type='text'>
We currently read how sibling lane adapter ports relate each other from
DROM (Device ROM). If the two lane adapter ports go through the same
physical connector these lanes can then be bonded together. However,
some cases DROM does not provide this information or it is missing
completely (host routers typically do not have DROM). In this case we
have hard-coded the relationship.

Expand this to work with both legacy devices where lane adapter ports 1
and 2, and 3 and 4 are always linked together, and with USB4 devices
where lane adapter 1 is always following lane adapter 0 or is disabled
completely (see USB4 section 5.2.1 for more information).

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Do not fail adding switch if some port is not implemented</title>
<updated>2019-08-26T09:14:51Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-07-04T05:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d94dcbb10183f3b384c84e65724d2b753aa53c4d'/>
<id>urn:sha1:d94dcbb10183f3b384c84e65724d2b753aa53c4d</id>
<content type='text'>
There are two ways to mark a port as unimplemented. Typical way is to
return port type as TB_TYPE_INACTIVE when its config space is read.
Alternatively if the port is not physically present (such as ports 10
and 11 in ICL) reading from port config space returns
TB_CFG_ERROR_INVALID_CONFIG_SPACE instead. Currently the driver bails
out from adding the switch if it receives any error during port
inititialization which is wrong.

Handle this properly and just leave the port as TB_TYPE_INACTIVE before
continuing to the next port.

This also allows us to get rid of special casing for Light Ridge port 5
in eeprom.c.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
Tested-by: Mario Limonciello &lt;mario.limonciello@dell.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Switch to use device_property_count_uXX()</title>
<updated>2019-08-06T11:45:08Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2019-07-23T19:21:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=100c12f20dfa463d52f9327b71c1806dcde82852'/>
<id>urn:sha1:100c12f20dfa463d52f9327b71c1806dcde82852</id>
<content type='text'>
Use device_property_count_uXX() directly, that makes code neater.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
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: Add Intel as copyright holder</title>
<updated>2018-10-02T22:52:08Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-10-01T09:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15c6784c7cee3b653f127b41340210284dea66f6'/>
<id>urn:sha1:15c6784c7cee3b653f127b41340210284dea66f6</id>
<content type='text'>
Intel has done pretty major changes to the driver and we continue to do
so in the future as well. Add Intel as copyright holder of the files we
have done changes.

While there drop "Cactus Ridge" from the headers because this driver
works also with other Thunderbolt controllers.

No functional changes intended.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Yehezkel Bernat &lt;yehezkelshb@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Make the driver less verbose</title>
<updated>2018-10-02T22:52:08Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2018-10-01T09:31:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=daa5140f7e71f513606c2e4f394b9e8b8d679661'/>
<id>urn:sha1:daa5140f7e71f513606c2e4f394b9e8b8d679661</id>
<content type='text'>
Currently the driver logs quite a lot to the system message buffer even
when doing normal operations. This information is not useful for
ordinary users and might even annoy some.

For this reason convert most of the logs at info level to happen at
debug level instead. The nice output formatting is untouched.

Logging can be easily re-enabled by passing "thunderbolt.dyndbg" in the
kernel command line (or using the corresponding control file runtime).

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Yehezkel Bernat &lt;yehezkelshb@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
