From owner-freebsd-multimedia Fri Mar 21 13:40:22 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA15051 for multimedia-outgoing; Fri, 21 Mar 1997 13:40:22 -0800 (PST) Received: from Ilsa.StevesCafe.com (sc-gw.StevesCafe.com [205.168.119.191]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA15046 for ; Fri, 21 Mar 1997 13:40:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.7.5/8.6.12) with SMTP id OAA25157; Fri, 21 Mar 1997 14:39:08 -0700 (MST) Message-Id: <199703212139.OAA25157@Ilsa.StevesCafe.com> X-Authentication-Warning: Ilsa.StevesCafe.com: Host localhost [127.0.0.1] didn't use HELO protocol X-Mailer: exmh version 1.6.5 12/11/95 From: Steve Passe To: Amancio Hasty Cc: multimedia@FreeBSD.ORG Subject: INTs on the bt848 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 21 Mar 1997 14:39:08 -0700 Sender: owner-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, I have been looking over the INT code and have the following questions: in bktr_intr, near the top you attempt to access the device status register: ... bt_reg = (u_char *) &bt848; s_status = *bt_reg; *bt_reg = 0; this code takes the addr of the pointer, then sets s_status to the pointer value, NOT the thing it points @, ie bt848 is already a u_char*. so your doing double indirection. shouldn't this be: s_status = *bt848; *bt848 = 0; --- a little further down you read the int status register: btl_reg = (u_long *) &bt848[BKTR_INT_STAT]; bktr_status = *btl_reg ; *btl_reg = *btl_reg; *btl_reg = 0; line 3 clears all the set bits, but line 4 doesn't accomplish anything that I can see, based on the databook, p 107, since a 0 in a bit field has no effect. shouldn'tline 4 be removed? --- in bktr_open() you access the device status register again: *bt848 = 0x3; *bt848 = 0xc0; what is this attempting to do? the databook, page 87, says only the 2 low bits hold values, and my experiments with reading/clearing it show that writting a 0 bit to the filed is what will clear it. shouldn't this be changed to: *bt848 = 0x00; -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD