1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-21 15:45:02 +00:00

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
This commit is contained in:
Matt Jacob 2002-10-11 17:18:54 +00:00
parent acdb91f616
commit 306a209024
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104915

View File

@ -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;