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
This commit is contained in:
Atsushi Murai 1996-07-19 13:20:05 +00:00
parent 9584a298e4
commit 0ed091876d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17223
6 changed files with 26 additions and 10 deletions

View file

@ -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;

View file

@ -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)) {

View file

@ -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.

View file

@ -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)) {

View file

@ -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;

View file

@ -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.