VirtualBox

Changeset 73777 in vbox for trunk/src/VBox/Devices/Serial


Ignore:
Timestamp:
Aug 20, 2018 10:36:51 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
124460
Message:

Devices/Serial/UartCore.cpp: Fix character timeout indication interrupt generation. The timer callback needs to respect the ITL level and we have to start the timer in the receive FIFO fill callback when the amount characters received is below the configured ITL. Should fix I/O hangs with Windows guests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Serial/UartCore.cpp

    r73713 r73777  
    648648    {
    649649        UART_REG_SET(pThis->uRegLsr, UART_REG_LSR_DR);
     650        if (pFifo->cbUsed < pFifo->cbItl)
     651        {
     652            pThis->fIrqCtiPending = false;
     653            TMTimerSetRelative(pThis->CTX_SUFF(pTimerRcvFifoTimeout), pThis->cSymbolXferTicks * 4, NULL);
     654        }
    650655        uartIrqUpdate(pThis);
    651656    }
     
    10711076                    UART_REG_CLR(pThis->uRegLsr, UART_REG_LSR_DR);
    10721077                }
    1073                 else
    1074                 {
    1075                     uint64_t tsCtiFire = TMTimerGet(pThis->CTX_SUFF(pTimerRcvFifoTimeout)) + pThis->cSymbolXferTicks * 4;
    1076                     TMTimerSet(pThis->CTX_SUFF(pTimerRcvFifoTimeout), tsCtiFire);
    1077                 }
     1078                else if (pThis->FifoRecv.cbUsed < pThis->FifoRecv.cbItl)
     1079                    TMTimerSetRelative(pThis->CTX_SUFF(pTimerRcvFifoTimeout), pThis->cSymbolXferTicks * 4, NULL);
    10781080                uartIrqUpdate(pThis);
    10791081            }
     
    13621364static DECLCALLBACK(void) uartR3RcvFifoTimeoutTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    13631365{
     1366    LogFlowFunc(("pDevIns=%#p pTimer=%#p pvUser=%#p\n", pDevIns, pTimer, pvUser));
    13641367    RT_NOREF(pDevIns, pTimer);
    13651368    PUARTCORE pThis = (PUARTCORE)pvUser;
    13661369    PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
    1367     if (pThis->FifoRecv.cbUsed)
     1370    if (pThis->FifoRecv.cbUsed < pThis->FifoRecv.cbItl)
    13681371    {
    13691372        pThis->fIrqCtiPending = true;
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