From 2a48e53c56589d48cfbdbca505e50eb9d3feff8a Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 21 Nov 2016 12:37:17 +0000 Subject: Correct the test for requiring a 64 bit mem bar. ok mikeb@ who tested on 82599, x540 and x550. --- sys/dev/pci/if_ix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index edd3ab2212c..541e75c0fba 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.139 2016/11/21 12:05:28 mikeb Exp $ */ +/* $OpenBSD: if_ix.c,v 1.140 2016/11/21 12:37:16 jsg Exp $ */ /****************************************************************************** @@ -1516,8 +1516,8 @@ ixgbe_allocate_pci_resources(struct ix_softc *sc) int val; val = pci_conf_read(pa->pa_pc, pa->pa_tag, PCIR_BAR(0)); - if (PCI_MAPREG_TYPE(val) != PCI_MAPREG_TYPE_MEM && - PCI_MAPREG_TYPE(val) != PCI_MAPREG_MEM_TYPE_64BIT) { + if (PCI_MAPREG_TYPE(val) != PCI_MAPREG_TYPE_MEM || + PCI_MAPREG_MEM_TYPE(val) != PCI_MAPREG_MEM_TYPE_64BIT) { printf(": mmba is not mem space\n"); return (ENXIO); } -- cgit v1.2.3