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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 21 Feb 2024 15:38:06 +0100
From: Oliver Hartkopp <socketcan@...tkopp.net>
To: Marc Kleine-Budde <mkl@...gutronix.de>
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

Hello Marc,

On 21.02.24 15:24, Marc Kleine-Budde wrote:
> 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/

Ok, thanks.

>> 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?

Hm, I was using a Debian 6.1 kernel in between, which worked.

Then I booted my 6.8.0-rc4-00433-g92a355464776 again, reverted the patch 
and loaded the changed can-dev module by hand - which then also worked.

To double check now I was unloading the patched version and using the 
can-dev from /lib/modules again, also works ¯\_(ツ)_/¯

So, I'll have to make more investigations what really went wrong here.
I also was astonished about such CAN FD dependency.

Will come back with more info about my experienced issue.
So far please drop my blame for this patch.

Best regards,
Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ