MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ice_dcf_check_reset_done

Function ice_dcf_check_reset_done

dpdk/drivers/net/ice/ice_dcf.c:487–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487static int
488ice_dcf_check_reset_done(struct ice_dcf_hw *hw)
489{
490#define ICE_DCF_RESET_WAIT_CNT 50
491 struct iavf_hw *avf = &hw->avf;
492 int i, reset;
493
494 for (i = 0; i < ICE_DCF_RESET_WAIT_CNT; i++) {
495 reset = IAVF_READ_REG(avf, IAVF_VFGEN_RSTAT) &
496 IAVF_VFGEN_RSTAT_VFR_STATE_MASK;
497 reset = reset >> IAVF_VFGEN_RSTAT_VFR_STATE_SHIFT;
498
499 if (reset == VIRTCHNL_VFR_VFACTIVE ||
500 reset == VIRTCHNL_VFR_COMPLETED)
501 break;
502
503 rte_delay_ms(20);
504 }
505
506 if (i >= ICE_DCF_RESET_WAIT_CNT)
507 return -1;
508
509 return 0;
510}
511
512static inline void
513ice_dcf_enable_irq0(struct ice_dcf_hw *hw)

Callers 1

ice_dcf_init_hwFunction · 0.85

Calls 1

rte_delay_msFunction · 0.85

Tested by

no test coverage detected