diff options
author | kato <kato@FreeBSD.org> | 1999-09-02 15:06:23 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1999-09-02 15:06:23 +0000 |
commit | 9a1f4e4d941fe0fe38f57daaefb340484c897074 (patch) | |
tree | 6d890abc7fde44c4a6c19e194e1b13c813909ce1 /sys/i386 | |
parent | 32707ed4fca52c7a5bcb73a62fe7f2d6db796916 (diff) | |
download | FreeBSD-src-9a1f4e4d941fe0fe38f57daaefb340484c897074.zip FreeBSD-src-9a1f4e4d941fe0fe38f57daaefb340484c897074.tar.gz |
- Added new macros ED_P1_MAR(i) and ED_P1_PAR(i) that replace
`ED_P1_MAR + i' and `ED_P1_PAR + i', respectively.
- convert ED_PC_RESET and ED_PC_MISC into relative offset from
ED_PC_ASIC_OFFSET (those macros are not used in current source).
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/if_ed.c | 8 | ||||
-rw-r--r-- | sys/i386/isa/if_edreg.h | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index f9c83e0..d202c0d 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -1941,7 +1941,7 @@ ed_init(xsc) * Copy out our station address */ for (i = 0; i < ETHER_ADDR_LEN; ++i) - outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]); + outb(sc->nic_addr + ED_P1_PAR(i), sc->arpcom.ac_enaddr[i]); /* * Set Current Page pointer to next_packet (initialized above) @@ -3333,7 +3333,7 @@ ed_setrcr(sc) * Reconfigure the multicast filter. */ for (i = 0; i < 8; i++) - outb(sc->nic_addr + ED_P1_MAR0 + i, 0xff); + outb(sc->nic_addr + ED_P1_MAR(i), 0xff); /* * And turn on promiscuous mode. Also enable reception of @@ -3359,7 +3359,7 @@ ed_setrcr(sc) * Set multicast filter on chip. */ for (i = 0; i < 8; i++) - outb(sc->nic_addr + ED_P1_MAR0 + i, ((u_char *) mcaf)[i]); + outb(sc->nic_addr + ED_P1_MAR(i), ((u_char *) mcaf)[i]); /* Set page 0 registers */ outb(sc->nic_addr + ED_P0_CR, sc->cr_proto | ED_CR_STP); @@ -3372,7 +3372,7 @@ ed_setrcr(sc) * not accept multicasts. */ for (i = 0; i < 8; ++i) - outb(sc->nic_addr + ED_P1_MAR0 + i, 0x00); + outb(sc->nic_addr + ED_P1_MAR(i), 0x00); /* Set page 0 registers */ outb(sc->nic_addr + ED_P0_CR, sc->cr_proto | ED_CR_STP); diff --git a/sys/i386/isa/if_edreg.h b/sys/i386/isa/if_edreg.h index db1a89d..2d06ef5 100644 --- a/sys/i386/isa/if_edreg.h +++ b/sys/i386/isa/if_edreg.h @@ -88,6 +88,7 @@ #define ED_P1_PAR3 0x04 /* Physical Address Register 3 */ #define ED_P1_PAR4 0x05 /* Physical Address Register 4 */ #define ED_P1_PAR5 0x06 /* Physical Address Register 5 */ +#define ED_P1_PAR(i) (ED_P1_PAR0 + i) #define ED_P1_CURR 0x07 /* Current RX ring-buffer page */ #define ED_P1_MAR0 0x08 /* Multicast Address Register 0 */ #define ED_P1_MAR1 0x09 /* Multicast Address Register 1 */ @@ -97,6 +98,7 @@ #define ED_P1_MAR5 0x0d /* Multicast Address Register 5 */ #define ED_P1_MAR6 0x0e /* Multicast Address Register 6 */ #define ED_P1_MAR7 0x0f /* Multicast Address Register 7 */ +#define ED_P1_MAR(i) (ED_P1_MAR0 + i) /* * Page 2 register offsets @@ -989,8 +991,9 @@ struct ed_ring { */ #define ED_PC_PAGE_OFFSET 0x40 /* page offset for NIC access to mem */ #define ED_PC_IO_PORTS 32 -#define ED_PC_RESET 0x1f -#define ED_PC_MISC 0x18 +#define ED_PC_ASIC_OFFSET 0x10 +#define ED_PC_RESET 0x0f /* Reset(offset from ASIC base) */ +#define ED_PC_MISC 0x08 /* Misc (offset from ASIC base) */ /* * if_ze.h constants |