pch 305 drivers/dma/k3dma.c unsigned pch, pch_alloc = 0; pch 325 drivers/dma/k3dma.c for (pch = 0; pch < d->dma_channels; pch++) { pch 326 drivers/dma/k3dma.c if (!(d->dma_channel_mask & (1 << pch))) pch 329 drivers/dma/k3dma.c p = &d->phy[pch]; pch 336 drivers/dma/k3dma.c pch_alloc |= 1 << pch; pch 340 drivers/dma/k3dma.c dev_dbg(d->slave.dev, "pchan %u: alloc vchan %p\n", pch, &c->vc); pch 345 drivers/dma/k3dma.c for (pch = 0; pch < d->dma_channels; pch++) { pch 346 drivers/dma/k3dma.c if (!(d->dma_channel_mask & (1 << pch))) pch 349 drivers/dma/k3dma.c if (pch_alloc & (1 << pch)) { pch 350 drivers/dma/k3dma.c p = &d->phy[pch]; pch 1547 drivers/dma/pl330.c struct dma_pl330_chan *pch; pch 1553 drivers/dma/pl330.c pch = desc->pchan; pch 1556 drivers/dma/pl330.c if (!pch) pch 1559 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 1563 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 1565 drivers/dma/pl330.c tasklet_schedule(&pch->task); pch 2030 drivers/dma/pl330.c static inline void fill_queue(struct dma_pl330_chan *pch) pch 2035 drivers/dma/pl330.c list_for_each_entry(desc, &pch->work_list, node) { pch 2041 drivers/dma/pl330.c ret = pl330_submit_req(pch->thread, desc); pch 2050 drivers/dma/pl330.c dev_err(pch->dmac->ddma.dev, "%s:%d Bad Desc(%d)\n", pch 2052 drivers/dma/pl330.c tasklet_schedule(&pch->task); pch 2059 drivers/dma/pl330.c struct dma_pl330_chan *pch = (struct dma_pl330_chan *)data; pch 2064 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 2067 drivers/dma/pl330.c list_for_each_entry_safe(desc, _dt, &pch->work_list, node) pch 2069 drivers/dma/pl330.c if (!pch->cyclic) pch 2071 drivers/dma/pl330.c list_move_tail(&desc->node, &pch->completed_list); pch 2075 drivers/dma/pl330.c fill_queue(pch); pch 2077 drivers/dma/pl330.c if (list_empty(&pch->work_list)) { pch 2078 drivers/dma/pl330.c spin_lock(&pch->thread->dmac->lock); pch 2079 drivers/dma/pl330.c _stop(pch->thread); pch 2080 drivers/dma/pl330.c spin_unlock(&pch->thread->dmac->lock); pch 2082 drivers/dma/pl330.c pch->active = false; pch 2085 drivers/dma/pl330.c spin_lock(&pch->thread->dmac->lock); pch 2086 drivers/dma/pl330.c _start(pch->thread); pch 2087 drivers/dma/pl330.c spin_unlock(&pch->thread->dmac->lock); pch 2090 drivers/dma/pl330.c while (!list_empty(&pch->completed_list)) { pch 2093 drivers/dma/pl330.c desc = list_first_entry(&pch->completed_list, pch 2098 drivers/dma/pl330.c if (pch->cyclic) { pch 2100 drivers/dma/pl330.c list_move_tail(&desc->node, &pch->work_list); pch 2102 drivers/dma/pl330.c pch->active = true; pch 2103 drivers/dma/pl330.c spin_lock(&pch->thread->dmac->lock); pch 2104 drivers/dma/pl330.c _start(pch->thread); pch 2105 drivers/dma/pl330.c spin_unlock(&pch->thread->dmac->lock); pch 2110 drivers/dma/pl330.c list_move_tail(&desc->node, &pch->dmac->desc_pool); pch 2116 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 2118 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 2121 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 2125 drivers/dma/pl330.c pm_runtime_mark_last_busy(pch->dmac->ddma.dev); pch 2126 drivers/dma/pl330.c pm_runtime_put_autosuspend(pch->dmac->ddma.dev); pch 2152 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2153 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2159 drivers/dma/pl330.c pch->cyclic = false; pch 2161 drivers/dma/pl330.c pch->thread = pl330_request_channel(pl330); pch 2162 drivers/dma/pl330.c if (!pch->thread) { pch 2167 drivers/dma/pl330.c tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch); pch 2193 drivers/dma/pl330.c static void pl330_unprep_slave_fifo(struct dma_pl330_chan *pch) pch 2195 drivers/dma/pl330.c if (pch->dir != DMA_NONE) pch 2196 drivers/dma/pl330.c dma_unmap_resource(pch->chan.device->dev, pch->fifo_dma, pch 2197 drivers/dma/pl330.c 1 << pch->burst_sz, pch->dir, 0); pch 2198 drivers/dma/pl330.c pch->dir = DMA_NONE; pch 2202 drivers/dma/pl330.c static bool pl330_prep_slave_fifo(struct dma_pl330_chan *pch, pch 2205 drivers/dma/pl330.c struct device *dev = pch->chan.device->dev; pch 2209 drivers/dma/pl330.c if (pch->dir == dma_dir) pch 2212 drivers/dma/pl330.c pl330_unprep_slave_fifo(pch); pch 2213 drivers/dma/pl330.c pch->fifo_dma = dma_map_resource(dev, pch->fifo_addr, pch 2214 drivers/dma/pl330.c 1 << pch->burst_sz, dma_dir, 0); pch 2215 drivers/dma/pl330.c if (dma_mapping_error(dev, pch->fifo_dma)) pch 2218 drivers/dma/pl330.c pch->dir = dma_dir; pch 2238 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2240 drivers/dma/pl330.c pl330_unprep_slave_fifo(pch); pch 2243 drivers/dma/pl330.c pch->fifo_addr = slave_config->dst_addr; pch 2245 drivers/dma/pl330.c pch->burst_sz = __ffs(slave_config->dst_addr_width); pch 2246 drivers/dma/pl330.c pch->burst_len = fixup_burst_len(slave_config->dst_maxburst, pch 2247 drivers/dma/pl330.c pch->dmac->quirks); pch 2250 drivers/dma/pl330.c pch->fifo_addr = slave_config->src_addr; pch 2252 drivers/dma/pl330.c pch->burst_sz = __ffs(slave_config->src_addr_width); pch 2253 drivers/dma/pl330.c pch->burst_len = fixup_burst_len(slave_config->src_maxburst, pch 2254 drivers/dma/pl330.c pch->dmac->quirks); pch 2263 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2265 drivers/dma/pl330.c memcpy(&pch->slave_config, slave_config, sizeof(*slave_config)); pch 2272 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2275 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2279 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 2282 drivers/dma/pl330.c _stop(pch->thread); pch 2283 drivers/dma/pl330.c pch->thread->req[0].desc = NULL; pch 2284 drivers/dma/pl330.c pch->thread->req[1].desc = NULL; pch 2285 drivers/dma/pl330.c pch->thread->req_running = -1; pch 2288 drivers/dma/pl330.c power_down = pch->active; pch 2289 drivers/dma/pl330.c pch->active = false; pch 2292 drivers/dma/pl330.c list_for_each_entry(desc, &pch->submitted_list, node) { pch 2297 drivers/dma/pl330.c list_for_each_entry(desc, &pch->work_list , node) { pch 2302 drivers/dma/pl330.c list_splice_tail_init(&pch->submitted_list, &pl330->desc_pool); pch 2303 drivers/dma/pl330.c list_splice_tail_init(&pch->work_list, &pl330->desc_pool); pch 2304 drivers/dma/pl330.c list_splice_tail_init(&pch->completed_list, &pl330->desc_pool); pch 2305 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 2323 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2324 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2328 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 2331 drivers/dma/pl330.c _stop(pch->thread); pch 2334 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 2343 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2344 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2347 drivers/dma/pl330.c tasklet_kill(&pch->task); pch 2349 drivers/dma/pl330.c pm_runtime_get_sync(pch->dmac->ddma.dev); pch 2352 drivers/dma/pl330.c pl330_release_channel(pch->thread); pch 2353 drivers/dma/pl330.c pch->thread = NULL; pch 2355 drivers/dma/pl330.c if (pch->cyclic) pch 2356 drivers/dma/pl330.c list_splice_tail_init(&pch->work_list, &pch->dmac->desc_pool); pch 2359 drivers/dma/pl330.c pm_runtime_mark_last_busy(pch->dmac->ddma.dev); pch 2360 drivers/dma/pl330.c pm_runtime_put_autosuspend(pch->dmac->ddma.dev); pch 2361 drivers/dma/pl330.c pl330_unprep_slave_fifo(pch); pch 2364 drivers/dma/pl330.c static int pl330_get_current_xferred_count(struct dma_pl330_chan *pch, pch 2367 drivers/dma/pl330.c struct pl330_thread *thrd = pch->thread; pch 2368 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2381 drivers/dma/pl330.c pm_runtime_mark_last_busy(pch->dmac->ddma.dev); pch 2398 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2409 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 2410 drivers/dma/pl330.c spin_lock(&pch->thread->dmac->lock); pch 2412 drivers/dma/pl330.c if (pch->thread->req_running != -1) pch 2413 drivers/dma/pl330.c running = pch->thread->req[pch->thread->req_running].desc; pch 2415 drivers/dma/pl330.c last_enq = pch->thread->req[pch->thread->lstenq].desc; pch 2418 drivers/dma/pl330.c list_for_each_entry(desc, &pch->work_list, node) { pch 2423 drivers/dma/pl330.c pl330_get_current_xferred_count(pch, desc); pch 2453 drivers/dma/pl330.c spin_unlock(&pch->thread->dmac->lock); pch 2454 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 2464 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2467 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 2468 drivers/dma/pl330.c if (list_empty(&pch->work_list)) { pch 2474 drivers/dma/pl330.c WARN_ON(list_empty(&pch->submitted_list)); pch 2475 drivers/dma/pl330.c pch->active = true; pch 2476 drivers/dma/pl330.c pm_runtime_get_sync(pch->dmac->ddma.dev); pch 2478 drivers/dma/pl330.c list_splice_tail_init(&pch->submitted_list, &pch->work_list); pch 2479 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 2481 drivers/dma/pl330.c pl330_tasklet((unsigned long)pch); pch 2492 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(tx->chan); pch 2496 drivers/dma/pl330.c spin_lock_irqsave(&pch->lock, flags); pch 2501 drivers/dma/pl330.c if (pch->cyclic) { pch 2509 drivers/dma/pl330.c list_move_tail(&desc->node, &pch->submitted_list); pch 2514 drivers/dma/pl330.c list_add_tail(&last->node, &pch->submitted_list); pch 2515 drivers/dma/pl330.c spin_unlock_irqrestore(&pch->lock, flags); pch 2577 drivers/dma/pl330.c static struct dma_pl330_desc *pl330_get_desc(struct dma_pl330_chan *pch) pch 2579 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2580 drivers/dma/pl330.c u8 *peri_id = pch->chan.private; pch 2599 drivers/dma/pl330.c desc->pchan = pch; pch 2603 drivers/dma/pl330.c desc->peri = peri_id ? pch->chan.chan_id : 0; pch 2604 drivers/dma/pl330.c desc->rqcfg.pcfg = &pch->dmac->pcfg; pch 2606 drivers/dma/pl330.c dma_async_tx_descriptor_init(&desc->txd, &pch->chan); pch 2620 drivers/dma/pl330.c __pl330_prep_dma_memcpy(struct dma_pl330_chan *pch, dma_addr_t dst, pch 2623 drivers/dma/pl330.c struct dma_pl330_desc *desc = pl330_get_desc(pch); pch 2626 drivers/dma/pl330.c dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n", pch 2649 drivers/dma/pl330.c struct dma_pl330_chan *pch = desc->pchan; pch 2650 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2670 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2671 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2680 drivers/dma/pl330.c dev_err(pch->dmac->ddma.dev, "%s:%d Invalid dma direction\n", pch 2685 drivers/dma/pl330.c pl330_config_write(chan, &pch->slave_config, direction); pch 2687 drivers/dma/pl330.c if (!pl330_prep_slave_fifo(pch, direction)) pch 2691 drivers/dma/pl330.c desc = pl330_get_desc(pch); pch 2693 drivers/dma/pl330.c dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n", pch 2719 drivers/dma/pl330.c dst = pch->fifo_dma; pch 2724 drivers/dma/pl330.c src = pch->fifo_dma; pch 2732 drivers/dma/pl330.c desc->rqcfg.brst_size = pch->burst_sz; pch 2733 drivers/dma/pl330.c desc->rqcfg.brst_len = pch->burst_len; pch 2748 drivers/dma/pl330.c pch->cyclic = true; pch 2759 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2763 drivers/dma/pl330.c if (unlikely(!pch || !len)) pch 2766 drivers/dma/pl330.c pl330 = pch->dmac; pch 2768 drivers/dma/pl330.c desc = __pl330_prep_dma_memcpy(pch, dst, src, len); pch 2834 drivers/dma/pl330.c struct dma_pl330_chan *pch = to_pchan(chan); pch 2838 drivers/dma/pl330.c if (unlikely(!pch || !sgl || !sg_len)) pch 2841 drivers/dma/pl330.c pl330_config_write(chan, &pch->slave_config, direction); pch 2843 drivers/dma/pl330.c if (!pl330_prep_slave_fifo(pch, direction)) pch 2850 drivers/dma/pl330.c desc = pl330_get_desc(pch); pch 2852 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pch 2854 drivers/dma/pl330.c dev_err(pch->dmac->ddma.dev, pch 2870 drivers/dma/pl330.c fill_px(&desc->px, pch->fifo_dma, sg_dma_address(sg), pch 2875 drivers/dma/pl330.c fill_px(&desc->px, sg_dma_address(sg), pch->fifo_dma, pch 2879 drivers/dma/pl330.c desc->rqcfg.brst_size = pch->burst_sz; pch 2880 drivers/dma/pl330.c desc->rqcfg.brst_len = pch->burst_len; pch 2922 drivers/dma/pl330.c struct dma_pl330_chan *pch = &pl330->peripherals[pr]; pch 2924 drivers/dma/pl330.c if (!pch->thread || thrd->id != pch->thread->id) pch 2999 drivers/dma/pl330.c struct dma_pl330_chan *pch, *_p; pch 3093 drivers/dma/pl330.c pl330->peripherals = kcalloc(num_chan, sizeof(*pch), GFP_KERNEL); pch 3100 drivers/dma/pl330.c pch = &pl330->peripherals[i]; pch 3102 drivers/dma/pl330.c pch->chan.private = adev->dev.of_node; pch 3103 drivers/dma/pl330.c INIT_LIST_HEAD(&pch->submitted_list); pch 3104 drivers/dma/pl330.c INIT_LIST_HEAD(&pch->work_list); pch 3105 drivers/dma/pl330.c INIT_LIST_HEAD(&pch->completed_list); pch 3106 drivers/dma/pl330.c spin_lock_init(&pch->lock); pch 3107 drivers/dma/pl330.c pch->thread = NULL; pch 3108 drivers/dma/pl330.c pch->chan.device = pd; pch 3109 drivers/dma/pl330.c pch->dmac = pl330; pch 3110 drivers/dma/pl330.c pch->dir = DMA_NONE; pch 3113 drivers/dma/pl330.c list_add_tail(&pch->chan.device_node, &pd->channels); pch 3183 drivers/dma/pl330.c list_for_each_entry_safe(pch, _p, &pl330->ddma.channels, pch 3187 drivers/dma/pl330.c list_del(&pch->chan.device_node); pch 3190 drivers/dma/pl330.c if (pch->thread) { pch 3191 drivers/dma/pl330.c pl330_terminate_all(&pch->chan); pch 3192 drivers/dma/pl330.c pl330_free_chan_resources(&pch->chan); pch 3209 drivers/dma/pl330.c struct dma_pl330_chan *pch, *_p; pch 3226 drivers/dma/pl330.c list_for_each_entry_safe(pch, _p, &pl330->ddma.channels, pch 3230 drivers/dma/pl330.c list_del(&pch->chan.device_node); pch 3233 drivers/dma/pl330.c if (pch->thread) { pch 3234 drivers/dma/pl330.c pl330_terminate_all(&pch->chan); pch 3235 drivers/dma/pl330.c pl330_free_chan_resources(&pch->chan); pch 331 drivers/dma/sa11x0-dma.c unsigned pch, pch_alloc = 0; pch 353 drivers/dma/sa11x0-dma.c for (pch = 0; pch < NR_PHY_CHAN; pch++) { pch 354 drivers/dma/sa11x0-dma.c p = &d->phy[pch]; pch 361 drivers/dma/sa11x0-dma.c pch_alloc |= 1 << pch; pch 366 drivers/dma/sa11x0-dma.c dev_dbg(d->slave.dev, "pchan %u: alloc vchan %p\n", pch, &c->vc); pch 371 drivers/dma/sa11x0-dma.c for (pch = 0; pch < NR_PHY_CHAN; pch++) { pch 372 drivers/dma/sa11x0-dma.c if (pch_alloc & (1 << pch)) { pch 373 drivers/dma/sa11x0-dma.c p = &d->phy[pch]; pch 990 drivers/dma/sa11x0-dma.c unsigned pch; pch 995 drivers/dma/sa11x0-dma.c for (pch = 0; pch < NR_PHY_CHAN; pch++) pch 996 drivers/dma/sa11x0-dma.c sa11x0_dma_free_irq(pdev, pch, &d->phy[pch]); pch 1007 drivers/dma/sa11x0-dma.c unsigned pch; pch 1009 drivers/dma/sa11x0-dma.c for (pch = 0; pch < NR_PHY_CHAN; pch++) { pch 1010 drivers/dma/sa11x0-dma.c struct sa11x0_dma_phy *p = &d->phy[pch]; pch 1045 drivers/dma/sa11x0-dma.c unsigned pch; pch 1047 drivers/dma/sa11x0-dma.c for (pch = 0; pch < NR_PHY_CHAN; pch++) { pch 1048 drivers/dma/sa11x0-dma.c struct sa11x0_dma_phy *p = &d->phy[pch]; pch 221 drivers/dma/zx_dma.c unsigned pch, pch_alloc = 0; pch 258 drivers/dma/zx_dma.c for (pch = 0; pch < d->dma_channels; pch++) { pch 259 drivers/dma/zx_dma.c if (pch_alloc & (1 << pch)) { pch 260 drivers/dma/zx_dma.c p = &d->phy[pch]; pch 146 drivers/gpu/drm/i915/intel_pch.c struct pci_dev *pch = NULL; pch 159 drivers/gpu/drm/i915/intel_pch.c while ((pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, pch))) { pch 163 drivers/gpu/drm/i915/intel_pch.c if (pch->vendor != PCI_VENDOR_ID_INTEL) pch 166 drivers/gpu/drm/i915/intel_pch.c id = pch->device & INTEL_PCH_DEVICE_ID_MASK; pch 173 drivers/gpu/drm/i915/intel_pch.c } else if (intel_is_virt_pch(id, pch->subsystem_vendor, pch 174 drivers/gpu/drm/i915/intel_pch.c pch->subsystem_device)) { pch 192 drivers/gpu/drm/i915/intel_pch.c if (pch && !HAS_DISPLAY(dev_priv)) { pch 198 drivers/gpu/drm/i915/intel_pch.c if (!pch) pch 201 drivers/gpu/drm/i915/intel_pch.c pci_dev_put(pch); pch 565 drivers/isdn/mISDN/stack.c struct mISDNchannel *pch; pch 592 drivers/isdn/mISDN/stack.c pch = get_channel4id(ch->st, ch->nr); pch 593 drivers/isdn/mISDN/stack.c if (pch) { pch 595 drivers/isdn/mISDN/stack.c list_del(&pch->list); pch 597 drivers/isdn/mISDN/stack.c pch->ctrl(pch, CLOSE_CHANNEL, NULL); pch 598 drivers/isdn/mISDN/stack.c pch = ch->st->dev->teimgr; pch 599 drivers/isdn/mISDN/stack.c pch->ctrl(pch, CLOSE_CHANNEL, NULL); pch 605 drivers/isdn/mISDN/stack.c pch = ch->st->dev->teimgr; pch 606 drivers/isdn/mISDN/stack.c if (pch) { pch 607 drivers/isdn/mISDN/stack.c pch->ctrl(pch, CLOSE_CHANNEL, NULL); pch 259 drivers/net/ppp/ppp_generic.c static void ppp_channel_push(struct channel *pch); pch 261 drivers/net/ppp/ppp_generic.c struct channel *pch); pch 268 drivers/net/ppp/ppp_generic.c struct channel *pch); pch 283 drivers/net/ppp/ppp_generic.c static int ppp_connect_channel(struct channel *pch, int unit); pch 284 drivers/net/ppp/ppp_generic.c static int ppp_disconnect_channel(struct channel *pch); pch 285 drivers/net/ppp/ppp_generic.c static void ppp_destroy_channel(struct channel *pch); pch 615 drivers/net/ppp/ppp_generic.c struct channel *pch; pch 618 drivers/net/ppp/ppp_generic.c pch = PF_TO_CHANNEL(pf); pch 624 drivers/net/ppp/ppp_generic.c err = ppp_connect_channel(pch, unit); pch 628 drivers/net/ppp/ppp_generic.c err = ppp_disconnect_channel(pch); pch 632 drivers/net/ppp/ppp_generic.c down_read(&pch->chan_sem); pch 633 drivers/net/ppp/ppp_generic.c chan = pch->chan; pch 637 drivers/net/ppp/ppp_generic.c up_read(&pch->chan_sem); pch 1623 drivers/net/ppp/ppp_generic.c struct channel *pch; pch 1640 drivers/net/ppp/ppp_generic.c pch = list_entry(list, struct channel, clist); pch 1642 drivers/net/ppp/ppp_generic.c spin_lock(&pch->downl); pch 1643 drivers/net/ppp/ppp_generic.c if (pch->chan) { pch 1644 drivers/net/ppp/ppp_generic.c if (pch->chan->ops->start_xmit(pch->chan, skb)) pch 1651 drivers/net/ppp/ppp_generic.c spin_unlock(&pch->downl); pch 1687 drivers/net/ppp/ppp_generic.c struct channel *pch; pch 1701 drivers/net/ppp/ppp_generic.c list_for_each_entry(pch, &ppp->channels, clist) { pch 1702 drivers/net/ppp/ppp_generic.c if (pch->chan) { pch 1703 drivers/net/ppp/ppp_generic.c pch->avail = 1; pch 1705 drivers/net/ppp/ppp_generic.c pch->speed = pch->chan->speed; pch 1707 drivers/net/ppp/ppp_generic.c pch->avail = 0; pch 1709 drivers/net/ppp/ppp_generic.c if (pch->avail) { pch 1710 drivers/net/ppp/ppp_generic.c if (skb_queue_empty(&pch->file.xq) || pch 1711 drivers/net/ppp/ppp_generic.c !pch->had_frag) { pch 1712 drivers/net/ppp/ppp_generic.c if (pch->speed == 0) pch 1715 drivers/net/ppp/ppp_generic.c totspeed += pch->speed; pch 1717 drivers/net/ppp/ppp_generic.c pch->avail = 2; pch 1721 drivers/net/ppp/ppp_generic.c if (!pch->had_frag && i < ppp->nxchan) pch 1764 drivers/net/ppp/ppp_generic.c pch = list_entry(list, struct channel, clist); pch 1766 drivers/net/ppp/ppp_generic.c if (!pch->avail) pch 1773 drivers/net/ppp/ppp_generic.c if (pch->avail == 1) { pch 1777 drivers/net/ppp/ppp_generic.c pch->avail = 1; pch 1781 drivers/net/ppp/ppp_generic.c spin_lock(&pch->downl); pch 1782 drivers/net/ppp/ppp_generic.c if (pch->chan == NULL) { pch 1784 drivers/net/ppp/ppp_generic.c if (pch->speed == 0) pch 1787 drivers/net/ppp/ppp_generic.c totspeed -= pch->speed; pch 1789 drivers/net/ppp/ppp_generic.c spin_unlock(&pch->downl); pch 1790 drivers/net/ppp/ppp_generic.c pch->avail = 0; pch 1807 drivers/net/ppp/ppp_generic.c if (pch->speed == 0) { pch 1815 drivers/net/ppp/ppp_generic.c ((totspeed*totfree)/pch->speed)) - hdrlen; pch 1817 drivers/net/ppp/ppp_generic.c flen += ((totfree - nzero)*pch->speed)/totspeed; pch 1818 drivers/net/ppp/ppp_generic.c nbigger -= ((totfree - nzero)*pch->speed)/ pch 1839 drivers/net/ppp/ppp_generic.c pch->avail = 2; pch 1840 drivers/net/ppp/ppp_generic.c spin_unlock(&pch->downl); pch 1849 drivers/net/ppp/ppp_generic.c mtu = pch->chan->mtu - (hdrlen - 2); pch 1876 drivers/net/ppp/ppp_generic.c chan = pch->chan; pch 1877 drivers/net/ppp/ppp_generic.c if (!skb_queue_empty(&pch->file.xq) || pch 1879 drivers/net/ppp/ppp_generic.c skb_queue_tail(&pch->file.xq, frag); pch 1880 drivers/net/ppp/ppp_generic.c pch->had_frag = 1; pch 1885 drivers/net/ppp/ppp_generic.c spin_unlock(&pch->downl); pch 1892 drivers/net/ppp/ppp_generic.c spin_unlock(&pch->downl); pch 1902 drivers/net/ppp/ppp_generic.c static void __ppp_channel_push(struct channel *pch) pch 1907 drivers/net/ppp/ppp_generic.c spin_lock(&pch->downl); pch 1908 drivers/net/ppp/ppp_generic.c if (pch->chan) { pch 1909 drivers/net/ppp/ppp_generic.c while (!skb_queue_empty(&pch->file.xq)) { pch 1910 drivers/net/ppp/ppp_generic.c skb = skb_dequeue(&pch->file.xq); pch 1911 drivers/net/ppp/ppp_generic.c if (!pch->chan->ops->start_xmit(pch->chan, skb)) { pch 1913 drivers/net/ppp/ppp_generic.c skb_queue_head(&pch->file.xq, skb); pch 1919 drivers/net/ppp/ppp_generic.c skb_queue_purge(&pch->file.xq); pch 1921 drivers/net/ppp/ppp_generic.c spin_unlock(&pch->downl); pch 1923 drivers/net/ppp/ppp_generic.c if (skb_queue_empty(&pch->file.xq)) { pch 1924 drivers/net/ppp/ppp_generic.c ppp = pch->ppp; pch 1930 drivers/net/ppp/ppp_generic.c static void ppp_channel_push(struct channel *pch) pch 1932 drivers/net/ppp/ppp_generic.c read_lock_bh(&pch->upl); pch 1933 drivers/net/ppp/ppp_generic.c if (pch->ppp) { pch 1934 drivers/net/ppp/ppp_generic.c (*this_cpu_ptr(pch->ppp->xmit_recursion))++; pch 1935 drivers/net/ppp/ppp_generic.c __ppp_channel_push(pch); pch 1936 drivers/net/ppp/ppp_generic.c (*this_cpu_ptr(pch->ppp->xmit_recursion))--; pch 1938 drivers/net/ppp/ppp_generic.c __ppp_channel_push(pch); pch 1940 drivers/net/ppp/ppp_generic.c read_unlock_bh(&pch->upl); pch 1954 drivers/net/ppp/ppp_generic.c ppp_do_recv(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) pch 1958 drivers/net/ppp/ppp_generic.c ppp_receive_frame(ppp, skb, pch); pch 2007 drivers/net/ppp/ppp_generic.c struct channel *pch = chan->ppp; pch 2010 drivers/net/ppp/ppp_generic.c if (!pch) { pch 2015 drivers/net/ppp/ppp_generic.c read_lock_bh(&pch->upl); pch 2018 drivers/net/ppp/ppp_generic.c if (pch->ppp) { pch 2019 drivers/net/ppp/ppp_generic.c ++pch->ppp->dev->stats.rx_length_errors; pch 2020 drivers/net/ppp/ppp_generic.c ppp_receive_error(pch->ppp); pch 2026 drivers/net/ppp/ppp_generic.c if (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) { pch 2028 drivers/net/ppp/ppp_generic.c skb_queue_tail(&pch->file.rq, skb); pch 2030 drivers/net/ppp/ppp_generic.c while (pch->file.rq.qlen > PPP_MAX_RQLEN && pch 2031 drivers/net/ppp/ppp_generic.c (skb = skb_dequeue(&pch->file.rq))) pch 2033 drivers/net/ppp/ppp_generic.c wake_up_interruptible(&pch->file.rwait); pch 2035 drivers/net/ppp/ppp_generic.c ppp_do_recv(pch->ppp, skb, pch); pch 2039 drivers/net/ppp/ppp_generic.c read_unlock_bh(&pch->upl); pch 2046 drivers/net/ppp/ppp_generic.c struct channel *pch = chan->ppp; pch 2049 drivers/net/ppp/ppp_generic.c if (!pch) pch 2052 drivers/net/ppp/ppp_generic.c read_lock_bh(&pch->upl); pch 2053 drivers/net/ppp/ppp_generic.c if (pch->ppp) { pch 2058 drivers/net/ppp/ppp_generic.c ppp_do_recv(pch->ppp, skb, pch); pch 2061 drivers/net/ppp/ppp_generic.c read_unlock_bh(&pch->upl); pch 2069 drivers/net/ppp/ppp_generic.c ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) pch 2077 drivers/net/ppp/ppp_generic.c ppp_receive_mp_frame(ppp, skb, pch); pch 2313 drivers/net/ppp/ppp_generic.c ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) pch 2351 drivers/net/ppp/ppp_generic.c pch->lastseq = seq; pch 2602 drivers/net/ppp/ppp_generic.c struct channel *pch; pch 2605 drivers/net/ppp/ppp_generic.c pch = kzalloc(sizeof(struct channel), GFP_KERNEL); pch 2606 drivers/net/ppp/ppp_generic.c if (!pch) pch 2611 drivers/net/ppp/ppp_generic.c pch->ppp = NULL; pch 2612 drivers/net/ppp/ppp_generic.c pch->chan = chan; pch 2613 drivers/net/ppp/ppp_generic.c pch->chan_net = get_net(net); pch 2614 drivers/net/ppp/ppp_generic.c chan->ppp = pch; pch 2615 drivers/net/ppp/ppp_generic.c init_ppp_file(&pch->file, CHANNEL); pch 2616 drivers/net/ppp/ppp_generic.c pch->file.hdrlen = chan->hdrlen; pch 2618 drivers/net/ppp/ppp_generic.c pch->lastseq = -1; pch 2620 drivers/net/ppp/ppp_generic.c init_rwsem(&pch->chan_sem); pch 2621 drivers/net/ppp/ppp_generic.c spin_lock_init(&pch->downl); pch 2622 drivers/net/ppp/ppp_generic.c rwlock_init(&pch->upl); pch 2625 drivers/net/ppp/ppp_generic.c pch->file.index = ++pn->last_channel_index; pch 2626 drivers/net/ppp/ppp_generic.c list_add(&pch->list, &pn->new_channels); pch 2638 drivers/net/ppp/ppp_generic.c struct channel *pch = chan->ppp; pch 2640 drivers/net/ppp/ppp_generic.c if (pch) pch 2641 drivers/net/ppp/ppp_generic.c return pch->file.index; pch 2650 drivers/net/ppp/ppp_generic.c struct channel *pch = chan->ppp; pch 2653 drivers/net/ppp/ppp_generic.c if (pch) { pch 2654 drivers/net/ppp/ppp_generic.c read_lock_bh(&pch->upl); pch 2655 drivers/net/ppp/ppp_generic.c if (pch->ppp) pch 2656 drivers/net/ppp/ppp_generic.c unit = pch->ppp->file.index; pch 2657 drivers/net/ppp/ppp_generic.c read_unlock_bh(&pch->upl); pch 2667 drivers/net/ppp/ppp_generic.c struct channel *pch = chan->ppp; pch 2670 drivers/net/ppp/ppp_generic.c if (pch) { pch 2671 drivers/net/ppp/ppp_generic.c read_lock_bh(&pch->upl); pch 2672 drivers/net/ppp/ppp_generic.c if (pch->ppp && pch->ppp->dev) pch 2673 drivers/net/ppp/ppp_generic.c name = pch->ppp->dev->name; pch 2674 drivers/net/ppp/ppp_generic.c read_unlock_bh(&pch->upl); pch 2687 drivers/net/ppp/ppp_generic.c struct channel *pch = chan->ppp; pch 2690 drivers/net/ppp/ppp_generic.c if (!pch) pch 2699 drivers/net/ppp/ppp_generic.c down_write(&pch->chan_sem); pch 2700 drivers/net/ppp/ppp_generic.c spin_lock_bh(&pch->downl); pch 2701 drivers/net/ppp/ppp_generic.c pch->chan = NULL; pch 2702 drivers/net/ppp/ppp_generic.c spin_unlock_bh(&pch->downl); pch 2703 drivers/net/ppp/ppp_generic.c up_write(&pch->chan_sem); pch 2704 drivers/net/ppp/ppp_generic.c ppp_disconnect_channel(pch); pch 2706 drivers/net/ppp/ppp_generic.c pn = ppp_pernet(pch->chan_net); pch 2708 drivers/net/ppp/ppp_generic.c list_del(&pch->list); pch 2711 drivers/net/ppp/ppp_generic.c pch->file.dead = 1; pch 2712 drivers/net/ppp/ppp_generic.c wake_up_interruptible(&pch->file.rwait); pch 2713 drivers/net/ppp/ppp_generic.c if (refcount_dec_and_test(&pch->file.refcnt)) pch 2714 drivers/net/ppp/ppp_generic.c ppp_destroy_channel(pch); pch 2724 drivers/net/ppp/ppp_generic.c struct channel *pch = chan->ppp; pch 2726 drivers/net/ppp/ppp_generic.c if (!pch) pch 2728 drivers/net/ppp/ppp_generic.c ppp_channel_push(pch); pch 3153 drivers/net/ppp/ppp_generic.c struct channel *pch; pch 3155 drivers/net/ppp/ppp_generic.c list_for_each_entry(pch, &pn->new_channels, list) { pch 3156 drivers/net/ppp/ppp_generic.c if (pch->file.index == unit) { pch 3157 drivers/net/ppp/ppp_generic.c list_move(&pch->list, &pn->all_channels); pch 3158 drivers/net/ppp/ppp_generic.c return pch; pch 3162 drivers/net/ppp/ppp_generic.c list_for_each_entry(pch, &pn->all_channels, list) { pch 3163 drivers/net/ppp/ppp_generic.c if (pch->file.index == unit) pch 3164 drivers/net/ppp/ppp_generic.c return pch; pch 3174 drivers/net/ppp/ppp_generic.c ppp_connect_channel(struct channel *pch, int unit) pch 3181 drivers/net/ppp/ppp_generic.c pn = ppp_pernet(pch->chan_net); pch 3187 drivers/net/ppp/ppp_generic.c write_lock_bh(&pch->upl); pch 3189 drivers/net/ppp/ppp_generic.c if (pch->ppp) pch 3193 drivers/net/ppp/ppp_generic.c spin_lock_bh(&pch->downl); pch 3194 drivers/net/ppp/ppp_generic.c if (!pch->chan) { pch 3196 drivers/net/ppp/ppp_generic.c spin_unlock_bh(&pch->downl); pch 3201 drivers/net/ppp/ppp_generic.c spin_unlock_bh(&pch->downl); pch 3202 drivers/net/ppp/ppp_generic.c if (pch->file.hdrlen > ppp->file.hdrlen) pch 3203 drivers/net/ppp/ppp_generic.c ppp->file.hdrlen = pch->file.hdrlen; pch 3204 drivers/net/ppp/ppp_generic.c hdrlen = pch->file.hdrlen + 2; /* for protocol bytes */ pch 3207 drivers/net/ppp/ppp_generic.c list_add_tail(&pch->clist, &ppp->channels); pch 3209 drivers/net/ppp/ppp_generic.c pch->ppp = ppp; pch 3215 drivers/net/ppp/ppp_generic.c write_unlock_bh(&pch->upl); pch 3225 drivers/net/ppp/ppp_generic.c ppp_disconnect_channel(struct channel *pch) pch 3230 drivers/net/ppp/ppp_generic.c write_lock_bh(&pch->upl); pch 3231 drivers/net/ppp/ppp_generic.c ppp = pch->ppp; pch 3232 drivers/net/ppp/ppp_generic.c pch->ppp = NULL; pch 3233 drivers/net/ppp/ppp_generic.c write_unlock_bh(&pch->upl); pch 3237 drivers/net/ppp/ppp_generic.c list_del(&pch->clist); pch 3251 drivers/net/ppp/ppp_generic.c static void ppp_destroy_channel(struct channel *pch) pch 3253 drivers/net/ppp/ppp_generic.c put_net(pch->chan_net); pch 3254 drivers/net/ppp/ppp_generic.c pch->chan_net = NULL; pch 3258 drivers/net/ppp/ppp_generic.c if (!pch->file.dead) { pch 3260 drivers/net/ppp/ppp_generic.c pr_err("ppp: destroying undead channel %p !\n", pch); pch 3263 drivers/net/ppp/ppp_generic.c skb_queue_purge(&pch->file.xq); pch 3264 drivers/net/ppp/ppp_generic.c skb_queue_purge(&pch->file.rq); pch 3265 drivers/net/ppp/ppp_generic.c kfree(pch); pch 4504 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c u8 *pbuf, *pch; pch 4527 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c pch = strsep(&ptmp, delim); pch 4528 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if ((pch == NULL) || (strlen(pch) == 0)) { pch 4534 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (strcmp(pch, "bton") == 0) pch 4537 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (strcmp(pch, "btoff") == 0) pch 4540 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if (strcmp(pch, "h2c") == 0) { pch 4550 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c pch = strsep(&ptmp, delim); pch 4551 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c if ((pch == NULL) || (strlen(pch) == 0)) pch 4554 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c sscanf(pch, "%x", &tmp); pch 156 tools/bpf/bpftool/perf.c const char *pch; pch 160 tools/bpf/bpftool/perf.c pch = fpath + 5; pch 161 tools/bpf/bpftool/perf.c if (*pch == '\0') pch 165 tools/bpf/bpftool/perf.c pch++; pch 166 tools/bpf/bpftool/perf.c while (isdigit(*pch)) { pch 167 tools/bpf/bpftool/perf.c pid = pid * 10 + *pch - '0'; pch 168 tools/bpf/bpftool/perf.c pch++; pch 170 tools/bpf/bpftool/perf.c if (*pch == '\0') pch 172 tools/bpf/bpftool/perf.c if (*pch != '/') pch 176 tools/bpf/bpftool/perf.c pch++; pch 177 tools/bpf/bpftool/perf.c if (strncmp(pch, "fd", 2)) pch 179 tools/bpf/bpftool/perf.c pch += 2; pch 180 tools/bpf/bpftool/perf.c if (*pch == '\0') pch 182 tools/bpf/bpftool/perf.c if (*pch != '/') pch 186 tools/bpf/bpftool/perf.c pch++; pch 187 tools/bpf/bpftool/perf.c while (isdigit(*pch)) { pch 188 tools/bpf/bpftool/perf.c fd = fd * 10 + *pch - '0'; pch 189 tools/bpf/bpftool/perf.c pch++; pch 191 tools/bpf/bpftool/perf.c if (*pch != '\0')