Lines Matching refs:tpc

335 static struct rtl8169_private *tpc;  variable
409 tpc->chipset = i; in rtl8169_init_board()
418 tpc->chipset = 0; in rtl8169_init_board()
527 cur_rx = tpc->cur_rx; in rtl_recv_common()
529 rtl_inval_rx_desc(&tpc->RxDescArray[cur_rx]); in rtl_recv_common()
531 if ((le32_to_cpu(tpc->RxDescArray[cur_rx].status) & OWNbit) == 0) { in rtl_recv_common()
532 if (!(le32_to_cpu(tpc->RxDescArray[cur_rx].status) & RxRES)) { in rtl_recv_common()
533 length = (int) (le32_to_cpu(tpc->RxDescArray[cur_rx]. in rtl_recv_common()
536 rtl_inval_buffer(tpc->RxBufferRing[cur_rx], length); in rtl_recv_common()
537 memcpy(rxdata, tpc->RxBufferRing[cur_rx], length); in rtl_recv_common()
540 tpc->RxDescArray[cur_rx].status = in rtl_recv_common()
543 tpc->RxDescArray[cur_rx].status = in rtl_recv_common()
546 tpc->RxDescArray[cur_rx].buf_addr = cpu_to_le32( in rtl_recv_common()
549 tpc->RxBufferRing[cur_rx])); in rtl_recv_common()
551 tpc->RxDescArray[cur_rx].buf_addr = cpu_to_le32( in rtl_recv_common()
553 tpc->RxBufferRing[cur_rx])); in rtl_recv_common()
555 rtl_flush_rx_desc(&tpc->RxDescArray[cur_rx]); in rtl_recv_common()
566 tpc->cur_rx = cur_rx; in rtl_recv_common()
574 tpc->cur_rx = cur_rx; in rtl_recv_common()
609 int entry = tpc->cur_tx % NUM_TX_DESC; in rtl_send_common()
622 ptxb = tpc->Tx_skbuff[entry * MAX_ETH_FRAME_SIZE]; in rtl_send_common()
630 tpc->TxDescArray[entry].buf_Haddr = 0; in rtl_send_common()
632 tpc->TxDescArray[entry].buf_addr = cpu_to_le32( in rtl_send_common()
635 tpc->TxDescArray[entry].buf_addr = cpu_to_le32( in rtl_send_common()
639 tpc->TxDescArray[entry].status = in rtl_send_common()
643 tpc->TxDescArray[entry].status = in rtl_send_common()
647 rtl_flush_tx_desc(&tpc->TxDescArray[entry]); in rtl_send_common()
650 tpc->cur_tx++; in rtl_send_common()
653 rtl_inval_tx_desc(&tpc->TxDescArray[entry]); in rtl_send_common()
654 } while ((le32_to_cpu(tpc->TxDescArray[entry].status) & OWNbit) in rtl_send_common()
706 rtl_chip_info[tpc->chipset].RxConfigMask); in rtl8169_set_rx_mode()
742 if (tpc->chipset <= 5) in rtl8169_hw_start()
752 rtl_chip_info[tpc->chipset].RxConfigMask); in rtl8169_hw_start()
760 tpc->cur_rx = 0; in rtl8169_hw_start()
764 (pci_addr_t)(unsigned long)tpc->TxDescArray)); in rtl8169_hw_start()
767 (pci_addr_t)(unsigned long)tpc->TxDescArray)); in rtl8169_hw_start()
772 dev, (pci_addr_t)(unsigned long)tpc->RxDescArray)); in rtl8169_hw_start()
775 dev, (pci_addr_t)(unsigned long)tpc->RxDescArray)); in rtl8169_hw_start()
780 if (tpc->chipset > 5) in rtl8169_hw_start()
811 tpc->cur_rx = 0; in rtl8169_init_ring()
812 tpc->cur_tx = 0; in rtl8169_init_ring()
813 tpc->dirty_tx = 0; in rtl8169_init_ring()
814 memset(tpc->TxDescArray, 0x0, NUM_TX_DESC * sizeof(struct TxDesc)); in rtl8169_init_ring()
815 memset(tpc->RxDescArray, 0x0, NUM_RX_DESC * sizeof(struct RxDesc)); in rtl8169_init_ring()
818 tpc->Tx_skbuff[i] = &txb[i]; in rtl8169_init_ring()
823 tpc->RxDescArray[i].status = in rtl8169_init_ring()
826 tpc->RxDescArray[i].status = in rtl8169_init_ring()
829 tpc->RxBufferRing[i] = &rxb[i * RX_BUF_SIZE]; in rtl8169_init_ring()
831 tpc->RxDescArray[i].buf_addr = cpu_to_le32(dm_pci_mem_to_phys( in rtl8169_init_ring()
832 dev, (pci_addr_t)(unsigned long)tpc->RxBufferRing[i])); in rtl8169_init_ring()
834 tpc->RxDescArray[i].buf_addr = cpu_to_le32(pci_mem_to_phys( in rtl8169_init_ring()
835 dev, (pci_addr_t)(unsigned long)tpc->RxBufferRing[i])); in rtl8169_init_ring()
837 rtl_flush_rx_desc(&tpc->RxDescArray[i]); in rtl8169_init_ring()
923 tpc->RxBufferRing[i] = NULL; in rtl_halt_common()
965 tpc = &tpx; in rtl_init()
976 printf("chipset = %d\n", tpc->chipset); in rtl_init()
1084 tpc->RxDescArray = rtl_alloc_descs(NUM_RX_DESC); in rtl_init()
1085 if (!tpc->RxDescArray) in rtl_init()
1088 tpc->TxDescArray = rtl_alloc_descs(NUM_TX_DESC); in rtl_init()
1089 if (!tpc->TxDescArray) in rtl_init()