From f6ce5cca74b8681fdf1d7307edc66a7213b43f6f Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Thu, 22 Nov 2007 21:19:39 +0100 Subject: plip: use netif_rx_ni() for packet receive netif_rx is meant to be called from interrupts because it doesn't wake up ksoftirqd. For calling from outside interrupts, netif_rx_ni exists. This fixes plip to use netif_rx_ni. It fixes the infamous error "NOHZ: local_softirq_panding 08" that happens on some machines with NOHZ and plip --- it is caused by the fact that softirq is pending and ksoftirqd is sleeping. Signed-off-by: Mikulas Patocka Signed-off-by: Linus Torvalds --- drivers/net/plip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/plip.c') diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 5071fcd8a0b..baf2cbfc886 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c @@ -663,7 +663,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, case PLIP_PK_DONE: /* Inform the upper layer for the arrival of a packet. */ rcv->skb->protocol=plip_type_trans(rcv->skb, dev); - netif_rx(rcv->skb); + netif_rx_ni(rcv->skb); dev->last_rx = jiffies; dev->stats.rx_bytes += rcv->length.h; dev->stats.rx_packets++; -- cgit v1.2.3 From cdb32706f6948238ed6d1d85473c64c27366e9e9 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Thu, 22 Nov 2007 21:26:01 +0100 Subject: plip: fix parport_register_device name parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plip passes a string "name" that is allocated on stack to parport_register_device. parport_register_device holds the pointer to "name" and when the registering function exits, it points nowhere. On some machine, this bug causes bad names to appear in /proc, such as /proc/sys/dev/parport/parport0/devices/T^/�X^/�, on others, the plip proc node is completely missing. The patch also fixes documentation to note this requirement. Signed-off-by: Mikulas Patocka Signed-off-by: Linus Torvalds --- drivers/net/plip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/plip.c') diff --git a/drivers/net/plip.c b/drivers/net/plip.c index baf2cbfc886..57c98669984 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c @@ -1269,7 +1269,7 @@ static void plip_attach (struct parport *port) nl = netdev_priv(dev); nl->dev = dev; - nl->pardev = parport_register_device(port, name, plip_preempt, + nl->pardev = parport_register_device(port, dev->name, plip_preempt, plip_wakeup, plip_interrupt, 0, dev); -- cgit v1.2.3