summaryrefslogtreecommitdiffstats
path: root/sys/netatm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netatm')
-rw-r--r--sys/netatm/atm_device.c24
-rw-r--r--sys/netatm/atm_if.h6
-rw-r--r--sys/netatm/atm_proto.c2
-rw-r--r--sys/netatm/atm_subr.c8
-rw-r--r--sys/netatm/ipatm/ipatm_load.c84
-rw-r--r--sys/netatm/kern_include.h10
-rw-r--r--sys/netatm/sigpvc/sigpvc_if.c84
-rw-r--r--sys/netatm/spans/spans_if.c84
-rw-r--r--sys/netatm/uni/uni_load.c84
9 files changed, 0 insertions, 386 deletions
diff --git a/sys/netatm/atm_device.c b/sys/netatm/atm_device.c
index 9c645a5..9bd4ee1 100644
--- a/sys/netatm/atm_device.c
+++ b/sys/netatm/atm_device.c
@@ -449,19 +449,7 @@ atm_dev_alloc(size, align, flags)
*
* This is obviously very OS-specific stuff
*/
-#ifdef sun
- if (flags & ATM_DEV_NONCACHE) {
- /* Byte-aligned */
- kalign = sizeof(long);
- } else {
- /* Doubleword-aligned */
- kalign = sizeof(double);
- }
-#elif (defined(BSD) && (BSD >= 199103))
kalign = MINALLOCSIZE;
-#else
- #error Unsupported/unconfigured OS
-#endif
/*
* Figure out how much memory we must allocate to satify the
@@ -476,13 +464,7 @@ atm_dev_alloc(size, align, flags)
* Finally, go get the memory
*/
if (flags & ATM_DEV_NONCACHE) {
-#ifdef sun
- mep->me_kaddr = IOPBALLOC(ksize);
-#elif defined(__i386__)
mep->me_kaddr = KM_ALLOC(ksize, M_DEVBUF, M_NOWAIT);
-#else
- #error Unsupported/unconfigured OS
-#endif
} else {
mep->me_kaddr = KM_ALLOC(ksize, M_DEVBUF, M_NOWAIT);
}
@@ -572,13 +554,7 @@ atm_dev_free(uaddr)
* Give the memory space back to the kernel
*/
if (mep->me_flags & ATM_DEV_NONCACHE) {
-#ifdef sun
- IOPBFREE(mep->me_kaddr, mep->me_ksize);
-#elif defined(__i386__)
KM_FREE(mep->me_kaddr, mep->me_ksize, M_DEVBUF);
-#else
- #error Unsupported/unconfigured OS
-#endif
} else {
KM_FREE(mep->me_kaddr, mep->me_ksize, M_DEVBUF);
}
diff --git a/sys/netatm/atm_if.h b/sys/netatm/atm_if.h
index d2ea471..3664cba 100644
--- a/sys/netatm/atm_if.h
+++ b/sys/netatm/atm_if.h
@@ -376,13 +376,7 @@ struct atm_ncm {
typedef void (atm_intr_t) __P((void *, KBuffer *)); /* Callback function type */
typedef atm_intr_t *atm_intr_func_t; /* Pointer to callback function */
-#ifdef sun
-#define SCHED_ATM schednetisr(atm_intr)
-#endif
-#ifdef __FreeBSD__
-#define NETISR_ATM AF_ATM
#define SCHED_ATM schednetisr(NETISR_ATM)
-#endif
#ifdef sgi
extern int atm_intr_index;
#define SCHED_ATM schednetisr(atm_intr_index)
diff --git a/sys/netatm/atm_proto.c b/sys/netatm/atm_proto.c
index a75024a..1b1c2ed 100644
--- a/sys/netatm/atm_proto.c
+++ b/sys/netatm/atm_proto.c
@@ -108,9 +108,7 @@ struct domain atmdomain = {
&atmsw[sizeof(atmsw) / sizeof(atmsw[0])]
};
-#ifdef __FreeBSD__
DOMAIN_SET(atm);
-#endif
#if (defined(__FreeBSD__) && (BSD >= 199506))
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c
index beed42b..962977b 100644
--- a/sys/netatm/atm_subr.c
+++ b/sys/netatm/atm_subr.c
@@ -115,20 +115,12 @@ atm_initialize()
return;
atm_init = 1;
-#ifndef __FreeBSD__
- /*
- * Add ATM protocol family
- */
- (void) protocol_family(&atmdomain, NULL, NULL);
-#endif
atm_intrq.ifq_maxlen = ATM_INTRQ_MAX;
#ifdef sgi
atm_intr_index = register_isr(atm_intr);
#endif
-#ifdef __FreeBSD__
register_netisr(NETISR_ATM, atm_intr);
-#endif
/*
* Initialize subsystems
diff --git a/sys/netatm/ipatm/ipatm_load.c b/sys/netatm/ipatm/ipatm_load.c
index 08c5d43..e158525 100644
--- a/sys/netatm/ipatm/ipatm_load.c
+++ b/sys/netatm/ipatm/ipatm_load.c
@@ -660,90 +660,7 @@ ipatm_dounload()
}
-#ifdef sun
-/*
- * Loadable driver description
- */
-struct vdldrv ipatm_drv = {
- VDMAGIC_PSEUDO, /* Pseudo Driver */
- "ipatm_mod", /* name */
- NULL, /* dev_ops */
- NULL, /* bdevsw */
- NULL, /* cdevsw */
- 0, /* blockmajor */
- 0 /* charmajor */
-};
-
-
-/*
- * Loadable module support entry point
- *
- * This is the routine called by the vd driver for all loadable module
- * functions for this pseudo driver. This routine name must be specified
- * on the modload(1) command. This routine will be called whenever the
- * modload(1), modunload(1) or modstat(1) commands are issued for this
- * module.
- *
- * Arguments:
- * cmd vd command code
- * vdp pointer to vd driver's structure
- * vdi pointer to command-specific vdioctl_* structure
- * vds pointer to status structure (VDSTAT only)
- *
- * Returns:
- * 0 command was successful
- * errno command failed - reason indicated
- *
- */
-int
-ipatm_mod(cmd, vdp, vdi, vds)
- int cmd;
- struct vddrv *vdp;
- caddr_t vdi;
- struct vdstat *vds;
-{
- int err = 0;
-
- switch (cmd) {
-
- case VDLOAD:
- /*
- * Module Load
- *
- * We dont support any user configuration
- */
- err = ipatm_doload();
- if (err == 0)
- /* Let vd driver know about us */
- vdp->vdd_vdtab = (struct vdlinkage *)&ipatm_drv;
- break;
-
- case VDUNLOAD:
- /*
- * Module Unload
- */
- err = ipatm_dounload();
- break;
-
- case VDSTAT:
- /*
- * Module Status
- */
-
- /* Not much to say at the moment */
-
- break;
-
- default:
- log(LOG_ERR, "ipatm_mod: Unknown vd command 0x%x\n", cmd);
- err = EINVAL;
- }
-
- return (err);
-}
-#endif /* sun */
-#ifdef __FreeBSD__
#include <sys/exec.h>
#include <sys/sysent.h>
@@ -831,7 +748,6 @@ ipatm_mod(lkmtp, cmd, ver)
MOD_DISPATCH(ipatm, lkmtp, cmd, ver,
ipatm_load, ipatm_unload, lkm_nullcmd);
}
-#endif /* __FreeBSD__ */
#else /* !ATM_IP_MODULE */
diff --git a/sys/netatm/kern_include.h b/sys/netatm/kern_include.h
index 36a4071..5854741 100644
--- a/sys/netatm/kern_include.h
+++ b/sys/netatm/kern_include.h
@@ -59,21 +59,11 @@
#include <sys/socketvar.h>
#include <sys/syslog.h>
-#ifdef sun
-#include <machine/cpu.h>
-#include <machine/mmu.h>
-#include <machine/psl.h>
-#include <sun/openprom.h>
-#include <sun/vddrv.h>
-#include <sundev/mbvar.h>
-#endif
-#ifdef __FreeBSD__
#include <sys/eventhandler.h>
#include <machine/clock.h>
#include <vm/vm.h>
#include <vm/pmap.h>
-#endif
/*
* Networking support
diff --git a/sys/netatm/sigpvc/sigpvc_if.c b/sys/netatm/sigpvc/sigpvc_if.c
index 3c454f6..8163698 100644
--- a/sys/netatm/sigpvc/sigpvc_if.c
+++ b/sys/netatm/sigpvc/sigpvc_if.c
@@ -737,90 +737,7 @@ sigpvc_dounload()
}
-#ifdef sun
-/*
- * Loadable driver description
- */
-struct vdldrv sigpvc_drv = {
- VDMAGIC_PSEUDO, /* Pseudo Driver */
- "sigpvc_mod", /* name */
- NULL, /* dev_ops */
- NULL, /* bdevsw */
- NULL, /* cdevsw */
- 0, /* blockmajor */
- 0 /* charmajor */
-};
-
-
-/*
- * Loadable module support entry point
- *
- * This is the routine called by the vd driver for all loadable module
- * functions for this pseudo driver. This routine name must be specified
- * on the modload(1) command. This routine will be called whenever the
- * modload(1), modunload(1) or modstat(1) commands are issued for this
- * module.
- *
- * Arguments:
- * cmd vd command code
- * vdp pointer to vd driver's structure
- * vdi pointer to command-specific vdioctl_* structure
- * vds pointer to status structure (VDSTAT only)
- *
- * Returns:
- * 0 command was successful
- * errno command failed - reason indicated
- *
- */
-int
-sigpvc_mod(cmd, vdp, vdi, vds)
- int cmd;
- struct vddrv *vdp;
- caddr_t vdi;
- struct vdstat *vds;
-{
- int err = 0;
-
- switch (cmd) {
-
- case VDLOAD:
- /*
- * Module Load
- *
- * We dont support any user configuration
- */
- err = sigpvc_doload();
- if (err == 0)
- /* Let vd driver know about us */
- vdp->vdd_vdtab = (struct vdlinkage *)&sigpvc_drv;
- break;
-
- case VDUNLOAD:
- /*
- * Module Unload
- */
- err = sigpvc_dounload();
- break;
-
- case VDSTAT:
- /*
- * Module Status
- */
-
- /* Not much to say at the moment */
-
- break;
-
- default:
- log(LOG_ERR, "sigpvc_mod: Unknown vd command 0x%x\n", cmd);
- err = EINVAL;
- }
-
- return (err);
-}
-#endif /* sun */
-#ifdef __FreeBSD__
#include <sys/exec.h>
#include <sys/sysent.h>
@@ -908,7 +825,6 @@ sigpvc_mod(lkmtp, cmd, ver)
MOD_DISPATCH(sigpvc, lkmtp, cmd, ver,
sigpvc_load, sigpvc_unload, lkm_nullcmd);
}
-#endif /* __FreeBSD__ */
#else /* !ATM_SIGPVC_MODULE */
diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c
index 5cdd778..2ddf6fc 100644
--- a/sys/netatm/spans/spans_if.c
+++ b/sys/netatm/spans/spans_if.c
@@ -1120,90 +1120,7 @@ spans_dounload()
}
-#ifdef sun
-/*
- * Loadable driver description
- */
-struct vdldrv spans_drv = {
- VDMAGIC_PSEUDO, /* Pseudo Driver */
- "spans_mod", /* name */
- NULL, /* dev_ops */
- NULL, /* bdevsw */
- NULL, /* cdevsw */
- 0, /* blockmajor */
- 0 /* charmajor */
-};
-
-
-/*
- * Loadable module support entry point
- *
- * This is the routine called by the vd driver for all loadable module
- * functions for this pseudo driver. This routine name must be specified
- * on the modload(1) command. This routine will be called whenever the
- * modload(1), modunload(1) or modstat(1) commands are issued for this
- * module.
- *
- * Arguments:
- * cmd vd command code
- * vdp pointer to vd driver's structure
- * vdi pointer to command-specific vdioctl_* structure
- * vds pointer to status structure (VDSTAT only)
- *
- * Returns:
- * 0 command was successful
- * errno command failed - reason indicated
- *
- */
-int
-spans_mod(cmd, vdp, vdi, vds)
- int cmd;
- struct vddrv *vdp;
- caddr_t vdi;
- struct vdstat *vds;
-{
- int err = 0;
-
- switch (cmd) {
-
- case VDLOAD:
- /*
- * Module Load
- *
- * We dont support any user configuration
- */
- err = spans_doload();
- if (err == 0)
- /* Let vd driver know about us */
- vdp->vdd_vdtab = (struct vdlinkage *)&spans_drv;
- break;
-
- case VDUNLOAD:
- /*
- * Module Unload
- */
- err = spans_dounload();
- break;
-
- case VDSTAT:
- /*
- * Module Status
- */
-
- /* Not much to say at the moment */
-
- break;
-
- default:
- log(LOG_ERR, "spans_mod: Unknown vd command 0x%x\n", cmd);
- err = EINVAL;
- }
-
- return (err);
-}
-#endif /* sun */
-#ifdef __FreeBSD__
#include <sys/exec.h>
#include <sys/sysent.h>
@@ -1291,7 +1208,6 @@ spans_mod(lkmtp, cmd, ver)
MOD_DISPATCH(spans, lkmtp, cmd, ver,
spans_load, spans_unload, lkm_nullcmd);
}
-#endif /* __FreeBSD__ */
#else /* !ATM_SPANS_MODULE */
diff --git a/sys/netatm/uni/uni_load.c b/sys/netatm/uni/uni_load.c
index 2f776bd..32db92c 100644
--- a/sys/netatm/uni/uni_load.c
+++ b/sys/netatm/uni/uni_load.c
@@ -231,90 +231,7 @@ uni_dounload()
}
-#ifdef sun
-/*
- * Loadable driver description
- */
-struct vdldrv uni_drv = {
- VDMAGIC_PSEUDO, /* Pseudo Driver */
- "uni_mod", /* name */
- NULL, /* dev_ops */
- NULL, /* bdevsw */
- NULL, /* cdevsw */
- 0, /* blockmajor */
- 0 /* charmajor */
-};
-
-
-/*
- * Loadable module support entry point
- *
- * This is the routine called by the vd driver for all loadable module
- * functions for this pseudo driver. This routine name must be specified
- * on the modload(1) command. This routine will be called whenever the
- * modload(1), modunload(1) or modstat(1) commands are issued for this
- * module.
- *
- * Arguments:
- * cmd vd command code
- * vdp pointer to vd driver's structure
- * vdi pointer to command-specific vdioctl_* structure
- * vds pointer to status structure (VDSTAT only)
- *
- * Returns:
- * 0 command was successful
- * errno command failed - reason indicated
- *
- */
-int
-uni_mod(cmd, vdp, vdi, vds)
- int cmd;
- struct vddrv *vdp;
- caddr_t vdi;
- struct vdstat *vds;
-{
- int err = 0;
-
- switch (cmd) {
-
- case VDLOAD:
- /*
- * Module Load
- *
- * We dont support any user configuration
- */
- err = uni_doload();
- if (err == 0)
- /* Let vd driver know about us */
- vdp->vdd_vdtab = (struct vdlinkage *)&uni_drv;
- break;
-
- case VDUNLOAD:
- /*
- * Module Unload
- */
- err = uni_dounload();
- break;
-
- case VDSTAT:
- /*
- * Module Status
- */
-
- /* Not much to say at the moment */
-
- break;
-
- default:
- log(LOG_ERR, "uni_mod: Unknown vd command 0x%x\n", cmd);
- err = EINVAL;
- }
-
- return (err);
-}
-#endif /* sun */
-#ifdef __FreeBSD__
#include <sys/exec.h>
#include <sys/sysent.h>
@@ -402,7 +319,6 @@ uni_mod(lkmtp, cmd, ver)
MOD_DISPATCH(uni, lkmtp, cmd, ver,
uni_load, uni_unload, lkm_nullcmd);
}
-#endif /* __FreeBSD__ */
#else /* !ATM_UNI_MODULE */
OpenPOWER on IntegriCloud