Re: [PATCH 2/3] PCI, ACPI: Don't glue ACPI dev with pci VFs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[+cc Rafael]

On Thu, May 30, 2013 at 10:21 PM, Jiang Liu <liuj97@xxxxxxxxx> wrote:
> From: Yinghai Lu <yinghai@xxxxxxxxxx>
>
> 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.
>
> Skip that if it is virtfn.
>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
> Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxx>
> ---
>  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;

Rafael, can you review this?  I don't understand the implications of
this change.

And I don't know exactly what problem this would fix, so I don't know
if it's stable material or not.  Yinghai did propose it as v3.10
material in https://lkml.kernel.org/r/1368498506-25857-1-git-send-email-yinghai@xxxxxxxxxx,
but I don't know why.

Bjorn

>         /* 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);
> --
> 1.8.1.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux