From 4466be9850425b8bec29fd728495340174337699 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 29 Sep 1996 20:59:41 +0000 Subject: Fix for PCI etherlink3 packet-receive bug; netbsd pr#2661, jonathan@DSG.Stanford.EDU --- sys/dev/ic/elink3.c | 5 +++++ sys/dev/ic/elink3reg.h | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 4b0ab2d71ab..a893c2869a6 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -194,6 +194,11 @@ epinit(sc) bus_io_write_1(bc, ioh, EP_W2_ADDR_0 + i, sc->sc_arpcom.ac_enaddr[i]); + if (sc->bustype == EP_BUS_PCI || sc->bustype == EP_BUS_EISA) + /* Reset the station-address receive filter */ + for (i = 0; i < 6; i++) + bus_io_write_1(bc, ioh,EP_W2_RECVMASK_0 + i, 0); + bus_io_write_2(bc, ioh, EP_COMMAND, RX_RESET); bus_io_write_2(bc, ioh, EP_COMMAND, TX_RESET); diff --git a/sys/dev/ic/elink3reg.h b/sys/dev/ic/elink3reg.h index 48dccc48339..222f395b66e 100644 --- a/sys/dev/ic/elink3reg.h +++ b/sys/dev/ic/elink3reg.h @@ -87,6 +87,7 @@ * Window 2 registers. Station Address Setup/Read */ /* Read/Write */ +#define EP_W2_RECVMASK_0 0x06 #define EP_W2_ADDR_5 0x05 #define EP_W2_ADDR_4 0x04 #define EP_W2_ADDR_3 0x03 @@ -139,6 +140,18 @@ #define TX_NO_SQE 0x01 #define TX_CD_LOST 0x00 +/* + * Window 7 registers. + * Address and length for a single bus-master DMA transfer. + */ +#define EP_W7_MASTER_ADDDRES 0x00 +#define EP_W7_RX_ERROR 0x04 +#define EP_W7_MASTER_LEN 0x06 +#define EP_W7_RX_STATUS 0x08 +#define EP_W7_TIMER 0x0a +#define EP_W7_TX_STATUS 0x0b +#define EP_W7_MASTER_STATUS 0x0c + /* * Register definitions. */ -- cgit v1.2.3