On 7/23/20 9:39 PM, Stéphane Grosjean wrote: >>> - changing the default clock value, > >> The input clock rate for the CAN IP Core? > Yes Can you query the possible clock rates? Either add to ethtool or make it a CAN specific callback. >>> - reading the bus load value, >> ..as calculated by the USB device? > > or by the IP core, yes. maybe we can add this to ethtool's stats, otherwise to the CAN stats. >>> - using a flashed device id. to better control the can interface number, > >> Can you make use of dev_id/dev_port >> https://elixir.bootlin.com/linux/latest/source/include/linux/netdevice.h#L1687 > > Ok. I'll check that, thanks. > > >>> - identifying the (USB) channel > >> Does udev offer all needed information? E.g.: > > Sorry, nope: identify the USB adapter <=> flash the LED (which USB device corresponds to which canX) Use ethtool's set_phys_id for this: https://elixir.bootlin.com/linux/latest/source/drivers/net/can/usb/gs_usb.c#L762 You can either implement a "activate blink", "deactivate blink" or "switch LED on", "switch LED off" (and I think the core will take care of blinking). 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: OpenPGP digital signature