Linux PCI subsystem development
 help / color / mirror / Atom feed
* Adding support for Relaxed ordering on a non-root device
@ 2020-06-04 12:35 Aya Levin
  2020-06-05 19:08 ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Aya Levin @ 2020-06-04 12:35 UTC (permalink / raw)
  To: Ding Tianhong, Bjorn Helgaas; +Cc: Tariq Toukan, Tal Gilboa, linux-pci

Hi

I am writing to you regarding your commits titled: 
1. a99b646afa8a PCI: Disable PCIe Relaxed Ordering if unsupported 
2. 87e09cdec4da PCI: Disable Relaxed Ordering for some Intel processors

While adding support to relaxed ordering on Mellanox Ethernet driver I
tried to avoid the Intel's bug with pcie_relaxed_ordering_enabled.
Expecting this to return False on Haswell and Broadwell CPU. I run
this API on: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz (I think it is
a Haswell, right?) and the API returned True. What am I missing?

In addition, I saw your comment in pci_configure_relaxed_ordering
(pasted below) the non-root ports are not handled since Peer-to-Peer
DMA is another can of warms. Could you elaborate on the complexity?
What is the effort to extend this to non-root ports?

Thanks,
Aya

---------------------------------------------------------------------
static void pci_configure_relaxed_ordering(struct pci_dev *dev)
{
	struct pci_dev *root;

	/* PCI_EXP_DEVICE_RELAX_EN is RsvdP in VFs */
	if (dev->is_virtfn)
		return;

	if (!pcie_relaxed_ordering_enabled(dev))
		return;

	/*
	 * For now, we only deal with Relaxed Ordering issues with Root
	 * Ports. Peer-to-Peer DMA is another can of worms.
	 */
	root = pci_find_pcie_root_port(dev);
	if (!root)
		return;

	if (root->dev_flags & PCI_DEV_FLAGS_NO_RELAXED_ORDERING) {
		pcie_capability_clear_word(dev, PCI_EXP_DEVCTL,
					   PCI_EXP_DEVCTL_RELAX_EN);
		pci_info(dev, "Relaxed Ordering disabled because the Root Port didn't support it\n");
	}
}



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-14  7:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04 12:35 Adding support for Relaxed ordering on a non-root device Aya Levin
2020-06-05 19:08 ` Bjorn Helgaas
2020-06-08 12:44   ` Aya Levin
2020-06-11 22:36     ` Bjorn Helgaas
2020-06-14  7:56       ` Aya Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox