All of lore.kernel.org
 help / color / mirror / Atom feed
* power button override
@ 2020-01-24  0:13 Vijay Khemka
  2020-01-24  0:36 ` Bills, Jason M
  0 siblings, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-24  0:13 UTC (permalink / raw)
  To: Bills, Jason M, James Feist; +Cc: OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

Hi Jason,
We have a requirement of power button override. I don’t see x86-power control doesn’t support this currently. Do you need this features or do you have any local patch for this.

Regards
-Vijay

[-- Attachment #2: Type: text/html, Size: 1730 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-24  0:13 power button override Vijay Khemka
@ 2020-01-24  0:36 ` Bills, Jason M
  2020-01-24 18:29   ` Vijay Khemka
  0 siblings, 1 reply; 18+ messages in thread
From: Bills, Jason M @ 2020-01-24  0:36 UTC (permalink / raw)
  To: Vijay Khemka, James Feist; +Cc: OpenBMC Maillist



On 1/23/2020 4:13 PM, Vijay Khemka wrote:
> Hi Jason,
> 
> We have a requirement of power button override. I don’t see x86-power 
> control doesn’t support this currently. Do you need this features or do 
> you have any local patch for this.
Hi Vijay,

power button override is used for the "Force Off" actions in power control:
https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
> 
> Regards
> 
> -Vijay
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-24  0:36 ` Bills, Jason M
@ 2020-01-24 18:29   ` Vijay Khemka
  2020-01-24 20:55     ` Bills, Jason M
  0 siblings, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-24 18:29 UTC (permalink / raw)
  To: Bills, Jason M, James Feist; +Cc: OpenBMC Maillist



On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:

    
    
    On 1/23/2020 4:13 PM, Vijay Khemka wrote:
    > Hi Jason,
    > 
    > We have a requirement of power button override. I don’t see x86-power 
    > control doesn’t support this currently. Do you need this features or do 
    > you have any local patch for this.
    Hi Vijay,
    
    power button override is used for the "Force Off" actions in power control:
    https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.

This will not work if current status is off. This should just send pulse in any status on/off.
    > 
    > Regards
    > 
    > -Vijay
    > 
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-24 18:29   ` Vijay Khemka
@ 2020-01-24 20:55     ` Bills, Jason M
  2020-01-24 21:12       ` Bills, Jason M
  0 siblings, 1 reply; 18+ messages in thread
From: Bills, Jason M @ 2020-01-24 20:55 UTC (permalink / raw)
  To: Vijay Khemka, James Feist; +Cc: OpenBMC Maillist



On 1/24/2020 10:29 AM, Vijay Khemka wrote:
> 
> 
> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
> 
>      
>      
>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>      > Hi Jason,
>      >
>      > We have a requirement of power button override. I don’t see x86-power
>      > control doesn’t support this currently. Do you need this features or do
>      > you have any local patch for this.
>      Hi Vijay,
>      
>      power button override is used for the "Force Off" actions in power control:
>      https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
> 
> This will not work if current status is off. This should just send pulse in any status on/off.
Correct.  Force Off is not done if the current status is off.
>      >
>      > Regards
>      >
>      > -Vijay
>      >
>      
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-24 20:55     ` Bills, Jason M
@ 2020-01-24 21:12       ` Bills, Jason M
  2020-01-24 21:17         ` Bills, Jason M
  2020-01-24 22:01         ` Vijay Khemka
  0 siblings, 2 replies; 18+ messages in thread
From: Bills, Jason M @ 2020-01-24 21:12 UTC (permalink / raw)
  To: openbmc



On 1/24/2020 12:55 PM, Bills, Jason M wrote:
> 
> 
> On 1/24/2020 10:29 AM, Vijay Khemka wrote:
>>
>>
>> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> 
>> wrote:
>>
>>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>>      > Hi Jason,
>>      >
>>      > We have a requirement of power button override. I don’t see 
>> x86-power
>>      > control doesn’t support this currently. Do you need this 
>> features or do
>>      > you have any local patch for this.
>>      Hi Vijay,
>>      power button override is used for the "Force Off" actions in 
>> power control:
>>      
>> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50. 
>>
>>
>> This will not work if current status is off. This should just send 
>> pulse in any status on/off.
> Correct.  Force Off is not done if the current status is off.
Do you have more details on the power button override behavior that you 
need?
>>      >
>>      > Regards
>>      >
>>      > -Vijay
>>      >
>>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-24 21:12       ` Bills, Jason M
@ 2020-01-24 21:17         ` Bills, Jason M
  2020-01-24 22:01         ` Vijay Khemka
  1 sibling, 0 replies; 18+ messages in thread
From: Bills, Jason M @ 2020-01-24 21:17 UTC (permalink / raw)
  To: openbmc



On 1/24/2020 1:12 PM, Bills, Jason M wrote:
> 
> 
> On 1/24/2020 12:55 PM, Bills, Jason M wrote:
>>
>>
>> On 1/24/2020 10:29 AM, Vijay Khemka wrote:
>>>
>>>
>>> On 1/23/20, 4:36 PM, "Bills, Jason M" 
>>> <jason.m.bills@linux.intel.com> wrote:
>>>
>>>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>>>      > Hi Jason,
>>>      >
>>>      > We have a requirement of power button override. I don’t see 
>>> x86-power
>>>      > control doesn’t support this currently. Do you need this 
>>> features or do
>>>      > you have any local patch for this.
Sorry, I forgot to answer this.  We don't have any local patches.  We're 
building power control directly from the repo as-is.
>>>      Hi Vijay,
>>>      power button override is used for the "Force Off" actions in 
>>> power control:
>>> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50. 
>>>
>>>
>>> This will not work if current status is off. This should just send 
>>> pulse in any status on/off.
>> Correct.  Force Off is not done if the current status is off.
> Do you have more details on the power button override behavior that you 
> need?
>>>      >
>>>      > Regards
>>>      >
>>>      > -Vijay
>>>      >
>>>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-24 21:12       ` Bills, Jason M
  2020-01-24 21:17         ` Bills, Jason M
@ 2020-01-24 22:01         ` Vijay Khemka
  2020-01-27 18:52           ` Bills, Jason M
  1 sibling, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-24 22:01 UTC (permalink / raw)
  To: Bills, Jason M, openbmc



On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:

    
    
    On 1/24/2020 12:55 PM, Bills, Jason M wrote:
    > 
    > 
    > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
    >>
    >>
    >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> 
    >> wrote:
    >>
    >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
    >>      > Hi Jason,
    >>      >
    >>      > We have a requirement of power button override. I don’t see 
    >> x86-power
    >>      > control doesn’t support this currently. Do you need this 
    >> features or do
    >>      > you have any local patch for this.
    >>      Hi Vijay,
    >>      power button override is used for the "Force Off" actions in 
    >> power control:
    >>      
    >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50. 
    >>
    >>
    >> This will not work if current status is off. This should just send 
    >> pulse in any status on/off.
    > Correct.  Force Off is not done if the current status is off.
    Do you have more details on the power button override behavior that you 
    need?

Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.

    >>      >
    >>      > Regards
    >>      >
    >>      > -Vijay
    >>      >
    >>
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-24 22:01         ` Vijay Khemka
@ 2020-01-27 18:52           ` Bills, Jason M
  2020-01-27 20:31             ` Vijay Khemka
  0 siblings, 1 reply; 18+ messages in thread
From: Bills, Jason M @ 2020-01-27 18:52 UTC (permalink / raw)
  To: Vijay Khemka, openbmc



On 1/24/2020 2:01 PM, Vijay Khemka wrote:
> 
> 
> On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
> 
>      
>      
>      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
>      >
>      >
>      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
>      >>
>      >>
>      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
>      >> wrote:
>      >>
>      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>      >>      > Hi Jason,
>      >>      >
>      >>      > We have a requirement of power button override. I don’t see
>      >> x86-power
>      >>      > control doesn’t support this currently. Do you need this
>      >> features or do
>      >>      > you have any local patch for this.
>      >>      Hi Vijay,
>      >>      power button override is used for the "Force Off" actions in
>      >> power control:
>      >>
>      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
>      >>
>      >>
>      >> This will not work if current status is off. This should just send
>      >> pulse in any status on/off.
>      > Correct.  Force Off is not done if the current status is off.
>      Do you have more details on the power button override behavior that you
>      need?
> 
> Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
When in recovery mode, the ME will accept a reset command (IPMI raw 0x6 
0x2) to reset to operational mode.

> 
>      >>      >
>      >>      > Regards
>      >>      >
>      >>      > -Vijay
>      >>      >
>      >>
>      
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-27 18:52           ` Bills, Jason M
@ 2020-01-27 20:31             ` Vijay Khemka
  2020-01-28 20:50               ` Bills, Jason M
  0 siblings, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-27 20:31 UTC (permalink / raw)
  To: Bills, Jason M, openbmc



On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:

    
    
    On 1/24/2020 2:01 PM, Vijay Khemka wrote:
    > 
    > 
    > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
    > 
    >      
    >      
    >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
    >      >
    >      >
    >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
    >      >>
    >      >>
    >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
    >      >> wrote:
    >      >>
    >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
    >      >>      > Hi Jason,
    >      >>      >
    >      >>      > We have a requirement of power button override. I don’t see
    >      >> x86-power
    >      >>      > control doesn’t support this currently. Do you need this
    >      >> features or do
    >      >>      > you have any local patch for this.
    >      >>      Hi Vijay,
    >      >>      power button override is used for the "Force Off" actions in
    >      >> power control:
    >      >>
    >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
    >      >>
    >      >>
    >      >> This will not work if current status is off. This should just send
    >      >> pulse in any status on/off.
    >      > Correct.  Force Off is not done if the current status is off.
    >      Do you have more details on the power button override behavior that you
    >      need?
    > 
    > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
    When in recovery mode, the ME will accept a reset command (IPMI raw 0x6 
    0x2) to reset to operational mode.

Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
    
    > 
    >      >>      >
    >      >>      > Regards
    >      >>      >
    >      >>      > -Vijay
    >      >>      >
    >      >>
    >      
    > 
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-27 20:31             ` Vijay Khemka
@ 2020-01-28 20:50               ` Bills, Jason M
  2020-01-30 18:49                 ` Vijay Khemka
  0 siblings, 1 reply; 18+ messages in thread
From: Bills, Jason M @ 2020-01-28 20:50 UTC (permalink / raw)
  To: Vijay Khemka, openbmc



On 1/27/2020 12:31 PM, Vijay Khemka wrote:
> 
> 
> On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
> 
>      
>      
>      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
>      >
>      >
>      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
>      >
>      >
>      >
>      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
>      >      >
>      >      >
>      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
>      >      >>
>      >      >>
>      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
>      >      >> wrote:
>      >      >>
>      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>      >      >>      > Hi Jason,
>      >      >>      >
>      >      >>      > We have a requirement of power button override. I don’t see
>      >      >> x86-power
>      >      >>      > control doesn’t support this currently. Do you need this
>      >      >> features or do
>      >      >>      > you have any local patch for this.
>      >      >>      Hi Vijay,
>      >      >>      power button override is used for the "Force Off" actions in
>      >      >> power control:
>      >      >>
>      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
>      >      >>
>      >      >>
>      >      >> This will not work if current status is off. This should just send
>      >      >> pulse in any status on/off.
>      >      > Correct.  Force Off is not done if the current status is off.
>      >      Do you have more details on the power button override behavior that you
>      >      need?
>      >
>      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
>      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
>      0x2) to reset to operational mode.
> 
> Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
I checked with the ME team and ME reset to move from recovery mode to 
operational mode should work.  You can file a ticket with Intel support 
to help resolve the inconsistent behavior that you see when doing this.

In the meantime, I will look over your patch.

Thanks,
-Jason

>      
>      >
>      >      >>      >
>      >      >>      > Regards
>      >      >>      >
>      >      >>      > -Vijay
>      >      >>      >
>      >      >>
>      >
>      >
>      
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-28 20:50               ` Bills, Jason M
@ 2020-01-30 18:49                 ` Vijay Khemka
  2020-01-30 18:53                   ` Vijay Khemka
  0 siblings, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-30 18:49 UTC (permalink / raw)
  To: Bills, Jason M, openbmc

Hi Jason,
The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.

Regards
-Vijay

On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:

    
    
    On 1/27/2020 12:31 PM, Vijay Khemka wrote:
    > 
    > 
    > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    > 
    >      
    >      
    >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
    >      >
    >      >
    >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
    >      >
    >      >
    >      >
    >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
    >      >      >
    >      >      >
    >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
    >      >      >>
    >      >      >>
    >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
    >      >      >> wrote:
    >      >      >>
    >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
    >      >      >>      > Hi Jason,
    >      >      >>      >
    >      >      >>      > We have a requirement of power button override. I don’t see
    >      >      >> x86-power
    >      >      >>      > control doesn’t support this currently. Do you need this
    >      >      >> features or do
    >      >      >>      > you have any local patch for this.
    >      >      >>      Hi Vijay,
    >      >      >>      power button override is used for the "Force Off" actions in
    >      >      >> power control:
    >      >      >>
    >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
    >      >      >>
    >      >      >>
    >      >      >> This will not work if current status is off. This should just send
    >      >      >> pulse in any status on/off.
    >      >      > Correct.  Force Off is not done if the current status is off.
    >      >      Do you have more details on the power button override behavior that you
    >      >      need?
    >      >
    >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
    >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
    >      0x2) to reset to operational mode.
    > 
    > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
    I checked with the ME team and ME reset to move from recovery mode to 
    operational mode should work.  You can file a ticket with Intel support 
    to help resolve the inconsistent behavior that you see when doing this.
    
    In the meantime, I will look over your patch.
    
    Thanks,
    -Jason
    
    >      
    >      >
    >      >      >>      >
    >      >      >>      > Regards
    >      >      >>      >
    >      >      >>      > -Vijay
    >      >      >>      >
    >      >      >>
    >      >
    >      >
    >      
    > 
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-30 18:49                 ` Vijay Khemka
@ 2020-01-30 18:53                   ` Vijay Khemka
  2020-01-30 21:10                     ` Bills, Jason M
  0 siblings, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-30 18:53 UTC (permalink / raw)
  To: Bills, Jason M, openbmc

And it is inconsistent as 2 times works out of 5 time loop with 30 second delay.

Regards
-Vijay

On 1/30/20, 10:49 AM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:

    Hi Jason,
    The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.
    
    Regards
    -Vijay
    
    On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    
        
        
        On 1/27/2020 12:31 PM, Vijay Khemka wrote:
        > 
        > 
        > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
        > 
        >      
        >      
        >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
        >      >
        >      >
        >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
        >      >
        >      >
        >      >
        >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
        >      >      >
        >      >      >
        >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
        >      >      >>
        >      >      >>
        >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
        >      >      >> wrote:
        >      >      >>
        >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
        >      >      >>      > Hi Jason,
        >      >      >>      >
        >      >      >>      > We have a requirement of power button override. I don’t see
        >      >      >> x86-power
        >      >      >>      > control doesn’t support this currently. Do you need this
        >      >      >> features or do
        >      >      >>      > you have any local patch for this.
        >      >      >>      Hi Vijay,
        >      >      >>      power button override is used for the "Force Off" actions in
        >      >      >> power control:
        >      >      >>
        >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
        >      >      >>
        >      >      >>
        >      >      >> This will not work if current status is off. This should just send
        >      >      >> pulse in any status on/off.
        >      >      > Correct.  Force Off is not done if the current status is off.
        >      >      Do you have more details on the power button override behavior that you
        >      >      need?
        >      >
        >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
        >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
        >      0x2) to reset to operational mode.
        > 
        > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
        I checked with the ME team and ME reset to move from recovery mode to 
        operational mode should work.  You can file a ticket with Intel support 
        to help resolve the inconsistent behavior that you see when doing this.
        
        In the meantime, I will look over your patch.
        
        Thanks,
        -Jason
        
        >      
        >      >
        >      >      >>      >
        >      >      >>      > Regards
        >      >      >>      >
        >      >      >>      > -Vijay
        >      >      >>      >
        >      >      >>
        >      >
        >      >
        >      
        > 
        
    
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-30 18:53                   ` Vijay Khemka
@ 2020-01-30 21:10                     ` Bills, Jason M
  2020-01-30 21:38                       ` Vijay Khemka
  0 siblings, 1 reply; 18+ messages in thread
From: Bills, Jason M @ 2020-01-30 21:10 UTC (permalink / raw)
  To: Vijay Khemka, openbmc



On 1/30/2020 10:53 AM, Vijay Khemka wrote:
> And it is inconsistent as 2 times works out of 5 time loop with 30 second delay.
> 
> Regards
> -Vijay
> 
> On 1/30/20, 10:49 AM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
> 
>      Hi Jason,
>      The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.
I have been told that this is not expected behavior and that you can 
file an IPS ticket for support.

The biggest issue with force poweroff using the power button while the 
system is off is that it will first start booting the system then 
immediately shut it down which is not desired behavior.

What happens if you try to power on in the failure?  Will it go to the 
On state where you can issue a ForceOff?

Thanks,
-Jason

>      
>      Regards
>      -Vijay
>      
>      On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>      
>          
>          
>          On 1/27/2020 12:31 PM, Vijay Khemka wrote:
>          >
>          >
>          > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>          >
>          >
>          >
>          >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
>          >      >
>          >      >
>          >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
>          >      >
>          >      >
>          >      >
>          >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
>          >      >      >
>          >      >      >
>          >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
>          >      >      >>
>          >      >      >>
>          >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
>          >      >      >> wrote:
>          >      >      >>
>          >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>          >      >      >>      > Hi Jason,
>          >      >      >>      >
>          >      >      >>      > We have a requirement of power button override. I don’t see
>          >      >      >> x86-power
>          >      >      >>      > control doesn’t support this currently. Do you need this
>          >      >      >> features or do
>          >      >      >>      > you have any local patch for this.
>          >      >      >>      Hi Vijay,
>          >      >      >>      power button override is used for the "Force Off" actions in
>          >      >      >> power control:
>          >      >      >>
>          >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
>          >      >      >>
>          >      >      >>
>          >      >      >> This will not work if current status is off. This should just send
>          >      >      >> pulse in any status on/off.
>          >      >      > Correct.  Force Off is not done if the current status is off.
>          >      >      Do you have more details on the power button override behavior that you
>          >      >      need?
>          >      >
>          >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
>          >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
>          >      0x2) to reset to operational mode.
>          >
>          > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
>          I checked with the ME team and ME reset to move from recovery mode to
>          operational mode should work.  You can file a ticket with Intel support
>          to help resolve the inconsistent behavior that you see when doing this.
>          
>          In the meantime, I will look over your patch.
>          
>          Thanks,
>          -Jason
>          
>          >
>          >      >
>          >      >      >>      >
>          >      >      >>      > Regards
>          >      >      >>      >
>          >      >      >>      > -Vijay
>          >      >      >>      >
>          >      >      >>
>          >      >
>          >      >
>          >
>          >
>          
>      
>      
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-30 21:10                     ` Bills, Jason M
@ 2020-01-30 21:38                       ` Vijay Khemka
  2020-01-31 22:40                         ` Bills, Jason M
  0 siblings, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-30 21:38 UTC (permalink / raw)
  To: Bills, Jason M, openbmc



On 1/30/20, 1:10 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:

    
    
    On 1/30/2020 10:53 AM, Vijay Khemka wrote:
    > And it is inconsistent as 2 times works out of 5 time loop with 30 second delay.
    > 
    > Regards
    > -Vijay
    > 
    > On 1/30/20, 10:49 AM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
    > 
    >      Hi Jason,
    >      The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.
    I have been told that this is not expected behavior and that you can 
    file an IPS ticket for support.
    
    The biggest issue with force poweroff using the power button while the 
    system is off is that it will first start booting the system then 
    immediately shut it down which is not desired behavior.
    
    What happens if you try to power on in the failure?  Will it go to the 
    On state where you can issue a ForceOff?

No, this is also intermittent. And sometimes it powers on and sometimes it gets stuck on TransitionToOnFailed. This is very dangerous state as no power command works after this, not even poweroff. Then I have to leave a system for some time and try many other things or sled cycle the system.
    
    Thanks,
    -Jason
    
    >      
    >      Regards
    >      -Vijay
    >      
    >      On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    >      
    >          
    >          
    >          On 1/27/2020 12:31 PM, Vijay Khemka wrote:
    >          >
    >          >
    >          > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    >          >
    >          >
    >          >
    >          >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
    >          >      >
    >          >      >
    >          >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
    >          >      >
    >          >      >
    >          >      >
    >          >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
    >          >      >      >
    >          >      >      >
    >          >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
    >          >      >      >>
    >          >      >      >>
    >          >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
    >          >      >      >> wrote:
    >          >      >      >>
    >          >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
    >          >      >      >>      > Hi Jason,
    >          >      >      >>      >
    >          >      >      >>      > We have a requirement of power button override. I don’t see
    >          >      >      >> x86-power
    >          >      >      >>      > control doesn’t support this currently. Do you need this
    >          >      >      >> features or do
    >          >      >      >>      > you have any local patch for this.
    >          >      >      >>      Hi Vijay,
    >          >      >      >>      power button override is used for the "Force Off" actions in
    >          >      >      >> power control:
    >          >      >      >>
    >          >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
    >          >      >      >>
    >          >      >      >>
    >          >      >      >> This will not work if current status is off. This should just send
    >          >      >      >> pulse in any status on/off.
    >          >      >      > Correct.  Force Off is not done if the current status is off.
    >          >      >      Do you have more details on the power button override behavior that you
    >          >      >      need?
    >          >      >
    >          >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
    >          >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
    >          >      0x2) to reset to operational mode.
    >          >
    >          > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
    >          I checked with the ME team and ME reset to move from recovery mode to
    >          operational mode should work.  You can file a ticket with Intel support
    >          to help resolve the inconsistent behavior that you see when doing this.
    >          
    >          In the meantime, I will look over your patch.
    >          
    >          Thanks,
    >          -Jason
    >          
    >          >
    >          >      >
    >          >      >      >>      >
    >          >      >      >>      > Regards
    >          >      >      >>      >
    >          >      >      >>      > -Vijay
    >          >      >      >>      >
    >          >      >      >>
    >          >      >
    >          >      >
    >          >
    >          >
    >          
    >      
    >      
    > 
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-30 21:38                       ` Vijay Khemka
@ 2020-01-31 22:40                         ` Bills, Jason M
  2020-01-31 22:53                           ` Vijay Khemka
  0 siblings, 1 reply; 18+ messages in thread
From: Bills, Jason M @ 2020-01-31 22:40 UTC (permalink / raw)
  To: Vijay Khemka, openbmc



On 1/30/2020 1:38 PM, Vijay Khemka wrote:
> 
> 
> On 1/30/20, 1:10 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
> 
>      
>      
>      On 1/30/2020 10:53 AM, Vijay Khemka wrote:
>      > And it is inconsistent as 2 times works out of 5 time loop with 30 second delay.
>      >
>      > Regards
>      > -Vijay
>      >
>      > On 1/30/20, 10:49 AM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
>      >
>      >      Hi Jason,
>      >      The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.
>      I have been told that this is not expected behavior and that you can
>      file an IPS ticket for support.
>      
>      The biggest issue with force poweroff using the power button while the
>      system is off is that it will first start booting the system then
>      immediately shut it down which is not desired behavior.
>      
>      What happens if you try to power on in the failure?  Will it go to the
>      On state where you can issue a ForceOff?
> 
> No, this is also intermittent. And sometimes it powers on and sometimes it gets stuck on TransitionToOnFailed. This is very dangerous state as no power command works after this, not even poweroff. Then I have to leave a system for some time and try many other things or sled cycle the system.

Vijay,

Will this change help fix the issue you are seeing?

diff --git a/power-control-x86/src/power_control.cpp 
b/power-control-x86/src/power_control.cpp
index 20ea9cd..eecc10a 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -1518,6 +1518,10 @@ static void powerStateOff(const Event event)
              setPowerState(PowerState::waitForPSPowerOK);
              powerOn();
              break;
+        case Event::powerOffRequest:
+            setPowerState(PowerState::transitionToOff);
+            forcePowerOff();
+            break;
          default:
              std::cerr << "No action taken.\n";
              break;

This adds support for powerOffRequest to the Off state.  So even when 
the host is off, the force off command will still hold the power button 
until the power good signal deasserts (on my system it asserts followed 
by a deassert).  This will more closely follow the Chassis.State 
definition of allowing a Chassis.Off request even while the Host.State 
is Off.

>      
>      Thanks,
>      -Jason
>      
>      >
>      >      Regards
>      >      -Vijay
>      >
>      >      On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>      >
>      >
>      >
>      >          On 1/27/2020 12:31 PM, Vijay Khemka wrote:
>      >          >
>      >          >
>      >          > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>      >          >
>      >          >
>      >          >
>      >          >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
>      >          >      >
>      >          >      >
>      >          >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
>      >          >      >
>      >          >      >
>      >          >      >
>      >          >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
>      >          >      >      >
>      >          >      >      >
>      >          >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
>      >          >      >      >>
>      >          >      >      >>
>      >          >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
>      >          >      >      >> wrote:
>      >          >      >      >>
>      >          >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>      >          >      >      >>      > Hi Jason,
>      >          >      >      >>      >
>      >          >      >      >>      > We have a requirement of power button override. I don’t see
>      >          >      >      >> x86-power
>      >          >      >      >>      > control doesn’t support this currently. Do you need this
>      >          >      >      >> features or do
>      >          >      >      >>      > you have any local patch for this.
>      >          >      >      >>      Hi Vijay,
>      >          >      >      >>      power button override is used for the "Force Off" actions in
>      >          >      >      >> power control:
>      >          >      >      >>
>      >          >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
>      >          >      >      >>
>      >          >      >      >>
>      >          >      >      >> This will not work if current status is off. This should just send
>      >          >      >      >> pulse in any status on/off.
>      >          >      >      > Correct.  Force Off is not done if the current status is off.
>      >          >      >      Do you have more details on the power button override behavior that you
>      >          >      >      need?
>      >          >      >
>      >          >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
>      >          >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
>      >          >      0x2) to reset to operational mode.
>      >          >
>      >          > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
>      >          I checked with the ME team and ME reset to move from recovery mode to
>      >          operational mode should work.  You can file a ticket with Intel support
>      >          to help resolve the inconsistent behavior that you see when doing this.
>      >
>      >          In the meantime, I will look over your patch.
>      >
>      >          Thanks,
>      >          -Jason
>      >
>      >          >
>      >          >      >
>      >          >      >      >>      >
>      >          >      >      >>      > Regards
>      >          >      >      >>      >
>      >          >      >      >>      > -Vijay
>      >          >      >      >>      >
>      >          >      >      >>
>      >          >      >
>      >          >      >
>      >          >
>      >          >
>      >
>      >
>      >
>      >
>      
> 

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-31 22:40                         ` Bills, Jason M
@ 2020-01-31 22:53                           ` Vijay Khemka
  2020-01-31 23:16                             ` Bills, Jason M
  0 siblings, 1 reply; 18+ messages in thread
From: Vijay Khemka @ 2020-01-31 22:53 UTC (permalink / raw)
  To: Bills, Jason M, openbmc



On 1/31/20, 2:41 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:

    
    
    On 1/30/2020 1:38 PM, Vijay Khemka wrote:
    > 
    > 
    > On 1/30/20, 1:10 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    > 
    >      
    >      
    >      On 1/30/2020 10:53 AM, Vijay Khemka wrote:
    >      > And it is inconsistent as 2 times works out of 5 time loop with 30 second delay.
    >      >
    >      > Regards
    >      > -Vijay
    >      >
    >      > On 1/30/20, 10:49 AM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
    >      >
    >      >      Hi Jason,
    >      >      The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.
    >      I have been told that this is not expected behavior and that you can
    >      file an IPS ticket for support.
    >      
    >      The biggest issue with force poweroff using the power button while the
    >      system is off is that it will first start booting the system then
    >      immediately shut it down which is not desired behavior.
    >      
    >      What happens if you try to power on in the failure?  Will it go to the
    >      On state where you can issue a ForceOff?
    > 
    > No, this is also intermittent. And sometimes it powers on and sometimes it gets stuck on TransitionToOnFailed. This is very dangerous state as no power command works after this, not even poweroff. Then I have to leave a system for some time and try many other things or sled cycle the system.
    
    Vijay,
    
    Will this change help fix the issue you are seeing?
    
    diff --git a/power-control-x86/src/power_control.cpp 
    b/power-control-x86/src/power_control.cpp
    index 20ea9cd..eecc10a 100644
    --- a/power-control-x86/src/power_control.cpp
    +++ b/power-control-x86/src/power_control.cpp
    @@ -1518,6 +1518,10 @@ static void powerStateOff(const Event event)
                  setPowerState(PowerState::waitForPSPowerOK);
                  powerOn();
                  break;
    +        case Event::powerOffRequest:
    +            setPowerState(PowerState::transitionToOff);
    +            forcePowerOff();
    +            break;
              default:
                  std::cerr << "No action taken.\n";
                  break;
   
    This adds support for powerOffRequest to the Off state.  So even when 
    the host is off, the force off command will still hold the power button 
    until the power good signal deasserts (on my system it asserts followed 
    by a deassert).  This will more closely follow the Chassis.State 
    definition of allowing a Chassis.Off request even while the Host.State 
    is Off.

You don't get deassert signal as it is already deasserted by previous power off.
Currently I have abandoned my patch. But following change would help

--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -1470,6 +1470,10 @@ static void powerStateFailedTransitionToOn(const Event event)
             setPowerState(PowerState::waitForPSPowerOK);
             powerOn();
             break;
+        case Event::powerOffRequest:
+            setPowerState(PowerState::off);
+            forcePowerOff();
+            break;
         default:
             std::cerr << "No action taken.\n";
             break;
@@ -1496,6 +1500,9 @@ static void powerStateOff(const Event event)
             setPowerState(PowerState::waitForPSPowerOK);
             powerOn();
             break;
+        case Event::powerOffRequest:
+            forcePowerOff();
+            break;
         default:
             std::cerr << "No action taken.\n";
             break;

Regards
-Vijay
    
    >      
    >      Thanks,
    >      -Jason
    >      
    >      >
    >      >      Regards
    >      >      -Vijay
    >      >
    >      >      On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    >      >
    >      >
    >      >
    >      >          On 1/27/2020 12:31 PM, Vijay Khemka wrote:
    >      >          >
    >      >          >
    >      >          > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    >      >          >
    >      >          >
    >      >          >
    >      >          >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
    >      >          >      >
    >      >          >      >
    >      >          >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
    >      >          >      >
    >      >          >      >
    >      >          >      >
    >      >          >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
    >      >          >      >      >
    >      >          >      >      >
    >      >          >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
    >      >          >      >      >>
    >      >          >      >      >>
    >      >          >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
    >      >          >      >      >> wrote:
    >      >          >      >      >>
    >      >          >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
    >      >          >      >      >>      > Hi Jason,
    >      >          >      >      >>      >
    >      >          >      >      >>      > We have a requirement of power button override. I don’t see
    >      >          >      >      >> x86-power
    >      >          >      >      >>      > control doesn’t support this currently. Do you need this
    >      >          >      >      >> features or do
    >      >          >      >      >>      > you have any local patch for this.
    >      >          >      >      >>      Hi Vijay,
    >      >          >      >      >>      power button override is used for the "Force Off" actions in
    >      >          >      >      >> power control:
    >      >          >      >      >>
    >      >          >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
    >      >          >      >      >>
    >      >          >      >      >>
    >      >          >      >      >> This will not work if current status is off. This should just send
    >      >          >      >      >> pulse in any status on/off.
    >      >          >      >      > Correct.  Force Off is not done if the current status is off.
    >      >          >      >      Do you have more details on the power button override behavior that you
    >      >          >      >      need?
    >      >          >      >
    >      >          >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
    >      >          >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
    >      >          >      0x2) to reset to operational mode.
    >      >          >
    >      >          > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
    >      >          I checked with the ME team and ME reset to move from recovery mode to
    >      >          operational mode should work.  You can file a ticket with Intel support
    >      >          to help resolve the inconsistent behavior that you see when doing this.
    >      >
    >      >          In the meantime, I will look over your patch.
    >      >
    >      >          Thanks,
    >      >          -Jason
    >      >
    >      >          >
    >      >          >      >
    >      >          >      >      >>      >
    >      >          >      >      >>      > Regards
    >      >          >      >      >>      >
    >      >          >      >      >>      > -Vijay
    >      >          >      >      >>      >
    >      >          >      >      >>
    >      >          >      >
    >      >          >      >
    >      >          >
    >      >          >
    >      >
    >      >
    >      >
    >      >
    >      
    > 
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-31 22:53                           ` Vijay Khemka
@ 2020-01-31 23:16                             ` Bills, Jason M
  2020-02-01  2:24                               ` Vijay Khemka
  0 siblings, 1 reply; 18+ messages in thread
From: Bills, Jason M @ 2020-01-31 23:16 UTC (permalink / raw)
  To: Vijay Khemka, openbmc



On 1/31/2020 2:53 PM, Vijay Khemka wrote:
> 
> 
> On 1/31/20, 2:41 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
> 
>      
>      
>      On 1/30/2020 1:38 PM, Vijay Khemka wrote:
>      >
>      >
>      > On 1/30/20, 1:10 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>      >
>      >
>      >
>      >      On 1/30/2020 10:53 AM, Vijay Khemka wrote:
>      >      > And it is inconsistent as 2 times works out of 5 time loop with 30 second delay.
>      >      >
>      >      > Regards
>      >      > -Vijay
>      >      >
>      >      > On 1/30/20, 10:49 AM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
>      >      >
>      >      >      Hi Jason,
>      >      >      The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.
>      >      I have been told that this is not expected behavior and that you can
>      >      file an IPS ticket for support.
>      >
>      >      The biggest issue with force poweroff using the power button while the
>      >      system is off is that it will first start booting the system then
>      >      immediately shut it down which is not desired behavior.
>      >
>      >      What happens if you try to power on in the failure?  Will it go to the
>      >      On state where you can issue a ForceOff?
>      >
>      > No, this is also intermittent. And sometimes it powers on and sometimes it gets stuck on TransitionToOnFailed. This is very dangerous state as no power command works after this, not even poweroff. Then I have to leave a system for some time and try many other things or sled cycle the system.
>      
>      Vijay,
>      
>      Will this change help fix the issue you are seeing?
>      
>      diff --git a/power-control-x86/src/power_control.cpp
>      b/power-control-x86/src/power_control.cpp
>      index 20ea9cd..eecc10a 100644
>      --- a/power-control-x86/src/power_control.cpp
>      +++ b/power-control-x86/src/power_control.cpp
>      @@ -1518,6 +1518,10 @@ static void powerStateOff(const Event event)
>                    setPowerState(PowerState::waitForPSPowerOK);
>                    powerOn();
>                    break;
>      +        case Event::powerOffRequest:
>      +            setPowerState(PowerState::transitionToOff);
>      +            forcePowerOff();
>      +            break;
>                default:
>                    std::cerr << "No action taken.\n";
>                    break;
>     
>      This adds support for powerOffRequest to the Off state.  So even when
>      the host is off, the force off command will still hold the power button
>      until the power good signal deasserts (on my system it asserts followed
>      by a deassert).  This will more closely follow the Chassis.State
>      definition of allowing a Chassis.Off request even while the Host.State
>      is Off.
> 
> You don't get deassert signal as it is already deasserted by previous power off.
> Currently I have abandoned my patch. But following change would help
it doesn't assert again when the power button is pressed at the start of 
forcePowerOff()?
> 
> --- a/power-control-x86/src/power_control.cpp
> +++ b/power-control-x86/src/power_control.cpp
> @@ -1470,6 +1470,10 @@ static void powerStateFailedTransitionToOn(const Event event)
>               setPowerState(PowerState::waitForPSPowerOK);
>               powerOn();
>               break;
> +        case Event::powerOffRequest:
> +            setPowerState(PowerState::off);
> +            forcePowerOff();
> +            break;
>           default:
>               std::cerr << "No action taken.\n";
>               break;
> @@ -1496,6 +1500,9 @@ static void powerStateOff(const Event event)
>               setPowerState(PowerState::waitForPSPowerOK);
>               powerOn();
>               break;
> +        case Event::powerOffRequest:
> +            forcePowerOff();
> +            break;
My concern with this is there is nothing to cancel the timer to release 
the power button so it will be held for the full 15-second timeout 
followed by the failure handling.

There would have to be some event to indicate that the power button has 
been held long enough and can be released.  Currently that is power good 
deasserting.

>           default:
>               std::cerr << "No action taken.\n";
>               break;
> 
> Regards
> -Vijay
>      
>      >
>      >      Thanks,
>      >      -Jason
>      >
>      >      >
>      >      >      Regards
>      >      >      -Vijay
>      >      >
>      >      >      On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>      >      >
>      >      >
>      >      >
>      >      >          On 1/27/2020 12:31 PM, Vijay Khemka wrote:
>      >      >          >
>      >      >          >
>      >      >          > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
>      >      >          >
>      >      >          >
>      >      >          >
>      >      >          >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
>      >      >          >      >
>      >      >          >      >
>      >      >          >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
>      >      >          >      >
>      >      >          >      >
>      >      >          >      >
>      >      >          >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
>      >      >          >      >      >
>      >      >          >      >      >
>      >      >          >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
>      >      >          >      >      >>
>      >      >          >      >      >>
>      >      >          >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
>      >      >          >      >      >> wrote:
>      >      >          >      >      >>
>      >      >          >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
>      >      >          >      >      >>      > Hi Jason,
>      >      >          >      >      >>      >
>      >      >          >      >      >>      > We have a requirement of power button override. I don’t see
>      >      >          >      >      >> x86-power
>      >      >          >      >      >>      > control doesn’t support this currently. Do you need this
>      >      >          >      >      >> features or do
>      >      >          >      >      >>      > you have any local patch for this.
>      >      >          >      >      >>      Hi Vijay,
>      >      >          >      >      >>      power button override is used for the "Force Off" actions in
>      >      >          >      >      >> power control:
>      >      >          >      >      >>
>      >      >          >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
>      >      >          >      >      >>
>      >      >          >      >      >>
>      >      >          >      >      >> This will not work if current status is off. This should just send
>      >      >          >      >      >> pulse in any status on/off.
>      >      >          >      >      > Correct.  Force Off is not done if the current status is off.
>      >      >          >      >      Do you have more details on the power button override behavior that you
>      >      >          >      >      need?
>      >      >          >      >
>      >      >          >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
>      >      >          >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
>      >      >          >      0x2) to reset to operational mode.
>      >      >          >
>      >      >          > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
>      >      >          I checked with the ME team and ME reset to move from recovery mode to
>      >      >          operational mode should work.  You can file a ticket with Intel support
>      >      >          to help resolve the inconsistent behavior that you see when doing this.
>      >      >
>      >      >          In the meantime, I will look over your patch.
>      >      >
>      >      >          Thanks,
>      >      >          -Jason
>      >      >
>      >      >          >
>      >      >          >      >
>      >      >          >      >      >>      >
>      >      >          >      >      >>      > Regards
>      >      >          >      >      >>      >
>      >      >          >      >      >>      > -Vijay
>      >      >          >      >      >>      >
>      >      >          >      >      >>
>      >      >          >      >
>      >      >          >      >
>      >      >          >
>      >      >          >
>      >      >
>      >      >
>      >      >
>      >      >
>      >
>      >
>      
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: power button override
  2020-01-31 23:16                             ` Bills, Jason M
@ 2020-02-01  2:24                               ` Vijay Khemka
  0 siblings, 0 replies; 18+ messages in thread
From: Vijay Khemka @ 2020-02-01  2:24 UTC (permalink / raw)
  To: Bills, Jason M, openbmc

Yes Jason, you are right and it tries to send i2c command to pch as it times out.

Regards
-Vijay

On 1/31/20, 3:16 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:

    
    
    On 1/31/2020 2:53 PM, Vijay Khemka wrote:
    > 
    > 
    > On 1/31/20, 2:41 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    > 
    >      
    >      
    >      On 1/30/2020 1:38 PM, Vijay Khemka wrote:
    >      >
    >      >
    >      > On 1/30/20, 1:10 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    >      >
    >      >
    >      >
    >      >      On 1/30/2020 10:53 AM, Vijay Khemka wrote:
    >      >      > And it is inconsistent as 2 times works out of 5 time loop with 30 second delay.
    >      >      >
    >      >      > Regards
    >      >      > -Vijay
    >      >      >
    >      >      > On 1/30/20, 10:49 AM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:
    >      >      >
    >      >      >      Hi Jason,
    >      >      >      The problem I am seeing as I am unable to send reset ipmi command to ME via IPMB on i2c bus. I tried to give 30 second delay after power off and setting in ME recovery mode. Once I do force poweroff then only I am able to send any command to ME. I don't know what is the relation of power to ME access on i2c bus.
    >      >      I have been told that this is not expected behavior and that you can
    >      >      file an IPS ticket for support.
    >      >
    >      >      The biggest issue with force poweroff using the power button while the
    >      >      system is off is that it will first start booting the system then
    >      >      immediately shut it down which is not desired behavior.
    >      >
    >      >      What happens if you try to power on in the failure?  Will it go to the
    >      >      On state where you can issue a ForceOff?
    >      >
    >      > No, this is also intermittent. And sometimes it powers on and sometimes it gets stuck on TransitionToOnFailed. This is very dangerous state as no power command works after this, not even poweroff. Then I have to leave a system for some time and try many other things or sled cycle the system.
    >      
    >      Vijay,
    >      
    >      Will this change help fix the issue you are seeing?
    >      
    >      diff --git a/power-control-x86/src/power_control.cpp
    >      b/power-control-x86/src/power_control.cpp
    >      index 20ea9cd..eecc10a 100644
    >      --- a/power-control-x86/src/power_control.cpp
    >      +++ b/power-control-x86/src/power_control.cpp
    >      @@ -1518,6 +1518,10 @@ static void powerStateOff(const Event event)
    >                    setPowerState(PowerState::waitForPSPowerOK);
    >                    powerOn();
    >                    break;
    >      +        case Event::powerOffRequest:
    >      +            setPowerState(PowerState::transitionToOff);
    >      +            forcePowerOff();
    >      +            break;
    >                default:
    >                    std::cerr << "No action taken.\n";
    >                    break;
    >     
    >      This adds support for powerOffRequest to the Off state.  So even when
    >      the host is off, the force off command will still hold the power button
    >      until the power good signal deasserts (on my system it asserts followed
    >      by a deassert).  This will more closely follow the Chassis.State
    >      definition of allowing a Chassis.Off request even while the Host.State
    >      is Off.
    > 
    > You don't get deassert signal as it is already deasserted by previous power off.
    > Currently I have abandoned my patch. But following change would help
    it doesn't assert again when the power button is pressed at the start of 
    forcePowerOff()?
    > 
    > --- a/power-control-x86/src/power_control.cpp
    > +++ b/power-control-x86/src/power_control.cpp
    > @@ -1470,6 +1470,10 @@ static void powerStateFailedTransitionToOn(const Event event)
    >               setPowerState(PowerState::waitForPSPowerOK);
    >               powerOn();
    >               break;
    > +        case Event::powerOffRequest:
    > +            setPowerState(PowerState::off);
    > +            forcePowerOff();
    > +            break;
    >           default:
    >               std::cerr << "No action taken.\n";
    >               break;
    > @@ -1496,6 +1500,9 @@ static void powerStateOff(const Event event)
    >               setPowerState(PowerState::waitForPSPowerOK);
    >               powerOn();
    >               break;
    > +        case Event::powerOffRequest:
    > +            forcePowerOff();
    > +            break;
    My concern with this is there is nothing to cancel the timer to release 
    the power button so it will be held for the full 15-second timeout 
    followed by the failure handling.
    
    There would have to be some event to indicate that the power button has 
    been held long enough and can be released.  Currently that is power good 
    deasserting.
    
    >           default:
    >               std::cerr << "No action taken.\n";
    >               break;
    > 
    > Regards
    > -Vijay
    >      
    >      >
    >      >      Thanks,
    >      >      -Jason
    >      >
    >      >      >
    >      >      >      Regards
    >      >      >      -Vijay
    >      >      >
    >      >      >      On 1/28/20, 12:50 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    >      >      >
    >      >      >
    >      >      >
    >      >      >          On 1/27/2020 12:31 PM, Vijay Khemka wrote:
    >      >      >          >
    >      >      >          >
    >      >      >          > On 1/27/20, 10:52 AM, "Bills, Jason M" <jason.m.bills@linux.intel.com> wrote:
    >      >      >          >
    >      >      >          >
    >      >      >          >
    >      >      >          >      On 1/24/2020 2:01 PM, Vijay Khemka wrote:
    >      >      >          >      >
    >      >      >          >      >
    >      >      >          >      > On 1/24/20, 1:13 PM, "openbmc on behalf of Bills, Jason M" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of jason.m.bills@linux.intel.com> wrote:
    >      >      >          >      >
    >      >      >          >      >
    >      >      >          >      >
    >      >      >          >      >      On 1/24/2020 12:55 PM, Bills, Jason M wrote:
    >      >      >          >      >      >
    >      >      >          >      >      >
    >      >      >          >      >      > On 1/24/2020 10:29 AM, Vijay Khemka wrote:
    >      >      >          >      >      >>
    >      >      >          >      >      >>
    >      >      >          >      >      >> On 1/23/20, 4:36 PM, "Bills, Jason M" <jason.m.bills@linux.intel.com>
    >      >      >          >      >      >> wrote:
    >      >      >          >      >      >>
    >      >      >          >      >      >>      On 1/23/2020 4:13 PM, Vijay Khemka wrote:
    >      >      >          >      >      >>      > Hi Jason,
    >      >      >          >      >      >>      >
    >      >      >          >      >      >>      > We have a requirement of power button override. I don’t see
    >      >      >          >      >      >> x86-power
    >      >      >          >      >      >>      > control doesn’t support this currently. Do you need this
    >      >      >          >      >      >> features or do
    >      >      >          >      >      >>      > you have any local patch for this.
    >      >      >          >      >      >>      Hi Vijay,
    >      >      >          >      >      >>      power button override is used for the "Force Off" actions in
    >      >      >          >      >      >> power control:
    >      >      >          >      >      >>
    >      >      >          >      >      >> https://github.com/openbmc/x86-power-control/blob/master/power-control-x86/src/power_control.cpp#L50.
    >      >      >          >      >      >>
    >      >      >          >      >      >>
    >      >      >          >      >      >> This will not work if current status is off. This should just send
    >      >      >          >      >      >> pulse in any status on/off.
    >      >      >          >      >      > Correct.  Force Off is not done if the current status is off.
    >      >      >          >      >      Do you have more details on the power button override behavior that you
    >      >      >          >      >      need?
    >      >      >          >      >
    >      >      >          >      > Yes, This is required to bring ME back to operation mode from recovery. How are you handling ME for Bios upgrade.
    >      >      >          >      When in recovery mode, the ME will accept a reset command (IPMI raw 0x6
    >      >      >          >      0x2) to reset to operational mode.
    >      >      >          >
    >      >      >          > Bill, I tried this and see inconsistent behavior from host. Sometime it refuse to power on. So PBO resolves this.
    >      >      >          I checked with the ME team and ME reset to move from recovery mode to
    >      >      >          operational mode should work.  You can file a ticket with Intel support
    >      >      >          to help resolve the inconsistent behavior that you see when doing this.
    >      >      >
    >      >      >          In the meantime, I will look over your patch.
    >      >      >
    >      >      >          Thanks,
    >      >      >          -Jason
    >      >      >
    >      >      >          >
    >      >      >          >      >
    >      >      >          >      >      >>      >
    >      >      >          >      >      >>      > Regards
    >      >      >          >      >      >>      >
    >      >      >          >      >      >>      > -Vijay
    >      >      >          >      >      >>      >
    >      >      >          >      >      >>
    >      >      >          >      >
    >      >      >          >      >
    >      >      >          >
    >      >      >          >
    >      >      >
    >      >      >
    >      >      >
    >      >      >
    >      >
    >      >
    >      
    > 
    


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-02-01  2:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24  0:13 power button override Vijay Khemka
2020-01-24  0:36 ` Bills, Jason M
2020-01-24 18:29   ` Vijay Khemka
2020-01-24 20:55     ` Bills, Jason M
2020-01-24 21:12       ` Bills, Jason M
2020-01-24 21:17         ` Bills, Jason M
2020-01-24 22:01         ` Vijay Khemka
2020-01-27 18:52           ` Bills, Jason M
2020-01-27 20:31             ` Vijay Khemka
2020-01-28 20:50               ` Bills, Jason M
2020-01-30 18:49                 ` Vijay Khemka
2020-01-30 18:53                   ` Vijay Khemka
2020-01-30 21:10                     ` Bills, Jason M
2020-01-30 21:38                       ` Vijay Khemka
2020-01-31 22:40                         ` Bills, Jason M
2020-01-31 22:53                           ` Vijay Khemka
2020-01-31 23:16                             ` Bills, Jason M
2020-02-01  2:24                               ` Vijay Khemka

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.