On Sun, Jun 01, 2003 at 01:52:57AM +0200, Dag-Erling Smorgrav wrote: > "David P. Reese Jr." <daver_at_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. What kind of breakage? Setting resources in probe? Right. Anybody having the viapm driver loaded usually should please try the attached patch. > > 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. The datasheet states that the command bits are RW but "fixed at 0". Nicholas -- Nicholas Souchu - nsouch_at_free.fr - nsouch_at_FreeBSD.org
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:10 UTC