Lines Matching full:txp
241 LAN9118Packet *txp; member
312 /* txp always points at tx_packet so need not be saved */
440 s->txp->fifo_used = 0; in lan9118_reset()
441 s->txp->state = TX_IDLE; in lan9118_reset()
442 s->txp->cmd_a = 0xffffffffu; in lan9118_reset()
443 s->txp->cmd_b = 0xffffffffu; in lan9118_reset()
444 s->txp->len = 0; in lan9118_reset()
445 s->txp->fifo_used = 0; in lan9118_reset()
683 qemu_receive_packet(qemu_get_queue(s->nic), s->txp->data, s->txp->len); in do_tx_packet()
685 qemu_send_packet(qemu_get_queue(s->nic), s->txp->data, s->txp->len); in do_tx_packet()
687 s->txp->fifo_used = 0; in do_tx_packet()
694 status = s->txp->cmd_b & 0xffff0000u; in do_tx_packet()
695 DPRINTF("Sent packet tag:%04x len %d\n", status >> 16, s->txp->len); in do_tx_packet()
747 if (s->txp->fifo_used == s->tx_fifo_size) { in tx_fifo_push()
751 switch (s->txp->state) { in tx_fifo_push()
753 s->txp->cmd_a = val & 0x831f37ff; in tx_fifo_push()
754 s->txp->fifo_used++; in tx_fifo_push()
755 s->txp->state = TX_B; in tx_fifo_push()
756 s->txp->buffer_size = extract32(s->txp->cmd_a, 0, 11); in tx_fifo_push()
757 s->txp->offset = extract32(s->txp->cmd_a, 16, 5); in tx_fifo_push()
760 if (s->txp->cmd_a & 0x2000) { in tx_fifo_push()
762 s->txp->cmd_b = val; in tx_fifo_push()
763 s->txp->fifo_used++; in tx_fifo_push()
765 n = (s->txp->buffer_size + s->txp->offset + 3) >> 2; in tx_fifo_push()
776 s->txp->pad = n; in tx_fifo_push()
777 s->txp->len = 0; in tx_fifo_push()
780 s->txp->buffer_size, s->txp->offset, s->txp->pad, in tx_fifo_push()
781 s->txp->cmd_a); in tx_fifo_push()
782 s->txp->state = TX_DATA; in tx_fifo_push()
785 if (s->txp->offset >= 4) { in tx_fifo_push()
786 s->txp->offset -= 4; in tx_fifo_push()
789 if (s->txp->buffer_size <= 0 && s->txp->pad != 0) { in tx_fifo_push()
790 s->txp->pad--; in tx_fifo_push()
792 n = MIN(4, s->txp->buffer_size + s->txp->offset); in tx_fifo_push()
793 while (s->txp->offset) { in tx_fifo_push()
796 s->txp->offset--; in tx_fifo_push()
802 if (s->txp->len == MIL_TXFIFO_SIZE) { in tx_fifo_push()
817 s->txp->data[s->txp->len] = val & 0xff; in tx_fifo_push()
818 s->txp->len++; in tx_fifo_push()
820 s->txp->buffer_size--; in tx_fifo_push()
822 s->txp->fifo_used++; in tx_fifo_push()
824 if (s->txp->buffer_size <= 0 && s->txp->pad == 0) { in tx_fifo_push()
825 if (s->txp->cmd_a & 0x1000) { in tx_fifo_push()
828 if (s->txp->cmd_a & 0x80000000) { in tx_fifo_push()
831 s->txp->state = TX_IDLE; in tx_fifo_push()
1096 s->txp->state = TX_IDLE; in lan9118_writel()
1097 s->txp->fifo_used = 0; in lan9118_writel()
1098 s->txp->cmd_a = 0xffffffff; in lan9118_writel()
1275 | (s->tx_fifo_size - s->txp->fifo_used); in lan9118_readl()
1391 s->txp = &s->tx_packet; in lan9118_realize()