Lines Matching full:hop

41 	int bit = ring->hop;  in ring_interrupt_index()
66 index = ring->hop; in ring_interrupt_active()
68 index = ring->hop + ring->nhi->hop_count; in ring_interrupt_active()
103 RING_TYPE(ring), ring->hop, in ring_interrupt_active()
131 io += ring->hop * 16; in ring_desc_base()
139 io += ring->hop * 32; in ring_options_base()
445 if (ring->hop < 0) { in nhi_alloc_hop()
455 ring->hop = i; in nhi_alloc_hop()
460 ring->hop = i; in nhi_alloc_hop()
467 if (ring->hop < 0 || ring->hop >= nhi->hop_count) { in nhi_alloc_hop()
468 dev_warn(&nhi->pdev->dev, "invalid hop: %d\n", ring->hop); in nhi_alloc_hop()
472 if (ring->is_tx && nhi->tx_rings[ring->hop]) { in nhi_alloc_hop()
473 dev_warn(&nhi->pdev->dev, "TX hop %d already allocated\n", in nhi_alloc_hop()
474 ring->hop); in nhi_alloc_hop()
477 } else if (!ring->is_tx && nhi->rx_rings[ring->hop]) { in nhi_alloc_hop()
478 dev_warn(&nhi->pdev->dev, "RX hop %d already allocated\n", in nhi_alloc_hop()
479 ring->hop); in nhi_alloc_hop()
485 nhi->tx_rings[ring->hop] = ring; in nhi_alloc_hop()
487 nhi->rx_rings[ring->hop] = ring; in nhi_alloc_hop()
495 static struct tb_ring *tb_ring_alloc(struct tb_nhi *nhi, u32 hop, int size, in tb_ring_alloc() argument
504 transmit ? "TX" : "RX", hop, size); in tb_ring_alloc()
516 ring->hop = hop; in tb_ring_alloc()
557 * @hop: HopID (ring) to allocate
561 struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size, in tb_ring_alloc_tx() argument
564 return tb_ring_alloc(nhi, hop, size, true, flags, 0, 0, NULL, NULL); in tb_ring_alloc_tx()
571 * @hop: HopID (ring) to allocate. Pass %-1 for automatic allocation.
581 struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size, in tb_ring_alloc_rx() argument
585 return tb_ring_alloc(nhi, hop, size, false, flags, sof_mask, eof_mask, in tb_ring_alloc_rx()
609 RING_TYPE(ring), ring->hop); in tb_ring_start()
658 RING_TYPE(ring), ring->hop); in tb_ring_stop()
663 RING_TYPE(ring), ring->hop); in tb_ring_stop()
706 ring->nhi->tx_rings[ring->hop] = NULL; in tb_ring_free()
708 ring->nhi->rx_rings[ring->hop] = NULL; in tb_ring_free()
712 RING_TYPE(ring), ring->hop); in tb_ring_free()
727 ring->hop); in tb_ring_free()
799 int hop = -1; in nhi_interrupt_work() local
815 if (++hop == nhi->hop_count) { in nhi_interrupt_work()
816 hop = 0; in nhi_interrupt_work()
824 hop); in nhi_interrupt_work()
828 ring = nhi->tx_rings[hop]; in nhi_interrupt_work()
830 ring = nhi->rx_rings[hop]; in nhi_interrupt_work()
835 hop); in nhi_interrupt_work()