From cbf398db3c1bf8d8f2f55eb35ca9de03dd698a34 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Fri, 3 Oct 2014 09:25:22 +0000 Subject: dont need to hold the kernel lock to call MCLGETI and m_freem now. --- sys/dev/pci/if_myx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index a7e8712108e..efeb3d235b5 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.65 2014/10/03 06:36:10 dlg Exp $ */ +/* $OpenBSD: if_myx.c,v 1.66 2014/10/03 09:25:21 dlg Exp $ */ /* * Copyright (c) 2007 Reyk Floeter @@ -1779,10 +1779,10 @@ myx_txeof(struct myx_softc *sc, u_int32_t done_count) KERNEL_LOCK(); bus_dmamap_unload(sc->sc_dmat, map); - m_freem(m); ifp->if_opackets++; KERNEL_UNLOCK(); + m_freem(m); myx_buf_put(&sc->sc_tx_buf_free, mb); } while (++sc->sc_tx_count != done_count); @@ -1951,9 +1951,7 @@ myx_buf_fill(struct myx_softc *sc, int ring) struct mbuf *m; int rv; - KERNEL_LOCK(); m = MCLGETI(NULL, M_DONTWAIT, NULL, sizes[ring]); - KERNEL_UNLOCK(); if (m == NULL) return (NULL); m->m_len = m->m_pkthdr.len = sizes[ring]; @@ -1977,9 +1975,7 @@ myx_buf_fill(struct myx_softc *sc, int ring) put: myx_buf_put(&sc->sc_rx_buf_free[ring], mb); mfree: - KERNEL_LOCK(); m_freem(m); - KERNEL_UNLOCK(); return (NULL); } -- cgit v1.2.3