Changeset 33013 in vbox
- Timestamp:
- Oct 8, 2010 3:58:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r32957 r33013 2620 2620 d2hFis[AHCI_CMDFIS_SECTC] = 0x01; 2621 2621 2622 pAhciPort->regTFD = (1 << 8) | ATA_STAT_READY | ATA_STAT_SEEK | ATA_STAT_WRERR; 2622 pAhciPort->regTFD = (1 << 8) | ATA_STAT_SEEK | ATA_STAT_WRERR; 2623 if (!pAhciPort->fATAPI) 2624 pAhciPort->regTFD |= ATA_STAT_READY; 2623 2625 2624 2626 ahciPostFisIntoMemory(pAhciPort, AHCI_CMDFIS_TYPE_D2H, d2hFis); … … 4502 4504 4503 4505 /** 4506 * Initiates a device reset caused by ATA_DEVICE_RESET (ATAPI only). 4507 * 4508 * @returns nothing. 4509 * @param pAhciPort The device to reset. 4510 * @param pAhciPortTaskState The task state. 4511 */ 4512 static void ahciDeviceReset(PAHCIPort pAhciPort, PAHCIPORTTASKSTATE pAhciPortTaskState) 4513 { 4514 ASMAtomicWriteBool(&pAhciPort->fResetDevice, true); 4515 4516 /* 4517 * Because this ATAPI only and ATAPI can't have 4518 * more than one command active at a time the task counter should be 0 4519 * and it is possible to finish the reset now. 4520 */ 4521 Assert(ASMAtomicReadU32(&pAhciPort->uActTasksActive) == 0); 4522 ahciFinishStorageDeviceReset(pAhciPort, pAhciPortTaskState); 4523 } 4524 4525 /** 4504 4526 * Build a D2H FIS and post into the memory area of the guest. 4505 4527 * … … 5813 5835 pAhciPortTaskState->uATARegError = ABRT_ERR; 5814 5836 pAhciPortTaskState->uATARegStatus = ATA_STAT_READY | ATA_STAT_ERR; 5837 } 5838 break; 5839 } 5840 case ATA_DEVICE_RESET: 5841 { 5842 if (!pAhciPort->fATAPI) 5843 { 5844 pAhciPortTaskState->uATARegError = ABRT_ERR; 5845 pAhciPortTaskState->uATARegStatus = ATA_STAT_READY | ATA_STAT_ERR; 5846 } 5847 else 5848 { 5849 /* Reset the device. */ 5850 ahciDeviceReset(pAhciPort, pAhciPortTaskState); 5815 5851 } 5816 5852 break;
Note:
See TracChangeset
for help on using the changeset viewer.