Re: [RFC PATCH 11/13] can: slcan: add ethtool support to reset adapter errors

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

 



On 08.06.2022 18:33:08, Dario Binacchi wrote:
> Hi Marc,
> 
> On Tue, Jun 7, 2022 at 12:52 PM Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
> >
> > On 07.06.2022 11:47:50, Dario Binacchi wrote:
> > > This patch adds a private flag to the slcan driver to switch the
> > > "err-rst-on-open" setting on and off.
> > >
> > > "err-rst-on-open" on  - Reset error states on opening command
> > >
> > > "err-rst-on-open" off - Don't reset error states on opening command
> > >                         (default)
> > >
> > > The setting can only be changed if the interface is down:
> > >
> > >     ip link set dev can0 down
> > >     ethtool --set-priv-flags can0 err-rst-on-open {off|on}
> > >     ip link set dev can0 up
> > >
> > > Signed-off-by: Dario Binacchi <dario.binacchi@xxxxxxxxxxxxxxxxxxxx>
> >
> > I'm a big fan of bringing the device into a well known good state during
> > ifup. What would be the reasons/use cases to not reset the device?
> 
> Because by default either slcand and slcan_attach don't reset the
> error states, but you must use the `-f' option to do so. So, I
> followed this use case.

Is this a CAN bus error state, like Bus Off or some controller (i.e. non
CAN related) error?

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: signature.asc
Description: PGP signature


[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