Skip to content

Commit

Permalink
npu2-opencapi: Extend delay after releasing reset on adapter
Browse files Browse the repository at this point in the history
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@linux.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
fbarrat authored and stewartsmith committed Mar 14, 2019
1 parent e4efac7 commit d75436f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/npu2-opencapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,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) {
Expand Down

0 comments on commit d75436f

Please sign in to comment.