summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-09 23:41:12 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-09 23:41:12 +0000
commited72955cc855cd232ba75ff8dde334569f90f913 (patch)
tree64883b047b3b43a8833841717a04907bf6ae90db /EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe
parent1f0032d8b9afa0f8a270639bf3b6131d802ccac1 (diff)
downloadedk2-platforms-ed72955cc855cd232ba75ff8dde334569f90f913.tar.xz
Update comments to conform to the new, Doxygen friendly, coding standard. These are structural changes only. There is NO NEW CONTENT.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@461 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe')
-rw-r--r--EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c1006
-rw-r--r--EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.h621
-rw-r--r--EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/ComponentName.c165
3 files changed, 791 insertions, 1001 deletions
diff --git a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c
index 6fe81d1521..1bdce40f67 100644
--- a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c
+++ b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c
@@ -1,23 +1,14 @@
-/*++
+/** @file
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. 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
-Copyright (c) 2006, Intel Corporation
-All rights reserved. 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.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
-
- AtapiPassThru.c
-
-Abstract:
-
-
-Revision History
---*/
+**/
#include "AtapiPassThru.h"
@@ -46,9 +37,9 @@ AtapiScsiPassThruDriverBindingStop (
IN EFI_HANDLE *ChildHandleBuffer
);
-//
-// IDE registers' fixed address
-//
+///
+/// IDE registers' fixed address
+///
static IDE_BASE_REGISTERS gAtapiIoPortRegisters[2] = {
{ 0x1f0, { 0x1f1 }, 0x1f2, 0x1f3, 0x1f4, 0x1f5, 0x1f6, { 0x1f7 }, { 0x3f6 }, 0x3f7, 0 },
{ 0x170, { 0x171 }, 0x172, 0x173, 0x174, 0x175, 0x176, { 0x177 }, { 0x376 }, 0x377, 0 }
@@ -56,9 +47,9 @@ static IDE_BASE_REGISTERS gAtapiIoPortRegisters[2] = {
static SCSI_COMMAND_SET gEndTable = { 0xff, 0xff };
-//
-// This table contains all the supported ATAPI commands.
-//
+///
+/// This table contains all the supported ATAPI commands.
+///
static SCSI_COMMAND_SET gSupportedATAPICommands[] = {
{ OP_INQUIRY, DataIn },
{ OP_LOAD_UNLOAD_CD, NoData },
@@ -107,6 +98,18 @@ EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding = {
NULL
};
+/**
+ Supported.
+
+ (Standard DriverBinding Protocol Supported() function)
+
+ @return EFI_STATUS
+
+ @todo This - add argument and description to function comment
+ @todo Controller - add argument and description to function comment
+ @todo RemainingDevicePath - add argument and description to function comment
+ @todo EFI_UNSUPPORTED - add return value to function comment
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingSupported (
@@ -114,22 +117,6 @@ AtapiScsiPassThruDriverBindingSupported (
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
- Routine Description:
- Supported.
-
- Arguments:
- (Standard DriverBinding Protocol Supported() function)
-
- Returns:
- EFI_STATUS
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: Controller - add argument and description to function comment
-// TODO: RemainingDevicePath - add argument and description to function comment
-// TODO: EFI_UNSUPPORTED - add return value to function comment
{
EFI_STATUS Status;
EFI_PCI_IO_PROTOCOL *PciIo;
@@ -186,6 +173,18 @@ AtapiScsiPassThruDriverBindingSupported (
return Status;
}
+/**
+ Create handles for IDE channels specified by RemainingDevicePath.
+ Install SCSI Pass Thru Protocol onto each created handle.
+
+ (Standard DriverBinding Protocol Start() function)
+
+ @return EFI_STATUS
+
+ @todo This - add argument and description to function comment
+ @todo Controller - add argument and description to function comment
+ @todo RemainingDevicePath - add argument and description to function comment
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingStart (
@@ -193,22 +192,6 @@ AtapiScsiPassThruDriverBindingStart (
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
- Routine Description:
- Create handles for IDE channels specified by RemainingDevicePath.
- Install SCSI Pass Thru Protocol onto each created handle.
-
- Arguments:
- (Standard DriverBinding Protocol Start() function)
-
- Returns:
- EFI_STATUS
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: Controller - add argument and description to function comment
-// TODO: RemainingDevicePath - add argument and description to function comment
{
EFI_STATUS Status;
EFI_PCI_IO_PROTOCOL *PciIo;
@@ -263,6 +246,19 @@ Done:
return Status;
}
+/**
+ Stop.
+
+ (Standard DriverBinding Protocol Stop() function)
+
+ @return EFI_STATUS
+
+ @todo This - add argument and description to function comment
+ @todo Controller - add argument and description to function comment
+ @todo NumberOfChildren - add argument and description to function comment
+ @todo ChildHandleBuffer - add argument and description to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingStop (
@@ -271,23 +267,6 @@ AtapiScsiPassThruDriverBindingStop (
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
- Routine Description:
- Stop.
-
- Arguments:
- (Standard DriverBinding Protocol Stop() function)
-
- Returns:
- EFI_STATUS
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: Controller - add argument and description to function comment
-// TODO: NumberOfChildren - add argument and description to function comment
-// TODO: ChildHandleBuffer - add argument and description to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru;
@@ -337,28 +316,25 @@ AtapiScsiPassThruDriverBindingStop (
return EFI_SUCCESS;
}
+/**
+ Attaches SCSI Pass Thru Protocol for specified IDE channel.
+
+ @param Controller: Parent device handle to the IDE channel.
+ @param PciIo: PCI I/O protocol attached on the "Controller".
+
+ @return EFI_SUCCESS Always returned unless installing SCSI Pass Thru Protocol failed.
+
+ @todo This - add argument and description to function comment
+ @todo Controller - add argument and description to function comment
+ @todo PciIo - add argument and description to function comment
+ @todo EFI_OUT_OF_RESOURCES - add return value to function comment
+**/
EFI_STATUS
RegisterAtapiScsiPassThru (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_PCI_IO_PROTOCOL *PciIo
)
-/*++
-
- Routine Description:
- Attaches SCSI Pass Thru Protocol for specified IDE channel.
-
- Arguments:
- Controller: Parent device handle to the IDE channel.
- PciIo: PCI I/O protocol attached on the "Controller".
-
- Returns:
- Always return EFI_SUCCESS unless installing SCSI Pass Thru Protocol failed.
---*/
-// TODO: This - add argument and description to function comment
-// TODO: Controller - add argument and description to function comment
-// TODO: PciIo - add argument and description to function comment
-// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
{
EFI_STATUS Status;
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate;
@@ -427,6 +403,29 @@ RegisterAtapiScsiPassThru (
return Status;
}
+/**
+ Implements EFI_SCSI_PASS_THRU_PROTOCOL.PassThru() function.
+
+ @param This The EFI_SCSI_PASS_THRU_PROTOCOL instance.
+ @param Target The Target ID of the ATAPI device to send the SCSI
+ Request Packet. To ATAPI devices attached on an IDE
+ Channel, Target ID 0 indicates Master device;Target
+ ID 1 indicates Slave device.
+ @param Lun The LUN of the ATAPI device to send the SCSI Request
+ Packet. To the ATAPI device, Lun is always 0.
+ @param Packet The SCSI Request Packet to send to the ATAPI device
+ specified by Target and Lun.
+ @param Event If non-blocking I/O is not supported then Event is ignored,
+ and blocking I/O is performed.<br>
+ If Event is NULL, then blocking I/O is performed.<br>
+ If Event is not NULL and non blocking I/O is supported,
+ then non-blocking I/O is performed, and Event will be signaled
+ when the SCSI Request Packet completes.
+
+ @todo This - add argument and description to function comment
+ @todo EFI_INVALID_PARAMETER - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruFunction (
@@ -436,34 +435,6 @@ AtapiScsiPassThruFunction (
IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
)
-/*++
-
- Routine Description:
- Implements EFI_SCSI_PASS_THRU_PROTOCOL.PassThru() function.
-
- Arguments:
- This: The EFI_SCSI_PASS_THRU_PROTOCOL instance.
- Target: The Target ID of the ATAPI device to send the SCSI
- Request Packet. To ATAPI devices attached on an IDE
- Channel, Target ID 0 indicates Master device;Target
- ID 1 indicates Slave device.
- Lun: The LUN of the ATAPI device to send the SCSI Request
- Packet. To the ATAPI device, Lun is always 0.
- Packet: The SCSI Request Packet to send to the ATAPI device
- specified by Target and Lun.
- Event: If non-blocking I/O is not supported then Event is ignored,
- and blocking I/O is performed.
- If Event is NULL, then blocking I/O is performed.
- If Event is not NULL and non blocking I/O is supported,
- then non-blocking I/O is performed, and Event will be signaled
- when the SCSI Request Packet completes.
-
- Returns:
-
---*/
-// TODO: This - add argument and description to function comment
-// TODO: EFI_INVALID_PARAMETER - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
{
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate;
EFI_STATUS Status;
@@ -515,6 +486,29 @@ AtapiScsiPassThruFunction (
return Status;
}
+/**
+ Used to retrieve the list of legal Target IDs for SCSI devices
+ on a SCSI channel.
+
+ @param This Protocol instance pointer.
+ @param Target On input, a pointer to the Target ID of a SCSI
+ device present on the SCSI channel. On output,
+ a pointer to the Target ID of the next SCSI device
+ present on a SCSI channel. An input value of
+ 0xFFFFFFFF retrieves the Target ID of the first
+ SCSI device present on a SCSI channel.
+ @param Lun On input, a pointer to the LUN of a SCSI device
+ present on the SCSI channel. On output, a pointer
+ to the LUN of the next SCSI device present on
+ a SCSI channel.
+
+ @retval EFI_SUCCESS The Target ID and Lun of the next SCSI device
+ on the SCSI channel was returned in Target and Lun.
+ @retval EFI_NOT_FOUND There are no more SCSI devices on this SCSI channel.
+ @retval EFI_INVALID_PARAMETER Target is not 0xFFFFFFFF,and Target and Lun were not
+ returned on a previous call to GetNextDevice().
+
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruGetNextDevice (
@@ -522,32 +516,6 @@ AtapiScsiPassThruGetNextDevice (
IN OUT UINT32 *Target,
IN OUT UINT64 *Lun
)
-/*++
-
- Routine Description:
- Used to retrieve the list of legal Target IDs for SCSI devices
- on a SCSI channel.
-
- Arguments:
- This - Protocol instance pointer.
- Target - On input, a pointer to the Target ID of a SCSI
- device present on the SCSI channel. On output,
- a pointer to the Target ID of the next SCSI device
- present on a SCSI channel. An input value of
- 0xFFFFFFFF retrieves the Target ID of the first
- SCSI device present on a SCSI channel.
- Lun - On input, a pointer to the LUN of a SCSI device
- present on the SCSI channel. On output, a pointer
- to the LUN of the next SCSI device present on
- a SCSI channel.
-
- Returns:
- EFI_SUCCESS - The Target ID and Lun of the next SCSI device
- on the SCSI channel was returned in Target and Lun.
- EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.
- EFI_INVALID_PARAMETER - Target is not 0xFFFFFFFF,and Target and Lun were not
- returned on a previous call to GetNextDevice().
---*/
{
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate;
@@ -591,6 +559,33 @@ AtapiScsiPassThruGetNextDevice (
}
+/**
+ Used to allocate and build a device path node for a SCSI device
+ on a SCSI channel. Would not build device path for a SCSI Host Controller.
+
+ @param This Protocol instance pointer.
+ @param Target The Target ID of the SCSI device for which
+ a device path node is to be allocated and built.
+ @param Lun The LUN of the SCSI device for which a device
+ path node is to be allocated and built.
+ @param DevicePath A pointer to a single device path node that
+ describes the SCSI device specified by
+ Target and Lun. This function is responsible
+ for allocating the buffer DevicePath with the boot
+ service AllocatePool(). It is the caller's
+ responsibility to free DevicePath when the caller
+ is finished with DevicePath.
+
+ @retval EFI_SUCCESS The device path node that describes the SCSI device
+ specified by Target and Lun was allocated and
+ returned in DevicePath.
+ @retval EFI_NOT_FOUND The SCSI devices specified by Target and Lun does
+ not exist on the SCSI channel.
+ @retval EFI_INVALID_PARAMETER DevicePath is NULL.
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate
+ DevicePath.
+
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruBuildDevicePath (
@@ -599,35 +594,6 @@ AtapiScsiPassThruBuildDevicePath (
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
)
-/*++
-
- Routine Description:
- Used to allocate and build a device path node for a SCSI device
- on a SCSI channel. Would not build device path for a SCSI Host Controller.
-
- Arguments:
- This - Protocol instance pointer.
- Target - The Target ID of the SCSI device for which
- a device path node is to be allocated and built.
- Lun - The LUN of the SCSI device for which a device
- path node is to be allocated and built.
- DevicePath - A pointer to a single device path node that
- describes the SCSI device specified by
- Target and Lun. This function is responsible
- for allocating the buffer DevicePath with the boot
- service AllocatePool(). It is the caller's
- responsibility to free DevicePath when the caller
- is finished with DevicePath.
- Returns:
- EFI_SUCCESS - The device path node that describes the SCSI device
- specified by Target and Lun was allocated and
- returned in DevicePath.
- EFI_NOT_FOUND - The SCSI devices specified by Target and Lun does
- not exist on the SCSI channel.
- EFI_INVALID_PARAMETER - DevicePath is NULL.
- EFI_OUT_OF_RESOURCES - There are not enough resources to allocate
- DevicePath.
---*/
{
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate;
EFI_DEV_PATH *Node;
@@ -670,6 +636,29 @@ AtapiScsiPassThruBuildDevicePath (
return EFI_SUCCESS;
}
+/**
+ Used to translate a device path node to a Target ID and LUN.
+
+ @param This Protocol instance pointer.
+ @param DevicePath A pointer to the device path node that
+ describes a SCSI device on the SCSI channel.
+ @param Target A pointer to the Target ID of a SCSI device
+ on the SCSI channel.
+ @param Lun A pointer to the LUN of a SCSI device on
+ the SCSI channel.
+
+ @retval EFI_SUCCESS DevicePath was successfully translated to a
+ Target ID and LUN, and they were returned
+ in Target and Lun.
+ @retval EFI_INVALID_PARAMETER DevicePath is NULL.
+ @retval EFI_INVALID_PARAMETER Target is NULL.
+ @retval EFI_INVALID_PARAMETER Lun is NULL.
+ @retval EFI_UNSUPPORTED This driver does not support the device path
+ node type in DevicePath.
+ @retval EFI_NOT_FOUND A valid translation from DevicePath to a
+ Target ID and LUN does not exist.
+
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruGetTargetLun (
@@ -678,31 +667,6 @@ AtapiScsiPassThruGetTargetLun (
OUT UINT32 *Target,
OUT UINT64 *Lun
)
-/*++
-
- Routine Description:
- Used to translate a device path node to a Target ID and LUN.
-
- Arguments:
- This - Protocol instance pointer.
- DevicePath - A pointer to the device path node that
- describes a SCSI device on the SCSI channel.
- Target - A pointer to the Target ID of a SCSI device
- on the SCSI channel.
- Lun - A pointer to the LUN of a SCSI device on
- the SCSI channel.
- Returns:
- EFI_SUCCESS - DevicePath was successfully translated to a
- Target ID and LUN, and they were returned
- in Target and Lun.
- EFI_INVALID_PARAMETER - DevicePath is NULL.
- EFI_INVALID_PARAMETER - Target is NULL.
- EFI_INVALID_PARAMETER - Lun is NULL.
- EFI_UNSUPPORTED - This driver does not support the device path
- node type in DevicePath.
- EFI_NOT_FOUND - A valid translation from DevicePath to a
- Target ID and LUN does not exist.
---*/
{
EFI_DEV_PATH *Node;
@@ -734,29 +698,26 @@ AtapiScsiPassThruGetTargetLun (
return EFI_SUCCESS;
}
+/**
+ Resets a SCSI channel.This operation resets all the
+ SCSI devices connected to the SCSI channel.
+
+ @param This Protocol instance pointer.
+
+ @retval EFI_SUCCESS The SCSI channel was reset.
+ @retval EFI_UNSUPPORTED The SCSI channel does not support
+ a channel reset operation.
+ @retval EFI_DEVICE_ERROR A device error occurred while
+ attempting to reset the SCSI channel.
+ @retval EFI_TIMEOUT A timeout occurred while attempting
+ to reset the SCSI channel.
+
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruResetChannel (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This
)
-/*++
-
- Routine Description:
- Resets a SCSI channel.This operation resets all the
- SCSI devices connected to the SCSI channel.
-
- Arguments:
- This - Protocol instance pointer.
-
- Returns:
- EFI_SUCCESS - The SCSI channel was reset.
- EFI_UNSUPPORTED - The SCSI channel does not support
- a channel reset operation.
- EFI_DEVICE_ERROR - A device error occurred while
- attempting to reset the SCSI channel.
- EFI_TIMEOUT - A timeout occurred while attempting
- to reset the SCSI channel.
---*/
{
UINT8 DeviceControlValue;
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate;
@@ -813,6 +774,25 @@ AtapiScsiPassThruResetChannel (
return EFI_SUCCESS;
}
+/**
+ Resets a SCSI device that is connected to a SCSI channel.
+
+ @param This Protocol instance pointer.
+ @param Target The Target ID of the SCSI device to reset.
+ @param Lun The LUN of the SCSI device to reset.
+
+ @retval EFI_SUCCESS The SCSI device specified by Target and
+ Lun was reset.
+ @retval EFI_UNSUPPORTED The SCSI channel does not support a target
+ reset operation.
+ @retval EFI_INVALID_PARAMETER Target or Lun are invalid.
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting
+ to reset the SCSI device specified by Target
+ and Lun.
+ @retval EFI_TIMEOUT A timeout occurred while attempting to reset
+ the SCSI device specified by Target and Lun.
+
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruResetTarget (
@@ -820,28 +800,6 @@ AtapiScsiPassThruResetTarget (
IN UINT32 Target,
IN UINT64 Lun
)
-/*++
-
- Routine Description:
- Resets a SCSI device that is connected to a SCSI channel.
-
- Arguments:
- This - Protocol instance pointer.
- Target - The Target ID of the SCSI device to reset.
- Lun - The LUN of the SCSI device to reset.
-
- Returns:
- EFI_SUCCESS - The SCSI device specified by Target and
- Lun was reset.
- EFI_UNSUPPORTED - The SCSI channel does not support a target
- reset operation.
- EFI_INVALID_PARAMETER - Target or Lun are invalid.
- EFI_DEVICE_ERROR - A device error occurred while attempting
- to reset the SCSI device specified by Target
- and Lun.
- EFI_TIMEOUT - A timeout occurred while attempting to reset
- the SCSI device specified by Target and Lun.
---*/
{
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate;
UINT8 Command;
@@ -899,25 +857,24 @@ AtapiScsiPassThruResetTarget (
}
+/**
+ Checks the parameters in the SCSI Request Packet to make sure
+ they are valid for a SCSI Pass Thru request.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo Packet - add argument and description to function comment
+ @todo EFI_INVALID_PARAMETER - add return value to function comment
+ @todo EFI_INVALID_PARAMETER - add return value to function comment
+ @todo EFI_INVALID_PARAMETER - add return value to function comment
+ @todo EFI_UNSUPPORTED - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
EFI_STATUS
CheckSCSIRequestPacket (
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet
)
-/*++
-
- Checks the parameters in the SCSI Request Packet to make sure
- they are valid for a SCSI Pass Thru request.
-
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: Packet - add argument and description to function comment
-// TODO: EFI_INVALID_PARAMETER - add return value to function comment
-// TODO: EFI_INVALID_PARAMETER - add return value to function comment
-// TODO: EFI_INVALID_PARAMETER - add return value to function comment
-// TODO: EFI_UNSUPPORTED - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
{
if (Packet == NULL) {
return EFI_INVALID_PARAMETER;
@@ -941,21 +898,20 @@ CheckSCSIRequestPacket (
return EFI_SUCCESS;
}
+/**
+ Checks the requested SCSI command:
+ Is it supported by this driver?
+ Is the Data transfer direction reasonable?
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo Packet - add argument and description to function comment
+**/
BOOLEAN
IsCommandValid (
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet
)
-/*++
-
- Checks the requested SCSI command:
- Is it supported by this driver?
- Is the Data transfer direction reasonable?
-
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: Packet - add argument and description to function comment
{
UINT8 Index;
UINT8 *OpCode;
@@ -995,30 +951,25 @@ IsCommandValid (
return FALSE;
}
+/**
+ Performs blocking I/O request.
+
+ @param AtapiScsiPrivate Private data structure for the specified channel.
+ @param Target The Target ID of the ATAPI device to send the SCSI
+ Request Packet. To ATAPI devices attached on an IDE
+ Channel, Target ID 0 indicates Master device;Target
+ ID 1 indicates Slave device.
+ @param Packet The SCSI Request Packet to send to the ATAPI device
+ specified by Target.
+
+ @todo AtapiScsiPrivate - add argument and description to function comment
+**/
EFI_STATUS
SubmitBlockingIoCommand (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT32 Target,
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet
)
-/*++
-
-Routine Description:
- Performs blocking I/O request.
-
- Arguments:
- AtapiScsiPrivate: Private data structure for the specified channel.
- Target: The Target ID of the ATAPI device to send the SCSI
- Request Packet. To ATAPI devices attached on an IDE
- Channel, Target ID 0 indicates Master device;Target
- ID 1 indicates Slave device.
- Packet: The SCSI Request Packet to send to the ATAPI device
- specified by Target.
-
- Returns:
-
---*/
-// TODO: AtapiScsiPrivate - add argument and description to function comment
{
UINT8 PacketCommand[12];
UINT64 TimeoutInMicroSeconds;
@@ -1079,6 +1030,23 @@ Routine Description:
return PacketCommandStatus;
}
+/**
+ RequestSenseCommand
+
+ @param AtapiScsiPrivate
+ @param Target
+ @param Timeout
+ @param SenseData
+ @param SenseDataLength
+
+ @todo Add function description
+ @todo AtapiScsiPrivate TODO: add argument description
+ @todo Target TODO: add argument description
+ @todo Timeout TODO: add argument description
+ @todo SenseData TODO: add argument description
+ @todo SenseDataLength TODO: add argument description
+ @todo add return values
+**/
EFI_STATUS
RequestSenseCommand (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
@@ -1087,25 +1055,6 @@ RequestSenseCommand (
VOID *SenseData,
UINT8 *SenseDataLength
)
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- Target - TODO: add argument description
- Timeout - TODO: add argument description
- SenseData - TODO: add argument description
- SenseDataLength - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
{
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET Packet;
UINT8 Cdb[12];
@@ -1130,6 +1079,37 @@ Returns:
return Status;
}
+/**
+ Submits ATAPI command packet to the specified ATAPI device.
+
+ @param AtapiScsiPrivate: Private data structure for the specified channel.
+ @param Target: The Target ID of the ATAPI device to send the SCSI
+ Request Packet. To ATAPI devices attached on an IDE
+ Channel, Target ID 0 indicates Master device;Target
+ ID 1 indicates Slave device.
+ @param PacketCommand: Points to the ATAPI command packet.
+ @param Buffer: Points to the transferred data.
+ @param ByteCount: When input,indicates the buffer size; when output,
+ indicates the actually transferred data size.
+ @param Direction: Indicates the data transfer direction.
+ @param TimeoutInMicroSeconds: The timeout, in micro second units,
+ to use for the execution of this ATAPI command.
+ A TimeoutInMicroSeconds value of 0 means that
+ this function will wait indefinitely for the ATAPI
+ command to execute.
+ <P>
+ If TimeoutInMicroSeconds is greater than zero, then
+ this function will return EFI_TIMEOUT if the time
+ required to execute the ATAPI command is greater
+ than TimeoutInMicroSeconds.
+ </P>
+
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo PacketCommand - add argument and description to function comment
+ @todo Buffer - add argument and description to function comment
+ @todo ByteCount - add argument and description to function comment
+ @todo Direction - add argument and description to function comment
+**/
EFI_STATUS
AtapiPacketCommand (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
@@ -1140,42 +1120,6 @@ AtapiPacketCommand (
DATA_DIRECTION Direction,
UINT64 TimeoutInMicroSeconds
)
-/*++
-
- Routine Description:
- Submits ATAPI command packet to the specified ATAPI device.
-
- Arguments:
- AtapiScsiPrivate: Private data structure for the specified channel.
- Target: The Target ID of the ATAPI device to send the SCSI
- Request Packet. To ATAPI devices attached on an IDE
- Channel, Target ID 0 indicates Master device;Target
- ID 1 indicates Slave device.
- PacketCommand: Points to the ATAPI command packet.
- Buffer: Points to the transferred data.
- ByteCount: When input,indicates the buffer size; when output,
- indicates the actually transferred data size.
- Direction: Indicates the data transfer direction.
- TimeoutInMicroSeconds:
- The timeout, in micro second units, to use for the
- execution of this ATAPI command.
- A TimeoutInMicroSeconds value of 0 means that
- this function will wait indefinitely for the ATAPI
- command to execute.
- If TimeoutInMicroSeconds is greater than zero, then
- this function will return EFI_TIMEOUT if the time
- required to execute the ATAPI command is greater
- than TimeoutInMicroSeconds.
-
- Returns:
-
-
---*/
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: PacketCommand - add argument and description to function comment
-// TODO: Buffer - add argument and description to function comment
-// TODO: ByteCount - add argument and description to function comment
-// TODO: Direction - add argument and description to function comment
{
UINT16 *CommandIndex;
@@ -1285,6 +1229,35 @@ AtapiPacketCommand (
);
}
+/**
+ Performs data transfer between ATAPI device and host after the
+ ATAPI command packet is sent.
+
+ @param AtapiScsiPrivate: Private data structure for the specified channel.
+ @param Buffer: Points to the transferred data.
+ @param ByteCount: When input,indicates the buffer size; when output,
+ indicates the actually transferred data size.
+ @param Direction: Indicates the data transfer direction.
+ @param TimeoutInMicroSeconds: The timeout, in micro second units,
+ to use for the execution of this ATAPI command.
+ A TimeoutInMicroSeconds value of 0 means that
+ this function will wait indefinitely for the ATAPI
+ command to execute.
+ <P>
+ If TimeoutInMicroSeconds is greater than zero, then
+ this function will return EFI_TIMEOUT if the time
+ required to execute the ATAPI command is greater
+ than TimeoutInMicroSeconds.
+ </P>
+
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo Buffer - add argument and description to function comment
+ @todo ByteCount - add argument and description to function comment
+ @todo Direction - add argument and description to function comment
+ @todo EFI_DEVICE_ERROR - add return value to function comment
+ @todo EFI_DEVICE_ERROR - add return value to function comment
+ @todo EFI_WARN_BUFFER_TOO_SMALL - add return value to function comment
+**/
EFI_STATUS
AtapiPassThruPioReadWriteData (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
@@ -1293,40 +1266,6 @@ AtapiPassThruPioReadWriteData (
DATA_DIRECTION Direction,
UINT64 TimeoutInMicroSeconds
)
-/*++
-
- Routine Description:
- Performs data transfer between ATAPI device and host after the
- ATAPI command packet is sent.
-
- Arguments:
- AtapiScsiPrivate: Private data structure for the specified channel.
- Buffer: Points to the transferred data.
- ByteCount: When input,indicates the buffer size; when output,
- indicates the actually transferred data size.
- Direction: Indicates the data transfer direction.
- TimeoutInMicroSeconds:
- The timeout, in micro second units, to use for the
- execution of this ATAPI command.
- A TimeoutInMicroSeconds value of 0 means that
- this function will wait indefinitely for the ATAPI
- command to execute.
- If TimeoutInMicroSeconds is greater than zero, then
- this function will return EFI_TIMEOUT if the time
- required to execute the ATAPI command is greater
- than TimeoutInMicroSeconds.
-
- Returns:
-
-
---*/
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: Buffer - add argument and description to function comment
-// TODO: ByteCount - add argument and description to function comment
-// TODO: Direction - add argument and description to function comment
-// TODO: EFI_DEVICE_ERROR - add return value to function comment
-// TODO: EFI_DEVICE_ERROR - add return value to function comment
-// TODO: EFI_WARN_BUFFER_TOO_SMALL - add return value to function comment
{
UINT32 Index;
UINT32 RequiredWordCount;
@@ -1420,19 +1359,20 @@ AtapiPassThruPioReadWriteData (
}
+/**
+ Read one byte from a specified I/O port.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo PciIo - add argument and description to function comment
+ @todo Port - add argument and description to function comment
+**/
UINT8
ReadPortB (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port
)
-/*++
- Read one byte from a specified I/O port.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: PciIo - add argument and description to function comment
-// TODO: Port - add argument and description to function comment
{
UINT8 Data;
@@ -1449,19 +1389,20 @@ ReadPortB (
}
+/**
+ Read one word from a specified I/O port.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo PciIo - add argument and description to function comment
+ @todo Port - add argument and description to function comment
+**/
UINT16
ReadPortW (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port
)
-/*++
- Read one word from a specified I/O port.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: PciIo - add argument and description to function comment
-// TODO: Port - add argument and description to function comment
{
UINT16 Data;
@@ -1478,21 +1419,22 @@ ReadPortW (
}
+/**
+ Write one byte to a specified I/O port.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo PciIo - add argument and description to function comment
+ @todo Port - add argument and description to function comment
+ @todo Data - add argument and description to function comment
+**/
VOID
WritePortB (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port,
IN UINT8 Data
)
-/*++
- Write one byte to a specified I/O port.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: PciIo - add argument and description to function comment
-// TODO: Port - add argument and description to function comment
-// TODO: Data - add argument and description to function comment
{
PciIo->Io.Write (
@@ -1507,21 +1449,22 @@ WritePortB (
}
+/**
+ Write one word to a specified I/O port.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo PciIo - add argument and description to function comment
+ @todo Port - add argument and description to function comment
+ @todo Data - add argument and description to function comment
+**/
VOID
WritePortW (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port,
IN UINT16 Data
)
-/*++
- Write one word to a specified I/O port.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: PciIo - add argument and description to function comment
-// TODO: Port - add argument and description to function comment
-// TODO: Data - add argument and description to function comment
{
PciIo->Io.Write (
@@ -1534,25 +1477,26 @@ WritePortW (
);
}
+/**
+ Check whether DRQ is clear in the Status Register. (BSY must also be cleared)
+ If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
+ DRQ clear. Otherwise, it will return EFI_TIMEOUT when specified time is
+ elapsed.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_ABORTED - add return value to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
EFI_STATUS
StatusDRQClear (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
- Check whether DRQ is clear in the Status Register. (BSY must also be cleared)
- If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
- DRQ clear. Otherwise, it will return EFI_TIMEOUT when specified time is
- elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_ABORTED - add return value to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
{
UINT64 Delay;
UINT8 StatusRegister;
@@ -1613,26 +1557,27 @@ StatusDRQClear (
return EFI_SUCCESS;
}
-EFI_STATUS
-AltStatusDRQClear (
- ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
- UINT64 TimeoutInMicroSeconds
- )
-/*++
+/**
Check whether DRQ is clear in the Alternate Status Register.
(BSY must also be cleared).
If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
DRQ clear. Otherwise, it will return EFI_TIMEOUT when specified time is
elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_ABORTED - add return value to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_ABORTED - add return value to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
+EFI_STATUS
+AltStatusDRQClear (
+ ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
+ UINT64 TimeoutInMicroSeconds
+ )
{
UINT64 Delay;
UINT8 AltStatusRegister;
@@ -1691,25 +1636,26 @@ AltStatusDRQClear (
return EFI_SUCCESS;
}
+/**
+ Check whether DRQ is ready in the Status Register. (BSY must also be cleared)
+ If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
+ DRQ ready. Otherwise, it will return EFI_TIMEOUT when specified time is
+ elapsed.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_ABORTED - add return value to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
EFI_STATUS
StatusDRQReady (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
- Check whether DRQ is ready in the Status Register. (BSY must also be cleared)
- If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
- DRQ ready. Otherwise, it will return EFI_TIMEOUT when specified time is
- elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_ABORTED - add return value to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
{
UINT64 Delay;
UINT8 StatusRegister;
@@ -1770,26 +1716,27 @@ StatusDRQReady (
return EFI_SUCCESS;
}
-EFI_STATUS
-AltStatusDRQReady (
- ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
- UINT64 TimeoutInMicroSeconds
- )
-/*++
+/**
Check whether DRQ is ready in the Alternate Status Register.
(BSY must also be cleared)
If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
DRQ ready. Otherwise, it will return EFI_TIMEOUT when specified time is
elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_ABORTED - add return value to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_ABORTED - add return value to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
+EFI_STATUS
+AltStatusDRQReady (
+ ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
+ UINT64 TimeoutInMicroSeconds
+ )
{
UINT64 Delay;
UINT8 AltStatusRegister;
@@ -1849,24 +1796,25 @@ AltStatusDRQReady (
return EFI_SUCCESS;
}
+/**
+ Check whether BSY is clear in the Status Register.
+ If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
+ BSY clear. Otherwise, it will return EFI_TIMEOUT when specified time is
+ elapsed.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
EFI_STATUS
StatusWaitForBSYClear (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
- Check whether BSY is clear in the Status Register.
- If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
- BSY clear. Otherwise, it will return EFI_TIMEOUT when specified time is
- elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
{
UINT64 Delay;
UINT8 StatusRegister;
@@ -1909,24 +1857,25 @@ StatusWaitForBSYClear (
return EFI_SUCCESS;
}
+/**
+ Check whether BSY is clear in the Alternate Status Register.
+ If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
+ BSY clear. Otherwise, it will return EFI_TIMEOUT when specified time is
+ elapsed.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
EFI_STATUS
AltStatusWaitForBSYClear (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
- Check whether BSY is clear in the Alternate Status Register.
- If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
- BSY clear. Otherwise, it will return EFI_TIMEOUT when specified time is
- elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
{
UINT64 Delay;
UINT8 AltStatusRegister;
@@ -1968,26 +1917,27 @@ AltStatusWaitForBSYClear (
return EFI_SUCCESS;
}
-EFI_STATUS
-StatusDRDYReady (
- ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
- UINT64 TimeoutInMicroSeconds
- )
-/*++
+/**
Check whether DRDY is ready in the Status Register.
(BSY must also be cleared)
If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
DRDY ready. Otherwise, it will return EFI_TIMEOUT when specified time is
elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_ABORTED - add return value to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_ABORTED - add return value to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
+EFI_STATUS
+StatusDRDYReady (
+ ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
+ UINT64 TimeoutInMicroSeconds
+ )
{
UINT64 Delay;
UINT8 StatusRegister;
@@ -2043,26 +1993,27 @@ StatusDRDYReady (
return EFI_SUCCESS;
}
-EFI_STATUS
-AltStatusDRDYReady (
- ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
- UINT64 TimeoutInMicroSeconds
- )
-/*++
+/**
Check whether DRDY is ready in the Alternate Status Register.
(BSY must also be cleared)
If TimeoutInMicroSeconds is zero, this routine should wait infinitely for
DRDY ready. Otherwise, it will return EFI_TIMEOUT when specified time is
elapsed.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: TimeoutInMicroSeconds - add argument and description to function comment
-// TODO: EFI_ABORTED - add return value to function comment
-// TODO: EFI_TIMEOUT - add return value to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo TimeoutInMicroSeconds - add argument and description to function comment
+ @todo EFI_ABORTED - add return value to function comment
+ @todo EFI_TIMEOUT - add return value to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+**/
+EFI_STATUS
+AltStatusDRDYReady (
+ ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
+ UINT64 TimeoutInMicroSeconds
+ )
{
UINT64 Delay;
UINT8 AltStatusRegister;
@@ -2118,19 +2069,20 @@ AltStatusDRDYReady (
return EFI_SUCCESS;
}
+/**
+ Check Error Register for Error Information.
+
+ @todo function comment is missing 'Routine Description:'
+ @todo function comment is missing 'Arguments:'
+ @todo function comment is missing 'Returns:'
+ @todo AtapiScsiPrivate - add argument and description to function comment
+ @todo EFI_SUCCESS - add return value to function comment
+ @todo EFI_DEVICE_ERROR - add return value to function comment
+**/
EFI_STATUS
AtapiPassThruCheckErrorStatus (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate
)
-/*++
- Check Error Register for Error Information.
---*/
-// TODO: function comment is missing 'Routine Description:'
-// TODO: function comment is missing 'Arguments:'
-// TODO: function comment is missing 'Returns:'
-// TODO: AtapiScsiPrivate - add argument and description to function comment
-// TODO: EFI_SUCCESS - add return value to function comment
-// TODO: EFI_DEVICE_ERROR - add return value to function comment
{
UINT8 StatusRegister;
diff --git a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.h b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.h
index d705c65949..659b37c876 100644
--- a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.h
+++ b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.h
@@ -1,23 +1,16 @@
-/*++
+/** @file
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. 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
-Copyright (c) 2006, Intel Corporation
-All rights reserved. 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.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
+ Module Name: AtapiPassThru.h
- AtapiPassThru.h
-
-Abstract:
-
-
-Revision History
---*/
+**/
#ifndef _APT_H
#define _APT_H
@@ -25,12 +18,13 @@ Revision History
#include <IndustryStandard/pci22.h>
-//
-// bit definition
-//
+///
+/// bit definition
+///
#define bit(a) 1 << (a)
#define MAX_TARGET_ID 4
+
//
// IDE Registers
//
@@ -49,9 +43,9 @@ typedef union {
UINT16 DeviceControl; /* when write */
} IDE_AltStatus_OR_DeviceControl;
-//
-// IDE registers set
-//
+///
+/// IDE registers set
+///
typedef struct {
UINT16 Data;
IDE_ERROR_OR_FEATURE Reg1;
@@ -167,21 +161,21 @@ typedef struct {
//
// ATA Err Reg bitmap
//
-#define BBK_ERR bit (7) /* Bad block detected */
-#define UNC_ERR bit (6) /* Uncorrectable Data */
-#define MC_ERR bit (5) /* Media Change */
-#define IDNF_ERR bit (4) /* ID Not Found */
-#define MCR_ERR bit (3) /* Media Change Requested */
-#define ABRT_ERR bit (2) /* Aborted Command */
-#define TK0NF_ERR bit (1) /* Track 0 Not Found */
-#define AMNF_ERR bit (0) /* Address Mark Not Found */
+#define BBK_ERR bit (7) ///< Bad block detected
+#define UNC_ERR bit (6) ///< Uncorrectable Data
+#define MC_ERR bit (5) ///< Media Change
+#define IDNF_ERR bit (4) ///< ID Not Found
+#define MCR_ERR bit (3) ///< Media Change Requested
+#define ABRT_ERR bit (2) ///< Aborted Command
+#define TK0NF_ERR bit (1) ///< Track 0 Not Found
+#define AMNF_ERR bit (0) ///< Address Mark Not Found
//
// ATAPI Err Reg bitmap
//
#define SENSE_KEY_ERR (bit (7) | bit (6) | bit (5) | bit (4))
-#define EOM_ERR bit (1) /* End of Media Detected */
-#define ILI_ERR bit (0) /* Illegal Length Indication */
+#define EOM_ERR bit (1) ///< End of Media Detected
+#define ILI_ERR bit (0) ///< Illegal Length Indication
//
// Device/Head Reg
@@ -201,21 +195,21 @@ typedef struct {
//
// Status Reg
//
-#define BSY bit (7) /* Controller Busy */
-#define DRDY bit (6) /* Drive Ready */
-#define DWF bit (5) /* Drive Write Fault */
-#define DSC bit (4) /* Disk Seek Complete */
-#define DRQ bit (3) /* Data Request */
-#define CORR bit (2) /* Corrected Data */
-#define IDX bit (1) /* Index */
-#define ERR bit (0) /* Error */
-#define CHECK bit (0) /* Check bit for ATAPI Status Reg */
+#define BSY bit (7) ///< Controller Busy
+#define DRDY bit (6) ///< Drive Ready
+#define DWF bit (5) ///< Drive Write Fault
+#define DSC bit (4) ///< Disk Seek Complete
+#define DRQ bit (3) ///< Data Request
+#define CORR bit (2) ///< Corrected Data
+#define IDX bit (1) ///< Index
+#define ERR bit (0) ///< Error
+#define CHECK bit (0) ///< Check bit for ATAPI Status Reg
//
// Device Control Reg
//
-#define SRST bit (2) /* Software Reset */
-#define IEN_L bit (1) /* Interrupt Enable #*/
+#define SRST bit (2) ///< Software Reset
+#define IEN_L bit (1) ///< Interrupt Enable
//
// ATAPI Feature Register
@@ -242,55 +236,63 @@ typedef struct {
//
// function prototype
//
+/**
+ AtapiScsiPassThruDriverEntryPoint
+
+ @param ImageHandle
+ @param SystemTable
+
+ @todo Add function description
+ @todo ImageHandle - add argument description
+ @todo SystemTable - add argument description
+ @todo add return values
+--*/
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
- /*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- ImageHandle - TODO: add argument description
- SystemTable - TODO: add argument description
-
-Returns:
+;
- TODO: add return values
+/**
+ RegisterAtapiScsiPassThru
---*/
-;
+ @param This
+ @param Controller
+ @param PciIo
+ @todo Add function description
+ @todo This add argument description
+ @todo Controller add argument description
+ @todo PciIo add argument description
+ @todo add return values
+**/
EFI_STATUS
RegisterAtapiScsiPassThru (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_PCI_IO_PROTOCOL *PciIo
)
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Controller - TODO: add argument description
- PciIo - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
;
+/**
+ AtapiScsiPassThruFunction
+
+ @param This
+ @param Target
+ @param Lun
+ @param Packet
+ @param Event
+
+ @todo Add function description
+ @todo This - add argument description
+ @todo Target - add argument description
+ @todo Lun - add argument description
+ @todo Packet - add argument description
+ @todo Event - add argument description
+ @todo add return values
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruFunction (
@@ -300,27 +302,20 @@ AtapiScsiPassThruFunction (
IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
)
-/*++
+;
-Routine Description:
+/**
+ AtapiScsiPassThruGetNextDevice
TODO: Add function description
-Arguments:
-
- This - TODO: add argument description
- Target - TODO: add argument description
- Lun - TODO: add argument description
- Packet - TODO: add argument description
- Event - TODO: add argument description
-
-Returns:
+ @param This TODO: add argument description
+ @param Target TODO: add argument description
+ @param Lun TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruGetNextDevice (
@@ -328,25 +323,21 @@ AtapiScsiPassThruGetNextDevice (
IN OUT UINT32 *Target,
IN OUT UINT64 *Lun
)
-/*++
+;
-Routine Description:
+/**
+ AtapiScsiPassThruBuildDevicePath
TODO: Add function description
-Arguments:
-
- This - TODO: add argument description
- Target - TODO: add argument description
- Lun - TODO: add argument description
-
-Returns:
+ @param This TODO: add argument description
+ @param Target TODO: add argument description
+ @param Lun TODO: add argument description
+ @param DevicePath TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruBuildDevicePath (
@@ -355,26 +346,21 @@ AtapiScsiPassThruBuildDevicePath (
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
)
-/*++
+;
-Routine Description:
+/**
+ AtapiScsiPassThruGetTargetLun
TODO: Add function description
-Arguments:
-
- This - TODO: add argument description
- Target - TODO: add argument description
- Lun - TODO: add argument description
- DevicePath - TODO: add argument description
-
-Returns:
+ @param This TODO: add argument description
+ @param DevicePath TODO: add argument description
+ @param Target TODO: add argument description
+ @param Lun TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruGetTargetLun (
@@ -383,48 +369,37 @@ AtapiScsiPassThruGetTargetLun (
OUT UINT32 *Target,
OUT UINT64 *Lun
)
-/*++
+;
-Routine Description:
+/**
+ AtapiScsiPassThruResetChannel
TODO: Add function description
-Arguments:
-
- This - TODO: add argument description
- DevicePath - TODO: add argument description
- Target - TODO: add argument description
- Lun - TODO: add argument description
-
-Returns:
+ @param This TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruResetChannel (
IN EFI_SCSI_PASS_THRU_PROTOCOL *This
)
-/*++
+;
-Routine Description:
+/**
+ AtapiScsiPassThruResetTarget
TODO: Add function description
-Arguments:
-
- This - TODO: add argument description
-
-Returns:
+ @param This TODO: add argument description
+ @param Target TODO: add argument description
+ @param Lun TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruResetTarget (
@@ -432,92 +407,74 @@ AtapiScsiPassThruResetTarget (
IN UINT32 Target,
IN UINT64 Lun
)
-/*++
+;
-Routine Description:
+/**
+ CheckSCSIRequestPacket
TODO: Add function description
-Arguments:
-
- This - TODO: add argument description
- Target - TODO: add argument description
- Lun - TODO: add argument description
-
-Returns:
+ @param Packet TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
CheckSCSIRequestPacket (
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet
)
-/*++
+;
-Routine Description:
+/**
+ SubmitBlockingIoCommand
TODO: Add function description
-Arguments:
-
- Packet - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param Target TODO: add argument description
+ @param Packet TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
SubmitBlockingIoCommand (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT32 Target,
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet
)
-/*++
+;
-Routine Description:
+/**
+ IsCommandValid
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- Target - TODO: add argument description
- Packet - TODO: add argument description
+ @param Packet - TODO: add argument description
-Returns:
-
- TODO: add return values
+ @return TODO: add return values
--*/
-;
-
BOOLEAN
IsCommandValid (
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet
)
- /*++
+;
-Routine Description:
+/**
+ RequestSenseCommand
TODO: Add function description
-Arguments:
-
- Packet - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param Target TODO: add argument description
+ @param Timeout TODO: add argument description
+ @param SenseData TODO: add argument description
+ @param SenseDataLength TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
RequestSenseCommand (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
@@ -526,27 +483,24 @@ RequestSenseCommand (
VOID *SenseData,
UINT8 *SenseDataLength
)
-/*++
+;
-Routine Description:
+/**
+ AtapiPacketCommand
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- Target - TODO: add argument description
- Timeout - TODO: add argument description
- SenseData - TODO: add argument description
- SenseDataLength - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param Target TODO: add argument description
+ @param PacketCommand TODO: add argument description
+ @param Buffer TODO: add argument description
+ @param ByteCount TODO: add argument description
+ @param Direction TODO: add argument description
+ @param TimeOutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
AtapiPacketCommand (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
@@ -557,313 +511,236 @@ AtapiPacketCommand (
DATA_DIRECTION Direction,
UINT64 TimeOutInMicroSeconds
)
-/*++
-
-Routine Description:
+;
- TODO: Add function description
-Arguments:
+/**
+ ReadPortB
- AtapiScsiPrivate - TODO: add argument description
- Target - TODO: add argument description
- PacketCommand - TODO: add argument description
- Buffer - TODO: add argument description
- ByteCount - TODO: add argument description
- Direction - TODO: add argument description
- TimeOutInMicroSeconds - TODO: add argument description
+ TODO: Add function description
-Returns:
+ @param PciIo TODO: add argument description
+ @param Port TODO: add argument description
TODO: add return values
---*/
-;
-
-
+**/
UINT8
ReadPortB (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port
)
-/*++
-
-Routine Description:
+;
- TODO: Add function description
-Arguments:
+/**
+ ReadPortW
- PciIo - TODO: add argument description
- Port - TODO: add argument description
+ TODO: Add function description
-Returns:
+ @param PciIo TODO: add argument description
+ @param Port TODO: add argument description
TODO: add return values
---*/
-;
-
-
+**/
UINT16
ReadPortW (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port
)
-/*++
-
-Routine Description:
+;
- TODO: Add function description
-Arguments:
+/**
+ WritePortB
- PciIo - TODO: add argument description
- Port - TODO: add argument description
+ TODO: Add function description
-Returns:
+ @param PciIo TODO: add argument description
+ @param Port TODO: add argument description
+ @param Data TODO: add argument description
TODO: add return values
---*/
-;
-
-
+**/
VOID
WritePortB (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port,
IN UINT8 Data
)
-/*++
-
-Routine Description:
+;
- TODO: Add function description
-Arguments:
+/**
+ WritePortW
- PciIo - TODO: add argument description
- Port - TODO: add argument description
- Data - TODO: add argument description
+ TODO: Add function description
-Returns:
+ @param PciIo TODO: add argument description
+ @param Port TODO: add argument description
+ @param Data TODO: add argument description
TODO: add return values
---*/
-;
-
-
+**/
VOID
WritePortW (
IN EFI_PCI_IO_PROTOCOL *PciIo,
IN UINT16 Port,
IN UINT16 Data
)
-/*++
+;
-Routine Description:
+/**
+ StatusDRQClear
TODO: Add function description
-Arguments:
-
- PciIo - TODO: add argument description
- Port - TODO: add argument description
- Data - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeOutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
StatusDRQClear (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeOutInMicroSeconds
)
-/*++
+;
-Routine Description:
+/**
+ AltStatusDRQClear
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeOutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeOutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
AltStatusDRQClear (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeOutInMicroSeconds
)
-/*++
+;
-Routine Description:
+/**
+ StatusDRQReady
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeOutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeOutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
StatusDRQReady (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeOutInMicroSeconds
)
-/*++
+;
-Routine Description:
+/**
+ AltStatusDRQReady
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeOutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeOutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
AltStatusDRQReady (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeOutInMicroSeconds
)
-/*++
-
-Routine Description:
+;
+/**
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeOutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeoutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
StatusWaitForBSYClear (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
-
-Routine Description:
+;
+/**
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeoutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeoutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
AltStatusWaitForBSYClear (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
-
-Routine Description:
+;
+/**
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeoutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeoutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
StatusDRDYReady (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
-
-Routine Description:
+;
+/**
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeoutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param TimeoutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
AltStatusDRDYReady (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
UINT64 TimeoutInMicroSeconds
)
-/*++
-
-Routine Description:
+;
+/**
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- TimeoutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
+ @param Buffer TODO: add argument description
+ @param ByteCount TODO: add argument description
+ @param Direction TODO: add argument description
+ @param TimeOutInMicroSeconds TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
AtapiPassThruPioReadWriteData (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,
@@ -872,45 +749,19 @@ AtapiPassThruPioReadWriteData (
DATA_DIRECTION Direction,
UINT64 TimeOutInMicroSeconds
)
-/*++
-
-Routine Description:
+;
+/**
TODO: Add function description
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
- Buffer - TODO: add argument description
- ByteCount - TODO: add argument description
- Direction - TODO: add argument description
- TimeOutInMicroSeconds - TODO: add argument description
-
-Returns:
+ @param AtapiScsiPrivate TODO: add argument description
TODO: add return values
---*/
-;
-
+**/
EFI_STATUS
AtapiPassThruCheckErrorStatus (
ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate
)
-/*++
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- AtapiScsiPrivate - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
---*/
;
#endif
diff --git a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/ComponentName.c b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/ComponentName.c
index 14658b0ace..b0b2231705 100644
--- a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/ComponentName.c
+++ b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/ComponentName.c
@@ -1,21 +1,16 @@
-/*++
+/** @file
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. 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
-Copyright (c) 2006, Intel Corporation
-All rights reserved. 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.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
+ Module Name: ComponentName.c
- ComponentName.c
-
-Abstract:
-
---*/
+**/
#include "AtapiPassThru.h"
//
@@ -39,9 +34,9 @@ AtapiScsiPassThruComponentNameGetControllerName (
OUT CHAR16 **ControllerName
);
-//
-// EFI Component Name Protocol
-//
+///
+/// EFI Component Name Protocol
+///
EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName = {
AtapiScsiPassThruComponentNameGetDriverName,
AtapiScsiPassThruComponentNameGetControllerName,
@@ -53,6 +48,28 @@ static EFI_UNICODE_STRING_TABLE mAtapiScsiPassThruDriverNameTable[] = {
{ NULL , NULL }
};
+/**
+ Retrieves a Unicode string that is the user readable name of the EFI Driver.
+
+ @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
+ @param Language A pointer to a three character ISO 639-2 language identifier.
+ This is the language of the driver name that that the caller
+ is requesting, and it must match one of the languages specified
+ in SupportedLanguages. The number of languages supported by a
+ driver is up to the driver writer.
+ @param DriverName A pointer to the Unicode string to return. This Unicode string
+ is the name of the driver specified by This in the language
+ specified by Language.
+
+ @retval EFI_SUCCESS The Unicode string for the Driver specified by This
+ and the language specified by Language was returned
+ in DriverName.
+ @retval EFI_INVALID_PARAMETER Language is NULL.
+ @retval EFI_INVALID_PARAMETER DriverName is NULL.
+ @retval EFI_UNSUPPORTED The driver specified by This does not support the
+ language specified by Language.
+
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruComponentNameGetDriverName (
@@ -60,32 +77,6 @@ AtapiScsiPassThruComponentNameGetDriverName (
IN CHAR8 *Language,
OUT CHAR16 **DriverName
)
-/*++
-
- Routine Description:
- Retrieves a Unicode string that is the user readable name of the EFI Driver.
-
- Arguments:
- This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
- Language - A pointer to a three character ISO 639-2 language identifier.
- This is the language of the driver name that that the caller
- is requesting, and it must match one of the languages specified
- in SupportedLanguages. The number of languages supported by a
- driver is up to the driver writer.
- DriverName - A pointer to the Unicode string to return. This Unicode string
- is the name of the driver specified by This in the language
- specified by Language.
-
- Returns:
- EFI_SUCCESS - The Unicode string for the Driver specified by This
- and the language specified by Language was returned
- in DriverName.
- EFI_INVALID_PARAMETER - Language is NULL.
- EFI_INVALID_PARAMETER - DriverName is NULL.
- EFI_UNSUPPORTED - The driver specified by This does not support the
- language specified by Language.
-
---*/
{
return LookupUnicodeString (
Language,
@@ -95,6 +86,47 @@ AtapiScsiPassThruComponentNameGetDriverName (
);
}
+/**
+ Retrieves a Unicode string that is the user readable name of the controller
+ that is being managed by an EFI Driver.
+
+ @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
+ @param ControllerHandle The handle of a controller that the driver specified by
+ This is managing. This handle specifies the controller
+ whose name is to be returned.
+ @param ChildHandle The handle of the child controller to retrieve the name
+ of. This is an optional parameter that may be NULL. It
+ will be NULL for device drivers. It will also be NULL
+ for a bus drivers that wish to retrieve the name of the
+ bus controller. It will not be NULL for a bus driver
+ that wishes to retrieve the name of a child controller.
+ @param Language A pointer to a three character ISO 639-2 language
+ identifier. This is the language of the controller name
+ that that the caller is requesting, and it must match one
+ of the languages specified in SupportedLanguages. The
+ number of languages supported by a driver is up to the
+ driver writer.
+ @param ControllerName A pointer to the Unicode string to return. This Unicode
+ string is the name of the controller specified by
+ ControllerHandle and ChildHandle in the language
+ specified by Language from the point of view of the
+ driver specified by This.
+
+ @retval EFI_SUCCESS The Unicode string for the user readable name in the
+ language specified by Language for the driver
+ specified by This was returned in DriverName.
+ @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
+ @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
+ EFI_HANDLE.
+ @retval EFI_INVALID_PARAMETER Language is NULL.
+ @retval EFI_INVALID_PARAMETER ControllerName is NULL.
+ @retval EFI_UNSUPPORTED The driver specified by This is not currently
+ managing the controller specified by
+ ControllerHandle and ChildHandle.
+ @retval EFI_UNSUPPORTED The driver specified by This does not support the
+ language specified by Language.
+
+**/
EFI_STATUS
EFIAPI
AtapiScsiPassThruComponentNameGetControllerName (
@@ -104,51 +136,6 @@ AtapiScsiPassThruComponentNameGetControllerName (
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
-/*++
-
- Routine Description:
- Retrieves a Unicode string that is the user readable name of the controller
- that is being managed by an EFI Driver.
-
- Arguments:
- This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
- ControllerHandle - The handle of a controller that the driver specified by
- This is managing. This handle specifies the controller
- whose name is to be returned.
- ChildHandle - The handle of the child controller to retrieve the name
- of. This is an optional parameter that may be NULL. It
- will be NULL for device drivers. It will also be NULL
- for a bus drivers that wish to retrieve the name of the
- bus controller. It will not be NULL for a bus driver
- that wishes to retrieve the name of a child controller.
- Language - A pointer to a three character ISO 639-2 language
- identifier. This is the language of the controller name
- that that the caller is requesting, and it must match one
- of the languages specified in SupportedLanguages. The
- number of languages supported by a driver is up to the
- driver writer.
- ControllerName - A pointer to the Unicode string to return. This Unicode
- string is the name of the controller specified by
- ControllerHandle and ChildHandle in the language
- specified by Language from the point of view of the
- driver specified by This.
-
- Returns:
- EFI_SUCCESS - The Unicode string for the user readable name in the
- language specified by Language for the driver
- specified by This was returned in DriverName.
- EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
- EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
- EFI_HANDLE.
- EFI_INVALID_PARAMETER - Language is NULL.
- EFI_INVALID_PARAMETER - ControllerName is NULL.
- EFI_UNSUPPORTED - The driver specified by This is not currently
- managing the controller specified by
- ControllerHandle and ChildHandle.
- EFI_UNSUPPORTED - The driver specified by This does not support the
- language specified by Language.
-
---*/
{
return EFI_UNSUPPORTED;
}