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

Function bnxt_check_fw_reset_done

dpdk/drivers/net/bnxt/bnxt_ethdev.c:4233–4257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4231}
4232
4233static int
4234bnxt_check_fw_reset_done(struct bnxt *bp)
4235{
4236 int timeout = bp->fw_reset_max_msecs;
4237 uint16_t val = 0;
4238 int rc;
4239
4240 do {
4241 rc = rte_pci_read_config(bp->pdev, &val, sizeof(val), PCI_SUBSYSTEM_ID_OFFSET);
4242 if (rc < 0) {
4243 PMD_DRV_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_SUBSYSTEM_ID_OFFSET);
4244 return rc;
4245 }
4246 if (val != 0xffff)
4247 break;
4248 rte_delay_ms(1);
4249 } while (timeout--);
4250
4251 if (val == 0xffff) {
4252 PMD_DRV_LOG(ERR, "Firmware reset aborted, PCI config space invalid\n");
4253 return -1;
4254 }
4255
4256 return 0;
4257}
4258
4259static int bnxt_restore_vlan_filters(struct bnxt *bp)
4260{

Callers 1

bnxt_dev_recoverFunction · 0.85

Calls 2

rte_delay_msFunction · 0.85
rte_pci_read_configFunction · 0.50

Tested by

no test coverage detected