summaryrefslogtreecommitdiff
path: root/sys/pci/amd.c
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2000-04-12 11:21:55 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2000-04-12 11:21:55 +0000
commitf3e2cba02f6f8aad7eb05005a099bc7cc31b2442 (patch)
tree5e59e6b4d0d8c3bef1acb0e55c2e6630d1fdda8e /sys/pci/amd.c
parent49a830040334c39c342f64d365744f95f083c6ba (diff)
Notes
Diffstat (limited to 'sys/pci/amd.c')
-rw-r--r--sys/pci/amd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/pci/amd.c b/sys/pci/amd.c
index ded2814b2d26..b07bc14acef2 100644
--- a/sys/pci/amd.c
+++ b/sys/pci/amd.c
@@ -2251,9 +2251,10 @@ amd_init(device_t dev)
{
struct amd_softc *amd = device_get_softc(dev);
struct resource *iores;
- int i, rid = 0;
+ int i, rid;
u_int bval;
+ rid = PCI_BASE_ADDR0;
iores = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1,
RF_ACTIVE);
if (iores == NULL) {
@@ -2356,7 +2357,7 @@ amd_attach(device_t dev)
u_int8_t intstat;
struct amd_softc *amd = device_get_softc(dev);
int unit = device_get_unit(dev);
- int rid = 0;
+ int rid;
void *ih;
struct resource *irqres;
@@ -2370,6 +2371,7 @@ amd_attach(device_t dev)
intstat = amd_read8(amd, INTSTATREG);
/* After setting up the adapter, map our interrupt */
+ rid = 0;
irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
RF_SHAREABLE | RF_ACTIVE);
if (irqres == NULL ||