From f3d922aec8cfc69617e079b7623dd6a09ad345fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Tigeot?= Date: Sun, 30 Sep 2012 13:27:15 +0200 Subject: [PATCH] ixgbe: Purge queue on inactive interfaces * The transmission code needs to process all queued packets in one way or another; if this is not done, the kernel will busy loop * Fix a kernel freeze issue when bringing up network interfaces not having an active link (cable not plugged...) --- sys/dev/netif/ixgbe/ixgbe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/netif/ixgbe/ixgbe.c b/sys/dev/netif/ixgbe/ixgbe.c index a2f675f7ed..e8e138debe 100644 --- a/sys/dev/netif/ixgbe/ixgbe.c +++ b/sys/dev/netif/ixgbe/ixgbe.c @@ -689,8 +689,11 @@ ixgbe_start_locked(struct tx_ring *txr, struct ifnet * ifp) if ((ifp->if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING) return; - if (!adapter->link_active) + + if (!adapter->link_active) { + ifq_purge(&ifp->if_snd); return; + } while (!ifq_is_empty(&ifp->if_snd)) { if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE) { -- 2.41.0