From 3de33e4aa9291053bf586a979b063cdf22536171 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Mon, 28 Jan 2002 01:04:03 +0000 Subject: Re-port the NetBSD driver, but rewrite tx logic to use static buffers (and copies). This makes the Blade100 gem stable for me. --- sys/dev/pci/if_gem_pci.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'sys/dev/pci/if_gem_pci.c') diff --git a/sys/dev/pci/if_gem_pci.c b/sys/dev/pci/if_gem_pci.c index e61467f4439..14c238e7131 100644 --- a/sys/dev/pci/if_gem_pci.c +++ b/sys/dev/pci/if_gem_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gem_pci.c,v 1.5 2001/12/14 02:43:56 drahn Exp $ */ +/* $OpenBSD: if_gem_pci.c,v 1.6 2002/01/28 01:04:02 jason Exp $ */ /* $NetBSD: if_gem_pci.c,v 1.1 2001/09/16 00:11:42 eeh Exp $ */ /* @@ -127,6 +127,7 @@ gem_attach_pci(parent, self, aux) #endif const char *intrstr; int type; + char enaddr[ETHER_ADDR_LEN]; if (pa->pa_memt) { type = PCI_MAPREG_TYPE_MEM; @@ -151,28 +152,18 @@ gem_attach_pci(parent, self, aux) sc->sc_bustag = gsc->gsc_memt; sc->sc_h = gsc->gsc_memh; -#if 0 -/* SBUS compatible stuff? */ - sc->sc_seb = gsc->gsc_memh; - sc->sc_etx = gsc->gsc_memh + 0x2000; - sc->sc_erx = gsc->gsc_memh + 0x4000; - sc->sc_mac = gsc->gsc_memh + 0x6000; - sc->sc_mif = gsc->gsc_memh + 0x7000; -#endif #ifdef __sparc__ - myetheraddr(sc->sc_enaddr); + myetheraddr(enaddr); #endif #ifdef __powerpc__ - pci_ether_hw_addr(pa->pa_pc, sc->sc_enaddr); + pci_ether_hw_addr(pa->pa_pc, enaddr); #endif - sc->sc_burst = 16; /* XXX */ - printf("\n"); /* * call the main configure */ - gem_config(sc); + gem_attach(sc, enaddr); if (pci_intr_map(pa, &intrhandle) != 0) { printf("%s: couldn't map interrupt\n", -- cgit v1.2.3