Lines Matching refs:txq

628   amb_txq * txq = &dev->txq;  in tx_give()  local
636 spin_lock_irqsave (&txq->lock, flags); in tx_give()
638 if (txq->pending < txq->maximum) { in tx_give()
639 PRINTD (DBG_TX, "TX in slot %p", txq->in.ptr); in tx_give()
641 *txq->in.ptr = *tx; in tx_give()
642 txq->pending++; in tx_give()
643 txq->in.ptr = NEXTQ (txq->in.ptr, txq->in.start, txq->in.limit); in tx_give()
645 wr_mem (dev, offsetof(amb_mem, mb.adapter.tx_address), virt_to_bus (txq->in.ptr)); in tx_give()
648 if (txq->pending > txq->high) in tx_give()
649 txq->high = txq->pending; in tx_give()
650 spin_unlock_irqrestore (&txq->lock, flags); in tx_give()
653 txq->filled++; in tx_give()
654 spin_unlock_irqrestore (&txq->lock, flags); in tx_give()
660 amb_txq * txq = &dev->txq; in tx_take() local
665 spin_lock_irqsave (&txq->lock, flags); in tx_take()
667 if (txq->pending && txq->out.ptr->handle) { in tx_take()
669 tx_complete (dev, txq->out.ptr); in tx_take()
671 txq->out.ptr->handle = 0; in tx_take()
673 txq->pending--; in tx_take()
674 txq->out.ptr = NEXTQ (txq->out.ptr, txq->out.start, txq->out.limit); in tx_take()
676 spin_unlock_irqrestore (&txq->lock, flags); in tx_take()
680 spin_unlock_irqrestore (&txq->lock, flags); in tx_take()
1450 amb_txq * t = &dev->txq; in amb_proc_read()
1564 amb_txq * txq = &dev->txq; in create_queues() local
1566 txq->pending = 0; in create_queues()
1567 txq->high = 0; in create_queues()
1568 txq->filled = 0; in create_queues()
1569 txq->maximum = txs - 1; in create_queues()
1571 txq->in.start = in; in create_queues()
1572 txq->in.ptr = in; in create_queues()
1573 txq->in.limit = in + txs; in create_queues()
1575 memory = txq->in.limit; in create_queues()
1578 txq->out.start = out; in create_queues()
1579 txq->out.ptr = out; in create_queues()
1580 txq->out.limit = out + txs; in create_queues()
1582 memory = txq->out.limit; in create_queues()
1996 a.tx_start = bus_addr (dev->txq.in.start); in amb_talk()
1997 a.tx_end = bus_addr (dev->txq.in.limit); in amb_talk()
1998 a.txcom_start = bus_addr (dev->txq.out.start); in amb_talk()
1999 a.txcom_end = bus_addr (dev->txq.out.limit); in amb_talk()
2168 spin_lock_init (&dev->txq.lock); in setup_dev()