Permalink
Browse files

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...)
  • Loading branch information...
1 parent 4450992 commit f3d922aec8cfc69617e079b7623dd6a09ad345fb François Tigeot committed Sep 30, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 sys/dev/netif/ixgbe/ixgbe.c
View
5 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) {

0 comments on commit f3d922a

Please sign in to comment.