From owner-freebsd-current@FreeBSD.ORG Sat May 31 16:53:00 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1FA037B401 for ; Sat, 31 May 2003 16:53:00 -0700 (PDT) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0692F43F75 for ; Sat, 31 May 2003 16:53:00 -0700 (PDT) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 566B05308; Sun, 1 Jun 2003 01:52:58 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: "David P. Reese Jr." References: <20030531210600.GA670@tombstone.localnet.gomerbud.com> From: Dag-Erling Smorgrav Date: Sun, 01 Jun 2003 01:52:57 +0200 In-Reply-To: <20030531210600.GA670@tombstone.localnet.gomerbud.com> (David P. Reese, Jr.'s message of "Sat, 31 May 2003 14:06:00 -0700") Message-ID: User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: current@freebsd.org Subject: Re: viapropm doesnt like sys/dev/pci.c rev 1.214 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2003 23:53:01 -0000 "David P. Reese Jr." writes: > In rev 1.214 of sys/dev/pci/pci.c, we have started checking if a > pci_set_command_bit() was successful with a subsequent PCI_READ_CONFIG > and comparing the results. For some odd reason, this doesnt work when > my viapropm tries to attach. viapropm is seriously broken for other reasons and needs professional help. > pci_set_command_bit(dev, child, bit); > command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2); > if (command & bit) > return (0); It should allow the register to "settle" between write and read, which may take some time (see chipset docs for timing details). DELAY(1000) should be OK in an attach function. DES -- Dag-Erling Smorgrav - des@ofug.org