Deleted Added
full compact
if_cp.c (130585) if_cp.c (130640)
1/*
2 * Cronyx-Tau-PCI adapter driver for FreeBSD.
3 * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1999-2004 Cronyx Engineering.
8 * Author: Kurakin Roman, <rik@cronyx.ru>

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

17 * modify and redistribute this software in source and binary forms,
18 * as long as this message is kept with the software, all derivative
19 * works or modified versions.
20 *
21 * $Cronyx: if_cp.c,v 1.1.2.32 2004/02/26 17:56:39 rik Exp $
22 */
23
24#include <sys/cdefs.h>
1/*
2 * Cronyx-Tau-PCI adapter driver for FreeBSD.
3 * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode,
4 * and asyncronous channels with full modem control.
5 * Keepalive protocol implemented in both Cisco and PPP modes.
6 *
7 * Copyright (C) 1999-2004 Cronyx Engineering.
8 * Author: Kurakin Roman, <rik@cronyx.ru>

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

17 * modify and redistribute this software in source and binary forms,
18 * as long as this message is kept with the software, all derivative
19 * works or modified versions.
20 *
21 * $Cronyx: if_cp.c,v 1.1.2.32 2004/02/26 17:56:39 rik Exp $
22 */
23
24#include <sys/cdefs.h>
25__FBSDID("$FreeBSD: head/sys/dev/cp/if_cp.c 130585 2004-06-16 09:47:26Z phk $");
25__FBSDID("$FreeBSD: head/sys/dev/cp/if_cp.c 130640 2004-06-17 17:16:53Z phk $");
26
27#include <sys/param.h>
28
29#if __FreeBSD_version >= 500000
30# define NPCI 1
31#else
32# include "pci.h"
33#endif

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

2652#else /* __FreeBSD_version >= 400000 */
2653static int cp_modevent (module_t mod, int type, void *unused)
2654{
2655 struct cdev *dev;
2656 static int load_count = 0;
2657 struct cdevsw *cdsw;
2658
2659#if __FreeBSD_version >= 502103
26
27#include <sys/param.h>
28
29#if __FreeBSD_version >= 500000
30# define NPCI 1
31#else
32# include "pci.h"
33#endif

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

2652#else /* __FreeBSD_version >= 400000 */
2653static int cp_modevent (module_t mod, int type, void *unused)
2654{
2655 struct cdev *dev;
2656 static int load_count = 0;
2657 struct cdevsw *cdsw;
2658
2659#if __FreeBSD_version >= 502103
2660 dev = udev2dev (makeudev(CDEV_MAJOR, 0));
2660 dev = findcdev (makedev(CDEV_MAJOR, 0));
2661#else
2662 dev = makedev (CDEV_MAJOR, 0);
2663#endif
2664 switch (type) {
2665 case MOD_LOAD:
2661#else
2662 dev = makedev (CDEV_MAJOR, 0);
2663#endif
2664 switch (type) {
2665 case MOD_LOAD:
2666 if (dev != NODEV &&
2666 if (dev != NULL &&
2667 (cdsw = devsw (dev)) &&
2668 cdsw->d_maj == CDEV_MAJOR) {
2669 printf ("Tau-PCI driver is already in system\n");
2670 return (ENXIO);
2671 }
2672#if __FreeBSD_version >= 500000 && defined NETGRAPH
2673 if (ng_newtype (&typestruct))
2674 printf ("Failed to register ng_cp\n");

--- 97 unchanged lines hidden ---
2667 (cdsw = devsw (dev)) &&
2668 cdsw->d_maj == CDEV_MAJOR) {
2669 printf ("Tau-PCI driver is already in system\n");
2670 return (ENXIO);
2671 }
2672#if __FreeBSD_version >= 500000 && defined NETGRAPH
2673 if (ng_newtype (&typestruct))
2674 printf ("Failed to register ng_cp\n");

--- 97 unchanged lines hidden ---