/Linux-v5.4/drivers/infiniband/hw/mthca/ |
D | mthca_main.c | 136 static int mthca_tune_pci(struct mthca_dev *mdev) in mthca_tune_pci() argument 142 if (pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX)) { in mthca_tune_pci() 143 if (pcix_set_mmrbc(mdev->pdev, pcix_get_max_mmrbc(mdev->pdev))) { in mthca_tune_pci() 144 mthca_err(mdev, "Couldn't set PCI-X max read count, " in mthca_tune_pci() 148 } else if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE)) in mthca_tune_pci() 149 mthca_info(mdev, "No PCI-X capability, not setting RBC.\n"); in mthca_tune_pci() 151 if (pci_is_pcie(mdev->pdev)) { in mthca_tune_pci() 152 if (pcie_set_readrq(mdev->pdev, 4096)) { in mthca_tune_pci() 153 mthca_err(mdev, "Couldn't write PCI Express read request, " in mthca_tune_pci() 157 } else if (mdev->mthca_flags & MTHCA_FLAG_PCIE) in mthca_tune_pci() [all …]
|
D | mthca_reset.c | 41 int mthca_reset(struct mthca_dev *mdev) in mthca_reset() argument 69 if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE)) { in mthca_reset() 72 while ((bridge = pci_get_device(mdev->pdev->vendor, in mthca_reset() 73 mdev->pdev->device + 2, in mthca_reset() 76 bridge->subordinate == mdev->pdev->bus) { in mthca_reset() 77 mthca_dbg(mdev, "Found bridge: %s\n", in mthca_reset() 89 mthca_warn(mdev, "No bridge found for %s\n", in mthca_reset() 90 pci_name(mdev->pdev)); in mthca_reset() 105 if (pci_read_config_dword(mdev->pdev, i * 4, hca_header + i)) { in mthca_reset() 107 mthca_err(mdev, "Couldn't save HCA " in mthca_reset() [all …]
|
/Linux-v5.4/drivers/sh/maple/ |
D | maple.c | 139 struct maple_device *mdev; in maple_release_device() local 142 mdev = to_maple_dev(dev); in maple_release_device() 143 mq = mdev->mq; in maple_release_device() 146 kfree(mdev); in maple_release_device() 157 int maple_add_packet(struct maple_device *mdev, u32 function, u32 command, in maple_add_packet() argument 172 mdev->mq->command = command; in maple_add_packet() 173 mdev->mq->length = length; in maple_add_packet() 176 mdev->mq->sendbuf = sendbuf; in maple_add_packet() 179 list_add_tail(&mdev->mq->list, &maple_waitq); in maple_add_packet() 186 static struct mapleq *maple_allocq(struct maple_device *mdev) in maple_allocq() argument [all …]
|
/Linux-v5.4/drivers/misc/mic/host/ |
D | mic_main.c | 49 static int mic_dp_init(struct mic_device *mdev) in mic_dp_init() argument 51 mdev->dp = kzalloc(MIC_DP_SIZE, GFP_KERNEL); in mic_dp_init() 52 if (!mdev->dp) in mic_dp_init() 55 mdev->dp_dma_addr = mic_map_single(mdev, in mic_dp_init() 56 mdev->dp, MIC_DP_SIZE); in mic_dp_init() 57 if (mic_map_error(mdev->dp_dma_addr)) { in mic_dp_init() 58 kfree(mdev->dp); in mic_dp_init() 59 dev_err(&mdev->pdev->dev, "%s %d err %d\n", in mic_dp_init() 63 mdev->ops->write_spad(mdev, MIC_DPLO_SPAD, mdev->dp_dma_addr); in mic_dp_init() 64 mdev->ops->write_spad(mdev, MIC_DPHI_SPAD, mdev->dp_dma_addr >> 32); in mic_dp_init() [all …]
|
D | mic_intr.c | 17 struct mic_device *mdev = dev; in mic_thread_fn() local 18 struct mic_intr_info *intr_info = mdev->intr_info; in mic_thread_fn() 19 struct mic_irq_info *irq_info = &mdev->irq_info; in mic_thread_fn() 21 struct pci_dev *pdev = mdev->pdev; in mic_thread_fn() 43 struct mic_device *mdev = dev; in mic_interrupt() local 44 struct mic_intr_info *intr_info = mdev->intr_info; in mic_interrupt() 45 struct mic_irq_info *irq_info = &mdev->irq_info; in mic_interrupt() 47 struct pci_dev *pdev = mdev->pdev; in mic_interrupt() 51 mask = mdev->ops->ack_interrupt(mdev); in mic_interrupt() 71 static u16 mic_map_src_to_offset(struct mic_device *mdev, in mic_map_src_to_offset() argument [all …]
|
D | mic_boot.c | 32 struct mic_device *mdev = vpdev_to_mdev(dev); in _mic_dma_map_page() local 34 return mic_map_single(mdev, va, size); in _mic_dma_map_page() 41 struct mic_device *mdev = vpdev_to_mdev(dev); in _mic_dma_unmap_page() local 43 mic_unmap_single(mdev, dma_addr, size); in _mic_dma_unmap_page() 56 struct mic_device *mdev = vpdev_to_mdev(&vpdev->dev); in __mic_request_irq() local 58 return mic_request_threaded_irq(mdev, func, NULL, name, data, in __mic_request_irq() 65 struct mic_device *mdev = vpdev_to_mdev(&vpdev->dev); in __mic_free_irq() local 67 mic_free_irq(mdev, cookie, data); in __mic_free_irq() 72 struct mic_device *mdev = vpdev_to_mdev(&vpdev->dev); in __mic_ack_interrupt() local 74 mdev->ops->intr_workarounds(mdev); in __mic_ack_interrupt() [all …]
|
D | mic_x100.c | 32 mic_x100_write_spad(struct mic_device *mdev, unsigned int idx, u32 val) in mic_x100_write_spad() argument 34 dev_dbg(&mdev->pdev->dev, "Writing 0x%x to scratch pad index %d\n", in mic_x100_write_spad() 36 mic_mmio_write(&mdev->mmio, val, in mic_x100_write_spad() 51 mic_x100_read_spad(struct mic_device *mdev, unsigned int idx) in mic_x100_read_spad() argument 53 u32 val = mic_mmio_read(&mdev->mmio, in mic_x100_read_spad() 57 dev_dbg(&mdev->pdev->dev, in mic_x100_read_spad() 66 static void mic_x100_enable_interrupts(struct mic_device *mdev) in mic_x100_enable_interrupts() argument 69 struct mic_mw *mw = &mdev->mmio; in mic_x100_enable_interrupts() 81 if (mdev->irq_info.num_vectors > 1) { in mic_x100_enable_interrupts() 93 static void mic_x100_disable_interrupts(struct mic_device *mdev) in mic_x100_disable_interrupts() argument [all …]
|
D | mic_smpt.c | 15 static inline u64 mic_system_page_mask(struct mic_device *mdev) in mic_system_page_mask() argument 17 return (1ULL << mdev->smpt->info.page_shift) - 1ULL; in mic_system_page_mask() 20 static inline u8 mic_sys_addr_to_smpt(struct mic_device *mdev, dma_addr_t pa) in mic_sys_addr_to_smpt() argument 22 return (pa - mdev->smpt->info.base) >> mdev->smpt->info.page_shift; in mic_sys_addr_to_smpt() 25 static inline u64 mic_smpt_to_pa(struct mic_device *mdev, u8 index) in mic_smpt_to_pa() argument 27 return mdev->smpt->info.base + (index * mdev->smpt->info.page_size); in mic_smpt_to_pa() 30 static inline u64 mic_smpt_offset(struct mic_device *mdev, dma_addr_t pa) in mic_smpt_offset() argument 32 return pa & mic_system_page_mask(mdev); in mic_smpt_offset() 35 static inline u64 mic_smpt_align_low(struct mic_device *mdev, dma_addr_t pa) in mic_smpt_align_low() argument 37 return ALIGN(pa - mic_system_page_mask(mdev), in mic_smpt_align_low() [all …]
|
/Linux-v5.4/drivers/gpu/drm/arm/display/komeda/ |
D | komeda_dev.c | 25 struct komeda_dev *mdev = sf->private; in komeda_register_show() local 28 if (mdev->funcs->dump_register) in komeda_register_show() 29 mdev->funcs->dump_register(mdev, sf); in komeda_register_show() 31 for (i = 0; i < mdev->n_pipelines; i++) in komeda_register_show() 32 komeda_pipeline_dump_register(mdev->pipelines[i], sf); in komeda_register_show() 51 static void komeda_debugfs_init(struct komeda_dev *mdev) in komeda_debugfs_init() argument 56 mdev->debugfs_root = debugfs_create_dir("komeda", NULL); in komeda_debugfs_init() 57 debugfs_create_file("register", 0444, mdev->debugfs_root, in komeda_debugfs_init() 58 mdev, &komeda_register_fops); in komeda_debugfs_init() 65 struct komeda_dev *mdev = dev_to_mdev(dev); in core_id_show() local [all …]
|
/Linux-v5.4/drivers/staging/most/video/ |
D | video.c | 52 struct most_video_dev *mdev; member 59 static inline bool data_ready(struct most_video_dev *mdev) in data_ready() argument 61 return !list_empty(&mdev->pending_mbos); in data_ready() 64 static inline struct mbo *get_top_mbo(struct most_video_dev *mdev) in get_top_mbo() argument 66 return list_first_entry(&mdev->pending_mbos, struct mbo, list); in get_top_mbo() 73 struct most_video_dev *mdev = video_drvdata(filp); in comp_vdev_open() local 87 if (!atomic_inc_and_test(&mdev->access_ref)) { in comp_vdev_open() 88 v4l2_err(&mdev->v4l2_dev, "too many clients\n"); in comp_vdev_open() 93 fh->mdev = mdev; in comp_vdev_open() 99 ret = most_start_channel(mdev->iface, mdev->ch_idx, &comp); in comp_vdev_open() [all …]
|
/Linux-v5.4/drivers/gpu/drm/mgag200/ |
D | mgag200_main.c | 21 static int mga_probe_vram(struct mga_device *mdev, void __iomem *mem) in mga_probe_vram() argument 33 vram_size = mdev->mc.vram_window; in mga_probe_vram() 35 if ((mdev->type == G200_EW3) && (vram_size >= 0x1000000)) { in mga_probe_vram() 66 static int mga_vram_init(struct mga_device *mdev) in mga_vram_init() argument 71 mdev->mc.vram_base = pci_resource_start(mdev->dev->pdev, 0); in mga_vram_init() 72 mdev->mc.vram_window = pci_resource_len(mdev->dev->pdev, 0); in mga_vram_init() 74 if (!devm_request_mem_region(mdev->dev->dev, mdev->mc.vram_base, mdev->mc.vram_window, in mga_vram_init() 80 mem = pci_iomap(mdev->dev->pdev, 0, 0); in mga_vram_init() 84 mdev->mc.vram_size = mga_probe_vram(mdev, mem); in mga_vram_init() 86 pci_iounmap(mdev->dev->pdev, mem); in mga_vram_init() [all …]
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx4/ |
D | en_clock.c | 43 struct mlx4_en_dev *mdev = in mlx4_en_read_clock() local 45 struct mlx4_dev *dev = mdev->dev; in mlx4_en_read_clock() 61 void mlx4_en_fill_hwtstamps(struct mlx4_en_dev *mdev, in mlx4_en_fill_hwtstamps() argument 69 seq = read_seqbegin(&mdev->clock_lock); in mlx4_en_fill_hwtstamps() 70 nsec = timecounter_cyc2time(&mdev->clock, timestamp); in mlx4_en_fill_hwtstamps() 71 } while (read_seqretry(&mdev->clock_lock, seq)); in mlx4_en_fill_hwtstamps() 83 void mlx4_en_remove_timestamp(struct mlx4_en_dev *mdev) in mlx4_en_remove_timestamp() argument 85 if (mdev->ptp_clock) { in mlx4_en_remove_timestamp() 86 ptp_clock_unregister(mdev->ptp_clock); in mlx4_en_remove_timestamp() 87 mdev->ptp_clock = NULL; in mlx4_en_remove_timestamp() [all …]
|
D | en_main.c | 96 level, DRV_NAME, dev_name(&priv->mdev->pdev->dev), in en_print() 117 if (mlx4_is_mfunc(priv->mdev->dev) && in mlx4_en_update_loopback_state() 124 if (mlx4_is_mfunc(priv->mdev->dev) || priv->validate_loopback) in mlx4_en_update_loopback_state() 127 mutex_lock(&priv->mdev->state_lock); in mlx4_en_update_loopback_state() 128 if ((priv->mdev->dev->caps.flags2 & in mlx4_en_update_loopback_state() 145 mlx4_warn(priv->mdev, "failed to change mcast loopback\n"); in mlx4_en_update_loopback_state() 147 mutex_unlock(&priv->mdev->state_lock); in mlx4_en_update_loopback_state() 150 static void mlx4_en_get_profile(struct mlx4_en_dev *mdev) in mlx4_en_get_profile() argument 152 struct mlx4_en_profile *params = &mdev->profile; in mlx4_en_get_profile() 160 if (params->udp_rss && !(mdev->dev->caps.flags in mlx4_en_get_profile() [all …]
|
/Linux-v5.4/drivers/dma/ |
D | altera-msgdma.c | 208 static struct msgdma_sw_desc *msgdma_get_descriptor(struct msgdma_device *mdev) in msgdma_get_descriptor() argument 213 spin_lock_irqsave(&mdev->lock, flags); in msgdma_get_descriptor() 214 desc = list_first_entry(&mdev->free_list, struct msgdma_sw_desc, node); in msgdma_get_descriptor() 216 spin_unlock_irqrestore(&mdev->lock, flags); in msgdma_get_descriptor() 228 static void msgdma_free_descriptor(struct msgdma_device *mdev, in msgdma_free_descriptor() argument 233 mdev->desc_free_cnt++; in msgdma_free_descriptor() 234 list_add_tail(&desc->node, &mdev->free_list); in msgdma_free_descriptor() 236 mdev->desc_free_cnt++; in msgdma_free_descriptor() 237 list_move_tail(&child->node, &mdev->free_list); in msgdma_free_descriptor() 246 static void msgdma_free_desc_list(struct msgdma_device *mdev, in msgdma_free_desc_list() argument [all …]
|
/Linux-v5.4/sound/core/seq/oss/ |
D | seq_oss_midi.c | 57 …t send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq_oss_midi *mdev); 96 struct seq_oss_midi *mdev; in get_mdev() local 100 mdev = midi_devs[dev]; in get_mdev() 101 if (mdev) in get_mdev() 102 snd_use_lock_use(&mdev->use_lock); in get_mdev() 104 return mdev; in get_mdev() 114 struct seq_oss_midi *mdev; in find_slot() local 119 mdev = midi_devs[i]; in find_slot() 120 if (mdev && mdev->client == client && mdev->port == port) { in find_slot() 122 snd_use_lock_use(&mdev->use_lock); in find_slot() [all …]
|
/Linux-v5.4/drivers/mtd/maps/ |
D | vmu-flash.c | 24 struct maple_device *mdev; member 60 struct maple_device *mdev; in ofs_to_block() local 66 mdev = mpart->mdev; in ofs_to_block() 67 card = maple_get_drvdata(mdev); in ofs_to_block() 91 struct maple_device *mdev; in vmu_blockread() local 94 mdev = mq->dev; in vmu_blockread() 95 card = maple_get_drvdata(mdev); in vmu_blockread() 114 struct maple_device *mdev; in maple_vmu_read_block() local 121 mdev = mpart->mdev; in maple_vmu_read_block() 123 card = maple_get_drvdata(mdev); in maple_vmu_read_block() [all …]
|
/Linux-v5.4/drivers/staging/most/usb/ |
D | usb.c | 78 struct most_dev *mdev; member 230 struct most_dev *mdev = to_mdev(iface); in hdm_poison_channel() local 235 dev_warn(&mdev->usb_device->dev, "Poison: Bad interface.\n"); in hdm_poison_channel() 239 dev_warn(&mdev->usb_device->dev, "Channel ID out of range.\n"); in hdm_poison_channel() 243 lock = mdev->channel_lock + channel; in hdm_poison_channel() 245 mdev->is_channel_healthy[channel] = false; in hdm_poison_channel() 248 cancel_work_sync(&mdev->clear_work[channel].ws); in hdm_poison_channel() 250 mutex_lock(&mdev->io_mutex); in hdm_poison_channel() 251 usb_kill_anchored_urbs(&mdev->busy_urbs[channel]); in hdm_poison_channel() 252 if (mdev->padding_active[channel]) in hdm_poison_channel() [all …]
|
/Linux-v5.4/drivers/vfio/mdev/ |
D | mdev_core.c | 30 struct device *mdev_parent_dev(struct mdev_device *mdev) in mdev_parent_dev() argument 32 return mdev->parent->dev; in mdev_parent_dev() 36 void *mdev_get_drvdata(struct mdev_device *mdev) in mdev_get_drvdata() argument 38 return mdev->driver_data; in mdev_get_drvdata() 42 void mdev_set_drvdata(struct mdev_device *mdev, void *data) in mdev_set_drvdata() argument 44 mdev->driver_data = data; in mdev_set_drvdata() 48 struct device *mdev_dev(struct mdev_device *mdev) in mdev_dev() argument 50 return &mdev->dev; in mdev_dev() 60 const guid_t *mdev_uuid(struct mdev_device *mdev) in mdev_uuid() argument 62 return &mdev->uuid; in mdev_uuid() [all …]
|
/Linux-v5.4/drivers/media/mc/ |
D | mc-device.c | 81 static struct media_entity *find_entity(struct media_device *mdev, u32 id) in find_entity() argument 88 media_device_for_each_entity(entity, mdev) { in find_entity() 98 static long media_device_enum_entities(struct media_device *mdev, void *arg) in media_device_enum_entities() argument 103 ent = find_entity(mdev, entd->id); in media_device_enum_entities() 151 static long media_device_enum_links(struct media_device *mdev, void *arg) in media_device_enum_links() argument 156 entity = find_entity(mdev, links->entity); in media_device_enum_links() 200 static long media_device_setup_link(struct media_device *mdev, void *arg) in media_device_setup_link() argument 209 source = find_entity(mdev, linkd->source.entity); in media_device_setup_link() 210 sink = find_entity(mdev, linkd->sink.entity); in media_device_setup_link() 230 static long media_device_get_topology(struct media_device *mdev, void *arg) in media_device_get_topology() argument [all …]
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_common.c | 39 int mlx5e_create_tir(struct mlx5_core_dev *mdev, in mlx5e_create_tir() argument 44 err = mlx5_core_create_tir(mdev, in, inlen, &tir->tirn); in mlx5e_create_tir() 48 mutex_lock(&mdev->mlx5e_res.td.list_lock); in mlx5e_create_tir() 49 list_add(&tir->list, &mdev->mlx5e_res.td.tirs_list); in mlx5e_create_tir() 50 mutex_unlock(&mdev->mlx5e_res.td.list_lock); in mlx5e_create_tir() 55 void mlx5e_destroy_tir(struct mlx5_core_dev *mdev, in mlx5e_destroy_tir() argument 58 mutex_lock(&mdev->mlx5e_res.td.list_lock); in mlx5e_destroy_tir() 59 mlx5_core_destroy_tir(mdev, tir->tirn); in mlx5e_destroy_tir() 61 mutex_unlock(&mdev->mlx5e_res.td.list_lock); in mlx5e_destroy_tir() 64 static int mlx5e_create_mkey(struct mlx5_core_dev *mdev, u32 pdn, in mlx5e_create_mkey() argument [all …]
|
/Linux-v5.4/drivers/dma/qcom/ |
D | hidma_mgmt_sys.c | 14 struct hidma_mgmt_dev *mdev; member 22 int (*get)(struct hidma_mgmt_dev *mdev); 23 int (*set)(struct hidma_mgmt_dev *mdev, u64 val); 27 static int get_##name(struct hidma_mgmt_dev *mdev) \ 29 return mdev->name; \ 31 static int set_##name(struct hidma_mgmt_dev *mdev, u64 val) \ 36 tmp = mdev->name; \ 37 mdev->name = val; \ 38 rc = hidma_mgmt_setup(mdev); \ 40 mdev->name = tmp; \ [all …]
|
/Linux-v5.4/drivers/mailbox/ |
D | mailbox-sti.c | 36 #define MBOX_BASE(mdev, inst) ((mdev)->base + ((inst) * 4)) argument 81 struct sti_mbox_device *mdev; member 89 struct sti_mbox_device *mdev = chan_info->mdev; in sti_mbox_channel_is_enabled() local 93 return mdev->enabled[instance] & BIT(channel); in sti_mbox_channel_is_enabled() 122 struct sti_mbox_device *mdev = chan_info->mdev; in sti_mbox_enable_channel() local 126 void __iomem *base = MBOX_BASE(mdev, instance); in sti_mbox_enable_channel() 128 spin_lock_irqsave(&mdev->lock, flags); in sti_mbox_enable_channel() 129 mdev->enabled[instance] |= BIT(channel); in sti_mbox_enable_channel() 131 spin_unlock_irqrestore(&mdev->lock, flags); in sti_mbox_enable_channel() 137 struct sti_mbox_device *mdev = chan_info->mdev; in sti_mbox_disable_channel() local [all …]
|
/Linux-v5.4/include/media/ |
D | media-device.h | 68 struct media_request *(*req_alloc)(struct media_device *mdev); 203 struct media_entity_enum *ent_enum, struct media_device *mdev) in media_entity_enum_init() argument 206 mdev->entity_internal_idx_max + 1); in media_entity_enum_init() 223 void media_device_init(struct media_device *mdev); 233 void media_device_cleanup(struct media_device *mdev); 279 int __must_check __media_device_register(struct media_device *mdev, 291 #define media_device_register(mdev) __media_device_register(mdev, THIS_MODULE) argument 301 void media_device_unregister(struct media_device *mdev); 339 int __must_check media_device_register_entity(struct media_device *mdev, 376 int __must_check media_device_register_entity_notify(struct media_device *mdev, [all …]
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/accel/ |
D | tls.h | 41 int mlx5_ktls_create_key(struct mlx5_core_dev *mdev, 44 void mlx5_ktls_destroy_key(struct mlx5_core_dev *mdev, u32 key_id); 46 static inline bool mlx5_accel_is_ktls_device(struct mlx5_core_dev *mdev) in mlx5_accel_is_ktls_device() argument 48 if (!MLX5_CAP_GEN(mdev, tls)) in mlx5_accel_is_ktls_device() 51 if (!MLX5_CAP_GEN(mdev, log_max_dek)) in mlx5_accel_is_ktls_device() 54 return MLX5_CAP_TLS(mdev, tls_1_2_aes_gcm_128); in mlx5_accel_is_ktls_device() 57 static inline bool mlx5e_ktls_type_check(struct mlx5_core_dev *mdev, in mlx5e_ktls_type_check() argument 63 return MLX5_CAP_TLS(mdev, tls_1_2_aes_gcm_128); in mlx5e_ktls_type_check() 71 mlx5_ktls_create_key(struct mlx5_core_dev *mdev, in mlx5_ktls_create_key() argument 75 mlx5_ktls_destroy_key(struct mlx5_core_dev *mdev, u32 key_id) {} in mlx5_ktls_destroy_key() argument [all …]
|
/Linux-v5.4/drivers/net/ethernet/marvell/octeontx2/af/ |
D | mbox.c | 22 struct otx2_mbox_dev *mdev = &mbox->dev[devid]; in otx2_mbox_reset() local 25 tx_hdr = mdev->mbase + mbox->tx_start; in otx2_mbox_reset() 26 rx_hdr = mdev->mbase + mbox->rx_start; in otx2_mbox_reset() 28 spin_lock(&mdev->mbox_lock); in otx2_mbox_reset() 29 mdev->msg_size = 0; in otx2_mbox_reset() 30 mdev->rsp_size = 0; in otx2_mbox_reset() 33 spin_unlock(&mdev->mbox_lock); in otx2_mbox_reset() 50 struct otx2_mbox_dev *mdev; in otx2_mbox_init() local 123 mdev = &mbox->dev[devid]; in otx2_mbox_init() 124 mdev->mbase = mbox->hwbase + (devid * MBOX_SIZE); in otx2_mbox_init() [all …]
|