1/*- 2 * Copyright (c) 2011 Chelsio Communications, Inc. 3 * All rights reserved. 4 * Written by: Navdeep Parhar <np@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/cxgbe/t4_main.c 220649 2011-04-15 03:09:27Z np $"); |
30 31#include "opt_inet.h" 32 33#include <sys/param.h> 34#include <sys/conf.h> 35#include <sys/priv.h> 36#include <sys/kernel.h> 37#include <sys/bus.h> --- 995 unchanged lines hidden (view full) --- 1033 TXQ_UNLOCK(txq); 1034 return (rc); 1035} 1036 1037static void 1038cxgbe_qflush(struct ifnet *ifp) 1039{ 1040 struct port_info *pi = ifp->if_softc; |
1041 struct sge_txq *txq; 1042 int i; 1043 struct mbuf *m; |
1044 |
1045 /* queues do not exist if !IFF_DRV_RUNNING. */ 1046 if (ifp->if_drv_flags & IFF_DRV_RUNNING) { 1047 for_each_txq(pi, i, txq) { 1048 TXQ_LOCK(txq); 1049 m_freem(txq->m); 1050 while ((m = buf_ring_dequeue_sc(txq->eq.br)) != NULL) 1051 m_freem(m); 1052 TXQ_UNLOCK(txq); 1053 } 1054 } 1055 if_qflush(ifp); |
1056} 1057 1058static int 1059cxgbe_media_change(struct ifnet *ifp) 1060{ 1061 struct port_info *pi = ifp->if_softc; 1062 1063 device_printf(pi->dev, "%s unimplemented.\n", __func__); --- 1617 unchanged lines hidden (view full) --- 2681} 2682 2683void 2684cxgbe_txq_start(void *arg, int count) 2685{ 2686 struct sge_txq *txq = arg; 2687 2688 TXQ_LOCK(txq); |
2689 if (txq->eq.flags & EQ_CRFLUSHED) { 2690 txq->eq.flags &= ~EQ_CRFLUSHED; 2691 txq_start(txq->ifp, txq); 2692 } else 2693 wakeup_one(txq); /* txq is going away, wakeup free_txq */ |
2694 TXQ_UNLOCK(txq); 2695} 2696 2697int 2698t4_os_find_pci_capability(struct adapter *sc, int cap) 2699{ 2700 device_t dev; 2701 struct pci_devinfo *dinfo; --- 194 unchanged lines hidden --- |