Home
last modified time | relevance | path

Searched refs:pdsc (Results 1 – 10 of 10) sorted by relevance

/linux/drivers/net/ethernet/amd/pds_core/
H A Ddev.c58 bool pdsc_is_fw_running(struct pdsc *pdsc) in pdsc_is_fw_running() argument
60 if (!pdsc->info_regs) in pdsc_is_fw_running()
63 pdsc->fw_status = ioread8(&pdsc->info_regs->fw_status); in pdsc_is_fw_running()
64 pdsc->last_fw_time = jiffies; in pdsc_is_fw_running()
65 pdsc->last_hb = ioread32(&pdsc->info_regs->fw_heartbeat); in pdsc_is_fw_running()
70 return (pdsc->fw_status != PDS_RC_BAD_PCI) && in pdsc_is_fw_running()
71 (pdsc->fw_status & PDS_CORE_FW_STS_F_RUNNING); in pdsc_is_fw_running()
74 bool pdsc_is_fw_good(struct pdsc *pdsc) in pdsc_is_fw_good() argument
76 bool fw_running = pdsc_is_fw_running(pdsc); in pdsc_is_fw_good()
82 gen = pdsc->fw_status & PDS_CORE_FW_STS_F_GENERATION; in pdsc_is_fw_good()
[all …]
H A Dmain.c24 static void pdsc_stop_health_thread(struct pdsc *pdsc);
28 struct pdsc *pdsc = timer_container_of(pdsc, t, wdtimer); in pdsc_wdtimer_cb() local
30 dev_dbg(pdsc->dev, "%s: jiffies %ld\n", __func__, jiffies); in pdsc_wdtimer_cb()
31 mod_timer(&pdsc->wdtimer, in pdsc_wdtimer_cb()
32 round_jiffies(jiffies + pdsc->wdtimer_period)); in pdsc_wdtimer_cb()
34 queue_work(pdsc->wq, &pdsc->health_work); in pdsc_wdtimer_cb()
37 static void pdsc_unmap_bars(struct pdsc *pdsc) in pdsc_unmap_bars() argument
39 struct pdsc_dev_bar *bars = pdsc->bars; in pdsc_unmap_bars()
42 pdsc->info_regs = NULL; in pdsc_unmap_bars()
43 pdsc->cmd_regs = NULL; in pdsc_unmap_bars()
[all …]
H A Dcore.c28 void pdsc_intr_free(struct pdsc *pdsc, int index) in pdsc_intr_free() argument
32 if (index >= pdsc->nintrs || index < 0) { in pdsc_intr_free()
37 intr_info = &pdsc->intr_info[index]; in pdsc_intr_free()
40 dev_dbg(pdsc->dev, "%s: idx %d vec %d name %s\n", in pdsc_intr_free()
43 pds_core_intr_mask(&pdsc->intr_ctrl[index], PDS_CORE_INTR_MASK_SET); in pdsc_intr_free()
44 pds_core_intr_clean(&pdsc->intr_ctrl[index]); in pdsc_intr_free()
51 int pdsc_intr_alloc(struct pdsc *pdsc, char *name, in pdsc_intr_alloc() argument
59 for (index = 0; index < pdsc->nintrs; index++) in pdsc_intr_alloc()
60 if (!pdsc->intr_info[index].vector) in pdsc_intr_alloc()
62 if (index >= pdsc->nintrs) { in pdsc_intr_alloc()
[all …]
H A Dcore.h48 struct pdsc;
52 struct pdsc *vf;
131 struct pdsc *pdsc; member
177 struct pdsc { struct
298 void __iomem *pdsc_map_dbpage(struct pdsc *pdsc, int page_num);
302 void pdsc_debugfs_add_dev(struct pdsc *pdsc);
303 void pdsc_debugfs_del_dev(struct pdsc *pdsc);
304 void pdsc_debugfs_add_ident(struct pdsc *pdsc);
305 void pdsc_debugfs_add_viftype(struct pdsc *pdsc);
306 void pdsc_debugfs_add_irqs(struct pdsc *pdsc);
[all …]
H A Dadminq.c11 struct pdsc *pdsc = qcq->pdsc; in pdsc_process_notifyq() local
20 while (eid > pdsc->last_eid) { in pdsc_process_notifyq()
31 dev_info(pdsc->dev, "NotifyQ LINK_CHANGE ecode %d eid %lld\n", in pdsc_process_notifyq()
37 dev_info(pdsc->dev, "NotifyQ RESET ecode %d eid %lld\n", in pdsc_process_notifyq()
43 dev_info(pdsc->dev, "NotifyQ XCVR ecode %d eid %lld\n", in pdsc_process_notifyq()
48 dev_info(pdsc->dev, "NotifyQ ecode %d eid %lld\n", in pdsc_process_notifyq()
53 pdsc->last_eid = eid; in pdsc_process_notifyq()
67 static bool pdsc_adminq_inc_if_up(struct pdsc *pdsc) in pdsc_adminq_inc_if_up() argument
69 if (pdsc->state & BIT_ULL(PDSC_S_STOPPING_DRIVER) || in pdsc_adminq_inc_if_up()
70 pdsc->state & BIT_ULL(PDSC_S_FW_DEAD)) in pdsc_adminq_inc_if_up()
[all …]
H A Ddebugfs.c20 void pdsc_debugfs_add_dev(struct pdsc *pdsc) in pdsc_debugfs_add_dev() argument
22 pdsc->dentry = debugfs_create_dir(pci_name(pdsc->pdev), pdsc_dir); in pdsc_debugfs_add_dev()
24 debugfs_create_ulong("state", 0400, pdsc->dentry, &pdsc->state); in pdsc_debugfs_add_dev()
27 void pdsc_debugfs_del_dev(struct pdsc *pdsc) in pdsc_debugfs_del_dev() argument
29 debugfs_remove_recursive(pdsc->dentry); in pdsc_debugfs_del_dev()
30 pdsc->dentry = NULL; in pdsc_debugfs_del_dev()
36 struct pdsc *pdsc = seq->private; in identity_show() local
39 ident = &pdsc->dev_ident; in identity_show()
42 ioread32(&pdsc->info_regs->fw_heartbeat)); in identity_show()
58 le16_to_cpu(pdsc->dev_ident.vif_types[vt])); in identity_show()
[all …]
H A Ddevlink.c8 pdsc_viftype *pdsc_dl_find_viftype_by_id(struct pdsc *pdsc, in pdsc_dl_find_viftype_by_id() argument
13 if (!pdsc->viftype_status) in pdsc_dl_find_viftype_by_id()
17 if (pdsc->viftype_status[vt].dl_id == dl_id) in pdsc_dl_find_viftype_by_id()
18 return &pdsc->viftype_status[vt]; in pdsc_dl_find_viftype_by_id()
28 struct pdsc *pdsc = devlink_priv(dl); in pdsc_dl_enable_get() local
31 vt_entry = pdsc_dl_find_viftype_by_id(pdsc, id); in pdsc_dl_enable_get()
44 struct pdsc *pdsc = devlink_priv(dl); in pdsc_dl_enable_set() local
49 vt_entry = pdsc_dl_find_viftype_by_id(pdsc, id); in pdsc_dl_enable_set()
57 for (vf_id = 0; vf_id < pdsc->num_vfs; vf_id++) { in pdsc_dl_enable_set()
58 struct pdsc *vf = pdsc->vfs[vf_id].vf; in pdsc_dl_enable_set()
[all …]
H A Dfw.c45 void pdsc_fw_components_invalidate(struct pdsc *pdsc) in pdsc_fw_components_invalidate() argument
48 WRITE_ONCE(pdsc->fw_components.num_components, 0); in pdsc_fw_components_invalidate()
72 static int pdsc_devcmd_fw_download_locked(struct pdsc *pdsc, u64 addr, in pdsc_devcmd_fw_download_locked() argument
83 return pdsc_devcmd_locked(pdsc, &cmd, &comp, pdsc->devcmd_timeout); in pdsc_devcmd_fw_download_locked()
86 static int pdsc_devcmd_fw_install(struct pdsc *pdsc) in pdsc_devcmd_fw_install() argument
95 err = pdsc_devcmd(pdsc, &cmd, &comp, pdsc->devcmd_timeout); in pdsc_devcmd_fw_install()
102 static int pdsc_devcmd_fw_activate(struct pdsc *pdsc, in pdsc_devcmd_fw_activate() argument
112 return pdsc_devcmd(pdsc, &cmd, &comp, pdsc->devcmd_timeout); in pdsc_devcmd_fw_activate()
115 static int pdsc_fw_status_long_wait(struct pdsc *pdsc, in pdsc_fw_status_long_wait() argument
137 err = pdsc_devcmd(pdsc, &cmd, &comp, pdsc->devcmd_timeout); in pdsc_fw_status_long_wait()
[all …]
H A Dauxbus.c17 int pds_client_register(struct pdsc *pf, char *devname) in pds_client_register()
57 int pds_client_unregister(struct pdsc *pf, u16 client_id) in pds_client_unregister()
100 struct pdsc *pf; in pds_client_adminq_cmd()
134 static struct pds_auxiliary_dev *pdsc_auxbus_dev_register(struct pdsc *cf, in pdsc_auxbus_dev_register()
135 struct pdsc *pf, in pdsc_auxbus_dev_register()
175 void pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc *pf, in pdsc_auxbus_dev_del()
198 int pdsc_auxbus_dev_add(struct pdsc *cf, struct pdsc *pf, in pdsc_auxbus_dev_add()
/linux/drivers/vfio/pci/pds/
H A Dcmds.c25 struct pdsc *pdsc; in pds_vfio_client_adminq_cmd() local
34 pdsc = pdsc_get_pf_struct(pdev); in pds_vfio_client_adminq_cmd()
35 if (IS_ERR(pdsc)) in pds_vfio_client_adminq_cmd()
36 return PTR_ERR(pdsc); in pds_vfio_client_adminq_cmd()
38 err = pdsc_adminq_post(pdsc, &cmd, resp, fast_poll); in pds_vfio_client_adminq_cmd()
50 struct pdsc *pdsc; in pds_vfio_register_client_cmd() local
57 pdsc = pdsc_get_pf_struct(pdev); in pds_vfio_register_client_cmd()
58 if (IS_ERR(pdsc)) in pds_vfio_register_client_cmd()
59 return PTR_ERR(pdsc); in pds_vfio_register_client_cmd()
61 ci = pds_client_register(pdsc, devname); in pds_vfio_register_client_cmd()
[all …]