aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/stge
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2013-08-12 23:30:01 +0000
committerScott Long <scottl@FreeBSD.org>2013-08-12 23:30:01 +0000
commitc68534f1d5bab4ad466384c4fb9bb2956811e8b9 (patch)
tree34ad11c71aadd28f5ff680b63e3f0fd70956bed5 /sys/dev/stge
parent4dc63104ae991922e7116022661fb3c7f366dd33 (diff)
Notes
Diffstat (limited to 'sys/dev/stge')
-rw-r--r--sys/dev/stge/if_stge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c
index 96860a88827d..3cc45b35051f 100644
--- a/sys/dev/stge/if_stge.c
+++ b/sys/dev/stge/if_stge.c
@@ -453,11 +453,11 @@ stge_attach(device_t dev)
pci_enable_busmaster(dev);
cmd = pci_read_config(dev, PCIR_COMMAND, 2);
val = pci_read_config(dev, PCIR_BAR(1), 4);
- if ((val & 0x01) != 0)
+ if (PCI_BAR_IO(val))
sc->sc_spec = stge_res_spec_mem;
else {
val = pci_read_config(dev, PCIR_BAR(0), 4);
- if ((val & 0x01) == 0) {
+ if (!PCI_BAR_IO(val)) {
device_printf(sc->sc_dev, "couldn't locate IO BAR\n");
error = ENXIO;
goto fail;