/Linux-v5.4/drivers/staging/most/i2c/ |
D | i2c.c | 29 list_first_entry(ptr, struct mbo, list) 121 int ch_idx, struct mbo *mbo) in enqueue() argument 133 list_add_tail(&mbo->list, &dev->rx.list); in enqueue() 140 ret = i2c_master_send(dev->client, mbo->virt_address, in enqueue() 141 mbo->buffer_length); in enqueue() 143 mbo->processed_length = 0; in enqueue() 144 mbo->status = MBO_E_INVAL; in enqueue() 146 mbo->processed_length = mbo->buffer_length; in enqueue() 147 mbo->status = MBO_SUCCESS; in enqueue() 149 mbo->complete(mbo); in enqueue() [all …]
|
/Linux-v5.4/drivers/scsi/ |
D | aha1542.c | 264 int errstatus, mbi, mbo, mbistatus; in aha1542_interrupt() local 329 mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb); in aha1542_interrupt() 335 if (ccb[mbo].tarstat | ccb[mbo].hastat) in aha1542_interrupt() 337 ccb[mbo].tarstat + ((int) ccb[mbo].hastat << 16), mb[mbi].status); in aha1542_interrupt() 344 shost_printk(KERN_DEBUG, sh, "...done %d %d\n", mbo, mbi); in aha1542_interrupt() 347 tmp_cmd = aha1542->int_cmds[mbo]; in aha1542_interrupt() 352 shost_printk(KERN_WARNING, sh, "tarstat=%x, hastat=%x idlun=%x ccb#=%d\n", ccb[mbo].tarstat, in aha1542_interrupt() 353 ccb[mbo].hastat, ccb[mbo].idlun, mbo); in aha1542_interrupt() 361 if (ccb[mbo].tarstat == 2) in aha1542_interrupt() 362 memcpy(tmp_cmd->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen], in aha1542_interrupt() [all …]
|
/Linux-v5.4/drivers/staging/most/ |
D | core.c | 100 struct mbo *_mbo = list_first_entry(ptr, struct mbo, list); \ 109 static void most_free_mbo_coherent(struct mbo *mbo) in most_free_mbo_coherent() argument 111 struct most_channel *c = mbo->context; in most_free_mbo_coherent() 115 c->iface->dma_free(mbo, coherent_buf_size); in most_free_mbo_coherent() 117 kfree(mbo->virt_address); in most_free_mbo_coherent() 118 kfree(mbo); in most_free_mbo_coherent() 130 struct mbo *mbo, *tmp; in flush_channel_fifos() local 136 list_for_each_entry_safe(mbo, tmp, &c->fifo, list) { in flush_channel_fifos() 137 list_del(&mbo->list); in flush_channel_fifos() 139 most_free_mbo_coherent(mbo); in flush_channel_fifos() [all …]
|
D | core.h | 176 struct mbo { struct 188 void (*complete)(struct mbo *mbo); argument 239 void *(*dma_alloc)(struct mbo *mbo, u32 size); 240 void (*dma_free)(struct mbo *mbo, u32 size); 244 struct mbo *mbo); 273 int (*rx_completion)(struct mbo *mbo); 294 void most_submit_mbo(struct mbo *mbo); 314 struct mbo *most_get_mbo(struct most_interface *iface, int channel_idx, 316 void most_put_mbo(struct mbo *mbo);
|
/Linux-v5.4/drivers/staging/most/dim2/ |
D | dim2.c | 153 struct mbo *mbo; in try_start_dim_transfer() local 171 mbo = list_first_entry(head, struct mbo, list); in try_start_dim_transfer() 172 buf_size = mbo->buffer_length; in try_start_dim_transfer() 179 BUG_ON(mbo->bus_address == 0); in try_start_dim_transfer() 180 if (!dim_enqueue_buffer(&hdm_ch->ch, mbo->bus_address, buf_size)) { in try_start_dim_transfer() 183 mbo->processed_length = 0; in try_start_dim_transfer() 184 mbo->status = MBO_E_INVAL; in try_start_dim_transfer() 185 mbo->complete(mbo); in try_start_dim_transfer() 231 static void retrieve_netinfo(struct dim2_hdm *dev, struct mbo *mbo) in retrieve_netinfo() argument 233 u8 *data = mbo->virt_address; in retrieve_netinfo() [all …]
|
/Linux-v5.4/drivers/staging/most/usb/ |
D | usb.c | 272 static int hdm_add_padding(struct most_dev *mdev, int channel, struct mbo *mbo) in hdm_add_padding() argument 280 num_frames = mbo->buffer_length / frame_size; in hdm_add_padding() 289 memmove(mbo->virt_address + j * USB_MTU, in hdm_add_padding() 290 mbo->virt_address + j * frame_size, in hdm_add_padding() 292 mbo->buffer_length = num_frames * USB_MTU; in hdm_add_padding() 306 struct mbo *mbo) in hdm_remove_padding() argument 314 num_frames = mbo->processed_length / USB_MTU; in hdm_remove_padding() 317 memmove(mbo->virt_address + frame_size * j, in hdm_remove_padding() 318 mbo->virt_address + USB_MTU * j, in hdm_remove_padding() 321 mbo->processed_length = frame_size * num_frames; in hdm_remove_padding() [all …]
|
/Linux-v5.4/drivers/staging/most/cdev/ |
D | cdev.c | 42 DECLARE_KFIFO_PTR(fifo, typeof(struct mbo *)); 56 static inline struct mbo *ch_get_mbo(struct comp_channel *c, struct mbo **mbo) in ch_get_mbo() argument 58 if (!kfifo_peek(&c->fifo, mbo)) { in ch_get_mbo() 59 *mbo = most_get_mbo(c->iface, c->channel_id, &comp.cc); in ch_get_mbo() 60 if (*mbo) in ch_get_mbo() 61 kfifo_in(&c->fifo, mbo, 1); in ch_get_mbo() 63 return *mbo; in ch_get_mbo() 87 struct mbo *mbo; in stop_channel() local 89 while (kfifo_out((struct kfifo *)&c->fifo, &mbo, 1)) in stop_channel() 90 most_put_mbo(mbo); in stop_channel() [all …]
|
/Linux-v5.4/drivers/staging/most/net/ |
D | net.c | 75 static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo) in skb_to_mamac() argument 77 u8 *buff = mbo->virt_address; in skb_to_mamac() 84 if (mbo->buffer_length < mdp_len) { in skb_to_mamac() 86 mbo->buffer_length, mdp_len); in skb_to_mamac() 122 mbo->buffer_length = mdp_len; in skb_to_mamac() 126 static int skb_to_mep(const struct sk_buff *skb, struct mbo *mbo) in skb_to_mep() argument 128 u8 *buff = mbo->virt_address; in skb_to_mep() 131 if (mbo->buffer_length < mep_len) { in skb_to_mep() 133 mbo->buffer_length, mep_len); in skb_to_mep() 148 mbo->buffer_length = mep_len; in skb_to_mep() [all …]
|
/Linux-v5.4/drivers/staging/most/sound/ |
D | sound.c | 190 static bool copy_data(struct channel *channel, struct mbo *mbo) in copy_data() argument 199 frames = mbo->processed_length / frame_bytes; in copy_data() 201 frames = mbo->buffer_length / frame_bytes; in copy_data() 205 mbo->virt_address, in copy_data() 211 mbo->virt_address + fr0 * frame_bytes, in copy_data() 242 struct mbo *mbo = NULL; in playback_thread() local 249 (mbo = most_get_mbo(channel->iface, channel->id, in playback_thread() 251 if (!mbo) in playback_thread() 255 period_elapsed = copy_data(channel, mbo); in playback_thread() 257 memset(mbo->virt_address, 0, mbo->buffer_length); in playback_thread() [all …]
|
/Linux-v5.4/drivers/staging/most/video/ |
D | video.c | 64 static inline struct mbo *get_top_mbo(struct most_video_dev *mdev) in get_top_mbo() 66 return list_first_entry(&mdev->pending_mbos, struct mbo, list); in get_top_mbo() 121 struct mbo *mbo, *tmp; in comp_vdev_close() local 134 list_for_each_entry_safe(mbo, tmp, &mdev->pending_mbos, list) { in comp_vdev_close() 135 list_del(&mbo->list); in comp_vdev_close() 137 most_put_mbo(mbo); in comp_vdev_close() 175 struct mbo *const mbo = get_top_mbo(mdev); in comp_vdev_read() local 176 int const rem = mbo->processed_length - fh->offs; in comp_vdev_read() 179 if (copy_to_user(buf, mbo->virt_address + fh->offs, cnt)) { in comp_vdev_read() 194 list_del(&mbo->list); in comp_vdev_read() [all …]
|