Changeset 32964 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Oct 7, 2010 8:29:39 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 66469
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r30722 r32964 197 197 uint16_t aBCR[BCR_MAX_RAP]; 198 198 uint16_t aMII[MII_MAX_REG]; 199 /** Holds the bits which were really seen by the guest. Relevant are bits 200 * 8..14 (IDON, TINT, RINT, MERR, MISS, CERR, BABL). We don't allow the 201 * guest to clear any of these bits (by writing a ONE) before a bit was 202 * seen by the guest. */ 199 203 uint16_t u16CSR0LastSeenByGuest; 200 204 uint16_t Alignment2[HC_ARCH_BITS == 32 ? 2 : 2]; … … 2539 2543 tmd.tmd2.buff = tmd.tmd2.uflo = tmd.tmd1.err = 1; 2540 2544 pThis->aCSR[0] |= 0x0200; /* set TINT */ 2545 /* Don't allow the guest to clear TINT before reading it */ 2546 pThis->u16CSR0LastSeenByGuest &= ~0x0200; 2541 2547 if (!CSR_DXSUFLO(pThis)) /* stop on xmit underflow */ 2542 2548 pThis->aCSR[0] &= ~0x0010; /* clear TXON */ … … 2626 2632 { 2627 2633 STAM_COUNTER_INC(&pThis->aStatXmitFlush[RT_MIN(cFlushIrq, RT_ELEMENTS(pThis->aStatXmitFlush)) - 1]); 2634 /* The WinXP PCnet driver has apparently a bug: It sets CSR0.TDMD _before_ 2635 * it clears CSR0.TINT. This can lead to a race where the driver clears 2636 * CSR0.TINT right after it was set by the device. The driver waits until 2637 * CSR0.TINT is set again but this will never happen. So prevent clearing 2638 * this bit as long as the driver didn't read it. */ 2628 2639 pThis->aCSR[0] |= 0x0200; /* set TINT */ 2640 /* Don't allow the guest to clear TINT before reading it */ 2641 pThis->u16CSR0LastSeenByGuest &= ~0x0200; 2629 2642 pcnetUpdateIrq(pThis); 2630 2643 }
Note:
See TracChangeset
for help on using the changeset viewer.