VirtualBox

Changeset 2839 in vbox


Ignore:
Timestamp:
May 24, 2007 1:24:07 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
21469
Message:

More release logging in relation to aborting of ATA commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r2826 r2839  
    198198
    199199    /** Enable passing through commands directly to the ATAPI drive. */
    200     bool fATAPIPassthrough;
     200    bool            fATAPIPassthrough;
    201201    /** Number of errors we've reported to the release log.
    202202     * This is to prevent flooding caused by something going horribly wrong.
    203203     * this value against MAX_LOG_REL_ERRORS in places likely to cause floods
    204204     * like the ones we currently seeing on the linux smoke tests (2006-11-10). */
    205     uint32_t cErrors;
     205    uint32_t        cErrors;
     206    /** Timestamp of last started command. 0 if no command pending. */
     207    uint64_t        u64CmdTS;
    206208
    207209    /** Pointer to the attached driver's base interface. */
     
    32263228            break;
    32273229        case ATA_IDLE_IMMEDIATE:
     3230            LogRel(("PIIX3 ATA: LUN#%d: aborting current command\n", s->iLUN));
    32283231            ataAbortCurrentCommand(s, false);
    32293232            break;
     
    32443247            if (!s->fATAPI)
    32453248                goto abort_cmd;
     3249            LogRel(("PIIX3 ATA: LUN#%d: performing device RESET\n", s->iLUN));
    32463250            ataAbortCurrentCommand(s, true);
    32473251            break;
     
    35383542#ifdef IN_RING3
    35393543        /* Software RESET low to high */
    3540         LogRel(("PIIX3 ATA: Ctl#%d: RESET, DevSel=%d AIOIf=%d CmdIf0=%#04x CmdIf1=%#04x\n",
     3544        uint32_t uCmdWait0 = -1, uCmdWait1 = -1;
     3545        uint64_t uNow = RTTimeNanoTS();
     3546        if (pCtl->aIfs[0].u64CmdTS)
     3547            uCmdWait0 = (pCtl->aIfs[0].u64CmdTS - uNow) / 1000;
     3548        if (pCtl->aIfs[1].u64CmdTS)
     3549            uCmdWait1 = (pCtl->aIfs[1].u64CmdTS - uNow) / 1000;
     3550        LogRel(("PIIX3 ATA: Ctl#%d: RESET, DevSel=%d AIOIf=%d CmdIf0=%#04x (%d usec ago) CmdIf1=%#04x (%d usec ago)\n",
    35413551                    ATACONTROLLER_IDX(pCtl), pCtl->iSelectedIf, pCtl->iAIOIf,
    3542                     pCtl->aIfs[0].uATARegCommand, pCtl->aIfs[1].uATARegCommand));
     3552                    pCtl->aIfs[0].uATARegCommand, uCmdWait0,
     3553                    pCtl->aIfs[1].uATARegCommand, uCmdWait1));
    35433554        pCtl->fReset = true;
    35443555        /* Everything must be done after the reset flag is set, otherwise
     
    40744085                s->iSourceSink = pReq->u.t.iSourceSink;
    40754086                s->iIOBufferEnd = 0;
     4087                s->u64CmdTS = u64TS;
    40764088
    40774089                pCtl->fChainedTransfer = false;
     
    42944306                pCtl->uAsyncIOState = ATA_AIO_NEW;
    42954307                pCtl->fReset = false;
     4308                LogRel(("PIIX3 ATA: Ctl#%d: finished processing RESET\n",
     4309                        ATACONTROLLER_IDX(pCtl)));
    42964310                for (uint32_t i = 0; i < RT_ELEMENTS(pCtl->aIfs); i++)
    42974311                {
     
    43454359            uWait = u64TS / 1000;
    43464360            Log(("%s: Ctl#%d: LUN#%d finished I/O transaction in %d microseconds\n", __FUNCTION__, ATACONTROLLER_IDX(pCtl), pCtl->aIfs[pCtl->iAIOIf].iLUN, (uint32_t)(uWait)));
     4361            /* Mark command as finished. */
     4362            pCtl->aIfs[pCtl->iAIOIf].u64CmdTS = 0;
    43474363
    43484364            /*
     
    43534369            if (pCtl->aIfs[pCtl->iAIOIf].uATARegCommand != ATA_PACKET)
    43544370            {
    4355                 if (uWait > 10 * 1000 * 1000)
     4371                if (uWait > 8 * 1000 * 1000)
    43564372                {
    43574373                    /*
    4358                      * Command took longer than 10 seconds. This is close
     4374                     * Command took longer than 8 seconds. This is close
    43594375                     * enough or over the guest's command timeout, so place
    43604376                     * an entry in the release log to allow tracking such
     
    49945010    bool            fVMLocked;
    49955011    uint64_t        u64Start;
     5012    PATACONTROLLER  pCtl;
    49965013    bool            fAllIdle = false;
    49975014
     
    50165033        for (uint32_t i = 0; i < RT_ELEMENTS(pData->aCts); i++)
    50175034        {
    5018             fAllIdle &= ataAsyncIOIsIdle(&pData->aCts[i], false);
     5035            pCtl = &pData->aCts[i];
     5036            fAllIdle &= ataAsyncIOIsIdle(pCtl, false);
    50195037            if (!fAllIdle)
    50205038                break;
     
    50305048    if (fVMLocked)
    50315049        pDevIns->pDevHlp->pfnLockVM(pDevIns);
     5050
     5051    if (!fAllIdle)
     5052        LogRel(("PIIX3 ATA: Ctl#%d is still executing, DevSel=%d AIOIf=%d CmdIf0=%#04x CmdIf1=%#04x\n",
     5053                ATACONTROLLER_IDX(pCtl), pCtl->iSelectedIf, pCtl->iAIOIf,
     5054                pCtl->aIfs[0].uATARegCommand, pCtl->aIfs[1].uATARegCommand));
    50325055
    50335056    return fAllIdle;
Note: See TracChangeset for help on using the changeset viewer.

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