diff options
| author | Scott Long <scottl@FreeBSD.org> | 2013-08-12 23:30:01 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2013-08-12 23:30:01 +0000 |
| commit | c68534f1d5bab4ad466384c4fb9bb2956811e8b9 (patch) | |
| tree | 34ad11c71aadd28f5ff680b63e3f0fd70956bed5 /sys/dev/buslogic | |
| parent | 4dc63104ae991922e7116022661fb3c7f366dd33 (diff) | |
Notes
Diffstat (limited to 'sys/dev/buslogic')
| -rw-r--r-- | sys/dev/buslogic/bt_pci.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/dev/buslogic/bt_pci.c b/sys/dev/buslogic/bt_pci.c index c3a36813f57f..7615ae8039ae 100644 --- a/sys/dev/buslogic/bt_pci.c +++ b/sys/dev/buslogic/bt_pci.c @@ -57,24 +57,19 @@ __FBSDID("$FreeBSD$"); static int bt_pci_alloc_resources(device_t dev) { - int command, type = 0, rid, zero; + int type = 0, rid, zero; struct resource *regs = 0; struct resource *irq = 0; - command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/1); #if 0 /* XXX Memory Mapped I/O seems to cause problems */ - if (command & PCIM_CMD_MEMEN) { - type = SYS_RES_MEMORY; - rid = BT_PCI_MEMADDR; - regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); - } + type = SYS_RES_MEMORY; + rid = BT_PCI_MEMADDR; + regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); #else - if (!regs && (command & PCIM_CMD_PORTEN)) { - type = SYS_RES_IOPORT; - rid = BT_PCI_IOADDR; - regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); - } + type = SYS_RES_IOPORT; + rid = BT_PCI_IOADDR; + regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); #endif if (!regs) return (ENOMEM); |
