From 07d662d8f4e86f083b30b4f5ce04c0f5c3a5f5cd Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 27 Jul 2000 16:34:46 +0000 Subject: if avoiding ac97_read because of AC97_HOST_DONT_READ, still permit access to AC97_REG_VENDOR* and AC97_REG_RESET --- sys/dev/ic/ac97.c | 6 ++++-- 1 file 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; } -- cgit v1.2.3