Deleted Added
sdiff udiff text old ( 170037 ) new ( 170076 )
full compact
1/**************************************************************************
2
3Copyright (c) 2007, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

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

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_main.c 170076 2007-05-28 22:57:27Z kmacy $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/bus.h>
37#include <sys/module.h>
38#include <sys/pciio.h>
39#include <sys/conf.h>

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

67#include <netinet/ip.h>
68#include <netinet/tcp.h>
69#include <netinet/udp.h>
70
71#include <dev/pci/pcireg.h>
72#include <dev/pci/pcivar.h>
73#include <dev/pci/pci_private.h>
74
75#ifdef CONFIG_DEFINED
76#include <cxgb_include.h>
77#else
78#include <dev/cxgb/cxgb_include.h>
79#endif
80
81#ifdef PRIV_SUPPORTED
82#include <sys/priv.h>
83#endif
84
85static int cxgb_setup_msix(adapter_t *, int);
86static void cxgb_init(void *);
87static void cxgb_init_locked(struct port_info *);
88static void cxgb_stop_locked(struct port_info *);

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

1588 m = m0;
1589 if ((err = t3_encap(p, &m)) != 0)
1590 break;
1591 BPF_MTAP(ifp, m);
1592 }
1593 mtx_unlock(&txq->lock);
1594
1595 if (__predict_false(err)) {
1596 if (err == ENOMEM) {
1597 IFQ_LOCK(&ifp->if_snd);
1598 IFQ_DRV_PREPEND(&ifp->if_snd, m);
1599 IFQ_UNLOCK(&ifp->if_snd);
1600 }
1601 }
1602 if (err == 0 && m == NULL) {
1603 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
1604 return (ENOBUFS);
1605 }
1606 if ((err == 0) && (txq->size <= txq->in_use + TX_MAX_DESC) &&
1607 (ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) {
1608 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
1609 return (ENOSPC);
1610 }
1611 return (err);
1612}
1613
1614static void
1615cxgb_start_proc(void *arg, int ncount)
1616{
1617 struct ifnet *ifp = arg;

--- 616 unchanged lines hidden ---