All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/2] pci: Provide a flag to access VPD through function 0
@ 2015-06-03 18:46 ` Mark D Rustad
  0 siblings, 0 replies; 20+ messages in thread
From: Mark D Rustad @ 2015-06-03 18:46 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, intel-wired-lan, netdev

Many multi-function devices provide shared registers in extended
config space for accessing VPD. The behavior of these registers
means that the state must be tracked and access locked correctly
for accesses not to hang or worse. One way to meet these needs is
to always perform the accesses through function 0, thereby using
the state tracking and mutex that already exists.

To provide this behavior, add a dev_flags bit to indicate that this
should be done. This bit can then be set for any non-zero function
that needs to redirect such VPD access to function 0. Do not set
this bit on the zero function or there will be an infinite recursion.

The second patch uses this new flag to invoke this behavior on all
multi-function Intel Ethernet devices.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>

---
Changes in V2:
- Corrected a spelling error in a log message
- Added checks to see that the referenced function 0 is reasonable
Changes in V3:
- Don't leak a device reference
- Check that function 0 has VPD
- Make a helper for the function 0 checks
- Moved a multifunction check to the quirk patch

---

Mark D Rustad (2):
      pci: Add dev_flags bit to access VPD through function 0
      pci: Add VPD quirk for Intel Ethernet devices


 drivers/pci/access.c |   61 +++++++++++++++++++++++++++++++++++++++++++++++++-
 drivers/pci/quirks.c |    9 +++++++
 2 files changed, 69 insertions(+), 1 deletion(-)

-- 
Mark Rustad, Network Division, Intel Corporation

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

end of thread, other threads:[~2015-07-11 19:50 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [Intel-wired-lan] " Mark D Rustad
2015-06-03 18:46 ` [PATCH V3 1/2] pci: Add dev_flags bit " Mark D Rustad
2015-06-03 18:46   ` [Intel-wired-lan] " Mark D Rustad
2015-06-03 18:47 ` [PATCH V3 2/2] pci: Add VPD quirk for Intel Ethernet devices Mark D Rustad
2015-06-03 18:47   ` [Intel-wired-lan] " Mark D Rustad
2015-06-05 21:59 ` [PATCH V3 0/2] pci: Provide a flag to access VPD through function 0 Rustad, Mark D
2015-06-05 21:59   ` [Intel-wired-lan] " Rustad, Mark D
2015-06-17 16:29   ` Rustad, Mark D
2015-06-17 16:29     ` [Intel-wired-lan] " Rustad, Mark D
2015-06-17 16:44     ` Bjorn Helgaas
2015-06-17 16:44       ` [Intel-wired-lan] " Bjorn Helgaas
2015-06-26 18:04       ` Rustad, Mark D
2015-06-26 18:04         ` [Intel-wired-lan] " Rustad, Mark D
2015-07-06 17:31         ` Rustad, Mark D
2015-07-06 17:31           ` Rustad, Mark D
2015-07-11 19:49           ` Bjorn Helgaas
2015-07-11 19:49             ` Bjorn Helgaas
2015-06-17 17:23     ` Alexander Duyck
2015-06-17 17:23       ` [Intel-wired-lan] " Alexander Duyck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.