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, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c index 4c3e18ca3181..f5edfc1e412e 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c @@ -878,6 +878,11 @@ static int pcan_usb_init(struct peak_usb_device *dev) return err; } + dev_info(dev->netdev->dev.parent, + "PEAK-System %s adapter hwrev %u serial %08X (%u channel)\n", + 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 * looped back frames. */ @@ -886,13 +891,11 @@ static int pcan_usb_init(struct peak_usb_device *dev) 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"); } - dev_info(dev->netdev->dev.parent, - "PEAK-System %s adapter hwrev %u serial %08X (%u channel)\n", - pcan_usb.name, dev->device_rev, serial_number, - pcan_usb.ctrl_count); - return 0; } -- 2.25.1