When loading wlan driver, driver will check if chip is initialized
by reading pci io FW_IND_INITIALIZED status. While timeout occurred
when wait for above status randomly in multi load-unload process.
Restore pci config space before enable device during resume pci link.
Change-Id: Ib10f739b2321c7cb0e71ad40db571075a56ae48a
Signed-off-by: Kai Liu <kaliu@codeaurora.org>
pci_priv->pci_link_state = PCI_LINK_UP;
+ ret = cnss_set_pci_config_space(pci_priv, RESTORE_PCI_CONFIG_SPACE);
+ if (ret)
+ goto out;
+
ret = pci_enable_device(pci_priv->pci_dev);
if (ret) {
cnss_pr_err("Failed to enable PCI device, err = %d\n", ret);
goto out;
}
- ret = cnss_set_pci_config_space(pci_priv, RESTORE_PCI_CONFIG_SPACE);
- if (ret)
- goto out;
pci_set_master(pci_priv->pci_dev);