Re: [PATCH] PCI quirk for VIA ACPI device (updated)

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Wed May 03 2000 - 16:34:48 EST


You were probably only copying code, but it is incorrect to mask the
dev->resource[].start value against anything.

        Jeff

Andrey Panin wrote:
> - --- /mnt/d/linux/arch/i386/kernel/acpi.c Tue May 2 20:01:35
> 2000
> +++ /linux/arch/i386/kernel/acpi.c Tue May 2 14:58:54 2000
> @@ -631,11 +631,7 @@
> if (!(pmregmisc & ACPI_PIIX4_PMIOSE))
> return -ENODEV;
>
> - - pci_read_config_dword(dev, 0x40, &base);
> - - if (!(base & PCI_BASE_ADDRESS_SPACE_IO))
> - - return -ENODEV;
> - -
> - - base &= PCI_BASE_ADDRESS_IO_MASK;
> + base = dev->resource[PCI_BRIDGE_RESOURCES].start &
> PCI_BASE_ADDRESS_IO_MASK;
> if (!base)
> return -ENODEV;

> - - pci_read_config_byte(dev, PCI_CLASS_REVISION, &tmp);
> - - tmp = (tmp & 0x10 ? 0x48 : 0x20);
> - -
> - - pci_read_config_dword(dev, tmp, &base);
> - - if (!(base & PCI_BASE_ADDRESS_SPACE_IO))
> - - return -ENODEV;
> - -
> + base = pci_resource_start(dev, PCI_BRIDGE_RESOURCES);
> + if (!base) {
> + base = pci_resource_start(dev, PCI_BASE_ADDRESS_4);
> + if (!base)
> + return -ENODEV;
> + }
> base &= PCI_BASE_ADDRESS_IO_MASK;

-- 
Jeff Garzik              | Nothing cures insomnia like the
Building 1024            | realization that it's time to get up.
MandrakeSoft, Inc.       |        -- random fortune

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:13 EST