summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWilliam Lai <b04597@freescale.com>2009-06-29 14:20:10 +0800
committerWilliam Lai <b04597@freescale.com>2009-06-29 14:20:10 +0800
commit854ea0cbbc9a25b3e6b9df5f229c5e157b5f153a (patch)
tree77d14543a8029e59a5e838856117292563722f8f /drivers
parentadbbca9331157acbcffa1ed8ba613ecd8fe464d5 (diff)
ENGR00113666 CAN: Triggers the WARN_ON_ONCE when receiving data
1. The dumping log appears once when CAN receives data for the first time, although the data is correctly received. 2. The WARN_ON_ONCE(in_irq() || irqs_disabled()) within the function _local_bh_enable_ip() in the file /kernel/softirq.c is triggered. 3. The root cause is that, the function netif_receive_skb() may only be called from softirq context, but the CAN driver calls this function directly in the interrupt handler, which is a hard interrupt request. Signed-off-by: William Lai <b04597@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/flexcan/mbm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/can/flexcan/mbm.c b/drivers/net/can/flexcan/mbm.c
index 6c0647045e79..ca1300503e02 100644
--- a/drivers/net/can/flexcan/mbm.c
+++ b/drivers/net/can/flexcan/mbm.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -99,7 +99,7 @@ static void flexcan_mb_bottom(struct net_device *dev, int index)
skb->dev = dev;
skb->protocol = __constant_htons(ETH_P_CAN);
skb->ip_summed = CHECKSUM_UNNECESSARY;
- netif_receive_skb(skb);
+ netif_rx(skb);
} else {
tmp = hwmb->mb_cs.data;
tmp = hwmb->mb_id;
@@ -156,7 +156,7 @@ static void flexcan_fifo_isr(struct net_device *dev, unsigned int iflag1)
skb->dev = dev;
skb->protocol = __constant_htons(ETH_P_CAN);
skb->ip_summed = CHECKSUM_UNNECESSARY;
- netif_receive_skb(skb);
+ netif_rx(skb);
} else {
tmp = hwmb->mb_cs.data;
tmp = hwmb->mb_id;
@@ -183,7 +183,7 @@ static void flexcan_fifo_isr(struct net_device *dev, unsigned int iflag1)
skb->dev = dev;
skb->protocol = __constant_htons(ETH_P_CAN);
skb->ip_summed = CHECKSUM_UNNECESSARY;
- netif_receive_skb(skb);
+ netif_rx(skb);
}
}
}