netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark D Rustad <mark.d.rustad@intel.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
	netdev@vger.kernel.org
Subject: [PATCH V3 2/2] pci: Add VPD quirk for Intel Ethernet devices
Date: Wed, 03 Jun 2015 11:47:04 -0700	[thread overview]
Message-ID: <20150603184704.109080.37608.stgit@mdrustad-wks.jf.intel.com> (raw)
In-Reply-To: <20150603184445.109080.36387.stgit@mdrustad-wks.jf.intel.com>

This quirk sets the PCI_DEV_FLAGS_VPD_REF_F0 flag on all Intel
Ethernet device functions other than function 0.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
---
Changes in V3:
- Added a multifunction device check
---
 drivers/pci/quirks.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index c6dc1dfd25d5..1d6d848b66f9 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1903,6 +1903,15 @@ static void quirk_netmos(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID,
 			 PCI_CLASS_COMMUNICATION_SERIAL, 8, quirk_netmos);
 
+static void quirk_f0_vpd_link(struct pci_dev *dev)
+{
+	if (!dev->multifunction || !PCI_FUNC(dev->devfn))
+		return;
+	dev->dev_flags |= PCI_DEV_FLAGS_VPD_REF_F0;
+}
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
+			      PCI_CLASS_NETWORK_ETHERNET, 8, quirk_f0_vpd_link);
+
 static void quirk_e100_interrupt(struct pci_dev *dev)
 {
 	u16 command, pmcsr;

  parent reply	other threads:[~2015-06-03 18:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 18:46 [PATCH V3 0/2] pci: Provide a flag to access VPD through function 0 Mark D Rustad
2015-06-03 18:46 ` [PATCH V3 1/2] pci: Add dev_flags bit " Mark D Rustad
2015-06-03 18:47 ` Mark D Rustad [this message]
2015-06-05 21:59 ` [PATCH V3 0/2] pci: Provide a flag " Rustad, Mark D
2015-06-17 16:29   ` Rustad, Mark D
2015-06-17 16:44     ` Bjorn Helgaas
2015-06-26 18:04       ` Rustad, Mark D
2015-07-06 17:31         ` [Intel-wired-lan] " Rustad, Mark D
2015-07-11 19:49           ` Bjorn Helgaas
2015-06-17 17:23     ` Alexander Duyck

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=20150603184704.109080.37608.stgit@mdrustad-wks.jf.intel.com \
    --to=mark.d.rustad@intel.com \
    --cc=bhelgaas@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).