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

From: David P. Reese Jr. <daver_at_gomerbud.com>
Date: Sat, 31 May 2003 14:06:00 -0700
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.  Allocating its port resources fails in
pci_enable_io_method().  The code in question is:

sys/dev/pci/pci.c:pci_enable_io_method()

        [snip]

        pci_set_command_bit(dev, child, bit);
        command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2);
        if (command & bit)
                return (0);
        device_printf(child, "failed to enable %s mapping!\n", error);
        return (ENXIO);

What is annoying is that by changing the last line to return a zero instead
of ENXIO, the viapropm successfully attaches.  The smbus interface even works.
Everything else that tries to claim port resources succeeds.

Is it my chipset's fault for not reading back the correct register value?
The board is a SOYO K7VTAPRO-2AA6.  What other info would be helpful in
this situation?

viapropm0_at_pci0:7:4:     class=0x068000 card=0x30571106 chip=0x30571106 rev=0x40 hdr=0x00
    vendor   = 'VIA Technologies Inc'
    device   = 'VT82C686A/B ACPI Power Management Controller'
    class    = bridge
    subclass = PCI-unknown

-- 

   David P. Reese Jr.                                      daver_at_gomerbud.com
   --------------------------------------------------------------------------
   It can be argued that returning a NULL pointer when asked to allocate
   zero bytes is a silly response to a silly question.
                                         -- FreeBSD manual page for malloc(3)
Received on Sat May 31 2003 - 12:05:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:10 UTC