]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
can: c_can: Set reserved bit in IFx_MASK2 to 1 on write
authorAlexander Stein <alexander.stein@systec-electronic.com>
Thu, 13 Dec 2012 09:06:10 +0000 (10:06 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 20 Feb 2013 03:15:23 +0000 (03:15 +0000)
commit 2bd3bc4e8472424f1a6009825397639a8968920a upstream.

According to C_CAN documentation, the reserved bit in IFx_MASK2 register is
fixed 1.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/c_can/c_can.c

index 21a3d77ea7e22503e3f8f2b61cf44abacf74fcdb..64647d4cf64c3ab54c0259885787f632c4d918cb 100644 (file)
@@ -446,8 +446,12 @@ static void c_can_setup_receive_object(struct net_device *dev, int iface,
 
        priv->write_reg(priv, &priv->regs->ifregs[iface].mask1,
                        IFX_WRITE_LOW_16BIT(mask));
+
+       /* According to C_CAN documentation, the reserved bit
+        * in IFx_MASK2 register is fixed 1
+        */
        priv->write_reg(priv, &priv->regs->ifregs[iface].mask2,
-                       IFX_WRITE_HIGH_16BIT(mask));
+                       IFX_WRITE_HIGH_16BIT(mask) | BIT(13));
 
        priv->write_reg(priv, &priv->regs->ifregs[iface].arb1,
                        IFX_WRITE_LOW_16BIT(id));