From: Kelly Zytaruk <kelly.zytaruk@amd.com>
To: bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Kelly Zytaruk <kelly.zytaruk@amd.com>
Subject: [PATCH] PCI: Support SRIOV on Legacy EndPoint device
Date: Thu, 4 Feb 2016 09:48:26 -0500 [thread overview]
Message-ID: <1454597306-26189-1-git-send-email-kelly.zytaruk@amd.com> (raw)
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.
Signed-off-by: Kelly Zytaruk <kelly.zytaruk@amd.com>
---
drivers/pci/iov.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 31f31d4..da4fbac 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -388,7 +388,8 @@ static int sriov_init(struct pci_dev *dev, int pos)
struct pci_dev *pdev;
if (pci_pcie_type(dev) != PCI_EXP_TYPE_RC_END &&
- pci_pcie_type(dev) != PCI_EXP_TYPE_ENDPOINT)
+ pci_pcie_type(dev) != PCI_EXP_TYPE_ENDPOINT &&
+ pci_pcie_type(dev) != PCI_EXP_TYPE_LEG_END)
return -ENODEV;
pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &ctrl);
--
1.7.10.4
next reply other threads:[~2016-02-04 15:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 14:48 Kelly Zytaruk [this message]
2016-02-04 15:14 ` Bjorn Helgaas
2016-02-04 16:21 ` Zytaruk, Kelly
2016-02-05 16:46 ` Bjorn Helgaas
2016-02-05 16:50 ` Zytaruk, Kelly
2016-02-05 16:59 ` Bjorn Helgaas
2016-02-04 15:08 Zytaruk, Kelly
2016-02-09 18:08 kelly.zytaruk
2016-02-29 18:00 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454597306-26189-1-git-send-email-kelly.zytaruk@amd.com \
--to=kelly.zytaruk@amd.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®