VirtualBox

Changeset 29047 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 4, 2010 10:38:43 PM (15 years ago)
Author:
vboxsync
Message:

AHCI: Fix error reporting protocol violation

File:
1 edited

Legend:

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

    r29030 r29047  
    38853885 * @param   pAhciPort           The port for which the SDB Fis is send.
    38863886 * @param   uFinishedTasks      Bitmask of finished tasks.
    3887  * @param   pAhciPortTaskState  The state of the last task.
    38883887 * @param   fInterrupt          If an interrupt should be asserted.
    38893888 */
    3890 static void ahciSendSDBFis(PAHCIPort pAhciPort, uint32_t uFinishedTasks, PAHCIPORTTASKSTATE pAhciPortTaskState, bool fInterrupt)
     3889static void ahciSendSDBFis(PAHCIPort pAhciPort, uint32_t uFinishedTasks, bool fInterrupt)
    38913890{
    38923891    uint32_t sdbFis[2];
     
    49344933
    49354934        if (!cOutstandingTasks)
    4936             ahciSendSDBFis(pAhciPort, 0, pAhciPortTaskState, true);
     4935            ahciSendSDBFis(pAhciPort, 0, true);
    49374936    }
    49384937    else
     
    52035202                                uChkSum += aBuf[i];
    52045203
    5205                             aBuf[511] = ~uChkSum;
     5204                            aBuf[511] = (uint8_t)-(int8_t)uChkSum;
     5205
     5206                            /*
     5207                             * Reading this log page results in an abort of all outstanding commands
     5208                             * and clearing the SActive register and TaskFile register.
     5209                             */
     5210                            ahciSendSDBFis(pAhciPort, 0xffffffff, true);
    52065211                        }
    52075212                        break;
     
    54675472        {
    54685473#ifdef RT_STRICT
    5469             bool fXchg = ASMAtomicCmpXchgBool(&pAhciPortTaskState->fActive, false, true);
     5474            fXchg = ASMAtomicCmpXchgBool(&pAhciPortTaskState->fActive, false, true);
    54705475            AssertMsg(fXchg, ("Task is not active\n"));
    54715476#endif
     
    58135818            {
    58145819                if (uQueuedTasksFinished && RT_LIKELY(!pAhciPort->fPortReset))
    5815                     ahciSendSDBFis(pAhciPort, uQueuedTasksFinished, pAhciPortTaskState, true);
     5820                    ahciSendSDBFis(pAhciPort, uQueuedTasksFinished, true);
    58165821
    58175822                uQueuedTasksFinished = 0;
     
    58225827
    58235828        if (uQueuedTasksFinished && RT_LIKELY(!pAhciPort->fPortReset))
    5824             ahciSendSDBFis(pAhciPort, uQueuedTasksFinished, pAhciPortTaskState, true);
     5829            ahciSendSDBFis(pAhciPort, uQueuedTasksFinished, true);
    58255830
    58265831        uQueuedTasksFinished = 0;
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