viapropm doesnt like sys/dev/pci.c rev 1.214

Dag-Erling Smorgrav des at ofug.org
Sat May 31 16:53:01 PDT 2003


"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.

>         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 at ofug.org


More information about the freebsd-current mailing list