diff options
author | Dong Aisheng <b29396@freescale.com> | 2011-11-16 17:46:59 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-01-09 21:06:59 +0800 |
commit | 13b90d28fc5a4761e08b8ca3f78e7ed54f0c7058 (patch) | |
tree | 4143db4097edfb415c68679bf571f15cf4e286c7 /drivers/net | |
parent | deb93986f13cf72dccd98a26e8d37e147fbf9ee8 (diff) |
ENGR00162364 flexcan: fix endless errors causing system hang
Clear state error to avoid ednless state error if error happens
which will call napi_schedule() each time, seems a little high load,
to cause system hang.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/flexcan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 83cbbee95f8d..b01e59bac733 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -435,11 +435,15 @@ static void do_state(struct net_device *dev, static int flexcan_poll_state(struct net_device *dev, u32 reg_esr) { struct flexcan_priv *priv = netdev_priv(dev); + struct flexcan_regs __iomem *regs = priv->base; struct sk_buff *skb; struct can_frame *cf; enum can_state new_state; int flt; + /* clear state error if any (write 1 to clear)*/ + writel(reg_esr, ®s->esr); + flt = reg_esr & FLEXCAN_ESR_FLT_CONF_MASK; if (likely(flt == FLEXCAN_ESR_FLT_CONF_ACTIVE)) { if (likely(!(reg_esr & (FLEXCAN_ESR_TX_WRN | |