<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/thunderbolt, branch linux-5.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.7.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.7.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2020-07-22T07:34:17Z</updated>
<entry>
<title>thunderbolt: Fix path indices used in USB3 tunnel discovery</title>
<updated>2020-07-22T07:34:17Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2020-04-02T09:45:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=15e17aa0db84835ad5a1f36a82bab831f3db6fc4'/>
<id>urn:sha1:15e17aa0db84835ad5a1f36a82bab831f3db6fc4</id>
<content type='text'>
commit 8b94a4b92327d061327117e127d7d44a4a43e639 upstream.

The USB3 discovery used wrong indices when tunnel is discovered. It
should use TB_USB3_PATH_DOWN for path that flows downstream and
TB_USB3_PATH_UP when it flows upstream. This should not affect the
functionality but better to fix it.

Fixes: e6f818585713 ("thunderbolt: Add support for USB 3.x tunnels")
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Cc: stable@vger.kernel.org # v5.6+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>thunderbolt: Check return value of tb_sw_read() in usb4_switch_op()</title>
<updated>2020-04-28T17:00:59Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2020-04-09T07:18:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c3bf9930921b33edb31909006607e478751a6f5e'/>
<id>urn:sha1:c3bf9930921b33edb31909006607e478751a6f5e</id>
<content type='text'>
The function misses checking return value of tb_sw_read() before it
accesses the value that was read. Fix this by checking the return value
first.

Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4")
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Yehezkel Bernat &lt;yehezkelshb@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.6-rc7 into usb-next</title>
<updated>2020-03-23T07:04:08Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2020-03-23T07:04:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d2e971d884e7b7e65162788b8f3b7801cd8bc137'/>
<id>urn:sha1:d2e971d884e7b7e65162788b8f3b7801cd8bc137</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'thunderbolt-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next</title>
<updated>2020-03-17T18:51:07Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2020-03-17T18:51:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cfe20827fb78fe810e089e703dc96d70010ba798'/>
<id>urn:sha1:cfe20827fb78fe810e089e703dc96d70010ba798</id>
<content type='text'>
Mika writes:

thunderbolt: Changes for v5.7 merge window

- A couple of commits that make the driver to use flexible-array member
  instead of zero-length array extension. This allows compiler to issue a
  warning if the flexible array is not the last member of a structure.

- Use scnprintf() instead of snprintf() to avoid potential buffer
  overflow.

* tag 'thunderbolt-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: Use scnprintf() for avoiding potential buffer overflow
  thunderbolt: icm: Replace zero-length array with flexible-array member
  thunderbolt: eeprom: Replace zero-length array with flexible-array member
</content>
</entry>
<entry>
<title>thunderbolt: Use scnprintf() for avoiding potential buffer overflow</title>
<updated>2020-03-12T08:27:41Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-03-11T09:28:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3010518964dc96c41848a05a5b0ec11ccf8d5ebe'/>
<id>urn:sha1:3010518964dc96c41848a05a5b0ec11ccf8d5ebe</id>
<content type='text'>
Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Fix error code in tb_port_is_width_supported()</title>
<updated>2020-03-04T09:34:17Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-03-03T10:17:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e9d0e7511fda92a6511904996dd0aa57b6d7687a'/>
<id>urn:sha1:e9d0e7511fda92a6511904996dd0aa57b6d7687a</id>
<content type='text'>
This function is type bool, and it's supposed to return true on success.
Unfortunately, this path takes negative error codes and casts them to
bool (true) so it's treated as success instead of failure.

Fixes: 91c0c12080d0 ("thunderbolt: Add support for lane bonding")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge 5.6-rc3 into usb-next</title>
<updated>2020-02-24T07:48:49Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2020-02-24T07:48:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=24e6aea4801bae1dce3b16da6bc64fc06742ac14'/>
<id>urn:sha1:24e6aea4801bae1dce3b16da6bc64fc06742ac14</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add missing kernel-doc parameter descriptions</title>
<updated>2020-02-14T16:38:15Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2020-02-14T12:16:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=21d78d860cd604330dfc373f001a48e548d2c49e'/>
<id>urn:sha1:21d78d860cd604330dfc373f001a48e548d2c49e</id>
<content type='text'>
Two functions that were added for USB4 support miss kernel-doc parameter
descriptions so add them now.

Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200214121638.75589-1-mika.westerberg@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: icm: Replace zero-length array with flexible-array member</title>
<updated>2020-02-14T12:08:49Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-11T23:20:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3084ea9ea88906576d0bfc0d66cb1735045266c8'/>
<id>urn:sha1:3084ea9ea88906576d0bfc0d66cb1735045266c8</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: eeprom: Replace zero-length array with flexible-array member</title>
<updated>2020-02-14T12:07:03Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-11T23:19:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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>
</feed>
