[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200629181809.25338-2-michael@walle.cc>
Date: Mon, 29 Jun 2020 20:18:08 +0200
From: Michael Walle <michael@...le.cc>
To: linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Joakim Zhang <qiangqing.zhang@....com>,
dl-linux-imx <linux-imx@....com>,
Michael Walle <michael@...le.cc>
Subject: [PATCH 1/2] can: flexcan: use ctrlmode to enable CAN-FD
The driver will enable CAN-FD mode according to the ctrlmode_supported,
which will always be true, if the controller supports it. This is wrong.
Use the correct ctrlmode instead.
Signed-off-by: Michael Walle <michael@...le.cc>
---
drivers/net/can/flexcan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 12043250e398..183e094f8d66 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1345,7 +1345,7 @@ static int flexcan_chip_start(struct net_device *dev)
reg_mcr |= FLEXCAN_MCR_SRX_DIS;
/* MCR - CAN-FD */
- if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD)
+ if (priv->can.ctrlmode & CAN_CTRLMODE_FD)
reg_mcr |= FLEXCAN_MCR_FDEN;
else
reg_mcr &= ~FLEXCAN_MCR_FDEN;
--
2.20.1
Powered by blists - more mailing lists