linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Stephane Grosjean <s.grosjean@peak-system.com>
Cc: linux-can Mailing List <linux-can@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] can: peak_usb: Add a "firmware update available" msg to old PCAN-USB
Date: Fri, 16 Jul 2021 11:19:43 +0200	[thread overview]
Message-ID: <20210716091943.ilvws7dxpthbhmjl@pengutronix.de> (raw)
In-Reply-To: <20210715142842.35793-2-s.grosjean@peak-system.com>

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

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@peak-system.com> for a possible firmware update.
> 
> Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
> ---
>  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@peak-system.com\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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-07-16  9:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 14:28 [PATCH v3 1/2] can: peak_usb: upgrades the handling of bus state changes Stephane Grosjean
2021-07-15 14:28 ` [PATCH v3 2/2] can: peak_usb: Add a "firmware update available" msg to old PCAN-USB Stephane Grosjean
2021-07-16  9:19   ` Marc Kleine-Budde [this message]
2021-07-16  9:56   ` Marc Kleine-Budde
2021-07-16  9:57 ` [PATCH v3 1/2] can: peak_usb: upgrades the handling of bus state changes Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210716091943.ilvws7dxpthbhmjl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=s.grosjean@peak-system.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).