[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 2/2] PCI: acpiphp: remove all functions in slot,
From: |
Amos Kong |
Subject: |
[Qemu-devel] [PATCH v8 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx |
Date: |
Wed, 23 May 2012 15:03:16 +0800 |
On Wed, May 23, 2012 at 1:29 PM, Yinghai Lu <address@hidden> wrote:
> On Tue, May 22, 2012 at 10:15 PM, Amos Kong <address@hidden> wrote:
>> Attached the v7, test passed.
>
> would be better to have break...
Yeah. Otherwise, it will delete from the last function.
Attached v8, test passed.
> +static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot)
> +{
> + struct pci_bus *bus = slot->bridge->pci_bus;
> + struct pci_dev *dev;
> + int ret = NULL;
> +
> + down_read(&pci_bus_sem);
> + list_for_each_entry(dev, &bus->devices, bus_list)
> + if (PCI_SLOT(dev->devfn) == slot->device)
> + ret = pci_dev_get(dev);
> + up_read(&pci_bus_sem);
> +
> + return ret;
> +}
>
> ===>
>
>
> +static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot)
> +{
> + struct pci_bus *bus = slot->bridge->pci_bus;
> + struct pci_dev *dev;
> + int ret = NULL;
> +
> + down_read(&pci_bus_sem);
> + list_for_each_entry(dev, &bus->devices, bus_list)
> + if (PCI_SLOT(dev->devfn) == slot->device) {
> + ret = pci_dev_get(dev);
> + break;
> + }
> + up_read(&pci_bus_sem);
> +
> + return ret;
> +}
0002-PCI-acpiphp-remove-all-functions-in-slot-even-withou.patch
Description: Text Data
- [Qemu-devel] [PATCH v6 0/2] PCI: acpiphp: remove multifunction devices, Bjorn Helgaas, 2012/05/23
- [Qemu-devel] [PATCH v6 1/2] PCI: acpiphp: fix function 0 leak when disabling a slot, Bjorn Helgaas, 2012/05/23
- [Qemu-devel] [PATCH v6 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx, Bjorn Helgaas, 2012/05/23
- Re: [Qemu-devel] [PATCH v6 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx, Yinghai Lu, 2012/05/23
- [Qemu-devel] [PATCH v7 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx, Amos Kong, 2012/05/23
- Re: [Qemu-devel] [PATCH v7 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx, Yinghai Lu, 2012/05/23
- [Qemu-devel] [PATCH v8 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx,
Amos Kong <=
- Re: [Qemu-devel] [PATCH v8 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx, Bjorn Helgaas, 2012/05/24