Re: [PATCH] PCI: disable decoding while sizing BARs

From: Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Date: Tue Dec 17 2002 - 09:29:25 EST


On Mon, Dec 16, 2002 at 05:41:53PM -0700, Bjorn Helgaas wrote:
> + /* Disable I/O & memory decoding while we size the BARs. */
> + pci_read_config_word(dev, PCI_COMMAND, &cmd);
> + pci_write_config_word(dev, PCI_COMMAND,
> + cmd & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY));

It's fatal for certain x86 northbridges, that's why the code was
removed 2 years ago.

Maybe it would be ok with this modification:

        pci_read_config_word(dev, PCI_COMMAND, &cmd);
        /* Don't touch northbridges or devices with devfn 0:0 */
        if ((dev->class >> 8) != PCI_CLASS_BRIDGE_HOST && dev->devfn)
                pci_write_config_word(dev, PCI_COMMAND,
                        cmd & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY));

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



This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:16 EST