aboutsummaryrefslogtreecommitdiff
path: root/net/can
diff options
context:
space:
mode:
authorGravatar Marc Kleine-Budde <mkl@pengutronix.de> 2023-02-06 14:02:37 +0100
committerGravatar Marc Kleine-Budde <mkl@pengutronix.de> 2023-02-06 14:02:37 +0100
commit3dafbe5cc1409dd2e3fc2955b0026c1ba7dfa323 (patch)
treec7bd0a8e7356206197ecf5faf209ca94b8d7a32a /net/can
parentMerge patch series "can: peak_usb: Introduce configurable CAN channel ID" (diff)
parentcan: bittiming: can_validate_bitrate(): report error via netlink (diff)
downloadlinux-3dafbe5cc1409dd2e3fc2955b0026c1ba7dfa323.tar.gz
linux-3dafbe5cc1409dd2e3fc2955b0026c1ba7dfa323.tar.bz2
linux-3dafbe5cc1409dd2e3fc2955b0026c1ba7dfa323.zip
Merge patch series "can: bittiming: cleanups and rework SJW handling"
Marc Kleine-Budde <mkl@pengutronix.de> says: several people noticed that on modern CAN controllers with wide bit timing registers the default SJW of 1 can result in unstable or no synchronization to the CAN network. See Patch 14/17 for details. During review of v1 Vincent pointed out that the original code and the series doesn't always check user provided bit timing parameters, sometimes silently limits them and the return error values are not consistent. This series first cleans up some code in bittiming.c, replacing open-coded variants by macros or functions (Patches 1, 2). Patch 3 adds the missing assignment of the effective TQ if the interface is configured with low level timing parameters. Patch 4 is another code cleanup. Patches 5, 6 check the bit timing parameter during interface registration. Patch 7 adds a validation of the sample point. The patches 8-13 convert the error messages from netdev_err() to NL_SET_ERR_MSG_FMT, factor out the SJW handling from can_fixup_bittiming(), add checking and error messages for the individual limits and harmonize the error return values. Patch 14 changes the default SJW value from 1 to min(Phase Seg1, Phase Seg2 / 2). Patch 15 switches can_calc_bittiming() to use the new SJW handling. Patch 16 converts can_calc_bittiming() to NL_SET_ERR_MSG_FMT(). And patch 16 adds a NL_SET_ERR_MSG_FMT() error message to can_validate_bitrate(). v1: https://lore.kernel.org/all/20220907103845.3929288-1-mkl@pengutronix.de Link: https://lore.kernel.org/all/20230202110854.2318594-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net/can')
0 files changed, 0 insertions, 0 deletions