Date: Tue, 16 Jul 1996 15:12:35 +0900 (JST) From: Naoki Hamada <nao@sbl.cl.nec.co.jp> To: amurai@spec.co.jp Cc: gibbs@freefall.freebsd.org, joerg_wunsch@uriah.heep.sax.de, j@uriah.heep.sax.de, freebsd-current@freebsd.org Subject: Re: Ethernet 3c579(EISA) is functional? (FIXED!) Message-ID: <199607160612.PAA06367@sirius.sbl.cl.nec.co.jp> In-Reply-To: Atsushi Murai's message of "Tue, 16 Jul 1996 10:45:42 %2B0900" <31EAF446.2D93@spec.co.jp> References: <199607140346.MAA01006@tama.spec.co.jp> <31EAF446.2D93@spec.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Atsushi wrote:
>Should I commit this to -current unless nobody has problem?
I made it more robust. Not enough test yet, but this should
work.
-nao
diff -ur sys-960612/i386/eisa/3c5x9.c sys/i386/eisa/3c5x9.c
--- sys-960612/i386/eisa/3c5x9.c Wed Jun 12 14:02:39 1996
+++ sys/i386/eisa/3c5x9.c Tue Jul 16 11:18:44 1996
@@ -293,6 +293,13 @@
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;
+ i = inw(eisa_ioport->addr+ EP_W0_RESOURCE_CFG) & 0x0fff;
+ outw(eisa_ioport->addr+ EP_W0_RESOURCE_CFG, SET_IRQ(irq) | i);
+
ep_attach(sc);
if(eisa_enable_intr(e_dev, irq)) {
diff -ur sys-960612/i386/isa/if_ep.c sys/i386/isa/if_ep.c
--- sys-960612/i386/isa/if_ep.c Wed Jun 12 14:03:38 1996
+++ sys/i386/isa/if_ep.c Tue Jul 16 11:20:30 1996
@@ -422,7 +422,7 @@
{
struct ep_softc *sc = ep_softc[is->id_unit];
u_short config;
- int irq;
+ int irq, i;
sc->ep_connectors = 0;
config = inw(IS_BASE + EP_W0_CONFIG_CTRL);
@@ -451,7 +451,8 @@
GO_WINDOW(0);
if(irq == 9)
irq = 2;
- outw(BASE + EP_W0_RESOURCE_CFG, SET_IRQ(irq));
+ i = inw(BASE + EP_W0_RESOURCE_CFG) & 0x0fff;
+ outw(BASE + EP_W0_RESOURCE_CFG, SET_IRQ(irq) | i);
ep_attach(sc);
return 1;
diff -ur sys-960612/i386/isa/if_epreg.h sys/i386/isa/if_epreg.h
--- sys-960612/i386/isa/if_epreg.h Thu Feb 29 02:19:04 1996
+++ sys/i386/isa/if_epreg.h Tue Jul 16 11:20:45 1996
@@ -363,7 +363,7 @@
*
*/
-#define SET_IRQ(i) (((i)<<12) | 0xF00) /* set IRQ i */
+#define SET_IRQ(i) ((i)<<12) /* set IRQ i */
/*
* FIFO Registers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607160612.PAA06367>
