diff options
author | amurai <amurai@FreeBSD.org> | 1996-07-19 13:20:05 +0000 |
---|---|---|
committer | amurai <amurai@FreeBSD.org> | 1996-07-19 13:20:05 +0000 |
commit | a9d8f72f829feb7daceda9fe6caf8d9c16c65935 (patch) | |
tree | 379c5a52b3fab3df1ae6cca8695a56dcc72cdb29 /sys | |
parent | 742697ede9b6b4fa2eb003ddd93e43b342b4249c (diff) | |
download | FreeBSD-src-a9d8f72f829feb7daceda9fe6caf8d9c16c65935.zip FreeBSD-src-a9d8f72f829feb7daceda9fe6caf8d9c16c65935.tar.gz |
Add interrupt register set up with original register value
before attaching. Without this fix, 3c579(EISA) never make
any H/W inturrupt.
Reviewed by: "Justin T. Gibbs" <gibbs@freefall.freebsd.org>, nao@sbl.cl.nec.co.jp and owner-current on mailing list ;-)
Submitted by: amurai@spec.co.jp, nao@sbl.cl.nec.co.jp
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ep/if_ep.c | 4 | ||||
-rw-r--r-- | sys/dev/ep/if_ep_eisa.c | 8 | ||||
-rw-r--r-- | sys/dev/ep/if_epreg.h | 6 | ||||
-rw-r--r-- | sys/i386/eisa/3c5x9.c | 8 | ||||
-rw-r--r-- | sys/i386/isa/if_ep.c | 4 | ||||
-rw-r--r-- | sys/i386/isa/if_epreg.h | 6 |
6 files changed, 26 insertions, 10 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 4542c7b..2e341db 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 43b317d..f0284ae 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 3ad7e03..e88a5f0 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 43b317d..f0284ae 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 4542c7b..2e341db 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 3ad7e03..e88a5f0 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. |