Re: Opterons and setting the pci bus master bit
From: linux-os (Dick Johnson)
Date: Fri Sep 30 2005 - 12:33:53 EST
On Fri, 30 Sep 2005, Mark Hounschell wrote:
> Problem, I have a number of dual processor Opterons that do not work
> with pci expansion chassis'. The reason that they do not work is because
> none of the cards discovered in the chassis get the pci bus master bit
> set in their command register. If I manually set this bit in our cards
> everything is fine. When we connect the same chassis to an Intel P4 box
> everything is fine. It looks like it is the kernel that sets this bit
> because we have never set it in any of our drivers, yet on the intel
> boxes it gets set. Why would this bit not be set when the chassis is
> connected to an Opteron. We are running 32-bit mode BTW. I am using a
> 2.6.11.9 kernel. Is this a motherboard problem or could this be a kernel
> problem?
>
> Thanks
> Mark
The PCI Busmaster bit should (read must) be set by the driver to enble
bus-mastering after the dma mask is set.
Commands are (in order):
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)
Cheers,
Dick Johnson
Penguin : Linux version 2.6.13 on an i686 machine (5589.55 BogoMips).
Warning : 98.36% of all statistics are fiction.
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@xxxxxxxxxxxx - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/