[Skiboot] [PATCH] bt: use the maximum retry count returned by the BMC

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Mar 11 22:20:36 AEDT 2016


On 03/11/2016 02:00 PM, Cédric Le Goater wrote:
> OpenPower systems using a AMI firmware on the BMC have a BT device
> configured with a capability of '1' maximum retry. The following code
> is equivalent to what skiboot currently supports but it will now also
> handle setups of other BT devices, like in qemu or OpenBMC.
>
> Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>

Looks good.

Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>

> ---
>   hw/bt.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: skiboot.git/hw/bt.c
> ===================================================================
> --- skiboot.git.orig/hw/bt.c
> +++ skiboot.git/hw/bt.c
> @@ -74,7 +74,7 @@
>   /*
>    * Maximum number of times to attempt sending a message before giving up.
>    */
> -#define BT_MAX_SEND_COUNT 2
> +#define BT_MAX_SEND_COUNT 1
>
>   #define BT_QUEUE_DEBUG 0
>
> @@ -392,7 +392,7 @@ static void bt_expire_old_msg(uint64_t t
>
>   	if (bt_msg && bt_msg->tb > 0 &&
>   	    (tb_compare(tb, bt_msg->tb + secs_to_tb(bt.caps.msg_timeout)) == TB_AAFTERB)) {
> -		if (bt_msg->send_count < BT_MAX_SEND_COUNT) {
> +		if (bt_msg->send_count < bt.caps.num_retries + 1) {

You may want comment why we are adding +1 here.

-Vasant



More information about the Skiboot mailing list