From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marek Vasut <marex@denx.de>, linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Mark Rutland <mark.rutland@arm.com>,
Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [PATCH 4/6] net: can: ifi: Treat CAN_CTRLMODE_FD_NON_ISO correctly
Date: Sun, 8 May 2016 20:26:10 +0200 [thread overview]
Message-ID: <572F84C2.7040907@hartkopp.net> (raw)
In-Reply-To: <1462660456-6179-4-git-send-email-marex@denx.de>
On 05/08/2016 12:34 AM, Marek Vasut wrote:
> The CAN_CTRLMODE_FD flag is set for both ISO and BOSCH CANFD mode,
> while the CAN_CTRLMODE_FD_NON_ISO is additional flag which is only
> set for CANFD-BOSCH mode. Fix the handling of the flags to reflect
> this.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Makes sense :-)
Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net>
> Cc: Wolfgang Grandegger <wg@grandegger.com>
> ---
> drivers/net/can/ifi_canfd/ifi_canfd.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c
> index 30dc3b6..5bd95dd 100644
> --- a/drivers/net/can/ifi_canfd/ifi_canfd.c
> +++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
> @@ -644,10 +644,11 @@ static void ifi_canfd_start(struct net_device *ndev)
> if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
> stcmd |= IFI_CANFD_STCMD_LOOPBACK;
>
> - if (priv->can.ctrlmode & CAN_CTRLMODE_FD)
> + if ((priv->can.ctrlmode & CAN_CTRLMODE_FD) &&
> + !(priv->can.ctrlmode & CAN_CTRLMODE_FD_NON_ISO))
> stcmd |= IFI_CANFD_STCMD_ENABLE_ISO;
>
> - if (!(priv->can.ctrlmode & (CAN_CTRLMODE_FD | CAN_CTRLMODE_FD_NON_ISO)))
> + if (!(priv->can.ctrlmode & CAN_CTRLMODE_FD))
> stcmd |= IFI_CANFD_STCMD_DISABLE_CANFD;
>
> priv->can.state = CAN_STATE_ERROR_ACTIVE;
>
next prev parent reply other threads:[~2016-05-08 18:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-07 22:34 [PATCH 1/6] net: can: ifi: Start NAPI poll on bus warning too Marek Vasut
2016-05-07 22:34 ` [PATCH 2/6] net: can: ifi: Update timing configuration code Marek Vasut
2016-05-07 22:34 ` [PATCH 3/6] net: can: ifi: Unify timing constants Marek Vasut
2016-05-07 22:34 ` [PATCH 4/6] net: can: ifi: Treat CAN_CTRLMODE_FD_NON_ISO correctly Marek Vasut
2016-05-08 18:26 ` Oliver Hartkopp [this message]
2016-05-08 18:55 ` Marc Kleine-Budde
2016-05-07 22:34 ` [PATCH 5/6] net: can: ifi: Increment TX counters only on real transmission Marek Vasut
2016-05-07 22:34 ` [PATCH 6/6] net: can: ifi: Add more detailed error reporting Marek Vasut
2016-05-08 18:58 ` Marc Kleine-Budde
2016-05-08 19:25 ` Marek Vasut
2016-05-08 18:59 ` [PATCH 1/6] net: can: ifi: Start NAPI poll on bus warning too 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=572F84C2.7040907@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=marex@denx.de \
--cc=mark.rutland@arm.com \
--cc=mkl@pengutronix.de \
--cc=wg@grandegger.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).