Skip to content

Commit 0c3cdb4

Browse files
GBertgregkh
authored andcommitted
can: sun4i: fix loopback mode
commit 3a379f5b36ae039dfeb6f73316e47ab1af4945df upstream. Fix loopback mode by setting the right flag and remove presume mode. Signed-off-by: Gerhard Bertelsmann <info@gerhard-bertelsmann.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 62b54cc commit 0c3cdb4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/net/can/sun4i_can.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ static int sun4i_can_start(struct net_device *dev)
342342

343343
/* enter the selected mode */
344344
mod_reg_val = readl(priv->base + SUN4I_REG_MSEL_ADDR);
345-
if (priv->can.ctrlmode & CAN_CTRLMODE_PRESUME_ACK)
345+
if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
346346
mod_reg_val |= SUN4I_MSEL_LOOPBACK_MODE;
347347
else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
348348
mod_reg_val |= SUN4I_MSEL_LISTEN_ONLY_MODE;
@@ -811,7 +811,6 @@ static int sun4ican_probe(struct platform_device *pdev)
811811
priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING |
812812
CAN_CTRLMODE_LISTENONLY |
813813
CAN_CTRLMODE_LOOPBACK |
814-
CAN_CTRLMODE_PRESUME_ACK |
815814
CAN_CTRLMODE_3_SAMPLES;
816815
priv->base = addr;
817816
priv->clk = clk;

0 commit comments

Comments
 (0)