igb: Setup subqueue CPUID before possible calling of igb_init
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 25 Jan 2013 03:34:36 +0000 (11:34 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 25 Jan 2013 03:34:36 +0000 (11:34 +0800)
sys/dev/netif/igb/if_igb.c

index 2677ba3..4f7bcac 100644 (file)
@@ -3063,6 +3063,12 @@ igb_npoll(struct ifnet *ifp, struct ifpoll_info *info)
                                igb_init(sc);
                }
        } else {
+               for (i = 0; i < sc->tx_ring_cnt; ++i) {
+                       struct igb_tx_ring *txr = &sc->tx_rings[i];
+
+                       ifsq_set_cpuid(txr->ifsq, txr->tx_intr_cpuid);
+               }
+
                if (ifp->if_flags & IFF_RUNNING) {
                        if (igb_get_rxring_inuse(sc, FALSE) ==
                            sc->rx_ring_inuse)
@@ -3070,12 +3076,6 @@ igb_npoll(struct ifnet *ifp, struct ifpoll_info *info)
                        else
                                igb_init(sc);
                }
-
-               for (i = 0; i < sc->tx_ring_cnt; ++i) {
-                       struct igb_tx_ring *txr = &sc->tx_rings[i];
-
-                       ifsq_set_cpuid(txr->ifsq, txr->tx_intr_cpuid);
-               }
        }
 }