Hi, all. I fixed and committed some smallproblem to -current.
The rest is: - Revert ixgbe_netbsd.c rev. 1.2 - make CORE_LOCK adaptive - Release spin lock while reinitializing the jumb buffer structure. Is it OK to commit? Index: ixgbe.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ixgbe/ixgbe.c,v retrieving revision 1.17 diff -u -r1.17 ixgbe.c --- ixgbe.c 4 Feb 2015 04:37:13 -0000 1.17 +++ ixgbe.c 4 Feb 2015 04:38:10 -0000 @@ -3933,12 +3933,16 @@ /* Free current RX buffer structs and their mbufs */ ixgbe_free_receive_ring(rxr); + IXGBE_RX_UNLOCK(rxr); + /* Now reinitialize our supply of jumbo mbufs. The number * or size of jumbo mbufs may have changed. */ ixgbe_jcl_reinit(&adapter->jcl_head, rxr->ptag->dt_dmat, 2 * adapter->num_rx_desc, adapter->rx_mbuf_sz); + IXGBE_RX_LOCK(rxr); + /* Configure header split? */ if (ixgbe_header_split) rxr->hdr_split = TRUE; Index: ixgbe.h =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ixgbe/ixgbe.h,v retrieving revision 1.1 diff -u -r1.1 ixgbe.h --- ixgbe.h 12 Aug 2011 21:55:29 -0000 1.1 +++ ixgbe.h 4 Feb 2015 04:38:10 -0000 @@ -476,7 +476,7 @@ #define IXGBE_CORE_LOCK_INIT(_sc, _name) \ - mutex_init(&(_sc)->core_mtx, MUTEX_DEFAULT, IPL_NET) + mutex_init(&(_sc)->core_mtx, MUTEX_DEFAULT, IPL_SOFTNET) #define IXGBE_CORE_LOCK_DESTROY(_sc) mutex_destroy(&(_sc)->core_mtx) #define IXGBE_TX_LOCK_DESTROY(_sc) mutex_destroy(&(_sc)->tx_mtx) #define IXGBE_RX_LOCK_DESTROY(_sc) mutex_destroy(&(_sc)->rx_mtx) Index: ixgbe_netbsd.c =================================================================== RCS file: /cvsroot/src/sys/dev/pci/ixgbe/ixgbe_netbsd.c,v retrieving revision 1.2 diff -u -r1.2 ixgbe_netbsd.c --- ixgbe_netbsd.c 28 Jan 2015 00:30:25 -0000 1.2 +++ ixgbe_netbsd.c 4 Feb 2015 04:38:10 -0000 @@ -56,7 +56,7 @@ *dtp = NULL; - if ((dt = kmem_zalloc(sizeof(*dt), KM_NOSLEEP)) == NULL) + if ((dt = kmem_zalloc(sizeof(*dt), KM_SLEEP)) == NULL) return ENOMEM; dt->dt_dmat = dmat; @@ -136,19 +136,19 @@ ixgbe_extmem_t *em; int nseg, rc; - em = kmem_zalloc(sizeof(*em), KM_NOSLEEP); + em = kmem_zalloc(sizeof(*em), KM_SLEEP); if (em == NULL) return NULL; rc = bus_dmamem_alloc(dmat, size, PAGE_SIZE, 0, &em->em_seg, 1, &nseg, - BUS_DMA_NOWAIT); + BUS_DMA_WAITOK); if (rc != 0) goto post_zalloc_err; rc = bus_dmamem_map(dmat, &em->em_seg, 1, size, &em->em_vaddr, - BUS_DMA_NOWAIT); + BUS_DMA_WAITOK); if (rc != 0) goto post_dmamem_err; -- ----------------------------------------------- SAITOH Masanobu (msai...@execsw.org msai...@netbsd.org)