Changeset 545 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 2, 2007 12:41:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r512 r545 161 161 uint32_t iFrame; 162 162 /** The xmit buffer. */ 163 uint8_t abFrameBuf[ 12288];163 uint8_t abFrameBuf[PCNET_TRQUEUE_DEPTH*1536]; 164 164 /** The recv buffer. */ 165 165 uint8_t abRecvBuf[4096]; … … 534 534 * Internal Functions * 535 535 *******************************************************************************/ 536 #define PRINT_TMD(T) Log (( \536 #define PRINT_TMD(T) Log2(( \ 537 537 "TMD0 : TBADR=0x%08x\n" \ 538 538 "TMD1 : OWN=%d, ERR=%d, FCS=%d, LTI=%d, " \ … … 551 551 (T)->tmd2.tdr, (T)->tmd2.trc)) 552 552 553 #define PRINT_RMD(R) Log (( \553 #define PRINT_RMD(R) Log2(( \ 554 554 "RMD0 : RBADR=0x%08x\n" \ 555 555 "RMD1 : OWN=%d, ERR=%d, FRAM=%d, OFLO=%d, " \ … … 1777 1777 } 1778 1778 1779 #ifdef PCNET_DELAY_INT 1780 /* Update TXSTRT and TINT. */ 1781 pData->aCSR[4] |= 0x0004; /* set TXSTRT */ 1782 pData->aCSR[0] |= 0x0200; /* set TINT */ 1783 pcnetUpdateIrq(pData); 1784 #endif 1785 1779 1786 pData->fTransmitting = false; 1780 1787 … … 1963 1970 1964 1971 #ifdef PCNET_DEBUG_TMD 1965 Log (("#%d TMDLOAD 0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, PHYSADDR(pData, CSR_CXDA(pData))));1972 Log2(("#%d TMDLOAD 0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, PHYSADDR(pData, CSR_CXDA(pData)))); 1966 1973 PRINT_TMD(&tmd); 1967 1974 #endif … … 2102 2109 break; 2103 2110 } 2104 2105 2111 /* Update TDMD, TXSTRT and TINT. */ 2106 2112 pData->aCSR[0] &= ~0x0008; /* clear TDMD */ 2113 2114 #ifndef PCNET_DELAY_INT 2107 2115 pData->aCSR[4] |= 0x0004; /* set TXSTRT */ 2108 2116 if ( !CSR_TOKINTD(pData) /* Transmit OK Interrupt Disable, no infl. on errors. */ … … 2110 2118 || tmd.tmd1.err) 2111 2119 pData->aCSR[0] |= 0x0200; /* set TINT */ 2112 2120 #endif 2113 2121 STAM_COUNTER_INC(&pData->aStatXmitChainCounts[RT_MIN(cBuffers, 2114 2122 ELEMENTS(pData->aStatXmitChainCounts)) - 1]); … … 2127 2135 PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(CTXSUFF(pData->pXmitQueue)); 2128 2136 if (pItem) 2137 { 2129 2138 # if 0 /* send before resuming guest (last argument isn't implemented yet and read as 0). */ 2130 2139 PDMQueueInsertEx(CTXSUFF(pData->pXmitQueue), pItem, 50000); … … 2132 2141 PDMQueueInsert(CTXSUFF(pData->pXmitQueue), pItem); 2133 2142 # endif 2143 } 2134 2144 } 2135 2145 #endif … … 2394 2404 u32RAP &= 0x7f; 2395 2405 #ifdef PCNET_DEBUG_BCR 2396 Log (("#%d pcnetBCRWriteU16: u32RAP=%d val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2406 Log2(("#%d pcnetBCRWriteU16: u32RAP=%d val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2397 2407 u32RAP, val)); 2398 2408 #endif … … 2577 2587 } 2578 2588 #ifdef PCNET_DEBUG_BCR 2579 Log (("#%d pcnetBCRReadU16: u32RAP=%d val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2589 Log2(("#%d pcnetBCRReadU16: u32RAP=%d val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2580 2590 u32RAP, val)); 2581 2591 #endif … … 2641 2651 2642 2652 #ifdef PCNET_DEBUG_IO 2643 Log (("#%d pcnetIoportWriteU16: addr=0x%08x val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2653 Log2(("#%d pcnetIoportWriteU16: addr=0x%08x val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2644 2654 addr, val)); 2645 2655 #endif … … 2676 2686 { 2677 2687 case 0x00: /* RDP */ 2678 pcnetPollTimer(pData); 2688 /** @note if we're not polling, then the guest will tell us when to poll by setting TDMD in CSR0 */ 2689 /** Polling is then useless here and very expensive. */ 2690 if (!CSR_DPOLL(pData)) 2691 pcnetPollTimer(pData); 2692 2679 2693 val = pcnetCSRReadU16(pData, pData->u32RAP); 2680 2694 if (pData->u32RAP == 0) // pcnetUpdateIrq() already called by pcnetCSRReadU16() … … 2697 2711 skip_update_irq: 2698 2712 #ifdef PCNET_DEBUG_IO 2699 Log (("#%d pcnetIoportReadU16: addr=0x%08x val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2713 Log2(("#%d pcnetIoportReadU16: addr=0x%08x val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2700 2714 addr, val & 0xffff)); 2701 2715 #endif … … 2708 2722 2709 2723 #ifdef PCNET_DEBUG_IO 2710 Log (("#%d pcnetIoportWriteU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2724 Log2(("#%d pcnetIoportWriteU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2711 2725 addr, val)); 2712 2726 #endif … … 2733 2747 pcnetBCRWriteU16(pData, BCR_BSBC, pcnetBCRReadU16(pData, BCR_BSBC) | 0x0080); 2734 2748 #ifdef PCNET_DEBUG_IO 2735 Log (("device switched into dword i/o mode\n"));2749 Log2(("device switched into dword i/o mode\n")); 2736 2750 #endif 2737 2751 } … … 2751 2765 { 2752 2766 case 0x00: /* RDP */ 2753 pcnetPollTimer(pData); 2767 /** @note if we're not polling, then the guest will tell us when to poll by setting TDMD in CSR0 */ 2768 /** Polling is then useless here and very expensive. */ 2769 if (!CSR_DPOLL(pData)) 2770 pcnetPollTimer(pData); 2771 2754 2772 val = pcnetCSRReadU16(pData, pData->u32RAP); 2755 2773 if (pData->u32RAP == 0) // pcnetUpdateIrq() already called by pcnetCSRReadU16() … … 2772 2790 skip_update_irq: 2773 2791 #ifdef PCNET_DEBUG_IO 2774 Log (("#%d pcnetIoportReadU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2792 Log2(("#%d pcnetIoportReadU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2775 2793 addr, val)); 2776 2794 #endif … … 2781 2799 { 2782 2800 #ifdef PCNET_DEBUG_IO 2783 Log (("#%d pcnetMMIOWriteU8: addr=0x%08x val=0x%02x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2801 Log2(("#%d pcnetMMIOWriteU8: addr=0x%08x val=0x%02x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2784 2802 addr, val)); 2785 2803 #endif … … 2794 2812 val = pcnetAPROMReadU8(pData, addr); 2795 2813 #ifdef PCNET_DEBUG_IO 2796 Log (("#%d pcnetMMIOReadU8: addr=0x%08x val=0x%02x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2814 Log2(("#%d pcnetMMIOReadU8: addr=0x%08x val=0x%02x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2797 2815 addr, val & 0xff)); 2798 2816 #endif … … 2803 2821 { 2804 2822 #ifdef PCNET_DEBUG_IO 2805 Log (("#%d pcnetMMIOWriteU16: addr=0x%08x val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2823 Log2(("#%d pcnetMMIOWriteU16: addr=0x%08x val=0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2806 2824 addr, val)); 2807 2825 #endif … … 2829 2847 } 2830 2848 #ifdef PCNET_DEBUG_IO 2831 Log (("#%d pcnetMMIOReadU16: addr=0x%08x val = 0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2849 Log2(("#%d pcnetMMIOReadU16: addr=0x%08x val = 0x%04x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2832 2850 addr, val & 0xffff)); 2833 2851 #endif … … 2838 2856 { 2839 2857 #ifdef PCNET_DEBUG_IO 2840 Log (("#%d pcnetMMIOWriteU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2858 Log2(("#%d pcnetMMIOWriteU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2841 2859 addr, val)); 2842 2860 #endif … … 2870 2888 } 2871 2889 #ifdef PCNET_DEBUG_IO 2872 Log (("#%d pcnetMMIOReadU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance,2890 Log2(("#%d pcnetMMIOReadU32: addr=0x%08x val=0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, 2873 2891 addr, val)); 2874 2892 #endif
Note:
See TracChangeset
for help on using the changeset viewer.