On 15.07.2021 16:28:42, Stephane Grosjean wrote: > When the driver detects that the PCAN-USB device runs an old firmware > (< 4.1) then it prints a message suggesting to contact > <support@xxxxxxxxxxxxxxx> for a possible firmware update. > > Signed-off-by: Stephane Grosjean <s.grosjean@xxxxxxxxxxxxxxx> > --- > drivers/net/can/usb/peak_usb/pcan_usb.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c > index 3af3136645ac..cb492584fdb0 100644 > --- a/drivers/net/can/usb/peak_usb/pcan_usb.c > +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c > @@ -850,6 +850,19 @@ static int pcan_usb_init(struct peak_usb_device *dev) > pcan_usb.name, dev->device_rev, serial_number, > pcan_usb.ctrl_count); > > + /* Since rev 4.1, PCAN-USB is able to make single-short as well as ^ Fixed typo while applying. > + * looped back frames. > + */ > + if (dev->device_rev >= 41) { > + struct can_priv *priv = netdev_priv(dev->netdev); > + > + priv->ctrlmode_supported |= CAN_CTRLMODE_ONE_SHOT | > + CAN_CTRLMODE_LOOPBACK; > + } else { > + dev_info(dev->netdev->dev.parent, > + "Firmware update available. Please contact support@xxxxxxxxxxxxxxx\n"); > + } > + > return 0; > } 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