Changeset 81879 in vbox
- Timestamp:
- Nov 15, 2019 3:38:29 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134674
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r81878 r81879 511 511 #endif 512 512 513 /** Countdown timer for command completion coalescing - R3 ptr */ 514 PTMTIMERR3 pHbaCccTimerR3; 515 /** Countdown timer for command completion coalescing - R0 ptr */ 516 PTMTIMERR0 pHbaCccTimerR0; 517 /** Countdown timer for command completion coalescing - RC ptr */ 518 PTMTIMERRC pHbaCccTimerRC; 519 520 #if HC_ARCH_BITS == 64 521 uint32_t Alignment4; 522 #endif 513 /** Countdown timer for command completion coalescing. */ 514 TMTIMERHANDLE hHbaCccTimer; 523 515 524 516 /** Which port number is used to mark an CCC interrupt */ … … 903 895 { 904 896 /* Reset command completion coalescing state. */ 905 TMTimerSetMillies(pAhci->CTX_SUFF(pHbaCccTimer), pAhci->uCccTimeout);897 PDMDevHlpTimerSetMillies(pAhci->CTX_SUFF(pDevIns), pAhci->hHbaCccTimer, pAhci->uCccTimeout); 906 898 pAhci->uCccCurrentNr = 0; 907 899 … … 936 928 #ifdef IN_RING3 937 929 938 /* 939 * Assert irq when an CCC timeout occurs930 /** 931 * @callback_method_impl{FNTMTIMERDEV, Assert irq when an CCC timeout occurs.} 940 932 */ 941 933 static DECLCALLBACK(void) ahciCccTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) … … 985 977 } 986 978 987 pAhciPort->regSSTS = (0x01 << 8) |/* Interface is active. */988 979 pAhciPort->regSSTS = (0x01 << 8) /* Interface is active. */ 980 | (0x03 << 0); /* Device detected and communication established. */ 989 981 990 982 /* … … 1792 1784 1793 1785 if (u32Value & AHCI_HBA_CCC_CTL_EN) 1794 TMTimerSetMillies(pAhci->CTX_SUFF(pHbaCccTimer), pAhci->uCccTimeout); /* Arm the timer */1786 PDMDevHlpTimerSetMillies(pAhci->CTX_SUFF(pDevIns), pAhci->hHbaCccTimer, pAhci->uCccTimeout); /* Arm the timer */ 1795 1787 else 1796 TMTimerStop(pAhci->CTX_SUFF(pHbaCccTimer));1788 PDMDevHlpTimerStop(pAhci->CTX_SUFF(pDevIns), pAhci->hHbaCccTimer); 1797 1789 1798 1790 return VINF_SUCCESS; … … 2032 2024 if (pThis->regHbaCccCtl & AHCI_HBA_CCC_CTL_EN) 2033 2025 { 2034 rc = TMTimerStop(pThis->CTX_SUFF(pHbaCccTimer));2026 rc = PDMDevHlpTimerStop(pThis->CTX_SUFF(pDevIns), pThis->hHbaCccTimer); 2035 2027 if (RT_FAILURE(rc)) 2036 2028 AssertMsgFailed(("%s: Failed to stop timer!\n", __FUNCTION__)); … … 5229 5221 5230 5222 pAhci->pDevInsRC += offDelta; 5231 pAhci->pHbaCccTimerRC = TMTimerRCPtr(pAhci->pHbaCccTimerR3);5232 5223 5233 5224 /* Relocate every port. */ … … 5773 5764 if (PDMDevHlpCritSectIsInitialized(pDevIns, &pThis->lock)) 5774 5765 { 5775 TMR3TimerDestroy(pThis->CTX_SUFF(pHbaCccTimer));5776 pThis-> CTX_SUFF(pHbaCccTimer) = NULL;5766 PDMDevHlpTimerDestroy(pDevIns, pThis->hHbaCccTimer); 5767 pThis->hHbaCccTimer = NIL_TMTIMERHANDLE; 5777 5768 5778 5769 Log(("%s: Destruct every port\n", __FUNCTION__)); … … 5994 5985 5995 5986 /* Create the timer for command completion coalescing feature. */ 5996 rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, ahciCccTimer, pThis, 5997 TMTIMER_FLAGS_NO_CRIT_SECT, "AHCI CCC Timer", &pThis->pHbaCccTimerR3); 5998 if (RT_FAILURE(rc)) 5999 { 6000 AssertMsgFailed(("pfnTMTimerCreate -> %Rrc\n", rc)); 6001 return rc; 6002 } 6003 pThis->pHbaCccTimerR0 = TMTimerR0Ptr(pThis->pHbaCccTimerR3); 6004 pThis->pHbaCccTimerRC = TMTimerRCPtr(pThis->pHbaCccTimerR3); 5987 rc = PDMDevHlpTimerCreate(pDevIns, TMCLOCK_VIRTUAL, ahciCccTimer, pThis, 5988 TMTIMER_FLAGS_NO_CRIT_SECT, "AHCI CCC Timer", &pThis->hHbaCccTimer); 5989 AssertRCReturn(rc, rc); 6005 5990 6006 5991 /* Status LUN. */
Note:
See TracChangeset
for help on using the changeset viewer.