diff mbox

Add PNP0A08 into acpi_pci_roots array.

Message ID 1350526971-9427-1-git-send-email-tangchen@cn.fujitsu.com
State Rejected
Headers show

Commit Message

Tang Chen Oct. 18, 2012, 2:22 a.m. UTC
acpi_pci_roots array doesn't include PNP0A08, which is PCI Express
Root Bridge.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
 drivers/acpi/pci_root.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Bjorn Helgaas Oct. 18, 2012, 3:55 a.m. UTC | #1
On Wed, Oct 17, 2012 at 8:22 PM, Tang Chen <tangchen@cn.fujitsu.com> wrote:
> acpi_pci_roots array doesn't include PNP0A08, which is PCI Express
> Root Bridge.

You need to explain why this change is necessary.  PNP0A08 devices
will have a PNP0A03 _CID, so the driver already claims PNP0A08 devices
because the _CID matches.

> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> ---
>  drivers/acpi/pci_root.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> index 037b59c..dedc4d6 100644
> --- a/drivers/acpi/pci_root.c
> +++ b/drivers/acpi/pci_root.c
> @@ -56,6 +56,7 @@ static int acpi_pci_root_start(struct acpi_device *device);
>
>  static const struct acpi_device_id root_device_ids[] = {
>         {"PNP0A03", 0},
> +       {"PNP0A08", 0},
>         {"", 0},
>  };
>  MODULE_DEVICE_TABLE(acpi, root_device_ids);
> --
> 1.7.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tang Chen Oct. 18, 2012, 5:52 a.m. UTC | #2
On 10/18/2012 11:55 AM, Bjorn Helgaas wrote:
> On Wed, Oct 17, 2012 at 8:22 PM, Tang Chen<tangchen@cn.fujitsu.com>  wrote:
>> acpi_pci_roots array doesn't include PNP0A08, which is PCI Express
>> Root Bridge.
>
> You need to explain why this change is necessary.  PNP0A08 devices
> will have a PNP0A03 _CID, so the driver already claims PNP0A08 devices
> because the _CID matches.

Hi Bjorn,

Here is my reason, but just my personal opinion. :)

1) There is no code to handle a pcie host bridge hotplug in kernel now.
    And when this happens,  pci host bridge related code will be
    executed, which makes me think that PNP0A03 and PNP0A08 are seen as
    the same devices. At least for now they are.
    So, acpi_pci_roots doesn't include PNP0A08 seems a little strange to
    me.

2) When I was reading Liu Jiang's "ACPI based hotplug framework"
    patches, I happened to see that he defined the following:

         static char *acpihp_dev_pcihb_ids[] = {
	        "PNP0A03",
                 "PNP0A08",
                 NULL
         };

    And also, Lu Yinghai defined the following in his own patch:

         static const struct acpi_device_id root_device_ids[] = {
                 {"PNP0A03", 0},
                 {"PNP0A08", 0},
                 {NULL, 0}
         };

    I think all these arraies should represent the same things, and we
    need only one of them.
    For now, it is root_device_ids[] in drivers/acpi/pci_root.c.

Well, all above is my own opinion. And you are right, even if we don't
change it, there won't be any problem.

Thanks. :)



>
>> Signed-off-by: Tang Chen<tangchen@cn.fujitsu.com>
>> ---
>>   drivers/acpi/pci_root.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
>> index 037b59c..dedc4d6 100644
>> --- a/drivers/acpi/pci_root.c
>> +++ b/drivers/acpi/pci_root.c
>> @@ -56,6 +56,7 @@ static int acpi_pci_root_start(struct acpi_device *device);
>>
>>   static const struct acpi_device_id root_device_ids[] = {
>>          {"PNP0A03", 0},
>> +       {"PNP0A08", 0},
>>          {"", 0},
>>   };
>>   MODULE_DEVICE_TABLE(acpi, root_device_ids);
>> --
>> 1.7.1
>>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 037b59c..dedc4d6 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -56,6 +56,7 @@  static int acpi_pci_root_start(struct acpi_device *device);
 
 static const struct acpi_device_id root_device_ids[] = {
 	{"PNP0A03", 0},
+	{"PNP0A08", 0},
 	{"", 0},
 };
 MODULE_DEVICE_TABLE(acpi, root_device_ids);