summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-07-27 16:34:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-07-27 16:34:46 +0000
commit07d662d8f4e86f083b30b4f5ce04c0f5c3a5f5cd (patch)
tree6e89f26cfd58d73f77e287e4295dc4cb924707a3
parent334d4944fa53638531da777807ced8b77417a8af (diff)
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;
}