X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FAta%2FAtaBusDxe%2FAtaPassThruExecute.c;h=c947a778a0c16d52774fb5de561556592962bf5f;hb=e3917e22e769898bb0d08d0112e768437f1ff9fb;hp=35a1b47e8a36b63f9bf6c4017227a3ccf17d8aef;hpb=4c33f8b190a439bb931a92eb63eb3cc1806c7ccc;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c index 35a1b47e8a..c947a778a0 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c @@ -10,15 +10,9 @@ for Security Protocol Specific layout. This implementation uses big endian for Cylinder register. - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -119,7 +113,7 @@ UINTN mMaxTransferBlockNumber[] = { EFI_STATUS AtaDevicePassThru ( IN OUT ATA_DEVICE *AtaDevice, - IN OUT EFI_ATA_PASS_THRU_COMMAND_PACKET *TaskPacket, OPTIONAL + IN OUT EFI_ATA_PASS_THRU_COMMAND_PACKET *TaskPacket OPTIONAL, IN OUT EFI_EVENT Event OPTIONAL ) { @@ -315,7 +309,7 @@ IdentifyAtaDevice ( return EFI_UNSUPPORTED; } - DEBUG ((EFI_D_INFO, "AtaBus - Identify Device: Port %x PortMultiplierPort %x\n", AtaDevice->Port, AtaDevice->PortMultiplierPort)); + DEBUG ((DEBUG_INFO, "AtaBus - Identify Device: Port %x PortMultiplierPort %x\n", AtaDevice->Port, AtaDevice->PortMultiplierPort)); // // Check whether the WORD 88 (supported UltraDMA by drive) is valid @@ -470,7 +464,7 @@ DiscoverAtaDevice ( EFI_STATUS TransferAtaDevice ( IN OUT ATA_DEVICE *AtaDevice, - IN OUT EFI_ATA_PASS_THRU_COMMAND_PACKET *TaskPacket, OPTIONAL + IN OUT EFI_ATA_PASS_THRU_COMMAND_PACKET *TaskPacket OPTIONAL, IN OUT VOID *Buffer, IN EFI_LBA StartLba, IN UINT32 TransferLength, @@ -542,7 +536,7 @@ TransferAtaDevice ( // // As AtaBus is used to manage ATA devices, we have to use the lowest transfer rate to // calculate the possible maximum timeout value for each read/write operation. - // The timout value is rounded up to nearest integar and here an additional 30s is added + // The timeout value is rounded up to nearest integer and here an additional 30s is added // to follow ATA spec in which it mentioned that the device may take up to 30s to respond // commands in the Standby/Idle mode. // @@ -633,14 +627,14 @@ AtaTerminateNonBlockingTask ( // // Aborting operation has been done. From now on, don't need to abort normal operation. - // + // OldTpl = gBS->RaiseTPL (TPL_NOTIFY); AtaDevice->Abort = FALSE; gBS->RestoreTPL (OldTpl); } /** - Call back funtion when the event is signaled. + Call back function when the event is signaled. @param[in] Event The Event this notify function registered to. @param[in] Context Pointer to the context data registered to the @@ -680,7 +674,7 @@ AtaNonBlockingCallBack ( } DEBUG (( - EFI_D_BLKIO, + DEBUG_BLKIO, "NON-BLOCKING EVENT FINISHED!- STATUS = %r\n", Task->Token->TransactionStatus )); @@ -689,7 +683,7 @@ AtaNonBlockingCallBack ( // Reduce the SubEventCount, till it comes to zero. // (*Task->UnsignalledEventCount) --; - DEBUG ((EFI_D_BLKIO, "UnsignalledEventCount = %d\n", *Task->UnsignalledEventCount)); + DEBUG ((DEBUG_BLKIO, "UnsignalledEventCount = %d\n", *Task->UnsignalledEventCount)); // // Remove the SubTask from the Task list. @@ -702,7 +696,7 @@ AtaNonBlockingCallBack ( // if (!(*Task->IsError)) { gBS->SignalEvent (Task->Token->Event); - DEBUG ((EFI_D_BLKIO, "Signal the upper layer event!\n")); + DEBUG ((DEBUG_BLKIO, "Signal the upper layer event!\n")); } FreePool (Task->UnsignalledEventCount); @@ -715,8 +709,8 @@ AtaNonBlockingCallBack ( if (!IsListEmpty (&AtaDevice->AtaTaskList)) { Entry = GetFirstNode (&AtaDevice->AtaTaskList); AtaTask = ATA_ASYN_TASK_FROM_ENTRY (Entry); - DEBUG ((EFI_D_BLKIO, "Start to embark a new Ata Task\n")); - DEBUG ((EFI_D_BLKIO, "AtaTask->NumberOfBlocks = %x; AtaTask->Token=%x\n", AtaTask->NumberOfBlocks, AtaTask->Token)); + DEBUG ((DEBUG_BLKIO, "Start to embark a new Ata Task\n")); + DEBUG ((DEBUG_BLKIO, "AtaTask->NumberOfBlocks = %x; AtaTask->Token=%x\n", AtaTask->NumberOfBlocks, AtaTask->Token)); Status = AccessAtaDevice ( AtaTask->AtaDevice, AtaTask->Buffer, @@ -735,7 +729,7 @@ AtaNonBlockingCallBack ( } DEBUG (( - EFI_D_BLKIO, + DEBUG_BLKIO, "PACKET INFO: Write=%s, Length=%x, LowCylinder=%x, HighCylinder=%x, SectionNumber=%x\n", Task->Packet.OutDataBuffer != NULL ? L"YES" : L"NO", Task->Packet.OutDataBuffer != NULL ? Task->Packet.OutTransferLength : Task->Packet.InTransferLength, @@ -844,13 +838,13 @@ AccessAtaDevice( FreePool (EventCount); return EFI_OUT_OF_RESOURCES; } - DEBUG ((EFI_D_BLKIO, "Allocation IsError Addr=%x\n", IsError)); + DEBUG ((DEBUG_BLKIO, "Allocation IsError Addr=%x\n", IsError)); *IsError = FALSE; TempCount = (NumberOfBlocks + MaxTransferBlockNumber - 1) / MaxTransferBlockNumber; *EventCount = TempCount; - DEBUG ((EFI_D_BLKIO, "AccessAtaDevice, NumberOfBlocks=%x\n", NumberOfBlocks)); - DEBUG ((EFI_D_BLKIO, "AccessAtaDevice, MaxTransferBlockNumber=%x\n", MaxTransferBlockNumber)); - DEBUG ((EFI_D_BLKIO, "AccessAtaDevice, EventCount=%x\n", TempCount)); + DEBUG ((DEBUG_BLKIO, "AccessAtaDevice, NumberOfBlocks=%x\n", NumberOfBlocks)); + DEBUG ((DEBUG_BLKIO, "AccessAtaDevice, MaxTransferBlockNumber=%x\n", MaxTransferBlockNumber)); + DEBUG ((DEBUG_BLKIO, "AccessAtaDevice, EventCount=%x\n", TempCount)); } else { while (!IsListEmpty (&AtaDevice->AtaTaskList) || !IsListEmpty (&AtaDevice->AtaSubTaskList)) { // @@ -912,7 +906,7 @@ AccessAtaDevice( // // Blocking Mode. // - DEBUG ((EFI_D_BLKIO, "Blocking AccessAtaDevice, TransferBlockNumber=%x; StartLba = %x\n", TransferBlockNumber, StartLba)); + DEBUG ((DEBUG_BLKIO, "Blocking AccessAtaDevice, TransferBlockNumber=%x; StartLba = %x\n", TransferBlockNumber, StartLba)); Status = TransferAtaDevice (AtaDevice, NULL, Buffer, StartLba, (UINT32) TransferBlockNumber, IsWrite, NULL); }