Linux CAN drivers development
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Jeroen Hofstee <jhofstee@victronenergy.com>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH 4/6] can: gs_usb: add ability to enable / disable berr rerporting
Date: Mon, 10 Oct 2022 09:00:43 +0200	[thread overview]
Message-ID: <20221010070043.yubz67efaa43wbj4@pengutronix.de> (raw)
In-Reply-To: <e9a8edc8-c019-6396-6655-fe331c89df7b@victronenergy.com>

[-- Attachment #1: Type: text/plain, Size: 2300 bytes --]

On 07.10.2022 20:30:27, Jeroen Hofstee wrote:
> > > 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.

Makes sense. If a user is interested in debugging such low level
problems a firmware update should be no problem and is suggested
anyways.

Let's keep your original logic, where bus error reporting
is disabled by default.

I'll try to find time to look into your firmware changes later this
week.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2022-10-10  7:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 16:24 [PATCH 0/6] can: gs_usb: new features: GS_CAN_FEATURE_GET_STATE, GS_CAN_FEATURE_BERR_REPORTING Marc Kleine-Budde
2022-10-06 16:24 ` [PATCH 1/6] can: gs_usb: gs_can_open(): allow loopback and listen only at the same time Marc Kleine-Budde
2022-10-06 16:24 ` [PATCH 2/6] can: gs_usb: gs_can_open(): sort checks for ctrlmode Marc Kleine-Budde
2022-10-06 16:24 ` [PATCH 3/6] can: gs_usb: gs_can_open(): merge setting of timestamp flags and init Marc Kleine-Budde
2022-10-06 16:24 ` [PATCH 4/6] can: gs_usb: add ability to enable / disable berr rerporting Marc Kleine-Budde
2022-10-06 16:36   ` Marc Kleine-Budde
2022-10-07 18:30     ` Jeroen Hofstee
2022-10-08 15:39       ` Jeroen Hofstee
2022-10-10  7:00       ` Marc Kleine-Budde [this message]
2022-10-08 22:11     ` Jeroen Hofstee
2022-10-10  7:03       ` Marc Kleine-Budde
2022-10-06 16:24 ` [PATCH 5/6] can: gs_usb: document GS_CAN_FEATURE_GET_STATE Marc Kleine-Budde
2022-10-06 16:24 ` [PATCH 6/6] can: gs_usb: support reading error counters Marc Kleine-Budde
2022-10-06 16:37   ` Marc Kleine-Budde
2022-10-06 16:28 ` [PATCH 0/6] can: gs_usb: new features: GS_CAN_FEATURE_GET_STATE, GS_CAN_FEATURE_BERR_REPORTING Marc Kleine-Budde
2022-10-07 18:59   ` Jeroen Hofstee
2022-10-10  6:30     ` Marc Kleine-Budde
2022-10-07 18:46 ` Jeroen Hofstee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221010070043.yubz67efaa43wbj4@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=jhofstee@victronenergy.com \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox