Hi Matthias,

On 05/11/2010 03:31 PM, Matthias Fuchs wrote:
> Hi Wolfgang,
> 
> first I reduced the receiver list of this discussion to the
> more CAN related community. When things come to an end I will
> add netdev and linux-usb again.

OK.

...
> This may be right. But we do not have an SJA1000 and the USB2 device 
> automatically reports any change upstream. You do not really have a chance 
> to turn on or off anything. So I only could hide some code when reporting is
> turned off. But I am not really sure which code exactly.

Ah, I was not aware of that. Bus error reporting might be too heavy on
some system and therefore we introduced that option to allow the user to
enable it on demand.

> Should I put some if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {}
> around these lines in esd_usb2_rx_event()
> ...
>               } else {
>                       priv->can.can_stats.bus_error++;
>                       stats->rx_errors++;
> 
>                       cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR;
>                       ...

There is no need to hide something. The user can filter bus errors
anyway. In that case, just do *not* implement berr-reporting.

Wolfgang.
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to