[Skiboot] [PATCH v3 1/2] ipmi: Provide a macro for netfn return code

Alistair Popple alistair at popple.id.au
Fri Jul 10 15:51:30 AEST 2015


Acked-by: Alistair Popple <alistair at popple.id.au>

On Fri, 10 Jul 2015 11:13:02 Neelesh Gupta wrote:
> Signed-off-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
> Cc: Alistair Popple <alistair at popple.id.au>
> ---
>  hw/bt.c        |    3 ++-
>  include/ipmi.h |    2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/bt.c b/hw/bt.c
> index 9f6244a..23fc68c 100644
> --- a/hw/bt.c
> +++ b/hw/bt.c
> @@ -139,7 +139,8 @@ static void bt_msg_del(struct bt_msg *bt_msg)
>  	list_del(&bt_msg->link);
>  	bt.queue_len--;
>  	unlock(&bt.lock);
> -	ipmi_cmd_done(bt_msg->ipmi_msg.cmd, bt_msg->ipmi_msg.netfn + (1 << 2),
> +	ipmi_cmd_done(bt_msg->ipmi_msg.cmd,
> +		      IPMI_NETFN_RETURN_CODE(bt_msg->ipmi_msg.netfn),
>  		      IPMI_TIMEOUT_ERR, &bt_msg->ipmi_msg);
>  	lock(&bt.lock);
>  }
> diff --git a/include/ipmi.h b/include/ipmi.h
> index f25b747..3aaa041 100644
> --- a/include/ipmi.h
> +++ b/include/ipmi.h
> @@ -93,6 +93,8 @@
>  #define IPMI_CMD(code)			((code) & 0xff)
>  #define IPMI_NETFN(code)		((code) >> 8 & 0xff)
>  
> +#define IPMI_NETFN_RETURN_CODE(netfn)	((netfn) | 0x4)
> +
>  #define IPMI_NETFN_CHASSIS		0x00
>  #define IPMI_NETFN_SE			0x04
>  #define IPMI_NETFN_STORAGE		0x0a
> 
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
> 



More information about the Skiboot mailing list