Lines Matching full:hop
51 int bit = ring->hop; in ring_interrupt_index()
76 index = ring->hop; in ring_interrupt_active()
78 index = ring->hop + ring->nhi->hop_count; in ring_interrupt_active()
116 RING_TYPE(ring), ring->hop, in ring_interrupt_active()
144 io += ring->hop * 16; in ring_desc_base()
152 io += ring->hop * 32; in ring_options_base()
481 if (ring->hop < 0) { in nhi_alloc_hop()
491 ring->hop = i; in nhi_alloc_hop()
496 ring->hop = i; in nhi_alloc_hop()
503 if (ring->hop > 0 && ring->hop < start_hop) { in nhi_alloc_hop()
504 dev_warn(&nhi->pdev->dev, "invalid hop: %d\n", ring->hop); in nhi_alloc_hop()
508 if (ring->hop < 0 || ring->hop >= nhi->hop_count) { in nhi_alloc_hop()
509 dev_warn(&nhi->pdev->dev, "invalid hop: %d\n", ring->hop); in nhi_alloc_hop()
513 if (ring->is_tx && nhi->tx_rings[ring->hop]) { in nhi_alloc_hop()
514 dev_warn(&nhi->pdev->dev, "TX hop %d already allocated\n", in nhi_alloc_hop()
515 ring->hop); in nhi_alloc_hop()
518 } else if (!ring->is_tx && nhi->rx_rings[ring->hop]) { in nhi_alloc_hop()
519 dev_warn(&nhi->pdev->dev, "RX hop %d already allocated\n", in nhi_alloc_hop()
520 ring->hop); in nhi_alloc_hop()
526 nhi->tx_rings[ring->hop] = ring; in nhi_alloc_hop()
528 nhi->rx_rings[ring->hop] = ring; in nhi_alloc_hop()
536 static struct tb_ring *tb_ring_alloc(struct tb_nhi *nhi, u32 hop, int size, in tb_ring_alloc() argument
545 transmit ? "TX" : "RX", hop, size); in tb_ring_alloc()
557 ring->hop = hop; in tb_ring_alloc()
599 * @hop: HopID (ring) to allocate
603 struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size, in tb_ring_alloc_tx() argument
606 return tb_ring_alloc(nhi, hop, size, true, flags, 0, 0, 0, NULL, NULL); in tb_ring_alloc_tx()
613 * @hop: HopID (ring) to allocate. Pass %-1 for automatic allocation.
624 struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size, in tb_ring_alloc_rx() argument
629 return tb_ring_alloc(nhi, hop, size, false, flags, e2e_tx_hop, sof_mask, eof_mask, in tb_ring_alloc_rx()
654 RING_TYPE(ring), ring->hop); in tb_ring_start()
684 u32 hop; in tb_ring_start() local
686 hop = ring->e2e_tx_hop << REG_RX_OPTIONS_E2E_HOP_SHIFT; in tb_ring_start()
687 hop &= REG_RX_OPTIONS_E2E_HOP_MASK; in tb_ring_start()
688 flags |= hop; in tb_ring_start()
692 RING_TYPE(ring), ring->hop, ring->e2e_tx_hop); in tb_ring_start()
695 RING_TYPE(ring), ring->hop); in tb_ring_start()
729 RING_TYPE(ring), ring->hop); in tb_ring_stop()
734 RING_TYPE(ring), ring->hop); in tb_ring_stop()
777 ring->nhi->tx_rings[ring->hop] = NULL; in tb_ring_free()
779 ring->nhi->rx_rings[ring->hop] = NULL; in tb_ring_free()
783 RING_TYPE(ring), ring->hop); in tb_ring_free()
798 ring->hop); in tb_ring_free()
870 int hop = -1; in nhi_interrupt_work() local
886 if (++hop == nhi->hop_count) { in nhi_interrupt_work()
887 hop = 0; in nhi_interrupt_work()
895 hop); in nhi_interrupt_work()
899 ring = nhi->tx_rings[hop]; in nhi_interrupt_work()
901 ring = nhi->rx_rings[hop]; in nhi_interrupt_work()
906 hop); in nhi_interrupt_work()