Linux CAN drivers development
 help / color / mirror / Atom feed
From: Max Staudt <max@enpas.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-can@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
	Wolfgang Grandegger <wg@grandegger.com>,
	Oliver Neukum <oneukum@suse.com>, Jiri Slaby <jslaby@suse.com>
Subject: Re: [PATCH v2] can, tty: elmcan CAN/ldisc driver for ELM327 based OBD-II adapters
Date: Fri, 11 Feb 2022 15:23:19 +0100	[thread overview]
Message-ID: <20220211152319.7745598b.max@enpas.org> (raw)
In-Reply-To: <YgYl9nwKwG2iY6MO@kroah.com>

On Fri, 11 Feb 2022 10:01:42 +0100
Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Thu, Feb 10, 2022 at 09:20:47PM +0100, Max Staudt wrote:
> > I'll hardcode the driver to be more lenient - i.e.
> > accept_flaky_uart=1. Whoever relies on it for critical systems
> > likely hasn't read the disclaimer anyway :)
> > 
> > 
> > How about inverting the option, thus having a debug_extra_strict
> > module option for debugging purposes, so users can more easily see
> > if their adapter is at fault?  
> 
> Will anyone really do that?  And if so, what can they do about it?
> The kernel's job is to work around broken hardware, so we might as
> well just deal with it :(

True, let's hardcode a behaviour.

I've thought about it a bit more and flipped the switch though :)

The rationale is as follows:

1) In my latest tests, my hardware behaved just fine, so I likely had
an EMI problem in my setup when I wrote that option years ago.

2) The errors I was working around were random insertions and bitflips.
Which can lead to incorrect rather than dropped data. The driver can
report obvious errors, but there is no way to detect a bitflip in those
places where it really hurts (i.e. the data packets). If the driver has
reason to believe there is a problem, I'd rather it avoid forwarding
possibly incorrect data to the user.

3) If the driver's users DO wish for a change, it's always easier to
make the driver more lenient rather than more strict. The only thing it
can do then is to restart the device anyway...

So, I'll kick the option out and keep the driver strict.


> > Maybe
> >   #define N_DEVELOPMENT 29
> > or something like that?
> > 
> > And then from this point onwards, NR_LDISCS needs only be
> > incremented once a new ldisc is actually upstreamed.  
> 
> That would work, want to send a patch right now for that?

Just did:

  Message-Id: <20220211141036.6403-1-max@enpas.org>


Max

      reply	other threads:[~2022-02-11 14:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 17:13 [PATCH v2] can, tty: elmcan CAN/ldisc driver for ELM327 based OBD-II adapters Max Staudt
2022-02-10 17:41 ` Greg Kroah-Hartman
2022-02-10 20:20   ` Max Staudt
2022-02-11  9:01     ` Greg Kroah-Hartman
2022-02-11 14:23       ` Max Staudt [this message]

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=20220211152319.7745598b.max@enpas.org \
    --to=max@enpas.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=oneukum@suse.com \
    --cc=wg@grandegger.com \
    /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