Message ID | 20200629181809.25338-2-michael@walle.cc |
---|---|
State | Awaiting Upstream |
Delegated to: | David Miller |
Headers | show |
Series | can: flexcan: small fix and ISO CAN-FD support | expand |
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;
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@walle.cc> --- drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)