diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2007-03-31 21:39:02 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2007-03-31 21:39:02 +0000 |
| commit | 4dc5078f8140c0854242f6cfbb6a200f86ff0173 (patch) | |
| tree | 521d8851bfe33d6303693f35ba56d75b14d22d15 /sys/dev/ipmi | |
| parent | 0ede1bfd33c617d1dd8c8ff549d7593e2d4c6c4b (diff) | |
Notes
Diffstat (limited to 'sys/dev/ipmi')
| -rw-r--r-- | sys/dev/ipmi/ipmi_pci.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c index 7c4bba23086b..e3225f19ffd8 100644 --- a/sys/dev/ipmi/ipmi_pci.c +++ b/sys/dev/ipmi/ipmi_pci.c @@ -220,12 +220,9 @@ ipmi2_pci_attach(device_t dev) return (ENXIO); } - /* - * Bottom bit of bar indicates resouce type. There should be - * constants in pcireg.h for fields in a BAR. - */ + /* Check the BAR to determine our resource type. */ sc->ipmi_io_rid = PCIR_BAR(0); - if (pci_read_config(dev, PCIR_BAR(0), 4) & 0x1) + if (PCI_BAR_IO(pci_read_config(dev, PCIR_BAR(0), 4))) type = SYS_RES_IOPORT; else type = SYS_RES_MEMORY; |
