Re: [PATCH 4/6] can: gs_usb: add ability to enable / disable berr rerporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 10/7/22 20:30, Jeroen Hofstee wrote:
Hello Marc,

Thanks for looking into this.

On 10/6/22 18:36, Marc Kleine-Budde wrote:
On 06.10.2022 18:24:50, Marc Kleine-Budde wrote:
From: Jeroen Hofstee <jhofstee@xxxxxxxxxxxxxxxxx>

The open source firmware candleLight report bus errors
unconditionally. This adds support to enable / disable bus error
reporting with the standard netlink property.
I haven't checked the candleLight firmware, yet.

If the unmodified firmware sends bus errors per default and we introduce
BERR_REPORTING as suggested in this patch, we have to modify the default
behavior for bus errors: By default the firmware will not send bus
errors, but only if GS_CAN_MODE_BERR_REPORTING is requested during
open().

I'm not sure if we want to change the default behavior of the
firmware....To work around this backwards compatibility issue we can
explicitly turn BERR reporting on or off during open via
GS_CAN_MODE_BERR_REPORTING_ON or GS_CAN_MODE_BERR_REPORTING_OFF.

What do you think?

Personally, I wouldn't care about backward compatibility, it was added
later on despite they know it should be a socketcan option, see [1] and
for most if not all users, having error frames on a bit level / crc mismatch
level is only annoying, unless you are really looking deep into problems
and then enabling a simple flag isn't your biggest problem, especially not
if it is a documented/common flag which is supposed to do exactly that.

Obviously state changes are still send after my changes to candleLight
are accepted without bit error reporting being set.

So yes afaiac berr-reporting is simply turned off by default. Unless there
really are users which need them and can't simply set a single bit; my
guess there isn't any of them.


mmm, that is with the patch included. For distro's that will take quite some
time. I will have a look if a backwards compatible version can be created
which doesn't look too odd.

Regards,

Jeroen





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux