Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-11-05 Thread Yinghai Lu
On Wed, Nov 5, 2014 at 1:57 PM, Bjorn Helgaas wrote: > > It's relatively common to start with a pci_dev and look for an ACPI handle > that corresponds to that device or the closest enclosing scope, so maybe > there should be a way to do that directly. > > For pci_get_hp_params(), I think the curre

Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-11-05 Thread Rafael J. Wysocki
On Wednesday, November 05, 2014 02:57:13 PM Bjorn Helgaas wrote: > On Wed, Nov 05, 2014 at 10:44:25PM +0100, Rafael J. Wysocki wrote: > > On Wednesday, November 05, 2014 01:22:52 PM Bjorn Helgaas wrote: > > > ... > > > The acpi_pci_get_bridge_handle(struct pci_bus *) interface niggles at me a > > >

Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-11-05 Thread Bjorn Helgaas
On Wed, Nov 05, 2014 at 10:44:25PM +0100, Rafael J. Wysocki wrote: > On Wednesday, November 05, 2014 01:22:52 PM Bjorn Helgaas wrote: > > ... > > The acpi_pci_get_bridge_handle(struct pci_bus *) interface niggles at me a > > little because I don't think there's any concept of an ACPI device for a >

Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-11-05 Thread Rafael J. Wysocki
On Wednesday, November 05, 2014 01:22:52 PM Bjorn Helgaas wrote: > [+cc Chao, Joerg] > > On Thu, Oct 30, 2014 at 11:09:13AM -0600, Bjorn Helgaas wrote: > > [+cc Rafael, linux-acpi] > > > > On Wed, Oct 29, 2014 at 03:26:10PM -0700, Yinghai Lu wrote: > > > While enabling sriov for intel igb device

Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-11-05 Thread Bjorn Helgaas
[+cc Chao, Joerg] On Thu, Oct 30, 2014 at 11:09:13AM -0600, Bjorn Helgaas wrote: > [+cc Rafael, linux-acpi] > > On Wed, Oct 29, 2014 at 03:26:10PM -0700, Yinghai Lu wrote: > > While enabling sriov for intel igb device got: > > > > sca05-0a81fda5:~ # echo 7 > > > /sys/bus/pci/devices/\:09\:0

Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-10-30 Thread Bjorn Helgaas
On Thu, Oct 30, 2014 at 12:57 PM, Yinghai Lu wrote: > On Thu, Oct 30, 2014 at 10:09 AM, Bjorn Helgaas wrote: >>> Fixing: commit 6cd33649fa83 ("PCI: Add pci_configure_device() during >>> enumeration") >> >> Thanks for including this, but why not use the same format everybody else >> does: >> >>

Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-10-30 Thread Yinghai Lu
On Thu, Oct 30, 2014 at 10:09 AM, Bjorn Helgaas wrote: > [+cc Rafael, linux-acpi] > This raises the question of what the correct behavior should be. Your > patch certainly avoids the NULL pointer dereference. It does so by making > acpi_pci_get_bridge_handle() fail gracefully, which means we wi

Re: [PATCH] PCI: fix sriov enabling with virtual bus

2014-10-30 Thread Bjorn Helgaas
[+cc Rafael, linux-acpi] On Wed, Oct 29, 2014 at 03:26:10PM -0700, Yinghai Lu wrote: > While enabling sriov for intel igb device got: > > sca05-0a81fda5:~ # echo 7 > /sys/bus/pci/devices/\:09\:00.0/sriov_numvfs > [ 729.612191] pci :0a:10.0: [8086:1520] type 00 class 0x02 > [ 729.61

[PATCH] PCI: fix sriov enabling with virtual bus

2014-10-29 Thread Yinghai Lu
While enabling sriov for intel igb device got: sca05-0a81fda5:~ # echo 7 > /sys/bus/pci/devices/\:09\:00.0/sriov_numvfs [ 729.612191] pci :0a:10.0: [8086:1520] type 00 class 0x02 [ 729.619002] BUG: unable to handle kernel NULL pointer dereference at 00e8 [ 729.627767]