VirtualBox

Changeset 29439 in vbox


Ignore:
Timestamp:
May 13, 2010 12:32:18 AM (15 years ago)
Author:
vboxsync
Message:

DevE1000: Fixed bug in e1kRegWriteRCTL wrt calculating and updating u16RxBSize. The calculation was done using the old register value and RCTL.BSEX was ignored when checking whether an update was necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r29435 r29439  
    25792579#endif
    25802580    }
     2581
    25812582    /* Adjust receive buffer size */
    2582     if (GET_BITS(RCTL, BSIZE) != GET_BITS_V(value, RCTL, BSIZE))
    2583     {
    2584         pState->u16RxBSize = 2048 >> GET_BITS(RCTL, BSIZE);
    2585         if (RCTL & RCTL_BSEX)
    2586             pState->u16RxBSize *= 16;
    2587         E1kLog2(("%s e1kRegWriteRCTL: Setting receive buffer size to %d\n",
    2588                  INSTANCE(pState), pState->u16RxBSize));
    2589     }
     2583    unsigned cbRxBuf = 2048 >> GET_BITS_V(value, RCTL, BSIZE);
     2584    if (value & RCTL_BSEX)
     2585        cbRxBuf *= 16;
     2586    if (cbRxBuf != pState->u16RxBSize)
     2587        E1kLog2(("%s e1kRegWriteRCTL: Setting receive buffer size to %d (old %d)\n",
     2588                 INSTANCE(pState), cbRxBuf, pState->u16RxBSize));
     2589    pState->u16RxBSize = cbRxBuf;
     2590
     2591    /* Update the register */
    25902592    e1kRegWriteDefault(pState, offset, index, value);
    25912593
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette