All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Jiang Liu <liuj97@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Xudong Hao <xudong.hao@intel.com>,
	Yijing Wang <wangyijing@huawei.com>,
	linux-pci@vger.kernel.org, Jiang Liu <jiang.liu@huawei.com>
Subject: Re: [PATCH 2/3] PCI, ACPI: Don't glue ACPI dev with pci VFs
Date: Wed, 05 Jun 2013 00:49:38 +0200	[thread overview]
Message-ID: <2947055.dGtK2eC6Fm@vostro.rjw.lan> (raw)
In-Reply-To: <2049081.aBp0De0oje@vostro.rjw.lan>

On Wednesday, June 05, 2013 12:44:27 AM Rafael J. Wysocki wrote:
> On Friday, May 31, 2013 12:21:30 PM Jiang Liu wrote:
> > From: Yinghai Lu <yinghai@kernel.org>
> > 
> > When sriov is enabled, VF could just start after PF in pci tree.
> > like c1:00.0 will be PF, and c1:00.1 and after will be VF.
> > 
> > acpi do have dev with same ADR. that will make them get glued
> > wrongly.
> 
> How exactly are they glued in that case?
> 
> > Skip that if it is virtfn.
> 
> That should be a bit more specific as far as I can say.  I don't see why a VF
> would not have a valid ACPI device object corresponding to it.  Is there any
> particular reason?

To be precise, I don't quite see why it is impossible or invalid for a VF to
have a corresponding ACPI device object.  It may not be the case on this
particular system, but why not in general?

Rafael


> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
> > ---
> >  drivers/pci/pci-acpi.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> > index e4b1fb2..720f3a2 100644
> > --- a/drivers/pci/pci-acpi.c
> > +++ b/drivers/pci/pci-acpi.c
> > @@ -321,6 +321,10 @@ static int acpi_pci_find_device(struct device *dev, acpi_handle *handle)
> >  	u64	addr;
> >  
> >  	pci_dev = to_pci_dev(dev);
> > +	/* don't mix vf with real pci device */
> > +	if (pci_dev->is_virtfn)
> > +		return -ENODEV;
> > +
> >  	/* Please ref to ACPI spec for the syntax of _ADR */
> >  	addr = (PCI_SLOT(pci_dev->devfn) << 16) | PCI_FUNC(pci_dev->devfn);
> >  	*handle = acpi_get_child(DEVICE_ACPI_HANDLE(dev->parent), addr);
> > 
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-06-04 22:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31  4:21 [PATCH 1/3] PCI: set correct value for iov device before device Jiang Liu
2013-05-31  4:21 ` [PATCH 2/3] PCI, ACPI: Don't glue ACPI dev with pci VFs Jiang Liu
2013-05-31 21:40   ` Bjorn Helgaas
2013-06-04 21:48     ` Bjorn Helgaas
2013-06-04 21:57       ` Yinghai Lu
2013-06-04 22:00         ` Bjorn Helgaas
2013-06-04 22:08           ` Yinghai Lu
2013-06-04 22:44   ` Rafael J. Wysocki
2013-06-04 22:49     ` Rafael J. Wysocki [this message]
2013-06-04 22:57       ` Yinghai Lu
2013-06-04 23:51         ` Rafael J. Wysocki
2013-06-05 15:55           ` Yinghai Lu
2013-06-05 16:21             ` Bjorn Helgaas
2013-05-31  4:21 ` [PATCH 3/3] PCI: Hide remove and rescan sysfs interfaces for SR-IOV virtual functions Jiang Liu
2013-06-05 18:32   ` Bjorn Helgaas
2013-06-05 18:31 ` [PATCH 1/3] PCI: set correct value for iov device before device Bjorn Helgaas

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=2947055.dGtK2eC6Fm@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=bhelgaas@google.com \
    --cc=jiang.liu@huawei.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.com \
    --cc=wangyijing@huawei.com \
    --cc=xudong.hao@intel.com \
    --cc=yinghai@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 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.