Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1330551

[PATCH] PCI: Support SRIOV on Legacy EndPoint device

From kelly.zytaruk@amd.com
Newsgroups linux.kernel
Subject [PATCH] PCI: Support SRIOV on Legacy EndPoint device
Date 2016-02-09 19:10 +0100
Message-ID <r0kTE-7Hi-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Kelly Zytaruk <kelly.zytaruk@amd.com>

It is not neccessary to check for PCI_EXP_TYPE in sriov_init().  There appears to be no reason for the check.

Some AMD GPUs have hardware support for grapics SRIOV.
If the GPU has a display output then the GPU needs to support Legacy VGA operation.
If CLASS_CODE = VGA then the device should have a Port Type = Legacy EndPoint.
Therefore in order to enable SRIOV on a GPU with a display output, LEGACY_END_POINT is supported as a valid Port Type by removing the check for Port Type.

Patch is also logged in Bugzilla #112221

Signed-off-by: Kelly Zytaruk <kelly.zytaruk@amd.com>
---
 drivers/pci/iov.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 31f31d4..fe4bd0a 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -387,10 +387,6 @@ static int sriov_init(struct pci_dev *dev, int pos)
 	struct resource *res;
 	struct pci_dev *pdev;
 
-	if (pci_pcie_type(dev) != PCI_EXP_TYPE_RC_END &&
-	    pci_pcie_type(dev) != PCI_EXP_TYPE_ENDPOINT)
-		return -ENODEV;
-
 	pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &ctrl);
 	if (ctrl & PCI_SRIOV_CTRL_VFE) {
 		pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, 0);
-- 
1.7.10.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] PCI: Support SRIOV on Legacy EndPoint device kelly.zytaruk@amd.com - 2016-02-09 19:10 +0100

csiph-web