Lines Matching refs:txq
613 amb_txq * txq = &dev->txq; in tx_give() local
621 spin_lock_irqsave (&txq->lock, flags); in tx_give()
623 if (txq->pending < txq->maximum) { in tx_give()
624 PRINTD (DBG_TX, "TX in slot %p", txq->in.ptr); in tx_give()
626 *txq->in.ptr = *tx; in tx_give()
627 txq->pending++; in tx_give()
628 txq->in.ptr = NEXTQ (txq->in.ptr, txq->in.start, txq->in.limit); in tx_give()
630 wr_mem (dev, offsetof(amb_mem, mb.adapter.tx_address), virt_to_bus (txq->in.ptr)); in tx_give()
633 if (txq->pending > txq->high) in tx_give()
634 txq->high = txq->pending; in tx_give()
635 spin_unlock_irqrestore (&txq->lock, flags); in tx_give()
638 txq->filled++; in tx_give()
639 spin_unlock_irqrestore (&txq->lock, flags); in tx_give()
645 amb_txq * txq = &dev->txq; in tx_take() local
650 spin_lock_irqsave (&txq->lock, flags); in tx_take()
652 if (txq->pending && txq->out.ptr->handle) { in tx_take()
654 tx_complete (dev, txq->out.ptr); in tx_take()
656 txq->out.ptr->handle = 0; in tx_take()
658 txq->pending--; in tx_take()
659 txq->out.ptr = NEXTQ (txq->out.ptr, txq->out.start, txq->out.limit); in tx_take()
661 spin_unlock_irqrestore (&txq->lock, flags); in tx_take()
665 spin_unlock_irqrestore (&txq->lock, flags); in tx_take()
1435 amb_txq * t = &dev->txq; in amb_proc_read()
1549 amb_txq * txq = &dev->txq; in create_queues() local
1551 txq->pending = 0; in create_queues()
1552 txq->high = 0; in create_queues()
1553 txq->filled = 0; in create_queues()
1554 txq->maximum = txs - 1; in create_queues()
1556 txq->in.start = in; in create_queues()
1557 txq->in.ptr = in; in create_queues()
1558 txq->in.limit = in + txs; in create_queues()
1560 memory = txq->in.limit; in create_queues()
1563 txq->out.start = out; in create_queues()
1564 txq->out.ptr = out; in create_queues()
1565 txq->out.limit = out + txs; in create_queues()
1567 memory = txq->out.limit; in create_queues()
1981 a.tx_start = bus_addr (dev->txq.in.start); in amb_talk()
1982 a.tx_end = bus_addr (dev->txq.in.limit); in amb_talk()
1983 a.txcom_start = bus_addr (dev->txq.out.start); in amb_talk()
1984 a.txcom_end = bus_addr (dev->txq.out.limit); in amb_talk()
2153 spin_lock_init (&dev->txq.lock); in setup_dev()