summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2012-03-03 21:28:40 +0000
committermiod <miod@openbsd.org>2012-03-03 21:28:40 +0000
commitfb88db89807b4be12e2266a1593b38c7d152e85a (patch)
treed526449042beec2d54665cc03a4c5514498fd6ed
parentDon't print the device name again in attach error messages occuring before (diff)
downloadwireguard-openbsd-fb88db89807b4be12e2266a1593b38c7d152e85a.tar.xz
wireguard-openbsd-fb88db89807b4be12e2266a1593b38c7d152e85a.zip
Fix the logic deciding whether to return PCI_COMMAND_MASTER_ENABLE in the
emulated pci functions #2 and #3; from NetBSD
-rw-r--r--sys/arch/loongson/dev/glx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/loongson/dev/glx.c b/sys/arch/loongson/dev/glx.c
index a93a653c748..e5ee0573f56 100644
--- a/sys/arch/loongson/dev/glx.c
+++ b/sys/arch/loongson/dev/glx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glx.c,v 1.6 2010/10/14 21:23:04 pirofti Exp $ */
+/* $OpenBSD: glx.c,v 1.7 2012/03/03 21:28:40 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -436,7 +436,7 @@ glx_fn2_read(int reg)
data = glx_get_status();
data |= PCI_COMMAND_IO_ENABLE;
msr = rdmsr(GLIU_PAE);
- if ((msr & (0x3 << 4)) == 0x03)
+ if ((msr & (0x3 << 4)) == (0x03 << 4))
data |= PCI_COMMAND_MASTER_ENABLE;
break;
case PCI_CLASS_REG:
@@ -560,7 +560,7 @@ glx_fn3_read(int reg)
data = glx_get_status();
data |= PCI_COMMAND_IO_ENABLE;
msr = rdmsr(GLIU_PAE);
- if ((msr & (0x3 << 8)) == 0x03)
+ if ((msr & (0x3 << 8)) == (0x03 << 8))
data |= PCI_COMMAND_MASTER_ENABLE;
break;
case PCI_CLASS_REG: