if_ce.c (199407) | if_ce.c (207554) |
---|---|
1/* 2 * Cronyx-Tau32-PCI adapter driver for FreeBSD. 3 * 4 * Copyright (C) 2003-2005 Cronyx Engineering. 5 * Copyright (C) 2003-2005 Kurakin Roman, <rik@FreeBSD.org> 6 * 7 * This software is distributed with NO WARRANTIES, not even the implied 8 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 * 10 * Authors grant any other persons or organisations a permission to use, 11 * modify and redistribute this software in source and binary forms, 12 * as long as this message is kept with the software, all derivative 13 * works or modified versions. 14 * 15 * $Cronyx: if_ce.c,v 1.9.2.8 2005/11/21 14:17:44 rik Exp $ 16 */ 17 18#include <sys/cdefs.h> | 1/* 2 * Cronyx-Tau32-PCI adapter driver for FreeBSD. 3 * 4 * Copyright (C) 2003-2005 Cronyx Engineering. 5 * Copyright (C) 2003-2005 Kurakin Roman, <rik@FreeBSD.org> 6 * 7 * This software is distributed with NO WARRANTIES, not even the implied 8 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 * 10 * Authors grant any other persons or organisations a permission to use, 11 * modify and redistribute this software in source and binary forms, 12 * as long as this message is kept with the software, all derivative 13 * works or modified versions. 14 * 15 * $Cronyx: if_ce.c,v 1.9.2.8 2005/11/21 14:17:44 rik Exp $ 16 */ 17 18#include <sys/cdefs.h> |
19__FBSDID("$FreeBSD: head/sys/dev/ce/if_ce.c 199407 2009-11-17 16:43:02Z jhb $"); | 19__FBSDID("$FreeBSD: head/sys/dev/ce/if_ce.c 207554 2010-05-03 07:32:50Z sobomax $"); |
20 21#include <sys/param.h> 22 23#if __FreeBSD_version >= 500000 24# define NPCI 1 25#else 26# include "pci.h" 27#endif --- 668 unchanged lines hidden (view full) --- 696#if __FreeBSD_version >= 500000 697 NG_NODE_UNREF (d->node); 698#else 699 ng_rmnode (d->node); 700 ng_unref (d->node); 701#endif 702 continue; 703 } | 20 21#include <sys/param.h> 22 23#if __FreeBSD_version >= 500000 24# define NPCI 1 25#else 26# include "pci.h" 27#endif --- 668 unchanged lines hidden (view full) --- 696#if __FreeBSD_version >= 500000 697 NG_NODE_UNREF (d->node); 698#else 699 ng_rmnode (d->node); 700 ng_unref (d->node); 701#endif 702 continue; 703 } |
704 d->queue.ifq_maxlen = IFQ_MAXLEN; 705 d->hi_queue.ifq_maxlen = IFQ_MAXLEN; 706 d->rqueue.ifq_maxlen = IFQ_MAXLEN; | 704 d->queue.ifq_maxlen = ifqmaxlen; 705 d->hi_queue.ifq_maxlen = ifqmaxlen; 706 d->rqueue.ifq_maxlen = ifqmaxlen; |
707#if __FreeBSD_version >= 500000 708 mtx_init (&d->queue.ifq_mtx, "ce_queue", NULL, MTX_DEF); 709 mtx_init (&d->hi_queue.ifq_mtx, "ce_queue_hi", NULL, MTX_DEF); 710 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); 711#endif 712#else /*NETGRAPH*/ 713#if __FreeBSD_version >= 600031 714 d->ifp = if_alloc(IFT_PPP); --- 12 unchanged lines hidden (view full) --- 727 d->ifp->if_unit = b->num * NCHAN + c->num; 728 d->ifp->if_name = "ce"; 729#endif 730 d->ifp->if_mtu = PP_MTU; 731 d->ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST; 732 d->ifp->if_ioctl = ce_sioctl; 733 d->ifp->if_start = ce_ifstart; 734 d->ifp->if_init = ce_initialize; | 707#if __FreeBSD_version >= 500000 708 mtx_init (&d->queue.ifq_mtx, "ce_queue", NULL, MTX_DEF); 709 mtx_init (&d->hi_queue.ifq_mtx, "ce_queue_hi", NULL, MTX_DEF); 710 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); 711#endif 712#else /*NETGRAPH*/ 713#if __FreeBSD_version >= 600031 714 d->ifp = if_alloc(IFT_PPP); --- 12 unchanged lines hidden (view full) --- 727 d->ifp->if_unit = b->num * NCHAN + c->num; 728 d->ifp->if_name = "ce"; 729#endif 730 d->ifp->if_mtu = PP_MTU; 731 d->ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST; 732 d->ifp->if_ioctl = ce_sioctl; 733 d->ifp->if_start = ce_ifstart; 734 d->ifp->if_init = ce_initialize; |
735 d->rqueue.ifq_maxlen = IFQ_MAXLEN; | 735 d->rqueue.ifq_maxlen = ifqmaxlen; |
736#if __FreeBSD_version >= 500000 737 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); 738#endif 739 sppp_attach (d->ifp); 740 if_attach (d->ifp); 741 IFP2SP(d->ifp)->pp_tlf = ce_tlf; 742 IFP2SP(d->ifp)->pp_tls = ce_tls; 743 /* If BPF is in the kernel, call the attach for it. --- 1925 unchanged lines hidden --- | 736#if __FreeBSD_version >= 500000 737 mtx_init (&d->rqueue.ifq_mtx, "ce_rqueue", NULL, MTX_DEF); 738#endif 739 sppp_attach (d->ifp); 740 if_attach (d->ifp); 741 IFP2SP(d->ifp)->pp_tlf = ce_tlf; 742 IFP2SP(d->ifp)->pp_tls = ce_tls; 743 /* If BPF is in the kernel, call the attach for it. --- 1925 unchanged lines hidden --- |