[Skiboot] [PATCH] npu2-opencapi: Fix assert on link reset during init

Andrew Donnellan andrew.donnellan at au1.ibm.com
Tue Mar 6 10:48:17 AEDT 2018


On 06/03/18 00:08, Frederic Barrat wrote:
> We don't support resetting an opencapi link yet.
> 
> Commit fe6d86b9 ("pci: Make fast reboot creset PHBs in parallel")
> tries resetting any PHB whose slot defines a 'run_sm' callback. It
> raises an assert when applied to an opencapi PHB, as 'run_sm' calls
> the 'freset' callback, which is not yet defined for opencapi.
> 
> Fix it for now by removing the currently useless definition of
> 'run_sm' on the opencapi slot. It will print a message in the skiboot
> log because the PHB cannot be reset, which is correct. It will all go
> away when we add support for resetting an opencapi link.
> 
> Signed-off-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>

Would be nice to include a comment explaining that.

Acked-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

> ---
>   hw/npu2-opencapi.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
> index d8c2714f..e7569eb4 100644
> --- a/hw/npu2-opencapi.c
> +++ b/hw/npu2-opencapi.c
> @@ -898,6 +898,7 @@ static struct pci_slot *npu2_opencapi_slot_create(struct phb *phb)
>   	slot->ops.get_latch_state     = NULL;
>   	slot->ops.set_power_state     = NULL;
>   	slot->ops.set_attention_state = NULL;
> +	slot->ops.run_sm = NULL;
> 
>   	return slot;
>   }
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list