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