summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2000-07-27 16:34:45 +0000
committerderaadt <deraadt@openbsd.org>2000-07-27 16:34:45 +0000
commitc2df2219fafbedfae47b31cb4c431268337883ef (patch)
tree2dd114209f282590b241e3086060c2c5a53b1798
parentfix espie@'s screwup; frenchies can't type! noticed by aaron@ (diff)
downloadwireguard-openbsd-c2df2219fafbedfae47b31cb4c431268337883ef.tar.xz
wireguard-openbsd-c2df2219fafbedfae47b31cb4c431268337883ef.zip
if avoiding ac97_read because of AC97_HOST_DONT_READ, still permit access to AC97_REG_VENDOR* and AC97_REG_RESET
-rw-r--r--sys/dev/ic/ac97.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c
index 8776c1f983f..aa7236a77a8 100644
--- a/sys/dev/ic/ac97.c
+++ b/sys/dev/ic/ac97.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ac97.c,v 1.9 2000/07/20 21:36:26 deraadt Exp $ */
+/* $OpenBSD: ac97.c,v 1.10 2000/07/27 16:34:45 deraadt Exp $ */
/*
* Copyright (c) 1999, 2000 Constantine Sapuntzakis
@@ -387,7 +387,9 @@ ac97_read(as, reg, val)
{
int error;
- if (as->host_flags & AC97_HOST_DONT_READ) {
+ if ((as->host_flags & AC97_HOST_DONT_READ) &&
+ (reg != AC97_REG_VENDOR_ID1 && reg != AC97_REG_VENDOR_ID2 &&
+ reg != AC97_REG_RESET)) {
*val = as->shadow_reg[reg >> 1];
return;
}