Lines Matching refs:lastWrite

469 		cmd = (struct cmd_desc *)(ring->ringBase + ring->lastWrite);  in typhoon_hello()
470 typhoon_inc_cmd_index(&ring->lastWrite, 1); in typhoon_hello()
474 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_hello()
539 typhoon_num_free(int lastWrite, int lastRead, int ringSize) in typhoon_num_free() argument
544 lastWrite /= sizeof(struct cmd_desc); in typhoon_num_free()
546 return (ringSize + lastRead - lastWrite - 1) % ringSize; in typhoon_num_free()
552 int lastWrite = tp->cmdRing.lastWrite; in typhoon_num_free_cmd() local
555 return typhoon_num_free(lastWrite, cmdCleared, COMMAND_ENTRIES); in typhoon_num_free_cmd()
571 return typhoon_num_free(ring->lastWrite, ring->lastRead, TXLO_ENTRIES); in typhoon_num_free_tx()
611 if (unlikely(ring->lastWrite + len > COMMAND_RING_SIZE)) { in typhoon_issue_command()
612 wrap_len = ring->lastWrite + len - COMMAND_RING_SIZE; in typhoon_issue_command()
613 len = COMMAND_RING_SIZE - ring->lastWrite; in typhoon_issue_command()
616 memcpy(ring->ringBase + ring->lastWrite, cmd, len); in typhoon_issue_command()
623 typhoon_inc_cmd_index(&ring->lastWrite, num_cmd); in typhoon_issue_command()
628 iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_issue_command()
696 tcpd = (struct tcpopt_desc *) (txRing->ringBase + txRing->lastWrite); in typhoon_tso_fill()
697 tcpd_offset += txRing->lastWrite; in typhoon_tso_fill()
699 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_tso_fill()
754 first_txd = (struct tx_desc *) (txRing->ringBase + txRing->lastWrite); in typhoon_start_tx()
755 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_start_tx()
785 txd = (struct tx_desc *) (txRing->ringBase + txRing->lastWrite); in typhoon_start_tx()
786 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_start_tx()
816 txRing->lastWrite); in typhoon_start_tx()
817 typhoon_inc_tx_index(&txRing->lastWrite, 1); in typhoon_start_tx()
834 iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); in typhoon_start_tx()
1256 tp->txLoRing.lastWrite = 0; in typhoon_init_rings()
1257 tp->txHiRing.lastWrite = 0; in typhoon_init_rings()
1258 tp->rxLoRing.lastWrite = 0; in typhoon_init_rings()
1259 tp->rxHiRing.lastWrite = 0; in typhoon_init_rings()
1260 tp->rxBuffRing.lastWrite = 0; in typhoon_init_rings()
1261 tp->cmdRing.lastWrite = 0; in typhoon_init_rings()
1262 tp->respRing.lastWrite = 0; in typhoon_init_rings()
1549 if (netif_queue_stopped(tp->dev) && typhoon_num_free(txRing->lastWrite, in typhoon_tx_complete()
1565 if ((ring->lastWrite + sizeof(*r)) % (RXFREE_ENTRIES * sizeof(*r)) == in typhoon_recycle_rx_skb()
1574 r = (struct rx_free *) (ring->ringBase + ring->lastWrite); in typhoon_recycle_rx_skb()
1575 typhoon_inc_rxfree_index(&ring->lastWrite, 1); in typhoon_recycle_rx_skb()
1581 indexes->rxBuffReady = cpu_to_le32(ring->lastWrite); in typhoon_recycle_rx_skb()
1596 if ((ring->lastWrite + sizeof(*r)) % (RXFREE_ENTRIES * sizeof(*r)) == in typhoon_alloc_rx_skb()
1617 r = (struct rx_free *) (ring->ringBase + ring->lastWrite); in typhoon_alloc_rx_skb()
1618 typhoon_inc_rxfree_index(&ring->lastWrite, 1); in typhoon_alloc_rx_skb()
1626 indexes->rxBuffReady = cpu_to_le32(ring->lastWrite); in typhoon_alloc_rx_skb()
1746 if (le32_to_cpu(indexes->rxBuffCleared) == tp->rxBuffRing.lastWrite) { in typhoon_poll()
1981 if (indexes->txLoCleared == cpu_to_le32(txLo->lastWrite)) in typhoon_stop_runtime()
2012 if (indexes->txLoCleared != cpu_to_le32(txLo->lastWrite)) { in typhoon_stop_runtime()
2013 indexes->txLoCleared = cpu_to_le32(txLo->lastWrite); in typhoon_stop_runtime()