diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/gem.c | 16 | ||||
-rw-r--r-- | sys/dev/ic/gemreg.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/if_gem_pci.c | 3 |
3 files changed, 13 insertions, 9 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 506346ccd1a..5ada09a56da 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.12 2001/11/06 19:53:18 miod Exp $ */ +/* $OpenBSD: gem.c,v 1.13 2001/12/13 03:51:10 drahn Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -725,13 +725,13 @@ gem_init(struct ifnet *ifp) gem_setladrf(sc); /* step 6 & 7. Program Descriptor Ring Base Addresses */ - bus_space_write_8(t, h, GEM_TX_RING_PTR, - GEM_CDTXADDR(sc, 0)); - /* Yeeech. The following has endianness issues. */ - bus_space_write_4(t, h, GEM_RX_RING_PTR_HI, - (((uint64_t)GEM_CDRXADDR(sc, 0))>>32)); - bus_space_write_4(t, h, GEM_RX_RING_PTR_LO, - GEM_CDRXADDR(sc, 0)); + bus_space_write_4(t, h, GEM_TX_RING_PTR_HI, + (((uint64_t)GEM_CDTXADDR(sc,0)) >> 32)); + bus_space_write_4(t, h, GEM_TX_RING_PTR_LO, GEM_CDTXADDR(sc, 0)); + + bus_space_write_4(t, h, GEM_RX_RING_PTR_HI, + (((uint64_t)GEM_CDRXADDR(sc,0)) >> 32)); + bus_space_write_4(t, h, GEM_RX_RING_PTR_LO, GEM_CDRXADDR(sc, 0)); /* step 8. Global Configuration & Interrupt Mask */ bus_space_write_4(t, h, GEM_INTMASK, diff --git a/sys/dev/ic/gemreg.h b/sys/dev/ic/gemreg.h index 53169b9b64a..8cfda9d9188 100644 --- a/sys/dev/ic/gemreg.h +++ b/sys/dev/ic/gemreg.h @@ -111,7 +111,8 @@ /* GEM TX DMA registers */ #define GEM_TX_KICK 0x2000 /* Write last valid desc + 1 */ #define GEM_TX_CONFIG 0x2004 -#define GEM_TX_RING_PTR 0x2008 /* 64-bits */ +#define GEM_TX_RING_PTR_LO 0x2008 +#define GEM_TX_RING_PTR_HI 0x200c #define GEM_TX_FIFO_WR_PTR 0x2014 /* FIFO write pointer */ #define GEM_TX_FIFO_SDWR_PTR 0x2018 /* FIFO shadow write pointer */ diff --git a/sys/dev/pci/if_gem_pci.c b/sys/dev/pci/if_gem_pci.c index 870c2d7a1c1..40427717198 100644 --- a/sys/dev/pci/if_gem_pci.c +++ b/sys/dev/pci/if_gem_pci.c @@ -161,6 +161,9 @@ gem_attach_pci(parent, self, aux) #ifdef __sparc__ myetheraddr(sc->sc_enaddr); #endif +#ifdef __powerpc__ + pci_ether_hw_addr(pa->pa_pc, sc->sc_enaddr); +#endif sc->sc_burst = 16; /* XXX */ |