* Re: [Pcihpd-discuss] Query regarding interrupt handler code in pciehp
@ 2005-11-17 6:08 Greg KH
2005-11-17 20:40 ` Rajesh Shah
0 siblings, 1 reply; 2+ messages in thread
From: Greg KH @ 2005-11-17 6:08 UTC (permalink / raw)
To: linux-hotplug
On Thu, Nov 17, 2005 at 02:55:05PM +0900, Rajat Jain wrote:
> Hi,
>
> This is a query regarding the "interrupt_event_handler()" function in
> pciehp_ctrl.c. Please refer to the following code:
>
> 673: else if (ctrl->event_queue[loop].event_type = INT_BUTTON_PRESS) {
> 675: if (ATTN_BUTTN(ctrl->ctrlcap)) {
> 676: dbg("Button pressed\n");
> 677: p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
> 678: if (getstatus) {
>
> As evident from above, in order to get Power Controller status, it
> checks the capability of Attention Button Present. Shouldn't it check
> the capability of Power Controller Present instead and should be
> written like this:
>
> if (POWER_CTRL(ctrl->ctrlcap)) {
>
> Please let me know if I am missing something.
So what exactly would your change look like? Does the current code not
work properly for you?
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Pcihpd-discuss] Query regarding interrupt handler code in pciehp
2005-11-17 6:08 [Pcihpd-discuss] Query regarding interrupt handler code in pciehp Greg KH
@ 2005-11-17 20:40 ` Rajesh Shah
0 siblings, 0 replies; 2+ messages in thread
From: Rajesh Shah @ 2005-11-17 20:40 UTC (permalink / raw)
To: linux-hotplug
On Thu, Nov 17, 2005 at 02:55:05PM +0900, Rajat Jain wrote:
>
> This is a query regarding the "interrupt_event_handler()" function in
> pciehp_ctrl.c. Please refer to the following code:
>
> 673: else if (ctrl->event_queue[loop].event_type = INT_BUTTON_PRESS) {
> 675: if (ATTN_BUTTN(ctrl->ctrlcap)) {
> 676: dbg("Button pressed\n");
> 677: p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
> 678: if (getstatus) {
>
> As evident from above, in order to get Power Controller status, it
> checks the capability of Attention Button Present. Shouldn't it check
> the capability of Power Controller Present instead and should be
This code triggers when pciehp thinks that an attention button
has been pressed. The ATTN_BUTTN() check is just a paranoia check
making sure that the controller reported support for the attention
button for this slot in the slot capabilities register. The
follow on code check if the slot is powered on or not. If it
was powered on, the attention button press was to turn it off
(i.e. hot remove). If it was powered off, the attention button
press was to turn it on (hot add). So, I think the code is
correct.
thanks,
Rajesh
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-17 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-17 6:08 [Pcihpd-discuss] Query regarding interrupt handler code in pciehp Greg KH
2005-11-17 20:40 ` Rajesh Shah
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).