Commit 2d408b42 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IRDA]: fix printk format
  [NETPOLL] netconsole: fix soft lockup when removing module
  [NETPOLL]: tx lock deadlock fix
  SCTP: lock_sock_nested in sctp_sock_migrate
  SCTP: Fix sctp_getsockopt_get_peer_addrs
  SCTP: update sctp_getsockopt helpers to allow oversized buffers
parents fde937d8 5f021217
......@@ -509,7 +509,7 @@ static void irport_timeout(struct net_device *dev)
IRDA_DEBUG(0, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n",
__FUNCTION__, iir, lsr, iobase);
IRDA_DEBUG(0, "%s(), transmitting=%d, remain=%d, done=%d\n",
IRDA_DEBUG(0, "%s(), transmitting=%d, remain=%d, done=%td\n",
__FUNCTION__, self->transmitting, self->tx_buff.len,
self->tx_buff.data - self->tx_buff.head);
......
......@@ -72,6 +72,7 @@ static void queue_process(struct work_struct *work)
netif_tx_unlock(dev);
local_irq_restore(flags);
if (atomic_read(&npinfo->refcnt))
schedule_delayed_work(&npinfo->tx_work, HZ/10);
return;
}
......@@ -250,23 +251,24 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
unsigned long flags;
local_irq_save(flags);
if (netif_tx_trylock(dev)) {
/* try until next clock tick */
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
tries > 0; --tries) {
if (netif_tx_trylock(dev)) {
if (!netif_queue_stopped(dev))
status = dev->hard_start_xmit(skb, dev);
netif_tx_unlock(dev);
if (status == NETDEV_TX_OK)
break;
}
/* tickle device maybe there is some cleanup */
netpoll_poll(np);
udelay(USEC_PER_POLL);
}
netif_tx_unlock(dev);
}
local_irq_restore(flags);
}
......@@ -784,9 +786,15 @@ void netpoll_cleanup(struct netpoll *np)
if (atomic_dec_and_test(&npinfo->refcnt)) {
skb_queue_purge(&npinfo->arp_tx);
skb_queue_purge(&npinfo->txq);
cancel_rearming_delayed_work(&npinfo->tx_work);
cancel_delayed_work(&npinfo->tx_work);
flush_scheduled_work();
/* clean after last, unfinished work */
if (!skb_queue_empty(&npinfo->txq)) {
struct sk_buff *skb;
skb = __skb_dequeue(&npinfo->txq);
kfree_skb(skb);
}
kfree(npinfo);
}
}
......
This diff is collapsed.
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