<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/can/usb, 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-12-02T07:52:00Z</updated>
<entry>
<title>can: gs_usb: fix endianess problem with candleLight firmware</title>
<updated>2020-12-02T07:52:00Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2020-11-19T13:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90198983bd2851dd2831a65f9d07040d55d4bf43'/>
<id>urn:sha1:90198983bd2851dd2831a65f9d07040d55d4bf43</id>
<content type='text'>
[ Upstream commit 4ba1cb39fce4464151517a37ce0ac0a1a3f580d6 ]

The firmware on the original USB2CAN by Geschwister Schneider Technologie
Entwicklungs- und Vertriebs UG exchanges all data between the host and the
device in host byte order. This is done with the struct
gs_host_config::byte_order member, which is sent first to indicate the desired
byte order.

The widely used open source firmware candleLight doesn't support this feature
and exchanges the data in little endian byte order. This breaks if a device
with candleLight firmware is used on big endianess systems.

To fix this problem, all u32 (but not the struct gs_host_frame::echo_id, which
is a transparent cookie) are converted to __le32.

Cc: Maximilian Schneider &lt;max@schneidersoft.net&gt;
Cc: Hubert Denkmair &lt;hubert@denkmair.de&gt;
Reported-by: Michael Rausch &lt;mr@netadair.de&gt;
Link: https://lore.kernel.org/r/b58aace7-61f3-6df7-c6df-69fee2c66906@netadair.de
Tested-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Link: https://lore.kernel.org/r/20201120103818.3386964-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits</title>
<updated>2020-11-24T12:39:03Z</updated>
<author>
<name>Jimmy Assarsson</name>
</author>
<published>2020-11-15T16:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99e089632b3a9ee293588ead5050bfa27dc60dbb'/>
<id>urn:sha1:99e089632b3a9ee293588ead5050bfa27dc60dbb</id>
<content type='text'>
[ Upstream commit d003868d7f8579838ed58b6429af91844039b6f8 ]

Use correct bittiming limits for the KCAN CAN controller.

Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family")
Signed-off-by: Jimmy Assarsson &lt;extja@kvaser.com&gt;
Link: https://lore.kernel.org/r/20201115163027.16851-2-jimmyassarsson@gmail.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>can: peak_usb: fix potential integer overflow on shift of a int</title>
<updated>2020-11-24T12:39:01Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2020-11-05T11:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2dce84cc58d4e8eebc2a5dc6c0beebad2068c302'/>
<id>urn:sha1:2dce84cc58d4e8eebc2a5dc6c0beebad2068c302</id>
<content type='text'>
[ Upstream commit 8a68cc0d690c9e5730d676b764c6f059343b842c ]

The left shift of int 32 bit integer constant 1 is evaluated using 32 bit
arithmetic and then assigned to a signed 64 bit variable. In the case where
time_ref-&gt;adapter-&gt;ts_used_bits is 32 or more this can lead to an oveflow.
Avoid this by shifting using the BIT_ULL macro instead.

Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/r/20201105112427.40688-1-colin.king@canonical.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb()</title>
<updated>2020-11-24T12:39:01Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2019-08-28T19:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28b801f283c0a8d1fbe4d3fbee6fe5ab56e977a2'/>
<id>urn:sha1:28b801f283c0a8d1fbe4d3fbee6fe5ab56e977a2</id>
<content type='text'>
[ Upstream commit 81c9c8e0adef3285336b942f93287c554c89e6c6 ]

The driver has to first fill the skb with data and then handle it to
can_put_echo_skb(). This patch moves the can_put_echo_skb() down, right before
sending the skb out via USB.

Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer")
Cc: Remigiusz Kołłątaj &lt;remigiusz.kollataj@mobica.com&gt;
Link: https://lore.kernel.org/r/20201111221204.1639007-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping</title>
<updated>2020-11-18T18:22:06Z</updated>
<author>
<name>Stephane Grosjean</name>
</author>
<published>2020-10-14T08:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37cc52739ad1839550a39aae8de1f6ae979ed494'/>
<id>urn:sha1:37cc52739ad1839550a39aae8de1f6ae979ed494</id>
<content type='text'>
[ Upstream commit ecc7b4187dd388549544195fb13a11b4ea8e6a84 ]

Fabian Inostroza &lt;fabianinostrozap@gmail.com&gt; has discovered a potential
problem in the hardware timestamp reporting from the PCAN-USB USB CAN interface
(only), related to the fact that a timestamp of an event may precede the
timestamp used for synchronization when both records are part of the same USB
packet. However, this case was used to detect the wrapping of the time counter.

This patch details and fixes the two identified cases where this problem can
occur.

Reported-by: Fabian Inostroza &lt;fabianinostrozap@gmail.com&gt;
Signed-off-by: Stephane Grosjean &lt;s.grosjean@peak-system.com&gt;
Link: https://lore.kernel.org/r/20201014085631.15128-1-s.grosjean@peak-system.com
Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>can: peak_usb: add range checking in decode operations</title>
<updated>2020-11-18T18:22:05Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2020-08-13T14:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5013cdd3aebc4fe8c01234ffee9e3661ee8e2655'/>
<id>urn:sha1:5013cdd3aebc4fe8c01234ffee9e3661ee8e2655</id>
<content type='text'>
[ Upstream commit a6921dd524fe31d1f460c161d3526a407533b6db ]

These values come from skb-&gt;data so Smatch considers them untrusted.  I
believe Smatch is correct but I don't have a way to test this.

The usb_if-&gt;dev[] array has 2 elements but the index is in the 0-15
range without checks.  The cfd-&gt;len can be up to 255 but the maximum
valid size is CANFD_MAX_DLEN (64) so that could lead to memory
corruption.

Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20200813140604.GA456946@mwanda
Acked-by: Stephane Grosjean &lt;s.grosjean@peak-system.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Use fallthrough pseudo-keyword</title>
<updated>2020-08-23T22:36:59Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2020-08-23T22:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df561f6688fef775baa341a0f5d960becd248b11'/>
<id>urn:sha1:df561f6688fef775baa341a0f5d960becd248b11</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: replace '---help---' in Kconfig files with 'help'</title>
<updated>2020-06-13T16:57:21Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2020-06-13T16:50:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7f7f6248d9740d710fd6bd190293fe5e16410ac'/>
<id>urn:sha1:a7f7f6248d9740d710fd6bd190293fe5e16410ac</id>
<content type='text'>
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
'---help---'"), the number of '---help---' has been gradually
decreasing, but there are still more than 2400 instances.

This commit finishes the conversion. While I touched the lines,
I also fixed the indentation.

There are a variety of indentation styles found.

  a) 4 spaces + '---help---'
  b) 7 spaces + '---help---'
  c) 8 spaces + '---help---'
  d) 1 space + 1 tab + '---help---'
  e) 1 tab + '---help---'    (correct indentation)
  f) 1 tab + 1 space + '---help---'
  g) 1 tab + 2 spaces + '---help---'

In order to convert all of them to 1 tab + 'help', I ran the
following commend:

  $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>can: gs_usb: gs_usb_probe(): use descriptors of current altsetting</title>
<updated>2020-01-02T14:34:27Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2019-12-10T11:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f361cd9474ab2c4ab9ac8db20faf81e66c6279b'/>
<id>urn:sha1:2f361cd9474ab2c4ab9ac8db20faf81e66c6279b</id>
<content type='text'>
Make sure to always use the descriptors of the current alternate setting
to avoid future issues when accessing fields that may differ between
settings.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: kvaser_usb: fix interface sanity check</title>
<updated>2020-01-02T14:34:27Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2019-12-10T11:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5660493c637c9d83786f1c9297f403eae44177b6'/>
<id>urn:sha1:5660493c637c9d83786f1c9297f403eae44177b6</id>
<content type='text'>
Make sure to use the current alternate setting when verifying the
interface descriptors to avoid binding to an invalid interface.

Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.19
Cc: Jimmy Assarsson &lt;extja@kvaser.com&gt;
Cc: Christer Beskow &lt;chbe@kvaser.com&gt;
Cc: Nicklas Johansson &lt;extnj@kvaser.com&gt;
Cc: Martin Henriksson &lt;mh@kvaser.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
