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

Frederic Barrat fbarrat at linux.ibm.com
Mon Mar 11 19:29:18 AEDT 2019



Le 06/03/2019 à 01:37, Andrew Donnellan a écrit :
> 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.


Well, it's in line with what we do for PCI, where we keep PERST asserted 
for 250ms, so I don't feel too bad about it.

   Fred



> 
> 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) {
>>
> 



More information about the Skiboot mailing list