Changeset 18739 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Apr 6, 2009 9:28:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r18690 r18739 852 852 rda[1] &= ~0x80000000; 853 853 PDMDevHlpPhysWrite(pDevIns, addr+7, (uint8_t*)rda + 7, 1); 854 } 855 } 856 857 /** 858 * Read+Write a TX/RX descriptor to prevent PDMDevHlpPhysWrite() allocating 859 * pages later when we shouldn't schedule to EMT. Temporarily hack. 860 */ 861 static void pcnetDescTouch(PCNetState *pThis, RTGCPHYS32 addr) 862 { 863 PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pThis); 864 865 if (!pThis->fPrivIfEnabled) 866 { 867 uint8_t aBuf[16]; 868 size_t cbDesc; 869 if (RT_UNLIKELY(BCR_SWSTYLE(pThis) == 0)) 870 cbDesc = 8; 871 else 872 cbDesc = 16; 873 PDMDevHlpPhysRead(pDevIns, addr, aBuf, cbDesc); 874 PDMDevHlpPhysWrite(pDevIns, addr, aBuf, cbDesc); 854 875 } 855 876 } … … 1550 1571 RMD rmd; 1551 1572 RTGCPHYS32 rdaddr = PHYSADDR(pThis, pcnetRdraAddr(pThis, i)); 1573 1574 pcnetDescTouch(pThis, rdaddr); 1552 1575 /* At this time it is not guaranteed that the buffers are already initialized. */ 1553 1576 if (pcnetRmdLoad(pThis, &rmd, rdaddr, false)) … … 1563 1586 cbRxBuffers += cbBuf; 1564 1587 } 1565 PDMDevHlpPhysWrite(pDevIns, rdaddr, (void*)&rmd, sizeof(rmd));1566 1588 } 1567 1589 … … 1570 1592 TMD tmd; 1571 1593 RTGCPHYS32 tdaddr = PHYSADDR(pThis, pcnetTdraAddr(pThis, i)); 1594 1595 pcnetDescTouch(pThis, tdaddr); 1572 1596 if (pcnetTmdLoad(pThis, &tmd, tdaddr, false)) 1573 1597 { … … 1582 1606 PDMDevHlpPhysWrite(pDevIns, tbadr, aBuf, RT_MIN(sizeof(aBuf), cbBuf)); 1583 1607 } 1584 PDMDevHlpPhysWrite(pDevIns, tdaddr, (void*)&tmd, sizeof(tmd));1585 1608 } 1586 1609
Note:
See TracChangeset
for help on using the changeset viewer.