Home
last modified time | relevance | path

Searched refs:zdev (Results 1 – 25 of 27) sorted by relevance

12

/linux/arch/s390/pci/
H A Dpci.c73 void zpci_zdev_put(struct zpci_dev *zdev) in zpci_zdev_put() argument
75 if (!zdev) in zpci_zdev_put()
78 kref_put_lock(&zdev->kref, zpci_release_device, &zpci_list_lock); in zpci_zdev_put()
84 struct zpci_dev *tmp, *zdev = NULL; in get_zdev_by_fid() local
89 zdev = tmp; in get_zdev_by_fid()
90 zpci_zdev_get(zdev); in get_zdev_by_fid()
95 return zdev; in get_zdev_by_fid()
100 struct zpci_dev *tmp, *zdev; in zpci_remove_reserved_devices() local
105 list_for_each_entry_safe(zdev, tmp, &zpci_list, entry) { in zpci_remove_reserved_devices()
106 if (zdev->state == ZPCI_FN_STATE_STANDBY && in zpci_remove_reserved_devices()
[all …]
H A Dpci_event.c65 struct zpci_dev *zdev = to_zpci(pdev); in is_passed_through() local
68 mutex_lock(&zdev->kzdev_lock); in is_passed_through()
69 ret = !!zdev->kzdev; in is_passed_through()
70 mutex_unlock(&zdev->kzdev_lock); in is_passed_through()
103 struct zpci_dev *zdev = to_zpci(pdev); in zpci_event_do_error_state_clear() local
107 if (!zdev_enabled(zdev)) in zpci_event_do_error_state_clear()
111 rc = zpci_reset_load_store_blocked(zdev); in zpci_event_do_error_state_clear()
133 rc = zpci_clear_error_state(zdev); in zpci_event_do_error_state_clear()
181 struct zpci_dev *zdev = to_zpci(pdev); in zpci_event_attempt_error_recovery() local
260 zpci_report_status(zdev, "recovery", status_str); in zpci_event_attempt_error_recovery()
[all …]
H A Dpci_bus.c42 static int zpci_bus_prepare_device(struct zpci_dev *zdev) in zpci_bus_prepare_device() argument
46 if (!zdev_enabled(zdev)) { in zpci_bus_prepare_device()
47 rc = zpci_enable_device(zdev); in zpci_bus_prepare_device()
49 pr_err("Enabling PCI function %08x failed\n", zdev->fid); in zpci_bus_prepare_device()
54 if (!zdev->has_resources) { in zpci_bus_prepare_device()
55 zpci_setup_bus_resources(zdev); in zpci_bus_prepare_device()
57 if (zdev->bars[i].res) in zpci_bus_prepare_device()
58 pci_bus_add_resource(zdev->zbus->bus, zdev->bars[i].res); in zpci_bus_prepare_device()
72 int zpci_bus_scan_device(struct zpci_dev *zdev) in zpci_bus_scan_device() argument
77 rc = zpci_bus_prepare_device(zdev); in zpci_bus_scan_device()
[all …]
H A Dpci_irq.c33 static int zpci_set_airq(struct zpci_dev *zdev) in zpci_set_airq() argument
35 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_REG_INT); in zpci_set_airq()
41 fib.fmt0.noi = airq_iv_end(zdev->aibv); in zpci_set_airq()
42 fib.fmt0.aibv = virt_to_phys(zdev->aibv->vector); in zpci_set_airq()
44 fib.fmt0.aisb = virt_to_phys(zpci_sbv->vector) + (zdev->aisb / 64) * 8; in zpci_set_airq()
45 fib.fmt0.aisbo = zdev->aisb & 63; in zpci_set_airq()
46 fib.gd = zdev->gisa; in zpci_set_airq()
52 static int zpci_clear_airq(struct zpci_dev *zdev) in zpci_clear_airq() argument
54 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_DEREG_INT); in zpci_clear_airq()
58 fib.gd = zdev->gisa; in zpci_clear_airq()
[all …]
H A Dpci_debug.c73 struct zpci_dev *zdev = m->private; in pci_sw_counter_show() local
79 spin_lock_irqsave(&zdev->dom_lock, flags); in pci_sw_counter_show()
89 spin_unlock_irqrestore(&zdev->dom_lock, flags); in pci_sw_counter_show()
94 struct zpci_dev *zdev = m->private; in pci_perf_show() local
96 if (!zdev) in pci_perf_show()
99 mutex_lock(&zdev->fmb_lock); in pci_perf_show()
100 if (!zdev->fmb) { in pci_perf_show()
101 mutex_unlock(&zdev->fmb_lock); in pci_perf_show()
107 seq_printf(m, "Update interval: %u ms\n", zdev->fmb_update); in pci_perf_show()
108 seq_printf(m, "Samples: %u\n", zdev->fmb->samples); in pci_perf_show()
[all …]
H A Dpci_clp.c102 static void clp_store_query_pci_fngrp(struct zpci_dev *zdev, in clp_store_query_pci_fngrp() argument
105 zdev->tlb_refresh = response->refresh; in clp_store_query_pci_fngrp()
106 zdev->dma_mask = response->dasm; in clp_store_query_pci_fngrp()
107 zdev->msi_addr = response->msia; in clp_store_query_pci_fngrp()
108 zdev->max_msi = response->noi; in clp_store_query_pci_fngrp()
109 zdev->fmb_update = response->mui; in clp_store_query_pci_fngrp()
110 zdev->version = response->version; in clp_store_query_pci_fngrp()
111 zdev->maxstbl = response->maxstbl; in clp_store_query_pci_fngrp()
112 zdev->dtsm = response->dtsm; in clp_store_query_pci_fngrp()
113 zdev->rtr_avail = response->rtr; in clp_store_query_pci_fngrp()
[all …]
H A Dpci_sysfs.c23 struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); \
25 return sysfs_emit(buf, fmt, zdev->member); \
49 struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); in mio_enabled_show() local
51 return sysfs_emit(buf, zpci_use_mio(zdev) ? "1\n" : "0\n"); in mio_enabled_show()
55 static int _do_recover(struct pci_dev *pdev, struct zpci_dev *zdev) in _do_recover() argument
60 if (zdev_enabled(zdev)) { in _do_recover()
61 ret = zpci_disable_device(zdev); in _do_recover()
74 ret = zpci_reenable_device(zdev); in _do_recover()
84 struct zpci_dev *zdev = to_zpci(pdev); in recover_store() local
101 mutex_lock(&zdev->state_lock); in recover_store()
[all …]
H A Dpci_iov.c76 struct pci_dev *zpci_iov_find_parent_pf(struct zpci_bus *zbus, struct zpci_dev *zdev) in zpci_iov_find_parent_pf() argument
84 if (!zdev->vfn || !zdev->rid_available) in zpci_iov_find_parent_pf()
87 vfid = zdev->vfn - 1; in zpci_iov_find_parent_pf()
88 devfn = zdev->rid & ZPCI_RID_MASK_DEVFN; in zpci_iov_find_parent_pf()
98 zdev = zbus->function[i]; in zpci_iov_find_parent_pf()
99 if (zdev && zdev->is_physfn) { in zpci_iov_find_parent_pf()
100 pdev = pci_get_slot(zbus->bus, zdev->devfn); in zpci_iov_find_parent_pf()
115 struct zpci_dev *zdev = to_zpci(virtfn); in zpci_iov_setup_virtfn() local
119 pdev_pf = zpci_iov_find_parent_pf(zbus, zdev); in zpci_iov_setup_virtfn()
122 rc = zpci_iov_link_virtfn(pdev_pf, virtfn, zdev->vfn - 1); in zpci_iov_setup_virtfn()
H A Dpci_bus.h14 int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops);
15 void zpci_bus_device_unregister(struct zpci_dev *zdev);
33 int zpci_bus_scan_device(struct zpci_dev *zdev);
34 void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);
38 void zpci_zdev_put(struct zpci_dev *zdev);
40 static inline void zpci_zdev_get(struct zpci_dev *zdev) in zpci_zdev_get() argument
42 kref_get(&zdev->kref); in zpci_zdev_get()
47 int zpci_setup_bus_resources(struct zpci_dev *zdev);
H A Dpci_report.c106 int zpci_report_status(struct zpci_dev *zdev, const char *operation, const char *status) in zpci_report_status() argument
114 if (!zdev || !zdev->zbus) in zpci_report_status()
124 if (zdev->zbus->bus) in zpci_report_status()
125 pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); in zpci_report_status()
148 ret = sclp_pci_report(&report->header, zdev->fh, zdev->fid); in zpci_report_status()
H A Dpci_iov.h22 struct pci_dev *zpci_iov_find_parent_pf(struct zpci_bus *zbus, struct zpci_dev *zdev);
34 static inline struct pci_dev *zpci_iov_find_parent_pf(struct zpci_bus *zbus, struct zpci_dev *zdev) in zpci_iov_find_parent_pf() argument
H A Dpci_report.h14 int zpci_report_status(struct zpci_dev *zdev, const char *operation, const char *status);
/linux/arch/s390/kvm/
H A Dpci.c158 static int kvm_zpci_set_airq(struct zpci_dev *zdev) in kvm_zpci_set_airq() argument
160 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_REG_INT); in kvm_zpci_set_airq()
164 fib.fmt0.isc = zdev->kzdev->fib.fmt0.isc; in kvm_zpci_set_airq()
166 fib.fmt0.noi = airq_iv_end(zdev->aibv); in kvm_zpci_set_airq()
167 fib.fmt0.aibv = virt_to_phys(zdev->aibv->vector); in kvm_zpci_set_airq()
169 fib.fmt0.aisb = virt_to_phys(aift->sbv->vector + (zdev->aisb / 64) * 8); in kvm_zpci_set_airq()
170 fib.fmt0.aisbo = zdev->aisb & 63; in kvm_zpci_set_airq()
171 fib.gd = zdev->gisa; in kvm_zpci_set_airq()
177 static int kvm_zpci_clear_airq(struct zpci_dev *zdev) in kvm_zpci_clear_airq() argument
179 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_DEREG_INT); in kvm_zpci_clear_airq()
[all …]
H A Dpci.h21 struct zpci_dev *zdev; member
/linux/drivers/pci/hotplug/
H A Ds390_pci_hpc.c24 struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev, in enable_slot() local
28 mutex_lock(&zdev->state_lock); in enable_slot()
29 if (zdev->state != ZPCI_FN_STATE_STANDBY) { in enable_slot()
34 rc = sclp_pci_configure(zdev->fid); in enable_slot()
35 zpci_dbg(3, "conf fid:%x, rc:%d\n", zdev->fid, rc); in enable_slot()
38 zdev->state = ZPCI_FN_STATE_CONFIGURED; in enable_slot()
40 rc = zpci_scan_configured_device(zdev, zdev->fh); in enable_slot()
42 mutex_unlock(&zdev->state_lock); in enable_slot()
48 struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev, in disable_slot() local
53 mutex_lock(&zdev->state_lock); in disable_slot()
[all …]
/linux/drivers/vfio/pci/
H A Dvfio_pci_zdev.c23 static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps) in zpci_base_cap() argument
28 .start_dma = zdev->start_dma, in zpci_base_cap()
29 .end_dma = zdev->end_dma, in zpci_base_cap()
30 .pchid = zdev->pchid, in zpci_base_cap()
31 .vfn = zdev->vfn, in zpci_base_cap()
32 .fmb_length = zdev->fmb_length, in zpci_base_cap()
33 .pft = zdev->pft, in zpci_base_cap()
34 .gid = zdev->pfgid, in zpci_base_cap()
35 .fh = zdev->fh in zpci_base_cap()
44 static int zpci_group_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps) in zpci_group_cap() argument
[all …]
/linux/drivers/iommu/
H A Ds390-iommu.c502 struct zpci_dev *zdev = to_zpci_dev(dev); in s390_iommu_capable() local
508 return zdev->pft != PCI_FUNC_TYPE_ISM; in s390_iommu_capable()
530 struct zpci_dev *zdev = to_zpci_dev(dev); in s390_domain_alloc_paging() local
545 zdev->end_dma - zdev->start_dma + 1); in s390_domain_alloc_paging()
546 if (aperture_size <= (ZPCI_TABLE_SIZE_RT - zdev->start_dma)) { in s390_domain_alloc_paging()
548 } else if (aperture_size <= (ZPCI_TABLE_SIZE_RS - zdev->start_dma) && in s390_domain_alloc_paging()
549 (zdev->dtsm & ZPCI_IOTA_DT_RS)) { in s390_domain_alloc_paging()
551 } else if (zdev->dtsm & ZPCI_IOTA_DT_RF) { in s390_domain_alloc_paging()
556 aperture_size = ZPCI_TABLE_SIZE_RT - zdev->start_dma; in s390_domain_alloc_paging()
558 zdev->end_dma = zdev->start_dma + aperture_size - 1; in s390_domain_alloc_paging()
[all …]
/linux/arch/s390/include/asm/
H A Dpci.h198 static inline bool zdev_enabled(struct zpci_dev *zdev) in zdev_enabled() argument
200 return (zdev->fh & (1UL << 31)) ? true : false; in zdev_enabled()
222 int zpci_add_device(struct zpci_dev *zdev);
224 int zpci_reenable_device(struct zpci_dev *zdev);
226 int zpci_scan_configured_device(struct zpci_dev *zdev, u32 fh);
227 int zpci_deconfigure_device(struct zpci_dev *zdev);
228 void zpci_device_reserved(struct zpci_dev *zdev);
229 bool zpci_is_device_configured(struct zpci_dev *zdev);
232 int zpci_hot_reset_device(struct zpci_dev *zdev);
236 void zpci_update_fh(struct zpci_dev *zdev, u32 fh);
[all …]
/linux/drivers/dma/xilinx/
H A Dzynqmp_dma.c220 struct zynqmp_dma_device *zdev; member
889 devm_free_irq(chan->zdev->dev, chan->irq, chan); in zynqmp_dma_chan_remove()
901 static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev, in zynqmp_dma_chan_probe() argument
909 chan = devm_kzalloc(zdev->dev, sizeof(*chan), GFP_KERNEL); in zynqmp_dma_chan_probe()
912 chan->dev = zdev->dev; in zynqmp_dma_chan_probe()
913 chan->zdev = zdev; in zynqmp_dma_chan_probe()
930 dev_err(zdev->dev, "invalid bus-width value"); in zynqmp_dma_chan_probe()
939 zdev->chan = chan; in zynqmp_dma_chan_probe()
948 chan->common.device = &zdev->common; in zynqmp_dma_chan_probe()
949 list_add_tail(&chan->common.device_node, &zdev->common.channels); in zynqmp_dma_chan_probe()
[all …]
/linux/drivers/net/ethernet/8390/
H A Dxsurf100.c239 static int xsurf100_probe(struct zorro_dev *zdev, in xsurf100_probe() argument
247 DEFINE_RES_MEM(zdev->resource.start + XS100_8390_BASE, in xsurf100_probe()
262 if (!request_mem_region(zdev->resource.start, 0x100, zdev->name)) { in xsurf100_probe()
263 dev_err(&zdev->dev, "cannot reserve X-Surf 100 control registers\n"); in xsurf100_probe()
267 if (!request_mem_region(zdev->resource.start + in xsurf100_probe()
271 dev_err(&zdev->dev, "cannot reserve 32-bit area\n"); in xsurf100_probe()
286 ax88796_data.base_regs = ioremap(zdev->resource.start, 0x100); in xsurf100_probe()
290 dev_err(&zdev->dev, "Cannot ioremap area %pR (registers)\n", in xsurf100_probe()
291 &zdev->resource); in xsurf100_probe()
297 ax88796_data.data_area = ioremap(zdev->resource.start + in xsurf100_probe()
[all …]
/linux/arch/s390/net/
H A Dpnet.c58 struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); in pnet_ids_by_device() local
60 memcpy(pnetids, zdev->util_str, sizeof(zdev->util_str)); in pnet_ids_by_device()
61 EBCASC(pnetids, sizeof(zdev->util_str)); in pnet_ids_by_device()
/linux/drivers/s390/net/
H A Dism.h246 struct zpci_dev *zdev = to_zpci(ism->pdev); in __ism_read_cmd() local
247 u64 req = ZPCI_CREATE_REQ(zdev->fh, 2, 8); in __ism_read_cmd()
260 struct zpci_dev *zdev = to_zpci(ism->pdev); in __ism_write_cmd() local
261 u64 req = ZPCI_CREATE_REQ(zdev->fh, 2, len); in __ism_write_cmd()
270 struct zpci_dev *zdev = to_zpci(ism->pdev); in __ism_move() local
271 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, size); in __ism_move()
H A Dism_drv.c597 struct zpci_dev *zdev; in ism_probe() local
649 zdev = to_zpci(pdev); in ism_probe()
650 dev_set_name(&dibs->dev, "ism%x", zdev->uid ? zdev->uid : zdev->fid); in ism_probe()
/linux/net/smc/
H A Dsmc_core.h561 struct zpci_dev *zdev; in smc_set_pci_values() local
563 zdev = to_zpci(pci_dev); in smc_set_pci_values()
564 smc_dev->pci_fid = zdev->fid; in smc_set_pci_values()
565 smc_dev->pci_pchid = zdev->pchid; in smc_set_pci_values()
/linux/drivers/s390/crypto/
H A Dzcrypt_card.c159 struct zcrypt_card *zdev = in zcrypt_card_release() local
161 zcrypt_card_free(zdev); in zcrypt_card_release()

12