diff options
| author | Matthew N. Dodd <mdodd@FreeBSD.org> | 2003-04-16 03:16:57 +0000 |
|---|---|---|
| committer | Matthew N. Dodd <mdodd@FreeBSD.org> | 2003-04-16 03:16:57 +0000 |
| commit | 533294b956a64b5420f2395a9a3bb047608b67fe (patch) | |
| tree | 43770c3696a3adbe67787f9d9f8ff9d3bb30a425 /sys/dev/fxp | |
| parent | c047e5b1a9d3c13f345a17a28dbb2569ad68d123 (diff) | |
Notes
Diffstat (limited to 'sys/dev/fxp')
| -rw-r--r-- | sys/dev/fxp/if_fxp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index c84c29a7a8ed..4dcb7c2adf61 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -391,8 +391,6 @@ fxp_attach(device_t dev) * BIOS/Prom forgot about it. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); val = pci_read_config(dev, PCIR_COMMAND, 2); fxp_powerstate_d0(dev); @@ -411,14 +409,11 @@ fxp_attach(device_t dev) m2 = PCIM_CMD_MEMEN; } - if (val & m1) { - sc->rtp = - (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; - sc->rgd = (m1 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; - sc->mem = bus_alloc_resource(dev, sc->rtp, &sc->rgd, + sc->rtp = (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; + sc->rgd = (m1 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; + sc->mem = bus_alloc_resource(dev, sc->rtp, &sc->rgd, 0, ~0, 1, RF_ACTIVE); - } - if (sc->mem == NULL && (val & m2)) { + if (sc->mem == NULL) { sc->rtp = (m2 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; sc->rgd = (m2 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; @@ -427,7 +422,6 @@ fxp_attach(device_t dev) } if (!sc->mem) { - device_printf(dev, "could not map device registers\n"); error = ENXIO; goto fail; } |
