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

Marcelo Tosatti (marcelo@conectiva.com.br)
Wed, 18 Dec 2002 10:30:54 -0200 (BRST)


On Tue, 17 Dec 2002, Ivan Kokshaysky wrote:

> 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));

Ok, I've reverted this one.
-
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/