Index: if_myx.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_myx.c,v retrieving revision 1.102 diff -u -p -r1.102 if_myx.c --- if_myx.c 7 Feb 2017 06:51:58 -0000 1.102 +++ if_myx.c 1 Aug 2017 00:24:58 -0000 @@ -292,20 +292,6 @@ myx_attach(struct device *parent, struct part[0] == '\0' ? "(unknown)" : part, ether_sprintf(sc->sc_ac.ac_enaddr)); - /* this is sort of racy */ - if (myx_mcl_pool == NULL) { - myx_mcl_pool = malloc(sizeof(*myx_mcl_pool), M_DEVBUF, - M_WAITOK); - if (myx_mcl_pool == NULL) { - printf("%s: unable to allocate mcl pool\n", - DEVNAME(sc)); - goto unmap; - } - - m_pool_init(myx_mcl_pool, MYX_RXBIG_SIZE, MYX_BOUNDARY, - "myxmcl"); - } - if (myx_pcie_dc(sc, pa) != 0) printf("%s: unable to configure PCI Express\n", DEVNAME(sc)); @@ -468,6 +454,16 @@ myx_attachhook(struct device *self) struct myx_softc *sc = (struct myx_softc *)self; struct ifnet *ifp = &sc->sc_ac.ac_if; struct myx_cmd mc; + + /* this is sort of racy */ + if (myx_mcl_pool == NULL) { + myx_mcl_pool = malloc(sizeof(*myx_mcl_pool), M_DEVBUF, + M_WAITOK); + + m_pool_init(myx_mcl_pool, MYX_RXBIG_SIZE, MYX_BOUNDARY, + "myxmcl"); + pool_cache_init(myx_mcl_pool); + } /* Allocate command DMA memory */ if (myx_dmamem_alloc(sc, &sc->sc_cmddma, MYXALIGN_CMD,