<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/can, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-03-10T10:12:52Z</updated>
<entry>
<title>can: hi311x: hi3110_open(): add check for hi3110_power_enable() return value</title>
<updated>2026-03-10T10:12:52Z</updated>
<author>
<name>Wenyuan Li</name>
</author>
<published>2026-03-10T05:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47bba09b14fa21712398febf36cb14fd4fc3bded'/>
<id>urn:sha1:47bba09b14fa21712398febf36cb14fd4fc3bded</id>
<content type='text'>
In hi3110_open(), the return value of hi3110_power_enable() is not checked.
If power enable fails, the device may not function correctly, while the
driver still returns success.

Add a check for the return value and propagate the error accordingly.

Signed-off-by: Wenyuan Li &lt;2063309626@qq.com&gt;
Link: https://patch.msgid.link/tencent_B5E2E7528BB28AA8A2A56E16C49BD58B8B07@qq.com
Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver")
[mkl: adjust subject, commit message and jump label]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: dev: keep the max bitrate error at 5%</title>
<updated>2026-03-10T10:12:52Z</updated>
<author>
<name>Haibo Chen</name>
</author>
<published>2026-03-06T09:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1eea46908c57abb7109b1fce024f366ae6c69c4f'/>
<id>urn:sha1:1eea46908c57abb7109b1fce024f366ae6c69c4f</id>
<content type='text'>
Commit b360a13d44db ("can: dev: print bitrate error with two decimal
digits") changed calculation of the bit rate error from on-tenth of a
percent to on-hundredth of a percent, but forgot to adjust the scale of the
CAN_CALC_MAX_ERROR constant.

Keeping the existing logic unchanged: Only when the bitrate error exceeds
5% should an error be returned. Otherwise, simply output a warning log.

Fixes: b360a13d44db ("can: dev: print bitrate error with two decimal digits")
Signed-off-by: Haibo Chen &lt;haibo.chen@nxp.com&gt;
Link: https://patch.msgid.link/20260306-can-fix-v1-1-ac526cec6777@nxp.com
Cc: stable@kernel.org
[mkl: improve commit message]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: gs_usb: gs_can_open(): always configure bitrates before starting device</title>
<updated>2026-03-02T10:09:36Z</updated>
<author>
<name>Marc Kleine-Budde</name>
</author>
<published>2026-02-19T12:57:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2df6162785f31f1bbb598cfc3b08e4efc88f80b6'/>
<id>urn:sha1:2df6162785f31f1bbb598cfc3b08e4efc88f80b6</id>
<content type='text'>
So far the driver populated the struct can_priv::do_set_bittiming() and
struct can_priv::fd::do_set_data_bittiming() callbacks.

Before bringing up the interface, user space has to configure the bitrates.
With these callbacks the configuration is directly forwarded into the CAN
hardware. Then the interface can be brought up.

An ifdown-ifup cycle (without changing the bit rates) doesn't re-configure
the bitrates in the CAN hardware. This leads to a problem with the
CANable-2.5 [1] firmware, which resets the configured bit rates during
ifdown.

To fix the problem remove both bit timing callbacks and always configure
the bitrates in the struct net_device_ops::ndo_open() callback.

[1] https://github.com/Elmue/CANable-2.5-firmware-Slcan-and-Candlelight

Cc: stable@vger.kernel.org
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Link: https://patch.msgid.link/20260219-gs_usb-always-configure-bitrates-v2-1-671f8ba5b0a5@pengutronix.de
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: usb: f81604: correctly anchor the urb in the read bulk callback</title>
<updated>2026-03-02T10:04:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2026-02-23T12:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=952caa5da10bed22be09612433964f6877ba0dde'/>
<id>urn:sha1:952caa5da10bed22be09612433964f6877ba0dde</id>
<content type='text'>
When submitting an urb, that is using the anchor pattern, it needs to be
anchored before submitting it otherwise it could be leaked if
usb_kill_anchored_urbs() is called.  This logic is correctly done
elsewhere in the driver, except in the read bulk callback so do that
here also.

Cc: Ji-Ze Hong (Peter Hong) &lt;peter_hong@fintek.com.tw&gt;
Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Cc: stable@kernel.org
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2026022334-starlight-scaling-2cea@gregkh
Fixes: 88da17436973 ("can: usb: f81604: add Fintek F81604 support")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: usb: f81604: handle bulk write errors properly</title>
<updated>2026-03-02T10:04:15Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2026-02-23T12:10:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51f94780720fa90c424f67e3e9784cb8ef8190e5'/>
<id>urn:sha1:51f94780720fa90c424f67e3e9784cb8ef8190e5</id>
<content type='text'>
If a write urb fails then more needs to be done other than just logging
the message, otherwise the transmission could be stalled.  Properly
increment the error counters and wake up the queues so that data will
continue to flow.

Cc: Ji-Ze Hong (Peter Hong) &lt;peter_hong@fintek.com.tw&gt;
Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Cc: stable@kernel.org
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2026022334-slackness-dynamic-9195@gregkh
Fixes: 88da17436973 ("can: usb: f81604: add Fintek F81604 support")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: usb: f81604: handle short interrupt urb messages properly</title>
<updated>2026-03-02T10:04:14Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2026-02-23T12:10:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7299b1b39a255f6092ce4ec0b65f66e9d6a357af'/>
<id>urn:sha1:7299b1b39a255f6092ce4ec0b65f66e9d6a357af</id>
<content type='text'>
If an interrupt urb is received that is not the correct length, properly
detect it and don't attempt to treat the data as valid.

Cc: Ji-Ze Hong (Peter Hong) &lt;peter_hong@fintek.com.tw&gt;
Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Cc: stable@kernel.org
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2026022331-opal-evaluator-a928@gregkh
Fixes: 88da17436973 ("can: usb: f81604: add Fintek F81604 support")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: usb: etas_es58x: correctly anchor the urb in the read bulk callback</title>
<updated>2026-03-02T10:03:42Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2026-02-23T16:39:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5eaad4f768266f1f17e01232ffe2ef009f8129b7'/>
<id>urn:sha1:5eaad4f768266f1f17e01232ffe2ef009f8129b7</id>
<content type='text'>
When submitting an urb, that is using the anchor pattern, it needs to be
anchored before submitting it otherwise it could be leaked if
usb_kill_anchored_urbs() is called.  This logic is correctly done
elsewhere in the driver, except in the read bulk callback so do that
here also.

Cc: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: stable@kernel.org
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Tested-by: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Link: https://patch.msgid.link/2026022320-poser-stiffly-9d84@gregkh
Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: ucan: Fix infinite loop from zero-length messages</title>
<updated>2026-03-02T10:03:42Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2026-02-23T16:30:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e446fd0582ad8be9f6dafb115fc2e7245f9bea7'/>
<id>urn:sha1:1e446fd0582ad8be9f6dafb115fc2e7245f9bea7</id>
<content type='text'>
If a broken ucan device gets a message with the message length field set
to 0, then the driver will loop for forever in
ucan_read_bulk_callback(), hanging the system.  If the length is 0, just
skip the message and go on to the next one.

This has been fixed in the kvaser_usb driver in the past in commit
0c73772cd2b8 ("can: kvaser_usb: leaf: Fix potential infinite loop in
command parsers"), so there must be some broken devices out there like
this somewhere.

Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Cc: stable@kernel.org
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2026022319-huff-absurd-6a18@gregkh
Fixes: 9f2d3eae88d2 ("can: ucan: add driver for Theobroma Systems UCAN devices")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: ems_usb: ems_usb_read_bulk_callback(): check the proper length of a message</title>
<updated>2026-03-02T10:03:42Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2026-02-23T16:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38a01c9700b0dcafe97dfa9dc7531bf4a245deff'/>
<id>urn:sha1:38a01c9700b0dcafe97dfa9dc7531bf4a245deff</id>
<content type='text'>
When looking at the data in a USB urb, the actual_length is the size of
the buffer passed to the driver, not the transfer_buffer_length which is
set by the driver as the max size of the buffer.

When parsing the messages in ems_usb_read_bulk_callback() properly check
the size both at the beginning of parsing the message to make sure it is
big enough for the expected structure, and at the end of the message to
make sure we don't overflow past the end of the buffer for the next
message.

Cc: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: stable@kernel.org
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://patch.msgid.link/2026022316-answering-strainer-a5db@gregkh
Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface")
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: esd_usb: add endpoint type validation</title>
<updated>2026-03-02T10:03:32Z</updated>
<author>
<name>Ziyi Guo</name>
</author>
<published>2026-02-13T20:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=968b098220e393a10488b6a5dddb302b2eaedf66'/>
<id>urn:sha1:968b098220e393a10488b6a5dddb302b2eaedf66</id>
<content type='text'>
esd_usb_probe() constructs bulk pipes for two endpoints without
verifying their transfer types:

  - usb_rcvbulkpipe(dev-&gt;udev, 1) for RX (version reply, async RX data)
  - usb_sndbulkpipe(dev-&gt;udev, 2) for TX (version query, CAN frames)

A malformed USB device can present these endpoints with transfer types
that differ from what the driver assumes, triggering the WARNING in
usb_submit_urb().

Use usb_find_common_endpoints() to discover and validate the first
bulk IN and bulk OUT endpoints at probe time, before any allocation.
Found pipes are saved to struct esd_usb and code uses them directly
instead of making pipes in place.

Similar to
- commit 136bed0bfd3b ("can: mcba_usb: properly check endpoint type")
  which established the usb_find_common_endpoints() + stored pipes
  pattern for CAN USB drivers.

Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device")
Suggested-by: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Signed-off-by: Ziyi Guo &lt;n7l8m4@u.northwestern.edu&gt;
Reviewed-by: Vincent Mailhol &lt;mailhol@kernel.org&gt;
Link: https://patch.msgid.link/20260213203927.599163-1-n7l8m4@u.northwestern.edu
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
