Lines Matching refs:pci_dev
197 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_bus_reset() local
205 pci_iounmap(pci_dev, mmio); in genwqe_bus_reset()
207 pci_release_mem_regions(pci_dev); in genwqe_bus_reset()
214 dev_dbg(&pci_dev->dev, "[%s] pci_reset function ...\n", __func__); in genwqe_bus_reset()
215 rc = pci_reset_function(pci_dev); in genwqe_bus_reset()
217 dev_err(&pci_dev->dev, in genwqe_bus_reset()
221 dev_dbg(&pci_dev->dev, "[%s] done with rc=%d\n", __func__, rc); in genwqe_bus_reset()
231 rc = pci_request_mem_regions(pci_dev, genwqe_driver_name); in genwqe_bus_reset()
233 dev_err(&pci_dev->dev, in genwqe_bus_reset()
238 cd->mmio = pci_iomap(pci_dev, 0, 0); in genwqe_bus_reset()
240 dev_err(&pci_dev->dev, in genwqe_bus_reset()
266 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_tweak_hardware() local
271 dev_warn(&pci_dev->dev, in genwqe_tweak_hardware()
359 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_setup_vf_jtimer() local
365 totalvfs = pci_sriov_get_totalvfs(pci_dev); in genwqe_setup_vf_jtimer()
430 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_read_ids() local
434 dev_err(&pci_dev->dev, in genwqe_read_ids()
442 dev_err(&pci_dev->dev, in genwqe_read_ids()
450 dev_err(&pci_dev->dev, in genwqe_read_ids()
464 if (pci_dev->is_virtfn) in genwqe_read_ids()
477 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_start() local
507 dev_warn(&pci_dev->dev, in genwqe_start()
520 dev_err(&pci_dev->dev, in genwqe_start()
539 dev_err(&pci_dev->dev, in genwqe_start()
554 dev_err(&pci_dev->dev, in genwqe_start()
588 pci_disable_sriov(cd->pci_dev); /* access pci config space */ in genwqe_stop()
610 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_recover_card() local
625 dev_err(&pci_dev->dev, in genwqe_recover_card()
632 dev_err(&pci_dev->dev, in genwqe_recover_card()
661 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_fir_checking() local
666 dev_err(&pci_dev->dev, "* exit looping after %d times\n", in genwqe_fir_checking()
673 dev_err(&pci_dev->dev, "* 0x%08x 0x%016llx\n", in genwqe_fir_checking()
697 dev_err(&pci_dev->dev, "* 0x%08x 0x%016llx\n", fir_addr, fir); in genwqe_fir_checking()
705 dev_err(&pci_dev->dev, "* 0x%08x 0x%016llx\n", fec_addr, fec); in genwqe_fir_checking()
720 dev_err(&pci_dev->dev, in genwqe_fir_checking()
728 dev_err(&pci_dev->dev, in genwqe_fir_checking()
749 dev_dbg(&pci_dev->dev, in genwqe_fir_checking()
766 dev_dbg(&pci_dev->dev, in genwqe_fir_checking()
781 dev_dbg(&pci_dev->dev, "ACK! Another FIR! Recursing %d!\n", in genwqe_fir_checking()
800 static int genwqe_pci_fundamental_reset(struct pci_dev *pci_dev) in genwqe_pci_fundamental_reset() argument
808 pci_cfg_access_lock(pci_dev); in genwqe_pci_fundamental_reset()
809 pci_save_state(pci_dev); in genwqe_pci_fundamental_reset()
810 rc = pci_set_pcie_reset_state(pci_dev, pcie_warm_reset); in genwqe_pci_fundamental_reset()
814 pci_set_pcie_reset_state(pci_dev, pcie_deassert_reset); in genwqe_pci_fundamental_reset()
818 pci_restore_state(pci_dev); in genwqe_pci_fundamental_reset()
819 pci_cfg_access_unlock(pci_dev); in genwqe_pci_fundamental_reset()
826 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_platform_recovery() local
829 dev_info(&pci_dev->dev, in genwqe_platform_recovery()
840 rc = genwqe_pci_fundamental_reset(pci_dev); in genwqe_platform_recovery()
844 dev_info(&pci_dev->dev, in genwqe_platform_recovery()
847 dev_err(&pci_dev->dev, in genwqe_platform_recovery()
851 dev_err(&pci_dev->dev, in genwqe_platform_recovery()
869 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_reload_bistream() local
872 dev_info(&pci_dev->dev, in genwqe_reload_bistream()
885 rc = genwqe_pci_fundamental_reset(pci_dev); in genwqe_reload_bistream()
893 dev_err(&pci_dev->dev, in genwqe_reload_bistream()
900 dev_err(&pci_dev->dev, in genwqe_reload_bistream()
905 dev_info(&pci_dev->dev, in genwqe_reload_bistream()
935 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_health_thread() local
949 dev_err(&pci_dev->dev, in genwqe_health_thread()
956 dev_err(&pci_dev->dev, in genwqe_health_thread()
964 dev_err(&pci_dev->dev, in genwqe_health_thread()
972 dev_err(&pci_dev->dev, in genwqe_health_thread()
1022 if (pci_channel_offline(pci_dev)) in genwqe_health_thread()
1035 dev_err(&pci_dev->dev, in genwqe_health_thread()
1092 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_pci_setup() local
1094 err = pci_enable_device_mem(pci_dev); in genwqe_pci_setup()
1096 dev_err(&pci_dev->dev, in genwqe_pci_setup()
1102 err = pci_request_mem_regions(pci_dev, genwqe_driver_name); in genwqe_pci_setup()
1104 dev_err(&pci_dev->dev, in genwqe_pci_setup()
1112 if (dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(64)) && in genwqe_pci_setup()
1113 dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32))) { in genwqe_pci_setup()
1114 dev_err(&pci_dev->dev, in genwqe_pci_setup()
1120 pci_set_master(pci_dev); in genwqe_pci_setup()
1123 pci_dev->needs_freset = 1; in genwqe_pci_setup()
1126 cd->mmio_len = pci_resource_len(pci_dev, 0); in genwqe_pci_setup()
1127 cd->mmio = pci_iomap(pci_dev, 0, 0); in genwqe_pci_setup()
1129 dev_err(&pci_dev->dev, in genwqe_pci_setup()
1135 cd->num_vfs = pci_sriov_get_totalvfs(pci_dev); in genwqe_pci_setup()
1146 pci_iounmap(pci_dev, cd->mmio); in genwqe_pci_setup()
1148 pci_release_mem_regions(pci_dev); in genwqe_pci_setup()
1150 pci_disable_device(pci_dev); in genwqe_pci_setup()
1161 struct pci_dev *pci_dev = cd->pci_dev; in genwqe_pci_remove() local
1164 pci_iounmap(pci_dev, cd->mmio); in genwqe_pci_remove()
1166 pci_release_mem_regions(pci_dev); in genwqe_pci_remove()
1167 pci_disable_device(pci_dev); in genwqe_pci_remove()
1179 static int genwqe_probe(struct pci_dev *pci_dev, in genwqe_probe() argument
1189 dev_err(&pci_dev->dev, "err: could not alloc mem (err=%d)!\n", in genwqe_probe()
1194 dev_set_drvdata(&pci_dev->dev, cd); in genwqe_probe()
1195 cd->pci_dev = pci_dev; in genwqe_probe()
1199 dev_err(&pci_dev->dev, in genwqe_probe()
1206 dev_err(&pci_dev->dev, in genwqe_probe()
1214 dev_err(&pci_dev->dev, in genwqe_probe()
1237 static void genwqe_remove(struct pci_dev *pci_dev) in genwqe_remove() argument
1239 struct genwqe_dev *cd = dev_get_drvdata(&pci_dev->dev); in genwqe_remove()
1261 static pci_ers_result_t genwqe_err_error_detected(struct pci_dev *pci_dev, in genwqe_err_error_detected() argument
1266 dev_err(&pci_dev->dev, "[%s] state=%d\n", __func__, state); in genwqe_err_error_detected()
1268 cd = dev_get_drvdata(&pci_dev->dev); in genwqe_err_error_detected()
1289 static pci_ers_result_t genwqe_err_slot_reset(struct pci_dev *pci_dev) in genwqe_err_slot_reset() argument
1292 struct genwqe_dev *cd = dev_get_drvdata(&pci_dev->dev); in genwqe_err_slot_reset()
1298 dev_err(&pci_dev->dev, in genwqe_err_slot_reset()
1304 static pci_ers_result_t genwqe_err_result_none(struct pci_dev *dev) in genwqe_err_result_none()
1309 static void genwqe_err_resume(struct pci_dev *pci_dev) in genwqe_err_resume() argument
1312 struct genwqe_dev *cd = dev_get_drvdata(&pci_dev->dev); in genwqe_err_resume()
1318 dev_err(&pci_dev->dev, in genwqe_err_resume()
1322 dev_err(&pci_dev->dev, in genwqe_err_resume()
1327 static int genwqe_sriov_configure(struct pci_dev *dev, int numvfs) in genwqe_sriov_configure()