From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Alex Chiang <achiang@hp.com>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
pcihpd-discuss@lists.sourceforge.net,
Gary Hade <garyhade@us.ibm.com>, Matthew Wilcox <matthew@wil.cx>
Subject: Re: [PATCH 0/4, v3] Physical PCI slot objects
Date: Tue, 04 Dec 2007 21:57:33 +0900 [thread overview]
Message-ID: <47554EBD.1090106@jp.fujitsu.com> (raw)
In-Reply-To: <20071203224331.GA29227@ldl.fc.hp.com>
Hi Alex-san,
> Hi Kenji-san,
>
> * Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
>> Hi Alex-san,
>>
>>>> On my system, hotplug slots themselves can be added, removed
>>>> and replaced with the ohter type of I/O box.
>
> Are you talking about some sort of I/O cabinet/chassis that you
> can attach to the actual computer? Can the I/O expander unit be
> hotplugged? Or do you need to power your machine down to attach
> it?
>
> If you can hotplug it, I'm guessing that is why your firmware
> presents SxFy objects in the namespace with "weird" _SUN values,
> and it's why you have to check _STA to see if the slots are valid
> or not. That means the value returned by _SUN will change too,
> right? What will it turn into?
>
Currently, it's not hotpluggable (will be hotpluggable in the future).
Here is a sample AML code to explain what my firmware is doing.
Device (PCI0) {
Device (P2PA) {
Device (P2PB) { // for I/O unit (A)
Name (_ADR, ...)
Method (_STA) { ... }
}
Device (S0F0) { // for I/O unit (B)
Name (_ADR, ...)
Method (_STA) { ... }
Method (_EJx) { ... }
Method (_SUN) { ... }
}
...
}
...
}
If the I/O unit (A) is connected, _STA of P2PB returns as present
and _STA of S0F0 returns as not present.
If the I/O unit (B) is connected, _STA of P2PB returns as not
present and _STA of S0F0 returns as present.
>> In addtion, I think we should not trust the _SUN value of
>> non-existing device because the ACPI spec says in "6.5.1 _INI
>> (Init)" that _INI method is run before _ADR, _CID, _HID, _SUN, and
>> _UID are run. It means _SUN could be initialized in _INI method
>> implecitely. And it also says that "If the _STA method indicates
>> that the device is not present, OSPM will not run the _INI and will
>> not examine the children of the device for _INI methods.". After all,
>> _SUN for non-existing device is not reliable because it might not
>> initialized by _INI method.
>
> This is true, but HP platforms provide _INI at the root
> device/host bridge level, not on SxFy objects, so it doesn't seem
> that we would need to call _STA before calling _SUN for SxFy.
>
> Does your firmware provide _INI on SxFy objects?
No, it doesn't. But what I wanted to say was we should not use _SUN
value of non-existing device object.
>
> Our firmware teams seem to think that _STA should give the status
> of the card for hotplug support and general functional state.
> They claim that it doesn't makes much sense to support _STA on
> the slot itself unless you can physically change the slot
> topology on the machine at runtime, which we can't do (although
> maybe you can).
>
> The section of the spec you quoted is correct as long as we are
> talking ACPI 2.0 or later. My platforms implement ACPI 1.0b for
> legacy reasons. :-/
>
> In ACPI 1.0b, _EJx definition says (section 6.3.2):
>
> For hot removal, the device must be immediately ejected
> when the OS calls the _EJ0 control method. The _EJ0
> control method does not return until ejection is
> complete. After calling _EJ0, the OS will call _STA to
> determine whether or not the eject succeeded.
>
> So your firmware implementation does not seem backward compatible
> with the 1.0b spec. The different versions of ACPI is part of the
> reason why my patch is breaking on your machine.
>
I think this is the real reason. My platform implements ACPI 2.0 or
later. I didn't notice the chage to_EJx definition. Maybe we need to
check ACPI version in pci_slot driver.
> But as long as we are quoting the spec... :)
>
> _SUN evaluates to a DWORD that is the number to be used
> in the user interface. This number is required to be
> unique among the slots of the same type. It is also
> recommended that this number match the slot number
> printed on the physical slot whenever possible.
>
> section 6.1.6 of ACPI 2.0c
>
> My question is, why is your firmware returning multiple values of
> 1023 then? This seems to be the real reason why my patch is
> breaking on your machine.
>
> While depending on ACPI 1.0b behavior might be somewhat risky,
> returning the same value for _SUN multiple times, for slots of
> the same type, definitely seems non-compliant.
>
The reason is very simple. The reason is your patch is evaluating
invalid _SUN method. We must skip non-existing device object. This
is what your patch is already doing for pci root bridges.
In addition, even if those _SUN method were changed to return unique
number, none of the problems would be solved. Maybe pci_slot driver
would detect many unknown slots.
Thanks,
Kenji Kaneshige
WARNING: multiple messages have this Message-ID (diff)
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Alex Chiang <achiang@hp.com>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
pcihpd-discuss@lists.sourceforge.net,
Gary Hade <garyhade@us.ibm.com>, Matthew Wilcox <matthew@wil.cx>,
gregkh@suse.de, kristen.c.accardi@intel.com, lenb@kernel.org,
rick.jones2@hp.com, linux-kernel@vger.kernel.org,
linux-pci@atrey.karlin.mff.cuni.cz, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 0/4, v3] Physical PCI slot objects
Date: Tue, 04 Dec 2007 21:57:33 +0900 [thread overview]
Message-ID: <47554EBD.1090106@jp.fujitsu.com> (raw)
In-Reply-To: <20071203224331.GA29227@ldl.fc.hp.com>
Hi Alex-san,
> Hi Kenji-san,
>
> * Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
>> Hi Alex-san,
>>
>>>> On my system, hotplug slots themselves can be added, removed
>>>> and replaced with the ohter type of I/O box.
>
> Are you talking about some sort of I/O cabinet/chassis that you
> can attach to the actual computer? Can the I/O expander unit be
> hotplugged? Or do you need to power your machine down to attach
> it?
>
> If you can hotplug it, I'm guessing that is why your firmware
> presents SxFy objects in the namespace with "weird" _SUN values,
> and it's why you have to check _STA to see if the slots are valid
> or not. That means the value returned by _SUN will change too,
> right? What will it turn into?
>
Currently, it's not hotpluggable (will be hotpluggable in the future).
Here is a sample AML code to explain what my firmware is doing.
Device (PCI0) {
Device (P2PA) {
Device (P2PB) { // for I/O unit (A)
Name (_ADR, ...)
Method (_STA) { ... }
}
Device (S0F0) { // for I/O unit (B)
Name (_ADR, ...)
Method (_STA) { ... }
Method (_EJx) { ... }
Method (_SUN) { ... }
}
...
}
...
}
If the I/O unit (A) is connected, _STA of P2PB returns as present
and _STA of S0F0 returns as not present.
If the I/O unit (B) is connected, _STA of P2PB returns as not
present and _STA of S0F0 returns as present.
>> In addtion, I think we should not trust the _SUN value of
>> non-existing device because the ACPI spec says in "6.5.1 _INI
>> (Init)" that _INI method is run before _ADR, _CID, _HID, _SUN, and
>> _UID are run. It means _SUN could be initialized in _INI method
>> implecitely. And it also says that "If the _STA method indicates
>> that the device is not present, OSPM will not run the _INI and will
>> not examine the children of the device for _INI methods.". After all,
>> _SUN for non-existing device is not reliable because it might not
>> initialized by _INI method.
>
> This is true, but HP platforms provide _INI at the root
> device/host bridge level, not on SxFy objects, so it doesn't seem
> that we would need to call _STA before calling _SUN for SxFy.
>
> Does your firmware provide _INI on SxFy objects?
No, it doesn't. But what I wanted to say was we should not use _SUN
value of non-existing device object.
>
> Our firmware teams seem to think that _STA should give the status
> of the card for hotplug support and general functional state.
> They claim that it doesn't makes much sense to support _STA on
> the slot itself unless you can physically change the slot
> topology on the machine at runtime, which we can't do (although
> maybe you can).
>
> The section of the spec you quoted is correct as long as we are
> talking ACPI 2.0 or later. My platforms implement ACPI 1.0b for
> legacy reasons. :-/
>
> In ACPI 1.0b, _EJx definition says (section 6.3.2):
>
> For hot removal, the device must be immediately ejected
> when the OS calls the _EJ0 control method. The _EJ0
> control method does not return until ejection is
> complete. After calling _EJ0, the OS will call _STA to
> determine whether or not the eject succeeded.
>
> So your firmware implementation does not seem backward compatible
> with the 1.0b spec. The different versions of ACPI is part of the
> reason why my patch is breaking on your machine.
>
I think this is the real reason. My platform implements ACPI 2.0 or
later. I didn't notice the chage to_EJx definition. Maybe we need to
check ACPI version in pci_slot driver.
> But as long as we are quoting the spec... :)
>
> _SUN evaluates to a DWORD that is the number to be used
> in the user interface. This number is required to be
> unique among the slots of the same type. It is also
> recommended that this number match the slot number
> printed on the physical slot whenever possible.
>
> section 6.1.6 of ACPI 2.0c
>
> My question is, why is your firmware returning multiple values of
> 1023 then? This seems to be the real reason why my patch is
> breaking on your machine.
>
> While depending on ACPI 1.0b behavior might be somewhat risky,
> returning the same value for _SUN multiple times, for slots of
> the same type, definitely seems non-compliant.
>
The reason is very simple. The reason is your patch is evaluating
invalid _SUN method. We must skip non-existing device object. This
is what your patch is already doing for pci root bridges.
In addition, even if those _SUN method were changed to return unique
number, none of the problems would be solved. Maybe pci_slot driver
would detect many unknown slots.
Thanks,
Kenji Kaneshige
next prev parent reply other threads:[~2007-12-04 13:03 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-17 18:29 [PATCH 0/4, v3] Physical PCI slot objects Alex Chiang
2007-11-17 18:29 ` Alex Chiang
2007-11-17 18:35 ` [PATCH 1/4, v3] PCI Hotplug: Remove path attribute from sgi_hotplug Alex Chiang
2007-11-17 18:35 ` Alex Chiang
2007-11-17 18:35 ` [PATCH 2/4, v3] PCI Hotplug: Construct one fakephp slot per pci slot Alex Chiang
2007-11-17 18:35 ` Alex Chiang
2007-11-17 18:37 ` [PATCH 3/4, v3] PCI, PCI Hotplug: Introduce pci_slot Alex Chiang
2007-11-17 18:37 ` Alex Chiang
2007-11-19 22:03 ` [PATCH 3/4, v4] " Alex Chiang
2007-11-19 22:03 ` Alex Chiang
2007-11-17 18:38 ` [PATCH 4/4, v3] ACPI, PCI: ACPI PCI slot detection driver Alex Chiang
[not found] ` <20071119220418.GE32540@ldl.fc.hp.com>
2007-11-19 22:26 ` [PATCH 4/4, v4] " Kristen Carlson Accardi
2007-11-20 3:07 ` Alex Chiang
2007-11-20 16:23 ` stgit (was Re: [PATCH 4/4, v4] ACPI, PCI: ACPI PCI slot detection driver) Henrique de Moraes Holschuh
2007-11-17 18:38 ` [PATCH 4/4, v3] ACPI, PCI: ACPI PCI slot detection driver Alex Chiang
2007-11-19 17:43 ` [PATCH 0/4, v3] Physical PCI slot objects Kristen Carlson Accardi
2007-11-19 17:43 ` Kristen Carlson Accardi
2007-11-19 17:57 ` Alex Chiang
2007-11-19 22:02 ` Alex Chiang
2007-11-19 23:32 ` Gary Hade
2007-11-19 23:32 ` Gary Hade
2007-11-20 1:33 ` Kenji Kaneshige
2007-11-20 2:04 ` Matthew Garrett
2007-11-20 19:53 ` Gary Hade
2007-11-26 22:22 ` Alex Chiang
2007-11-26 22:26 ` [PATCH 3/4, v5] PCI, PCI Hotplug: Introduce pci_slot Alex Chiang
2007-11-26 22:28 ` [PATCH 4/4, v5] ACPI, PCI: ACPI PCI slot detection driver Alex Chiang
2007-11-27 3:04 ` [PATCH 0/4, v3] Physical PCI slot objects Gary Hade
2007-11-27 19:11 ` Kristen Carlson Accardi
2007-11-27 19:11 ` Kristen Carlson Accardi
2007-11-28 21:31 ` Gary Hade
2007-11-29 0:02 ` Kristen Carlson Accardi
2007-11-29 0:02 ` Kristen Carlson Accardi
2007-11-29 1:09 ` Gary Hade
2007-11-30 1:19 ` Alex Chiang
2007-11-30 19:10 ` Gary Hade
2007-11-29 7:47 ` Kenji Kaneshige
2007-11-29 7:47 ` Kenji Kaneshige
2007-11-30 1:51 ` Alex Chiang
2007-12-03 3:30 ` Kenji Kaneshige
2007-12-03 22:43 ` Alex Chiang
2007-12-04 12:57 ` Kenji Kaneshige [this message]
2007-12-04 12:57 ` Kenji Kaneshige
2007-12-10 23:02 ` Alex Chiang
2008-03-11 19:15 ` Kristen Carlson Accardi
2008-03-11 19:15 ` Kristen Carlson Accardi
2008-03-12 12:25 ` Kenji Kaneshige
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=47554EBD.1090106@jp.fujitsu.com \
--to=kaneshige.kenji@jp.fujitsu.com \
--cc=achiang@hp.com \
--cc=garyhade@us.ibm.com \
--cc=matthew@wil.cx \
--cc=pcihpd-discuss@lists.sourceforge.net \
/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.