• Home
  • Raw
  • Download

Lines Matching refs:tx_ring

357 struct tx_ring {  struct
487 struct tx_ring tx_ring; member
1641 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_config_tx_dma_regs() local
1644 writel(upper_32_bits(tx_ring->tx_desc_ring_pa), &txdma->pr_base_hi); in et131x_config_tx_dma_regs()
1645 writel(lower_32_bits(tx_ring->tx_desc_ring_pa), &txdma->pr_base_lo); in et131x_config_tx_dma_regs()
1651 writel(upper_32_bits(tx_ring->tx_status_pa), &txdma->dma_wb_base_hi); in et131x_config_tx_dma_regs()
1652 writel(lower_32_bits(tx_ring->tx_status_pa), &txdma->dma_wb_base_lo); in et131x_config_tx_dma_regs()
1654 *tx_ring->tx_status = 0; in et131x_config_tx_dma_regs()
1657 tx_ring->send_idx = 0; in et131x_config_tx_dma_regs()
1754 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_init_send() local
1755 struct tcb *tcb = tx_ring->tcb_ring; in et131x_init_send()
1757 tx_ring->tcb_qhead = tcb; in et131x_init_send()
1767 tx_ring->tcb_qtail = tcb; in et131x_init_send()
1770 tx_ring->send_head = NULL; in et131x_init_send()
1771 tx_ring->send_tail = NULL; in et131x_init_send()
2359 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_tx_dma_memory_alloc() local
2362 tx_ring->tcb_ring = kcalloc(NUM_TCB, sizeof(struct tcb), in et131x_tx_dma_memory_alloc()
2364 if (!tx_ring->tcb_ring) in et131x_tx_dma_memory_alloc()
2368 tx_ring->tx_desc_ring = dma_alloc_coherent(&adapter->pdev->dev, in et131x_tx_dma_memory_alloc()
2370 &tx_ring->tx_desc_ring_pa, in et131x_tx_dma_memory_alloc()
2372 if (!tx_ring->tx_desc_ring) { in et131x_tx_dma_memory_alloc()
2378 tx_ring->tx_status = dma_alloc_coherent(&adapter->pdev->dev, in et131x_tx_dma_memory_alloc()
2380 &tx_ring->tx_status_pa, in et131x_tx_dma_memory_alloc()
2382 if (!tx_ring->tx_status) { in et131x_tx_dma_memory_alloc()
2393 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_tx_dma_memory_free() local
2395 if (tx_ring->tx_desc_ring) { in et131x_tx_dma_memory_free()
2400 tx_ring->tx_desc_ring, in et131x_tx_dma_memory_free()
2401 tx_ring->tx_desc_ring_pa); in et131x_tx_dma_memory_free()
2402 tx_ring->tx_desc_ring = NULL; in et131x_tx_dma_memory_free()
2406 if (tx_ring->tx_status) { in et131x_tx_dma_memory_free()
2409 tx_ring->tx_status, in et131x_tx_dma_memory_free()
2410 tx_ring->tx_status_pa); in et131x_tx_dma_memory_free()
2412 tx_ring->tx_status = NULL; in et131x_tx_dma_memory_free()
2415 kfree(tx_ring->tcb_ring); in et131x_tx_dma_memory_free()
2430 struct tx_ring *tx_ring = &adapter->tx_ring; in nic_send_packet() local
2502 if (++tx_ring->since_irq == PARM_TX_NUM_BUFS_DEF) { in nic_send_packet()
2506 tx_ring->since_irq = 0; in nic_send_packet()
2517 tcb->index_start = tx_ring->send_idx; in nic_send_packet()
2520 thiscopy = NUM_DESC_PER_RING_TX - INDEX10(tx_ring->send_idx); in nic_send_packet()
2529 memcpy(tx_ring->tx_desc_ring + INDEX10(tx_ring->send_idx), in nic_send_packet()
2533 add_10bit(&tx_ring->send_idx, thiscopy); in nic_send_packet()
2535 if (INDEX10(tx_ring->send_idx) == 0 || in nic_send_packet()
2536 INDEX10(tx_ring->send_idx) == NUM_DESC_PER_RING_TX) { in nic_send_packet()
2537 tx_ring->send_idx &= ~ET_DMA10_MASK; in nic_send_packet()
2538 tx_ring->send_idx ^= ET_DMA10_WRAP; in nic_send_packet()
2542 memcpy(tx_ring->tx_desc_ring, in nic_send_packet()
2546 add_10bit(&tx_ring->send_idx, remainder); in nic_send_packet()
2549 if (INDEX10(tx_ring->send_idx) == 0) { in nic_send_packet()
2550 if (tx_ring->send_idx) in nic_send_packet()
2555 tcb->index = tx_ring->send_idx - 1; in nic_send_packet()
2560 if (tx_ring->send_tail) in nic_send_packet()
2561 tx_ring->send_tail->next = tcb; in nic_send_packet()
2563 tx_ring->send_head = tcb; in nic_send_packet()
2565 tx_ring->send_tail = tcb; in nic_send_packet()
2569 tx_ring->used++; in nic_send_packet()
2574 writel(tx_ring->send_idx, &adapter->regs->txdma.service_request); in nic_send_packet()
2591 struct tx_ring *tx_ring = &adapter->tx_ring; in send_packet() local
2599 tcb = tx_ring->tcb_qhead; in send_packet()
2606 tx_ring->tcb_qhead = tcb->next; in send_packet()
2608 if (tx_ring->tcb_qhead == NULL) in send_packet()
2609 tx_ring->tcb_qtail = NULL; in send_packet()
2621 if (tx_ring->tcb_qtail) in send_packet()
2622 tx_ring->tcb_qtail->next = tcb; in send_packet()
2625 tx_ring->tcb_qhead = tcb; in send_packet()
2627 tx_ring->tcb_qtail = tcb; in send_packet()
2631 WARN_ON(tx_ring->used > NUM_TCB); in send_packet()
2642 struct tx_ring *tx_ring = &adapter->tx_ring; in free_send_packet() local
2653 desc = tx_ring->tx_desc_ring + in free_send_packet()
2669 } while (desc != tx_ring->tx_desc_ring + INDEX10(tcb->index)); in free_send_packet()
2681 if (tx_ring->tcb_qtail) in free_send_packet()
2682 tx_ring->tcb_qtail->next = tcb; in free_send_packet()
2684 tx_ring->tcb_qhead = tcb; in free_send_packet()
2686 tx_ring->tcb_qtail = tcb; in free_send_packet()
2689 WARN_ON(tx_ring->used < 0); in free_send_packet()
2698 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_free_busy_send_packets() local
2703 tcb = tx_ring->send_head; in et131x_free_busy_send_packets()
2708 tx_ring->send_head = next; in et131x_free_busy_send_packets()
2711 tx_ring->send_tail = NULL; in et131x_free_busy_send_packets()
2713 tx_ring->used--; in et131x_free_busy_send_packets()
2722 tcb = tx_ring->send_head; in et131x_free_busy_send_packets()
2729 tx_ring->used = 0; in et131x_free_busy_send_packets()
2743 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_handle_send_pkts() local
2753 tcb = tx_ring->send_head; in et131x_handle_send_pkts()
2758 tx_ring->used--; in et131x_handle_send_pkts()
2759 tx_ring->send_head = tcb->next; in et131x_handle_send_pkts()
2761 tx_ring->send_tail = NULL; in et131x_handle_send_pkts()
2768 tcb = tx_ring->send_head; in et131x_handle_send_pkts()
2773 tx_ring->used--; in et131x_handle_send_pkts()
2774 tx_ring->send_head = tcb->next; in et131x_handle_send_pkts()
2776 tx_ring->send_tail = NULL; in et131x_handle_send_pkts()
2783 tcb = tx_ring->send_head; in et131x_handle_send_pkts()
2787 if (tx_ring->used <= NUM_TCB / 3) in et131x_handle_send_pkts()
3376 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_isr() local
3403 struct tcb *tcb = tx_ring->send_head; in et131x_isr()
3788 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_tx() local
3791 if (tx_ring->used >= NUM_TCB - 1 && !netif_queue_stopped(netdev)) in et131x_tx()
3798 if (tx_ring->used >= NUM_TCB) in et131x_tx()
3825 struct tx_ring *tx_ring = &adapter->tx_ring; in et131x_tx_timeout() local
3847 tcb = tx_ring->send_head; in et131x_tx_timeout()