Lines Matching refs:lastWrite

464 		cmd = (struct cmd_desc *)(ring->ringBase + ring->lastWrite);  in typhoon_hello()
465 typhoon_inc_cmd_index(&ring->lastWrite, 1); in typhoon_hello()
469 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_hello()
534 typhoon_num_free(int lastWrite, int lastRead, int ringSize) in typhoon_num_free() argument
539 lastWrite /= sizeof(struct cmd_desc); in typhoon_num_free()
541 return (ringSize + lastRead - lastWrite - 1) % ringSize; in typhoon_num_free()
547 int lastWrite = tp->cmdRing.lastWrite; in typhoon_num_free_cmd() local
550 return typhoon_num_free(lastWrite, cmdCleared, COMMAND_ENTRIES); in typhoon_num_free_cmd()
566 return typhoon_num_free(ring->lastWrite, ring->lastRead, TXLO_ENTRIES); in typhoon_num_free_tx()
606 if (unlikely(ring->lastWrite + len > COMMAND_RING_SIZE)) { in typhoon_issue_command()
607 wrap_len = ring->lastWrite + len - COMMAND_RING_SIZE; in typhoon_issue_command()
608 len = COMMAND_RING_SIZE - ring->lastWrite; in typhoon_issue_command()
611 memcpy(ring->ringBase + ring->lastWrite, cmd, len); in typhoon_issue_command()
618 typhoon_inc_cmd_index(&ring->lastWrite, num_cmd); in typhoon_issue_command()
623 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_issue_command()
691 tcpd = (struct tcpopt_desc *) (txRing->ringBase + txRing->lastWrite); in typhoon_tso_fill()
692 tcpd_offset += txRing->lastWrite; in typhoon_tso_fill()
694 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_tso_fill()
749 first_txd = (struct tx_desc *) (txRing->ringBase + txRing->lastWrite); in typhoon_start_tx()
750 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_start_tx()
780 txd = (struct tx_desc *) (txRing->ringBase + txRing->lastWrite); in typhoon_start_tx()
781 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_start_tx()
811 txRing->lastWrite); in typhoon_start_tx()
812 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_start_tx()
829 iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); in typhoon_start_tx()
1253 tp->txLoRing.lastWrite = 0; in typhoon_init_rings()
1254 tp->txHiRing.lastWrite = 0; in typhoon_init_rings()
1255 tp->rxLoRing.lastWrite = 0; in typhoon_init_rings()
1256 tp->rxHiRing.lastWrite = 0; in typhoon_init_rings()
1257 tp->rxBuffRing.lastWrite = 0; in typhoon_init_rings()
1258 tp->cmdRing.lastWrite = 0; in typhoon_init_rings()
1259 tp->respRing.lastWrite = 0; in typhoon_init_rings()
1546 if (netif_queue_stopped(tp->dev) && typhoon_num_free(txRing->lastWrite, in typhoon_tx_complete()
1562 if ((ring->lastWrite + sizeof(*r)) % (RXFREE_ENTRIES * sizeof(*r)) == in typhoon_recycle_rx_skb()
1571 r = (struct rx_free *) (ring->ringBase + ring->lastWrite); in typhoon_recycle_rx_skb()
1572 typhoon_inc_rxfree_index(&ring->lastWrite, 1); in typhoon_recycle_rx_skb()
1578 indexes->rxBuffReady = cpu_to_le32(ring->lastWrite); in typhoon_recycle_rx_skb()
1593 if ((ring->lastWrite + sizeof(*r)) % (RXFREE_ENTRIES * sizeof(*r)) == in typhoon_alloc_rx_skb()
1614 r = (struct rx_free *) (ring->ringBase + ring->lastWrite); in typhoon_alloc_rx_skb()
1615 typhoon_inc_rxfree_index(&ring->lastWrite, 1); in typhoon_alloc_rx_skb()
1623 indexes->rxBuffReady = cpu_to_le32(ring->lastWrite); in typhoon_alloc_rx_skb()
1743 if (le32_to_cpu(indexes->rxBuffCleared) == tp->rxBuffRing.lastWrite) { in typhoon_poll()
1978 if (indexes->txLoCleared == cpu_to_le32(txLo->lastWrite)) in typhoon_stop_runtime()
2009 if (indexes->txLoCleared != cpu_to_le32(txLo->lastWrite)) { in typhoon_stop_runtime()
2010 indexes->txLoCleared = cpu_to_le32(txLo->lastWrite); in typhoon_stop_runtime()