From: "Rustad, Mark D" <mark.d.rustad@intel.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: "bhelgaas@google.com" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH V2 1/2] pci: Add dev_flags bit to access VPD through function 0
Date: Wed, 3 Jun 2015 16:16:43 +0000 [thread overview]
Message-ID: <4033DF50-0126-4F69-88FA-C6AABC0CADCE@intel.com> (raw)
In-Reply-To: <556E6667.1020000@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]
> On Jun 2, 2015, at 7:28 PM, Alexander Duyck <alexander.duyck@gmail.com> wrote:
>
> You can probably combine the dev->multifunction check with the dev_flags check. After all you don't need this workaround if the device is not multifunction. It might even make more sense to move the multifunction check to the quirk in patch 2/2.
Yes. I also realized that I really should check that tdev->vpd is not NULL. There is no point in referencing it if, for whatever reason, it has no VPD.
> I also believe this leaks a reference to the device.
Yes, and I was thinking that when I wrote the line, but forgot to do anything about it. Good catch!
> You should be calling pci_dev_put(tdev) if tdev is not NULL. As such you probably need to split up the !tdev and the rest of the checks.
Yup. I will have a V3 coming. I still don't have anything to handle PFs assigned to guests, but I think that would be best in a separate patch set if there is need to fix that. It looks to me like that would involve trapping on all config space accesses to such devices and then emulating the behavior of the VPD Address/F and Data registers. It may be worth seeing if anyone cares before doing anything about it. I haven't seen any reports related to such a setup.
Again, thank you for your comments.
--
Mark Rustad, Networking Division, Intel Corporation
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 841 bytes --]
next prev parent reply other threads:[~2015-06-03 16:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 0:10 [PATCH V2 0/2] pci: Provide a flag to access VPD through function 0 Mark D Rustad
2015-06-03 0:10 ` [PATCH V2 1/2] pci: Add dev_flags bit " Mark D Rustad
2015-06-03 2:28 ` [Intel-wired-lan] " Alexander Duyck
2015-06-03 16:16 ` Rustad, Mark D [this message]
2015-06-03 0:10 ` [PATCH V2 2/2] pci: Add VPD quirk for Intel Ethernet devices Mark D Rustad
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=4033DF50-0126-4F69-88FA-C6AABC0CADCE@intel.com \
--to=mark.d.rustad@intel.com \
--cc=alexander.duyck@gmail.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