Lines Matching refs:ring
141 #error TX ring too small!
465 struct basic_ring *ring = &tp->cmdRing; in typhoon_hello() local
473 cmd = (struct cmd_desc *)(ring->ringBase + ring->lastWrite); in typhoon_hello()
474 typhoon_inc_cmd_index(&ring->lastWrite, 1); in typhoon_hello()
478 writel(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_hello()
572 typhoon_num_free_tx(struct transmit_ring *ring) in typhoon_num_free_tx() argument
575 return typhoon_num_free(ring->lastWrite, ring->lastRead, TXLO_ENTRIES); in typhoon_num_free_tx()
583 struct basic_ring *ring = &tp->cmdRing; in typhoon_issue_command() local
616 if(unlikely(ring->lastWrite + len > COMMAND_RING_SIZE)) { in typhoon_issue_command()
617 wrap_len = ring->lastWrite + len - COMMAND_RING_SIZE; in typhoon_issue_command()
618 len = COMMAND_RING_SIZE - ring->lastWrite; in typhoon_issue_command()
621 memcpy(ring->ringBase + ring->lastWrite, cmd, len); in typhoon_issue_command()
625 memcpy(ring->ringBase, wrap_ptr, wrap_len); in typhoon_issue_command()
628 typhoon_inc_cmd_index(&ring->lastWrite, num_cmd); in typhoon_issue_command()
633 writel(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); in typhoon_issue_command()
1596 struct basic_ring *ring = &tp->rxBuffRing; in typhoon_recycle_rx_skb() local
1599 if((ring->lastWrite + sizeof(*r)) % (RXFREE_ENTRIES * sizeof(*r)) == in typhoon_recycle_rx_skb()
1608 r = (struct rx_free *) (ring->ringBase + ring->lastWrite); in typhoon_recycle_rx_skb()
1609 typhoon_inc_rxfree_index(&ring->lastWrite, 1); in typhoon_recycle_rx_skb()
1615 indexes->rxBuffReady = cpu_to_le32(ring->lastWrite); in typhoon_recycle_rx_skb()
1623 struct basic_ring *ring = &tp->rxBuffRing; in typhoon_alloc_rx_skb() local
1630 if((ring->lastWrite + sizeof(*r)) % (RXFREE_ENTRIES * sizeof(*r)) == in typhoon_alloc_rx_skb()
1652 r = (struct rx_free *) (ring->ringBase + ring->lastWrite); in typhoon_alloc_rx_skb()
1653 typhoon_inc_rxfree_index(&ring->lastWrite, 1); in typhoon_alloc_rx_skb()
1661 indexes->rxBuffReady = cpu_to_le32(ring->lastWrite); in typhoon_alloc_rx_skb()