Commit c7b5c6cd authored by Alexander Stein's avatar Alexander Stein Committed by Greg Kroah-Hartman

can: c_can: Set reserved bit in IFx_MASK2 to 1 on write

commit 2bd3bc4e upstream.

According to C_CAN documentation, the reserved bit in IFx_MASK2 register is
fixed 1.
Signed-off-by: default avatarAlexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0700471
...@@ -446,8 +446,12 @@ static void c_can_setup_receive_object(struct net_device *dev, int iface, ...@@ -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, priv->write_reg(priv, &priv->regs->ifregs[iface].mask1,
IFX_WRITE_LOW_16BIT(mask)); 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, 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, priv->write_reg(priv, &priv->regs->ifregs[iface].arb1,
IFX_WRITE_LOW_16BIT(id)); IFX_WRITE_LOW_16BIT(id));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment