diff options
author | 1996-09-29 20:59:39 +0000 | |
---|---|---|
committer | 1996-09-29 20:59:39 +0000 | |
commit | fed8ba5e18fc44fb0985f250914369dbc87723eb (patch) | |
tree | 89a421f913c53ecbeb36912b315f91f67b61c9ac | |
parent | On popular demand: annoying kernel link messages fixed :-) (diff) | |
download | wireguard-openbsd-fed8ba5e18fc44fb0985f250914369dbc87723eb.tar.xz wireguard-openbsd-fed8ba5e18fc44fb0985f250914369dbc87723eb.zip |
Fix for PCI etherlink3 packet-receive bug; netbsd pr#2661, jonathan@DSG.Stanford.EDU
-rw-r--r-- | sys/dev/ic/elink3.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/elink3reg.h | 13 |
2 files changed, 18 insertions, 0 deletions
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 @@ -140,6 +141,18 @@ #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. */ |