Deleted Added
full compact
t4_main.c (220643) t4_main.c (220649)
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>
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 220643 2011-04-14 20:06:23Z np $");
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;
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;
1041
1044
1042 device_printf(pi->dev, "%s unimplemented.\n", __func__);
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);
1043}
1044
1045static int
1046cxgbe_media_change(struct ifnet *ifp)
1047{
1048 struct port_info *pi = ifp->if_softc;
1049
1050 device_printf(pi->dev, "%s unimplemented.\n", __func__);

--- 1617 unchanged lines hidden (view full) ---

2668}
2669
2670void
2671cxgbe_txq_start(void *arg, int count)
2672{
2673 struct sge_txq *txq = arg;
2674
2675 TXQ_LOCK(txq);
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);
2676 txq->eq.flags &= ~EQ_CRFLUSHED;
2677 txq_start(txq->ifp, 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 */
2678 TXQ_UNLOCK(txq);
2679}
2680
2681int
2682t4_os_find_pci_capability(struct adapter *sc, int cap)
2683{
2684 device_t dev;
2685 struct pci_devinfo *dinfo;

--- 194 unchanged lines hidden ---
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 ---