Use the podule interrupt number provided by the podule structure when
attaching interrupts. Fixed declarations of the attach and probe functions.
This commit is contained in:
parent
dcbc0a0652
commit
82441d4be5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ea.c,v 1.15 1997/07/31 00:13:18 mark Exp $ */
|
||||
/* $NetBSD: if_ea.c,v 1.16 1997/10/14 22:31:50 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Brinicombe
|
||||
|
@ -159,7 +159,7 @@ static void ea_hardreset __P((struct ea_softc *));
|
|||
static void eagetpackets __P((struct ea_softc *));
|
||||
static void eatxpacket __P((struct ea_softc *));
|
||||
|
||||
int eaprobe __P((struct device *, void *, void *));
|
||||
int eaprobe __P((struct device *, struct cfdata *, void *));
|
||||
void eaattach __P((struct device *, struct device *, void *));
|
||||
|
||||
/* driver structure for autoconf */
|
||||
|
@ -237,15 +237,15 @@ ea_dump_buffer(sc, offset)
|
|||
*/
|
||||
|
||||
/*
|
||||
* int eaprobe(struct device *parent, void *match, void *aux)
|
||||
* int eaprobe(struct device *parent, struct cfdata *cf, void *aux)
|
||||
*
|
||||
* Probe for the ether3 podule.
|
||||
*/
|
||||
|
||||
int
|
||||
eaprobe(parent, match, aux)
|
||||
eaprobe(parent, cf, aux)
|
||||
struct device *parent;
|
||||
void *match;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
{
|
||||
struct podule_attach_args *pa = (void *)aux;
|
||||
|
@ -254,6 +254,7 @@ eaprobe(parent, match, aux)
|
|||
/* Look for a network slot interface */
|
||||
|
||||
if ((matchpodule(pa, MANUFACTURER_ATOMWIDE, PODULE_ATOMWIDE_ETHER3, -1) == 0)
|
||||
&& (matchpodule(pa, MANUFACTURER_ACORN, PODULE_ACORN_ETHER3XXX, -1) == 0)
|
||||
&& (matchpodule(pa, MANUFACTURER_ANT, PODULE_ANT_ETHER3, -1) == 0))
|
||||
return(0);
|
||||
|
||||
|
@ -345,10 +346,7 @@ eaattach(parent, self, aux)
|
|||
|
||||
/* Claim either a network slot interrupt or a podule interrupt */
|
||||
|
||||
if (sc->sc_podule_number >= MAX_PODULES)
|
||||
sc->sc_irq = IRQ_NETSLOT;
|
||||
else
|
||||
sc->sc_irq = IRQ_PODULE /*+ sc->sc_podule_number*/;
|
||||
sc->sc_irq = sc->sc_podule->interrupt;
|
||||
|
||||
/* Stop the board. */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_eb.c,v 1.14 1997/07/31 00:09:48 mark Exp $ */
|
||||
/* $NetBSD: if_eb.c,v 1.15 1997/10/14 22:31:55 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Brinicombe
|
||||
|
@ -159,7 +159,7 @@ static void eb_hardreset __P((struct eb_softc *));
|
|||
static void ebgetpackets __P((struct eb_softc *));
|
||||
static void ebtxpacket __P((struct eb_softc *));
|
||||
|
||||
int ebprobe __P((struct device *, void *, void *));
|
||||
int ebprobe __P((struct device *, struct cfdata *, void *));
|
||||
void ebattach __P((struct device *, struct device *, void *));
|
||||
|
||||
/* driver structure for autoconf */
|
||||
|
@ -237,15 +237,15 @@ eb_dump_buffer(sc, offset)
|
|||
*/
|
||||
|
||||
/*
|
||||
* int ebprobe(struct device *parent, void *match, void *aux)
|
||||
* int ebprobe(struct device *parent, struct cfdata *cf, void *aux)
|
||||
*
|
||||
* Probe for the ether3 podule.
|
||||
*/
|
||||
|
||||
int
|
||||
ebprobe(parent, match, aux)
|
||||
ebprobe(parent, cf, aux)
|
||||
struct device *parent;
|
||||
void *match;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
{
|
||||
struct podule_attach_args *pa = (void *)aux;
|
||||
|
@ -360,10 +360,7 @@ ebattach(parent, self, aux)
|
|||
|
||||
/* Claim either a network slot interrupt or a podule interrupt */
|
||||
|
||||
if (sc->sc_podule_number >= MAX_PODULES)
|
||||
sc->sc_irq = IRQ_NETSLOT;
|
||||
else
|
||||
sc->sc_irq = IRQ_PODULE /*+ sc->sc_podule_number*/;
|
||||
sc->sc_irq = sc->sc_podule->interrupt;
|
||||
|
||||
/* Stop the board. */
|
||||
|
||||
|
@ -1496,7 +1493,7 @@ eb_ioctl(ifp, cmd, data)
|
|||
*(union ns_host *)LLADDR(ifp->if_sadl);
|
||||
else
|
||||
bcopy(ina->x_host.c_host,
|
||||
LLADDR(ifp->if_sadl), ETHER_ADDR_LEN;
|
||||
LLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
|
||||
/* Set new address. */
|
||||
dprintf(("Interface eb is coming up (AF_NS)\n"));
|
||||
eb_init(sc);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_eh.c,v 1.16 1997/07/28 17:54:07 mark Exp $ */
|
||||
/* $NetBSD: if_eh.c,v 1.17 1997/10/14 22:32:00 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Melvin Tang-Richardson.
|
||||
|
@ -166,7 +166,7 @@ struct eh_softc {
|
|||
/* Function and data prototypes *********************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
int ehprobe __P((struct device *parent, void *match, void *aux));
|
||||
int ehprobe __P((struct device *parent, struct cfdata *cf, void *aux));
|
||||
void ehattach __P((struct device *parent, struct device *self, void *aux));
|
||||
void ehstart __P((struct ifnet *ifp));
|
||||
int ehioctl __P((struct ifnet *ifp, u_long cmd, caddr_t data));
|
||||
|
@ -211,9 +211,9 @@ struct cfdriver eh_cd = {
|
|||
/****************************************************************************/
|
||||
|
||||
int
|
||||
ehprobe(parent, match, aux)
|
||||
ehprobe(parent, cf, aux)
|
||||
struct device *parent;
|
||||
void *match;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
{
|
||||
struct podule_attach_args *pa = (void *) aux;
|
||||
|
@ -462,10 +462,10 @@ ehattach(parent, self, aux)
|
|||
sc->sc_ih.ih_level = IPL_NET;
|
||||
sc->sc_ih.ih_name = "net: eh";
|
||||
|
||||
irq = (sc->sc_podule_number>=MAX_PODULES) ? IRQ_NETSLOT : IRQ_PODULE;
|
||||
irq = sc->sc_podule->interrupt;
|
||||
|
||||
if (irq_claim(irq, &sc->sc_ih))
|
||||
panic("Cannot install IRQ handler");
|
||||
panic("%s: Cannot install IRQ handler\n", sc->sc_dev.dv_xname);
|
||||
|
||||
/* This loopbacks the card on reset, and stops riscos locking */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ie.c,v 1.13 1997/03/15 18:09:39 is Exp $ */
|
||||
/* $NetBSD: if_ie.c,v 1.14 1997/10/14 22:32:04 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Melvin Tang-Richardson.
|
||||
|
@ -172,7 +172,7 @@ static int command_and_wait __P(( struct ie_softc *sc, u_short cmd,
|
|||
struct ie_sys_ctl_block *pscb,
|
||||
void *pcmd, int ocmd, int scmd, int mask ));
|
||||
|
||||
int ieprobe __P((struct device *, void *, void *));
|
||||
int ieprobe __P((struct device *, struct cfdata *, void *));
|
||||
void ieattach __P((struct device *, struct device *, void *));
|
||||
|
||||
/*
|
||||
|
@ -296,7 +296,7 @@ crc32(p, l)
|
|||
*/
|
||||
|
||||
int
|
||||
ieprobe(struct device *parent, void *match, void *aux)
|
||||
ieprobe(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct podule_attach_args *pa = (void *)aux;
|
||||
|
||||
|
@ -484,10 +484,10 @@ void ieattach ( struct device *parent, struct device *self, void *aux )
|
|||
sc->sc_ih.ih_maskaddr = sc->sc_podule->irq_addr;
|
||||
sc->sc_ih.ih_maskbits = sc->sc_podule->irq_mask;
|
||||
|
||||
if (irq_claim(IRQ_PODULE, &sc->sc_ih)) {
|
||||
if (irq_claim(sc->sc_podule->interrupt, &sc->sc_ih)) {
|
||||
sc->sc_irqmode = 0;
|
||||
printf(" POLLED");
|
||||
panic("Cannot install IRQ handler\n");
|
||||
panic("%s: Cannot install IRQ handler\n", sc->sc_dev.dv_xname);
|
||||
} else {
|
||||
sc->sc_irqmode = 1;
|
||||
printf(" IRQ");
|
||||
|
@ -1444,8 +1444,8 @@ loop:
|
|||
ie_cli(sc);
|
||||
if ( saftey_net++ > 50 )
|
||||
{
|
||||
printf ( "ie: saftey net catches driver, shutting down\n" );
|
||||
disable_irq ( IRQ_PODULE );
|
||||
/* printf ( "ie: saftey net catches driver, shutting down\n" );
|
||||
disable_irq ( IRQ_PODULE );*/
|
||||
}
|
||||
in_intr = 0;
|
||||
return(0);
|
||||
|
|
Loading…
Reference in New Issue