Lines Matching full:hop
55 int bit = ring->hop; in ring_interrupt_index()
101 index = ring->hop; in ring_interrupt_active()
103 index = ring->hop + ring->nhi->hop_count; in ring_interrupt_active()
148 RING_TYPE(ring), ring->hop, in ring_interrupt_active()
180 io += ring->hop * 16; in ring_desc_base()
188 io += ring->hop * 32; in ring_options_base()
520 if (ring->hop < 0) { in nhi_alloc_hop()
530 ring->hop = i; in nhi_alloc_hop()
535 ring->hop = i; in nhi_alloc_hop()
542 if (ring->hop > 0 && ring->hop < start_hop) { in nhi_alloc_hop()
543 dev_warn(&nhi->pdev->dev, "invalid hop: %d\n", ring->hop); in nhi_alloc_hop()
547 if (ring->hop < 0 || ring->hop >= nhi->hop_count) { in nhi_alloc_hop()
548 dev_warn(&nhi->pdev->dev, "invalid hop: %d\n", ring->hop); in nhi_alloc_hop()
552 if (ring->is_tx && nhi->tx_rings[ring->hop]) { in nhi_alloc_hop()
553 dev_warn(&nhi->pdev->dev, "TX hop %d already allocated\n", in nhi_alloc_hop()
554 ring->hop); in nhi_alloc_hop()
558 if (!ring->is_tx && nhi->rx_rings[ring->hop]) { in nhi_alloc_hop()
559 dev_warn(&nhi->pdev->dev, "RX hop %d already allocated\n", in nhi_alloc_hop()
560 ring->hop); in nhi_alloc_hop()
566 nhi->tx_rings[ring->hop] = ring; in nhi_alloc_hop()
568 nhi->rx_rings[ring->hop] = ring; in nhi_alloc_hop()
576 static struct tb_ring *tb_ring_alloc(struct tb_nhi *nhi, u32 hop, int size, in tb_ring_alloc() argument
585 transmit ? "TX" : "RX", hop, size); in tb_ring_alloc()
597 ring->hop = hop; in tb_ring_alloc()
639 * @hop: HopID (ring) to allocate
643 struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size, in tb_ring_alloc_tx() argument
646 return tb_ring_alloc(nhi, hop, size, true, flags, 0, 0, 0, NULL, NULL); in tb_ring_alloc_tx()
653 * @hop: HopID (ring) to allocate. Pass %-1 for automatic allocation.
664 struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size, in tb_ring_alloc_rx() argument
669 return tb_ring_alloc(nhi, hop, size, false, flags, e2e_tx_hop, sof_mask, eof_mask, in tb_ring_alloc_rx()
694 RING_TYPE(ring), ring->hop); in tb_ring_start()
724 u32 hop; in tb_ring_start() local
726 hop = ring->e2e_tx_hop << REG_RX_OPTIONS_E2E_HOP_SHIFT; in tb_ring_start()
727 hop &= REG_RX_OPTIONS_E2E_HOP_MASK; in tb_ring_start()
728 flags |= hop; in tb_ring_start()
732 RING_TYPE(ring), ring->hop, ring->e2e_tx_hop); in tb_ring_start()
735 RING_TYPE(ring), ring->hop); in tb_ring_start()
769 RING_TYPE(ring), ring->hop); in tb_ring_stop()
774 RING_TYPE(ring), ring->hop); in tb_ring_stop()
817 ring->nhi->tx_rings[ring->hop] = NULL; in tb_ring_free()
819 ring->nhi->rx_rings[ring->hop] = NULL; in tb_ring_free()
823 RING_TYPE(ring), ring->hop); in tb_ring_free()
838 ring->hop); in tb_ring_free()
910 int hop = -1; in nhi_interrupt_work() local
926 if (++hop == nhi->hop_count) { in nhi_interrupt_work()
927 hop = 0; in nhi_interrupt_work()
935 hop); in nhi_interrupt_work()
939 ring = nhi->tx_rings[hop]; in nhi_interrupt_work()
941 ring = nhi->rx_rings[hop]; in nhi_interrupt_work()
946 hop); in nhi_interrupt_work()