[Intel-wired-lan] [PATCH 1/2] pci: Add dev_flags bit to access VPD through function 0

Rustad, Mark D mark.d.rustad at intel.com
Tue Jun 2 18:15:14 UTC 2015


> On Jun 2, 2015, at 10:48 AM, Alexander Duyck <alexander.h.duyck at redhat.com> wrote:
> 
> I'm pretty sure these could cause some serious errors if you direct assign the device into a VM since you then end up with multiple devices sharing a bus.  Also it would likely have side-effects on a LOM (Lan On Motherboard) as it also shares the bus with multiple non-Ethernet devices.
> 
> I believe you still need to add something like a check for !pci_is_root_bus(dev->bus) before you attempt to grab function 0.  It probably also wouldn't hurt to check the dev->multifunction bit before running this code since it wouldn't make sense to go chasing down the VPD on another function if the device doesn't have one.  You could probably do that either as a part of this code, or perhaps put it in the quirk.

I'll look into those. I think you are right about more checks being needed. Thanks for the comments.

--
Mark Rustad, Networking Division, Intel Corporation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150602/94886361/attachment-0001.asc>


More information about the Intel-wired-lan mailing list