diff --git a/sys/dev/ic/i4b_isic.c b/sys/dev/ic/i4b_isic.c index 8978f9fa8a76..d05ba58cfd33 100644 --- a/sys/dev/ic/i4b_isic.c +++ b/sys/dev/ic/i4b_isic.c @@ -27,51 +27,26 @@ * i4b_isic.c - global isic stuff * ============================== * - * $Id: i4b_isic.c,v 1.1.1.1 2001/01/05 12:50:11 martin Exp $ + * $Id: i4b_isic.c,v 1.2 2001/01/07 21:47:24 martin Exp $ * * last edit-date: [Fri Jan 5 11:36:10 2001] * *---------------------------------------------------------------------------*/ #include -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 #include -#else -#include -#endif #include #include #include #include #include - -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 #include -#endif - -#ifdef __FreeBSD__ -#include -#include -#else #include -#if defined(__NetBSD__) && defined(amiga) #include -#else -#ifndef __bsdi__ -#include -#endif -#endif -#endif -#ifdef __FreeBSD__ -#include -#include -#include -#else #include #include #include -#endif #include #include @@ -82,79 +57,16 @@ #include #include -#ifdef __bsdi__ -static int isicmatch(struct device *parent, struct cfdata *cf, void *aux); -static void isicattach(struct device *parent, struct device *self, void *aux); -struct cfdriver isiccd = - { NULL, "isic", isicmatch, isicattach, DV_IFNET, - sizeof(struct l1_softc) }; - -int isa_isicmatch(struct device *parent, struct cfdata *cf, struct isa_attach_args *); -int isapnp_isicmatch(struct device *parent, struct cfdata *cf, struct isa_attach_args *); -int isa_isicattach(struct device *parent, struct device *self, struct isa_attach_args *ia); - -static int -isicmatch(struct device *parent, struct cfdata *cf, void *aux) -{ - struct isa_attach_args *ia = (struct isa_attach_args *) aux; - if (ia->ia_bustype == BUS_PCMCIA) { - ia->ia_irq = IRQNONE; - /* return 1; Not yet */ - return 0; /* for now */ - } - if (ia->ia_bustype == BUS_PNP) { - return isapnp_isicmatch(parent, cf, ia); - } - return isa_isicmatch(parent, cf, ia); -} - -static void -isicattach(struct device *parent, struct device *self, void *aux) -{ - struct isa_attach_args *ia = (struct isa_attach_args *) aux; - struct l1_softc *sc = (struct l1_softc *)self; - - sc->sc_flags = sc->sc_dev.dv_flags; - isa_isicattach(parent, self, ia); - isa_establish(&sc->sc_id, &sc->sc_dev); - sc->sc_ih.ih_fun = isicintr; - sc->sc_ih.ih_arg = (void *)sc; - intr_establish(ia->ia_irq, &sc->sc_ih, DV_NET); - /* Could add a shutdown hook here... */ -} -#endif - -#ifdef __FreeBSD__ -void isicintr_sc(struct l1_softc *sc); -#if !(defined(__FreeBSD_version)) || (defined(__FreeBSD_version) && __FreeBSD_version >= 300006) -void isicintr(int unit); -#endif -#else /* XXX - hack, going away soon! */ struct l1_softc *l1_sc[ISIC_MAXUNIT]; -#endif /*---------------------------------------------------------------------------* * isic - device driver interrupt routine *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ - -void -isicintr_sc(struct l1_softc *sc) -{ - isicintr(sc->sc_unit); -} - -void -isicintr(int unit) -{ - register struct l1_softc *sc = &l1_sc[unit]; -#else int isicintr(void *arg) { struct l1_softc *sc = arg; -#endif if(sc->sc_ipac == 0) /* HSCX/ISAC interupt routine */ { @@ -217,9 +129,8 @@ isicintr(void *arg) HSCX_WRITE(0, H_MASK, HSCX_A_IMASK); ISAC_WRITE(I_MASK, ISAC_IMASK); HSCX_WRITE(1, H_MASK, HSCX_B_IMASK); -#ifndef __FreeBSD__ + return(was_hscx_irq || was_isac_irq); -#endif } else /* IPAC interrupt routine */ { @@ -267,17 +178,12 @@ isicintr(void *arg) if(!ipac_irq_stat) break; } -#ifdef NOTDEF - if(was_ipac_irq == 0) - NDBGL1(L1_ERROR, "WARNING: unit %d, No IRQ from IPAC!", sc->sc_unit); -#endif + IPAC_WRITE(IPAC_MASK, 0xff); DELAY(50); IPAC_WRITE(IPAC_MASK, 0xc0); -#ifndef __FreeBSD__ return(was_ipac_irq); -#endif } } diff --git a/sys/dev/ic/i4b_isicl1.c b/sys/dev/ic/i4b_isicl1.c index e6503f55d485..1daaa91cfb1a 100644 --- a/sys/dev/ic/i4b_isicl1.c +++ b/sys/dev/ic/i4b_isicl1.c @@ -27,7 +27,7 @@ * i4b_l1.c - isdn4bsd layer 1 handler * ----------------------------------- * - * $Id: i4b_isicl1.c,v 1.1.1.1 2001/01/05 12:50:12 martin Exp $ + * $Id: i4b_isicl1.c,v 1.2 2001/01/07 21:47:27 martin Exp $ * * last edit-date: [Fri Jan 5 11:36:11 2001] * @@ -303,7 +303,7 @@ i4b_mph_command_req(int unit, int command, void *parm) case CMR_SETTRACE: NDBGL1(L1_PRIM, "unit %d, command = CMR_SETTRACE, parm = %p", unit, parm); - sc->sc_trace = (unsigned int)parm; + sc->sc_trace = (int)(unsigned long)parm; break; default: diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 3ebc83a1d26c..ee487444eb2e 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_spppsubr.c,v 1.16 2000/12/18 20:50:36 thorpej Exp $ */ +/* $NetBSD: if_spppsubr.c,v 1.17 2001/01/07 21:47:28 martin Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. @@ -4945,7 +4945,7 @@ sppp_params(struct sppp *sp, int cmd, void *data) switch (subcmd) { case SPPPIOGDEFS: - if (cmd != SIOCGIFGENERIC) + if (cmd != (int)SIOCGIFGENERIC) return EINVAL; /* * We copy over the entire current state, but clean @@ -4962,7 +4962,7 @@ sppp_params(struct sppp *sp, int cmd, void *data) return copyout(&spr, (caddr_t)ifr->ifr_data, sizeof spr); case SPPPIOSDEFS: - if (cmd != SIOCSIFGENERIC) + if (cmd != (int)SIOCSIFGENERIC) return EINVAL; /* * We have a very specific idea of which fields we allow diff --git a/sys/netisdn/i4b_l2.c b/sys/netisdn/i4b_l2.c index c775714d0dab..26c4338fc5f3 100644 --- a/sys/netisdn/i4b_l2.c +++ b/sys/netisdn/i4b_l2.c @@ -27,7 +27,7 @@ * i4b_l2.c - ISDN layer 2 (Q.921) * ------------------------------- * - * $Id: i4b_l2.c,v 1.1.1.1 2001/01/05 12:50:07 martin Exp $ + * $Id: i4b_l2.c,v 1.2 2001/01/07 21:47:29 martin Exp $ * * $FreeBSD$ * @@ -340,7 +340,7 @@ i4b_mph_status_ind(int unit, int status, int parm) *---------------------------------------------------------------------------*/ int i4b_mdl_command_req(int unit, int command, void * parm) { - NDBGL2(L2_PRIM, "unit %d, command=%d, parm=%d", unit, command, (unsigned int)parm); + NDBGL2(L2_PRIM, "unit %d, command=%d, parm=%p", unit, command, parm); switch(command) { diff --git a/sys/netisdn/i4b_trace.c b/sys/netisdn/i4b_trace.c index 1cc2f181e0bf..4bf5fbfe1f6d 100644 --- a/sys/netisdn/i4b_trace.c +++ b/sys/netisdn/i4b_trace.c @@ -27,7 +27,7 @@ * i4btrc - device driver for trace data read device * --------------------------------------------------- * - * $Id: i4b_trace.c,v 1.1.1.1 2001/01/05 12:50:00 martin Exp $ + * $Id: i4b_trace.c,v 1.2 2001/01/07 21:47:29 martin Exp $ * * last edit-date: [Fri Jan 5 11:33:47 2001] * @@ -518,7 +518,7 @@ i4btrcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) case I4B_TRC_SET: if(cno < 0) return ENOTTY; - (*ctrl_desc[cno].N_MGMT_COMMAND)(ctrl_desc[cno].unit, CMR_SETTRACE, (void *)*(unsigned int *)data); + (*ctrl_desc[cno].N_MGMT_COMMAND)(ctrl_desc[cno].unit, CMR_SETTRACE, (void *)*(unsigned long *)data); break; case I4B_TRC_SETA: @@ -547,8 +547,8 @@ i4btrcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) outunit = unit; analyzemode = 1; - (*ctrl_desc[cno].N_MGMT_COMMAND)(rxunit, CMR_SETTRACE, (int *)(tsa->rxflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX))); - (*ctrl_desc[cno].N_MGMT_COMMAND)(txunit, CMR_SETTRACE, (int *)(tsa->txflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX))); + (*ctrl_desc[cno].N_MGMT_COMMAND)(rxunit, CMR_SETTRACE, (void *)(unsigned long)(tsa->rxflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX))); + (*ctrl_desc[cno].N_MGMT_COMMAND)(txunit, CMR_SETTRACE, (void *)(unsigned long)(tsa->txflags & (TRACE_I | TRACE_D_RX | TRACE_B_RX))); } break;