Changeset 82798 in vbox for trunk/src/VBox/Devices/Serial
- Timestamp:
- Jan 20, 2020 3:35:50 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135759
- Location:
- trunk/src/VBox/Devices/Serial
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r81585 r82798 192 192 static DECLCALLBACK(int) drvCharQueryStsLines(PPDMISERIALCONNECTOR pInterface, uint32_t *pfStsLines) 193 193 { 194 /* Nothing to do here. */195 *pfStsLines = 0;194 /* Always carrier detect, data set read and clear to send. */ 195 *pfStsLines = PDMISERIALPORT_STS_LINE_DCD | PDMISERIALPORT_STS_LINE_DSR | PDMISERIALPORT_STS_LINE_CTS; 196 196 RT_NOREF(pInterface); 197 197 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Serial/UartCore.cpp
r81897 r82798 1122 1122 } 1123 1123 else if (pThisCC->pDrvSerial) 1124 { 1124 1125 pThisCC->pDrvSerial->pfnChgModemLines(pThisCC->pDrvSerial, 1125 1126 RT_BOOL(uVal & UART_REG_MCR_RTS), 1126 1127 RT_BOOL(uVal & UART_REG_MCR_DTR)); 1128 1129 uint32_t fStsLines = 0; 1130 int rc = pThisCC->pDrvSerial->pfnQueryStsLines(pThisCC->pDrvSerial, &fStsLines); 1131 if (RT_SUCCESS(rc)) 1132 uartR3StsLinesUpdate(pDevIns, pThis, pThisCC, fStsLines); 1133 else 1134 LogRelMax(10, ("Serial#%d: Failed to query status line status with %Rrc during reset\n", 1135 pDevIns->iInstance, rc)); 1136 } 1137 else /* Loopback mode got disabled and no driver attached, fake presence. */ 1138 uartR3MsrUpdate(pDevIns, pThis, pThisCC, UART_REG_MSR_DCD | UART_REG_MSR_CTS | UART_REG_MSR_DSR); 1127 1139 #endif 1128 1140 } … … 1549 1561 ASMAtomicSubU32(&pThis->cbAvailRdr, 1); 1550 1562 } 1563 1551 1564 if (cbRead == 1) 1552 1565 PDMDevHlpTimerSetRelative(pDevIns, pThis->hTimerTxUnconnected, pThis->cSymbolXferTicks, NULL); 1566 else 1567 { 1568 /* NO data left, set the transmitter holding register as empty. */ 1569 UART_REG_SET(pThis->uRegLsr, UART_REG_LSR_TEMT); 1570 } 1553 1571 1554 1572 PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect); … … 1884 1902 pThis->uRegMcr = 0; 1885 1903 pThis->uRegLsr = UART_REG_LSR_THRE | UART_REG_LSR_TEMT; 1886 pThis->uRegMsr = 0; /* Updated below. */1904 pThis->uRegMsr = UART_REG_MSR_DCD | UART_REG_MSR_CTS | UART_REG_MSR_DSR | UART_REG_MSR_DCTS | UART_REG_MSR_DDSR | UART_REG_MSR_DDCD; 1887 1905 pThis->uRegScr = 0; 1888 1906 pThis->fIrqCtiPending = false;
Note:
See TracChangeset
for help on using the changeset viewer.