lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240221-garden-petted-789304a1b1a5-mkl@pengutronix.de>
Date: Wed, 21 Feb 2024 15:24:24 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Oliver Hartkopp <socketcan@...tkopp.net>
Cc: Vincent MAILHOL <mailhol.vincent@...adoo.fr>, 
	Maxime Jayat <maxime.jayat@...ile-devices.fr>, Wolfgang Grandegger <wg@...ndegger.com>, 
	linux-can@...r.kernel.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] can: netlink: Fix TDCO calculation using the old data
 bittiming

On 21.02.2024 15:14:02, Oliver Hartkopp wrote:
> I have an old PCAN USB adapter (Classical CAN) which uses the pcan_usb
> driver and wanted to set a 50kbit/s bitrate:
> 
> ip link set can0 up txqueuelen 500 type can bitrate 50000 sjw 4
> 
> First it complained about the SJW having a higher value than some phase-seg
> value which was 2.
> 
> Error: sjw: 4 greater than phase-seg2: 2.
> 
> I always thought the driver automatically adapts the SJW value to the
> highest possible and SJW=4 could always be set. Did this change at a certain
> point?

Yes, that changed with b5a3d0864ee7 ("can: bittiming: can_sjw_check():
check that SJW is not longer than either Phase Buffer Segment")

See discussion in https://lore.kernel.org/all/20220907103845.3929288-3-mkl@pengutronix.de/

> Anyway, then I reduced the given SJW value and the ip command did not give
> any error message.
> 
> But finally there was not CAN traffic possible with my "always working
> setup".
> 
> I'm running 6.8.0-rc4-00433-g92a355464776 from Linus' tree.
> 
> Reverting this patch fixed my issue.

But what has the tdco calculation to do with non CAN-FD controllers?

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ