diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 4542c7b3d7fc..2e341db26679 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.49 1996/06/18 01:22:21 bde Exp $ + * $Id: if_ep.c,v 1.50 1996/07/13 10:49:53 davidg Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -626,7 +626,7 @@ ep_isa_attach(is) GO_WINDOW(0); if(irq == 9) irq = 2; - outw(BASE + EP_W0_RESOURCE_CFG, SET_IRQ(irq)); + SET_IRQ(BASE, irq); ep_attach(sc); return 1; diff --git a/sys/dev/ep/if_ep_eisa.c b/sys/dev/ep/if_ep_eisa.c index 43b317d7b88c..f0284aeaf1f4 100644 --- a/sys/dev/ep/if_ep_eisa.c +++ b/sys/dev/ep/if_ep_eisa.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: 3c5x9.c,v 1.2 1996/02/28 17:18:55 gibbs Exp $ + * $Id: 3c5x9.c,v 1.3 1996/06/12 05:02:39 gpalmer Exp $ */ #include "eisa.h" @@ -293,6 +293,12 @@ ep_eisa_attach(e_dev) for(i = 0; i < 3; i++) sc->epb->eth_addr[i] = get_e(sc, i); + /* Even we get irq number from board, we should tell him.. + Otherwise we never get a H/W interrupt anymore...*/ + if ( irq == 9 ) + irq = 2; + SET_IRQ(eisa_ioport->addr, irq); + ep_attach(sc); if(eisa_enable_intr(e_dev, irq)) { diff --git a/sys/dev/ep/if_epreg.h b/sys/dev/ep/if_epreg.h index 3ad7e0381f78..e88a5f0e913d 100644 --- a/sys/dev/ep/if_epreg.h +++ b/sys/dev/ep/if_epreg.h @@ -31,7 +31,7 @@ */ /* - * $Id: if_epreg.h,v 1.13 1996/02/28 17:19:04 gibbs Exp $ + * $Id: if_epreg.h,v 1.14 1996/06/14 22:11:38 nate Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -370,7 +370,9 @@ struct ep_board { * */ -#define SET_IRQ(i) (((i)<<12) | 0xF00) /* set IRQ i */ +#define SET_IRQ(base,irq) outw((base) + EP_W0_RESOURCE_CFG, \ + ((inw((base) + EP_W0_RESOURCE_CFG) & 0x0fff) | \ + ((u_short)(irq)<<12)) ) /* set IRQ i */ /* * FIFO Registers. diff --git a/sys/i386/eisa/3c5x9.c b/sys/i386/eisa/3c5x9.c index 43b317d7b88c..f0284aeaf1f4 100644 --- a/sys/i386/eisa/3c5x9.c +++ b/sys/i386/eisa/3c5x9.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: 3c5x9.c,v 1.2 1996/02/28 17:18:55 gibbs Exp $ + * $Id: 3c5x9.c,v 1.3 1996/06/12 05:02:39 gpalmer Exp $ */ #include "eisa.h" @@ -293,6 +293,12 @@ ep_eisa_attach(e_dev) for(i = 0; i < 3; i++) sc->epb->eth_addr[i] = get_e(sc, i); + /* Even we get irq number from board, we should tell him.. + Otherwise we never get a H/W interrupt anymore...*/ + if ( irq == 9 ) + irq = 2; + SET_IRQ(eisa_ioport->addr, irq); + ep_attach(sc); if(eisa_enable_intr(e_dev, irq)) { diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c index 4542c7b3d7fc..2e341db26679 100644 --- a/sys/i386/isa/if_ep.c +++ b/sys/i386/isa/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.49 1996/06/18 01:22:21 bde Exp $ + * $Id: if_ep.c,v 1.50 1996/07/13 10:49:53 davidg Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -626,7 +626,7 @@ ep_isa_attach(is) GO_WINDOW(0); if(irq == 9) irq = 2; - outw(BASE + EP_W0_RESOURCE_CFG, SET_IRQ(irq)); + SET_IRQ(BASE, irq); ep_attach(sc); return 1; diff --git a/sys/i386/isa/if_epreg.h b/sys/i386/isa/if_epreg.h index 3ad7e0381f78..e88a5f0e913d 100644 --- a/sys/i386/isa/if_epreg.h +++ b/sys/i386/isa/if_epreg.h @@ -31,7 +31,7 @@ */ /* - * $Id: if_epreg.h,v 1.13 1996/02/28 17:19:04 gibbs Exp $ + * $Id: if_epreg.h,v 1.14 1996/06/14 22:11:38 nate Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -370,7 +370,9 @@ struct ep_board { * */ -#define SET_IRQ(i) (((i)<<12) | 0xF00) /* set IRQ i */ +#define SET_IRQ(base,irq) outw((base) + EP_W0_RESOURCE_CFG, \ + ((inw((base) + EP_W0_RESOURCE_CFG) & 0x0fff) | \ + ((u_short)(irq)<<12)) ) /* set IRQ i */ /* * FIFO Registers.