Date: Sun, 01 Jun 2003 01:52:57 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: "David P. Reese Jr." <daver@gomerbud.com> Cc: current@freebsd.org Subject: Re: viapropm doesnt like sys/dev/pci.c rev 1.214 Message-ID: <xzpof1i65d2.fsf@flood.ping.uio.no> In-Reply-To: <20030531210600.GA670@tombstone.localnet.gomerbud.com> (David P. Reese, Jr.'s message of "Sat, 31 May 2003 14:06:00 -0700") References: <20030531210600.GA670@tombstone.localnet.gomerbud.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"David P. Reese Jr." <daver@gomerbud.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpof1i65d2.fsf>