[Skiboot] [PATCH 6/7] npu2-opencapi: Extend delay after releasing reset on adapter

Andrew Donnellan andrew.donnellan at au1.ibm.com
Wed Mar 6 11:37:23 AEDT 2019


On 2/3/19 12:52 am, Frederic Barrat wrote:
> Give more time to the FPGA to process the reset signal. The previous
> delay, 5ms, is too short for newer adapters with bigger FPGAs. Extend
> it to 250ms.
> Ultimately, that delay will likely end up being added to the opencapi
> specification, but we are not there yet.
> 
> Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>

250ms feels a bit nasty, oh well.

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

> ---
>   hw/npu2-opencapi.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
> index a0c1dba1..786fb655 100644
> --- a/hw/npu2-opencapi.c
> +++ b/hw/npu2-opencapi.c
> @@ -1194,8 +1194,8 @@ static int64_t npu2_opencapi_freset(struct pci_slot *slot)
>   		deassert_adapter_reset(dev);
>   		pci_slot_set_state(slot,
>   				OCAPI_SLOT_FRESET_DEASSERT_DELAY2);
> -		/* give 5ms to device to be ready */
> -		return pci_slot_set_sm_timeout(slot, msecs_to_tb(5));
> +		/* give 250ms to device to be ready */
> +		return pci_slot_set_sm_timeout(slot, msecs_to_tb(250));
>   
>   	case OCAPI_SLOT_FRESET_DEASSERT_DELAY2:
>   		if (dev->train_fenced) {
> 

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



More information about the Skiboot mailing list