From 306a2090245980d3724fe6fdbd95dfdc787f0b64 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Fri, 11 Oct 2002 17:18:54 +0000 Subject: [PATCH] Fix the code so that it no longer on alpha refers to the now nonexistent pci_cvt_to_bwx. This doesn't necessarily make bge(4) now actually *work* on an alpha. It loads, configures, and then about 30 seconds later, my XP1000 hard freezes. But, hey, it's a start. Obtained from: gallatin@freebsd.org --- sys/dev/bge/if_bge.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 55bc011d8af..3c50cc52b8b 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1480,7 +1480,7 @@ bge_attach(dev) rid = BGE_PCI_BAR0; sc->bge_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, - 0, ~0, 1, RF_ACTIVE); + 0, ~0, 1, RF_ACTIVE|PCI_RF_DENSE); if (sc->bge_res == NULL) { printf ("bge%d: couldn't map memory\n", unit); @@ -1492,22 +1492,6 @@ bge_attach(dev) sc->bge_bhandle = rman_get_bushandle(sc->bge_res); sc->bge_vhandle = (vm_offset_t)rman_get_virtual(sc->bge_res); - /* - * XXX FIXME: rman_get_virtual() on the alpha is currently - * broken and returns a physical address instead of a kernel - * virtual address. Consequently, we need to do a little - * extra mangling of the vhandle on the alpha. This should - * eventually be fixed! The whole idea here is to get rid - * of platform dependencies. - */ -#ifdef __alpha__ - if (pci_cvt_to_bwx(sc->bge_vhandle)) - sc->bge_vhandle = pci_cvt_to_bwx(sc->bge_vhandle); - else - sc->bge_vhandle = pci_cvt_to_dense(sc->bge_vhandle); - sc->bge_vhandle = ALPHA_PHYS_TO_K0SEG(sc->bge_vhandle); -#endif - /* Allocate interrupt */ rid = 0;