Re: Opterons and setting the pci bus master bit

Benjamin Herrenschmidt
2005-10-02T08:57:44Z

On Fri, 2005-09-30 at 13:32 -0400, linux-os (Dick Johnson) wrote:
> pci_set_dma_mask(dev, 0xffffffffULL); // 32 bit DMA only
> pci_set_drvdata(dev, NULL); // Harmless if unused
> pci_set_power_state(dev, 0); // Turn it ON
> pci_set_master(dev); // Make bus-master
> pci_set_mwi(dev); // Check return, different code
> pci_write_config_dword(dev, PCI_COMMAND, PCI_CONFIG_YOU_DEFINE);
>
> Typical bus-master PCI_CONFIG_YOU_DEFINE is:
> (PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER|PCI_COMMAND_SERR)

Actually the last one is slightly bogus for things like
memory/master/etc... you shouldn't bother about these if you do things
correctly and call ... pci_enable_device() which you forgot :)

Ben.