From: Bjorn Helgaas <bhelgaas@google.com>
To: "Zytaruk, Kelly" <Kelly.Zytaruk@amd.com>
Cc: Yu Zhao <yuzhao@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: Architectural question regarding IOV support in Linux 3.13.4
Date: Tue, 2 Dec 2014 14:26:16 -0700 [thread overview]
Message-ID: <20141202212616.GA20069@google.com> (raw)
In-Reply-To: <B756807489D6244883AC0B799A6EEC1514C6A32D@storexdag03.amd.com>
On Tue, Dec 02, 2014 at 09:11:26PM +0000, Zytaruk, Kelly wrote:
> > -----Original Message-----
> > From: linux-pci-owner@vger.kernel.org [mailto:linux-pci-
> > owner@vger.kernel.org] On Behalf Of Bjorn Helgaas
> > Sent: Tuesday, December 02, 2014 4:02 PM
> > To: Zytaruk, Kelly
> > Cc: Yu Zhao; linux-pci@vger.kernel.org; Alex Williamson
> > Subject: Re: Architectural question regarding IOV support in Linux 3.13.4
> >
> > On Tue, Dec 2, 2014 at 9:42 AM, Zytaruk, Kelly <Kelly.Zytaruk@amd.com>
> > wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Bjorn Helgaas [mailto:bhelgaas@google.com]
...
> > >> Can you try out Yu's patch and see what happens? If you do turn on
> > >> SR-IOV on this device, it would be interesting to see the complete dmesg log
> > and "lspci -vv"
> > >> output to see what we do with it.
> > >
> > > Bjorn,
> > > I am resurrecting this thread as I have been looking through the 3.18 source
> > code and don't see any support for PCI_EXP_TYPE_LEG_END for SRIOV. For
> > devices that must remain defined as Legacy endpoints we still need to be able to
> > enable SRIOV.
> >
> > Looking back, I see that Yu Zhao did attach a patch earlier in the thread. Are you
> > asking me to apply that one? I don't remember why I dropped it from my queue;
> > maybe it was because I was waiting for you to test it.
> >
> > Did you test it? What were the results (complete dmesg log and lspci -vv
> > output)? There was also some follow-on discussion that I would need to
> > evaluate before applying it.
> >
> > Bjorn
>
> I lost the original patch but it was simple enough that I coded it myself (one line change) locally. I have been testing with it for several months now and have no issues with it. In fact my testing requires it to be present in order to succeed, it will fail if it is not present.
Huh, I don't see it in the archives, either. Ah, I see, it was a
multi-part message, which is rejected by the mailing lists. But since I'm
a nice guy, I'll include it again below.
See https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches
for the usual procedure.
Please test the patch below (or post your patch if you prefer), collect
the info I requested above (dmesg and lspci info), and attach it to a
bugzilla so we can archive the details that motivate this change.
Bjorn
>From e81dfb3e73982ae9d74e3a8c6110a5104e36c3c0 Mon Sep 17 00:00:00 2001
From: Yu Zhao <yuzhao@google.com>
Date: Fri, 21 Feb 2014 14:46:50 -0800
Subject: [PATCH] pci: fix legacy endpoint being excluded from using SR-IOV
Neither PCIe 3.0 nor SR-IOV 1.1 spec excludes device of legacy
endpoint type from having SR-IOV capability. The legacy endpoint
together with root complex integrated and regular endpoints should
be supported by sriov_init().
Signed-off-by: Yu Zhao <yu.zhao@google.com>
---
drivers/pci/iov.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 9dce7c5..5f98707 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -418,6 +418,7 @@ 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_LEG_END &&
pci_pcie_type(dev) != PCI_EXP_TYPE_ENDPOINT)
return -ENODEV;
--
1.9.0.rc1.175.g0b1dcb5
next prev parent reply other threads:[~2014-12-02 21:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 17:45 Architectural question regarding IOV support in Linux 3.13.4 Zytaruk, Kelly
2014-02-21 21:11 ` Bjorn Helgaas
2014-02-21 22:03 ` Alex Williamson
[not found] ` <CAOUHufai=eoR+tgVB5Zdp6veCQgY=pHDSAESZ5cLOjPTw-R8CQ@mail.gmail.com>
2014-02-24 19:22 ` Zytaruk, Kelly
2014-02-24 20:51 ` Bjorn Helgaas
2014-02-24 21:08 ` Zytaruk, Kelly
2014-12-02 16:42 ` Zytaruk, Kelly
2014-12-02 21:01 ` Bjorn Helgaas
2014-12-02 21:11 ` Zytaruk, Kelly
2014-12-02 21:26 ` Bjorn Helgaas [this message]
2014-02-24 20:59 ` Alex Williamson
2014-02-24 21:57 ` Yu Zhao
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=20141202212616.GA20069@google.com \
--to=bhelgaas@google.com \
--cc=Kelly.Zytaruk@amd.com \
--cc=alex.williamson@redhat.com \
--cc=linux-pci@vger.kernel.org \
--cc=yuzhao@google.com \
/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;
as well as URLs for NNTP newsgroup(s).