summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2005-03-28 18:06:44 +0000
committerobrien <obrien@FreeBSD.org>2005-03-28 18:06:44 +0000
commit613b483802874e934abeb4a1848fda027d499d90 (patch)
tree7b58ab44d0c45858f372c527bb6da1e8b8809fba
parent5cf246c0b4dfe3805b6648d7f7231545ebb32c0a (diff)
downloadFreeBSD-src-613b483802874e934abeb4a1848fda027d499d90.zip
FreeBSD-src-613b483802874e934abeb4a1848fda027d499d90.tar.gz
Bring rev 1.31 to the AMD64 platform.
This adds support for the SiS intergrated NIC on some Athlon64 motherboards. The MAC address is stored in the APC CMOS RAM and this fixes the sis driver ending up with a 00:00:00:00:00:00 MAC address. Submitted by: Stasys Smailys <ssmailys@komvista.lt>
-rw-r--r--sys/pci/if_sis.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index 1a3e12f..0e461ba 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -311,7 +311,7 @@ sis_read_eeprom(struct sis_softc *sc, caddr_t dest, int off, int cnt, int swap)
}
}
-#ifdef __i386__
+#if defined(__i386__) || defined(__amd64__)
static device_t
sis_find_bridge(device_t dev)
{
@@ -363,7 +363,11 @@ sis_read_cmos(struct sis_softc *sc, device_t dev, caddr_t dest, int off, int cnt
pci_write_config(bridge, 0x48, reg|0x40, 1);
/* XXX */
+#if defined(__i386__)
btag = I386_BUS_SPACE_IO;
+#elif defined(__amd64__)
+ btag = AMD64_BUS_SPACE_IO;
+#endif
for (i = 0; i < cnt; i++) {
bus_space_write_1(btag, 0x0, 0x70, i + off);
@@ -1007,7 +1011,7 @@ sis_attach(device_t dev)
break;
case SIS_VENDORID:
default:
-#ifdef __i386__
+#if defined(__i386__) || defined(__amd64__)
/*
* If this is a SiS 630E chipset with an embedded
* SiS 900 controller, we have to read the MAC address
@@ -1441,7 +1445,7 @@ sis_rxeof(struct sis_softc *sc)
}
/* No errors; receive the packet. */
-#ifdef __i386__
+#if defined(__i386__) || defined(__amd64__)
/*
* On the x86 we do not have alignment problems, so try to
* allocate a new buffer for the receive ring, and pass up
OpenPOWER on IntegriCloud