[Skiboot] [PATCH V2] hw/bt.c: Retry sending ipmi message in bt with correct data
Stewart Smith
stewart at linux.vnet.ibm.com
Wed Sep 28 18:15:25 AEST 2016
Mamatha Inamdar <mamatha4 at linux.vnet.ibm.com> writes:
> When bt times out reading data from BMC, it will retry sending same command,
> but while retrying it's failing to send the correct data to BMC.
>
> This patch will send the correct data while retrying the sent message.
>
> Changes in V2:
> 1)Check for bt_idle() before calling bt_send_msg()
>
> before fix:
> IPMIMain: [693 WARNING][corecmdselect.c:913]Request: Channel:f; Netfn:a; Cmd:11; Data:0 0 0 ff
> IPMIMain: [693 WARNING][corecmdselect.c:913]Request: Channel:f; Netfn:3f; Cmd:ff; Data:ff ff ff ff ff ff
> ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> ff ff ff ff ff ff ff ff f
>
> After Fix:
>
> 2693:Feb 19 09:21:21 AMIA0423F306276 IPMIMain: [693 WARNING][corecmdselect.c:913]Request: Channel:f; Netfn:a; Cmd:11; Data:0 0 0 ff
> 2695:Feb 19 09:21:21 AMIA0423F306276 IPMIMain: [693 WARNING][corecmdselect.c:913]Request: Channel:f; Netfn:a; Cmd:11; Data:0 0 0 ff
>
> Cc: stable
>
> Signed-off-by: Mamatha Inamdar <mamatha4 at linux.vnet.ibm.com>
> ---
> hw/bt.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/bt.c b/hw/bt.c
> index 3325f69..f5fd5d7 100644
> --- a/hw/bt.c
> +++ b/hw/bt.c
> @@ -396,13 +396,13 @@ static void bt_expire_old_msg(uint64_t tb)
> if (bt_msg->send_count < BT_MAX_SEND_COUNT) {
> /* A message timeout is usually due to the BMC
> clearing the H2B_ATN flag without actually
> - doing anything. The data will still be in the
> - FIFO so just reset the flag.*/
> + doing anything. */
> BT_Q_ERR(bt_msg, "Retry sending message");
> - bt_msg->send_count++;
> -
> bt_msg->tb = tb;
> - bt_outb(BT_CTRL_H2B_ATN, BT_CTRL);
> +
> + /* retry sending ipmi_msg */
> + if (!bt_idle())
> + bt_send_msg(bt_msg);
Is !bt_idle() correct? Shouldn't it be if(bt_idle()) ?
Or are we working around aa case where B_BUSY gets stuck?
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list