Lines Matching defs:channel

15 /* Open a packet data online channel between the network layer and CP. */
79 /* Initialize wwan channel */
142 /* return true if channel is ready for use */
144 struct ipc_mem_channel *channel)
162 if (channel->state != IMEM_CHANNEL_RESERVED) {
164 "ch[%d]:invalid channel state %d,expected %d",
165 channel->channel_id, channel->state,
174 channel->channel_id, phase);
177 /* Check the full availability of the channel. */
178 if (channel->state != IMEM_CHANNEL_ACTIVE) {
179 dev_err(ipc_imem->dev, "ch[%d]: confused channel state %d",
180 channel->channel_id, channel->state);
194 * @channel: Channel instance.
197 struct ipc_mem_channel *channel)
206 * channel is already freed. Nothing to do.
215 if (channel->state == IMEM_CHANNEL_FREE) {
216 dev_err(ipc_imem->dev, "ch[%d]: invalid channel state %d",
217 channel->channel_id, channel->state);
224 if (channel->ul_pipe.old_tail != channel->ul_pipe.old_head) {
236 channel->ul_pipe.pipe_nr,
237 channel->ul_pipe.old_head,
238 channel->ul_pipe.old_tail);
248 &channel->dl_pipe, NULL, &tail);
250 if (tail != channel->dl_pipe.old_tail) {
262 channel->dl_pipe.pipe_nr,
263 channel->dl_pipe.old_head,
264 channel->dl_pipe.old_tail);
271 * between closing the pipe and updating the channel is closed. In this
273 * the channel state as CLOSING to aviod unnecessary interrupt
276 channel->state = IMEM_CHANNEL_CLOSING;
278 ipc_imem_pipe_close(ipc_imem, &channel->ul_pipe);
279 ipc_imem_pipe_close(ipc_imem, &channel->dl_pipe);
281 ipc_imem_channel_free(channel);
284 /* Open a PORT link to CP and return the channel */
288 struct ipc_mem_channel *channel;
305 channel = ipc_imem_channel_open(ipc_imem, ch_id, hp_id);
307 if (!channel) {
308 dev_err(ipc_imem->dev, "PORT channel id open failed");
312 return channel;
318 struct ipc_mem_channel *channel = ipc_cdev->channel;
322 if (!ipc_imem_is_channel_active(ipc_imem, channel) ||
332 skb_queue_tail(&channel->ul_list, skb);
337 skb_dequeue_tail(&channel->ul_list);
338 dev_err(ipc_cdev->dev, "channel id[%d] write failed\n",
339 ipc_cdev->channel->channel_id);
345 /* Open a SIO link to CP and return the channel instance */
348 struct ipc_mem_channel *channel;
356 /* Get a channel id as flash id and reserve it. */
363 "reservation of a flash channel id failed");
368 channel = &ipc_imem->channels[channel_id];
373 channel->state = IMEM_CHANNEL_FREE;
377 return channel;
399 /* Release a SIO channel link to CP. */
405 struct ipc_mem_channel *channel;
409 channel = ipc_imem->ipc_devlink->devlink_sio.channel;
423 if (channel->ul_pipe.old_tail != channel->ul_pipe.old_head) {
430 channel->ul_pipe.pipe_nr,
431 channel->ul_pipe.old_head,
432 channel->ul_pipe.old_tail);
437 &channel->dl_pipe, NULL, &tail);
439 if (tail != channel->dl_pipe.old_tail) {
446 channel->dl_pipe.pipe_nr,
447 channel->dl_pipe.old_head,
448 channel->dl_pipe.old_tail);
453 * between closing the pipe and updating the channel is closed. In this
455 * the channel state as CLOSING to aviod unnecessary interrupt
458 channel->state = IMEM_CHANNEL_CLOSING;
460 ipc_imem_pipe_cleanup(ipc_imem, &channel->ul_pipe);
461 ipc_imem_pipe_cleanup(ipc_imem, &channel->dl_pipe);
474 struct ipc_mem_channel *channel,
495 (&channel->ul_sem,
540 (&channel->ul_sem, msecs_to_jiffies(IPC_PSI_TRANSFER_TIMEOUT));
551 channel->channel_id,
558 /* Create the flash channel for the transfer of the images. */
575 struct ipc_mem_channel *channel;
580 channel = ipc_imem->ipc_devlink->devlink_sio.channel;
586 ret = ipc_imem_sys_psi_transfer(ipc_imem, channel, buf, count);
610 skb_queue_tail(&channel->ul_list, skb);
614 ret = wait_for_completion_interruptible(&channel->ul_sem);
619 channel->channel_id, ret);