]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
fix a typo in a comment
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / IdeBus / Dxe / idebus.c
index 4cf882eb00f01d4abc4f6513eeedddbc95eda43e..0e7d43eeb9a0475e0b2d3e603a3bb96809895217 100644 (file)
@@ -1,25 +1,17 @@
-/*++\r
+/** @file\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  The full text of the license may be found at        \r
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-  idebus.c\r
-    \r
-Abstract: \r
-    \r
-\r
-Revision History\r
+  @par Revision Reference:\r
   This module is modified from DXE\IDE module for Ide Contriller Init support\r
 \r
---*/\r
+**/\r
 \r
 #include "idebus.h"\r
 \r
@@ -34,7 +26,7 @@ EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding = {
   IDEBusDriverBindingSupported,\r
   IDEBusDriverBindingStart,\r
   IDEBusDriverBindingStop,\r
-  0x10,\r
+  0xa,\r
   NULL,\r
   NULL\r
 };\r
@@ -44,6 +36,17 @@ EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding = {
 // IDEBusDriverBindingSupported\r
 // ***********************************************************************************\r
 //\r
+/**\r
+  Register Driver Binding protocol for this driver.\r
+\r
+  @param[in] This   -- A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
+  @param[in] ControllerHandle    -- The handle of the controller to test.\r
+  @param[in] RemainingDevicePath -- A pointer to the remaining portion of a device path.\r
+\r
+  @retval  EFI_SUCCESS Driver loaded.\r
+  @retval  other Driver not loaded.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEBusDriverBindingSupported (\r
@@ -51,20 +54,6 @@ IDEBusDriverBindingSupported (
   IN EFI_HANDLE                   Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
-/*++\r
-  \r
-Routine Description:\r
-  Register Driver Binding protocol for this driver.\r
-  \r
-Arguments:\r
-  This   -- A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r
-  ControllerHandle    -- The handle of the controller to test.\r
-  RemainingDevicePath -- A pointer to the remaining portion of a device path.\r
-\r
-Returns: \r
-  EFI_SUCCESS - Driver loaded.\r
-  other       - Driver not loaded.\r
---*/\r
 // TODO:    Controller - add argument and description to function comment\r
 // TODO:    EFI_UNSUPPORTED - add return value to function comment\r
 {\r
@@ -102,7 +91,7 @@ Returns:
   }\r
  \r
   //\r
-  // Clsoe protocol, don't use device path protocol in the .Support() function\r
+  // Close protocol, don't use device path protocol in the .Support() function\r
   //\r
   gBS->CloseProtocol (\r
         Controller,\r
@@ -150,6 +139,19 @@ Returns:
 // IDEBusDriverBindingStart\r
 // ***********************************************************************************\r
 //\r
+/**\r
+  Start this driver on Controller by detecting all disks and installing \r
+  BlockIo protocol on them.\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  Controller Handle of device to bind driver to.\r
+  @param  RemainingDevicePath Not used, always produce all possible children.\r
+\r
+  @retval  EFI_SUCCESS This driver is added to ControllerHandle.\r
+  @retval  EFI_ALREADY_STARTED This driver is already running on ControllerHandle.\r
+  @retval  other This driver does not support this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEBusDriverBindingStart (\r
@@ -157,23 +159,6 @@ IDEBusDriverBindingStart (
   IN EFI_HANDLE                   Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Start this driver on Controller by detecting all disks and installing \r
-      BlockIo protocol on them.\r
-\r
-  Arguments:\r
-    This                - Protocol instance pointer.\r
-    Controller          - Handle of device to bind driver to.\r
-    RemainingDevicePath - Not used, always produce all possible children.\r
-\r
-  Returns:\r
-    EFI_SUCCESS         - This driver is added to ControllerHandle.\r
-    EFI_ALREADY_STARTED - This driver is already running on ControllerHandle.\r
-    other               - This driver does not support this device.\r
-\r
---*/\r
 {\r
   EFI_STATUS                        Status;\r
   EFI_STATUS                        SavedStatus;\r
@@ -196,7 +181,6 @@ IDEBusDriverBindingStart (
   UINT16                            CommandBlockBaseAddr;\r
   UINT16                            ControlBlockBaseAddr;\r
   UINTN                             DataSize;\r
-  UINT32                            Attributes;\r
   IDE_BUS_DRIVER_PRIVATE_DATA       *IdeBusDriverPrivateData;\r
 \r
   //\r
@@ -205,7 +189,6 @@ IDEBusDriverBindingStart (
   EFI_IDE_CONTROLLER_INIT_PROTOCOL  *IdeInit;\r
   BOOLEAN                           EnumAll;\r
   BOOLEAN                           ChannelEnabled;\r
-  UINT8                             ChannelCount;\r
   UINT8                             MaxDevices;\r
   EFI_IDENTIFY_DATA                 IdentifyData;\r
   EFI_ATA_COLLECTIVE_MODE           *SupportedModes;\r
@@ -255,10 +238,9 @@ IDEBusDriverBindingStart (
   }\r
 \r
   //\r
-  // Save Enumall and ChannelCount. Step7.2\r
+  // Save Enumall. Step7.2\r
   //\r
   EnumAll       = IdeInit->EnumAll;\r
-  ChannelCount  = IdeInit->ChannelCount;\r
 \r
   //\r
   // Consume PCI I/O protocol. Note that the OpenProtocol with _GET_PROTOCOL\r
@@ -331,7 +313,7 @@ IDEBusDriverBindingStart (
   Status = gRT->GetVariable (\r
                   (CHAR16 *) L"Configuration",\r
                   &gEfiCallerIdGuid,\r
-                  &Attributes,\r
+                  NULL,\r
                   &DataSize,\r
                   &ConfigurationOptions\r
                   );\r
@@ -431,6 +413,12 @@ IDEBusDriverBindingStart (
               EfiIdeBusBeforeDevicePresenceDetection,\r
               IdeChannel\r
               );\r
+\r
+    //\r
+    // Prepare to detect IDE device of this channel\r
+    //\r
+    InitializeIDEChannelData ();\r
+\r
     //\r
     // -- 1st inner loop --- Master/Slave ------------  Step14\r
     //\r
@@ -463,8 +451,8 @@ IDEBusDriverBindingStart (
       ZeroMem (IdeBlkIoDevicePtr, sizeof (IDE_BLK_IO_DEV));\r
 \r
       IdeBlkIoDevicePtr->Signature  = IDE_BLK_IO_DEV_SIGNATURE;\r
-      IdeBlkIoDevicePtr->Channel    = IdeChannel;\r
-      IdeBlkIoDevicePtr->Device     = IdeDevice;\r
+      IdeBlkIoDevicePtr->Channel    = (EFI_IDE_CHANNEL) IdeChannel;\r
+      IdeBlkIoDevicePtr->Device     = (EFI_IDE_DEVICE) IdeDevice;\r
 \r
       //\r
       // initialize Block IO interface's Media pointer\r
@@ -502,6 +490,19 @@ IDEBusDriverBindingStart (
       IdeBlkIoDevicePtr->IdeBusDriverPrivateData = IdeBusDriverPrivateData;\r
       IdeBlkIoDevicePtr->IoPort->BusMasterBaseAddr = IdeRegsBaseAddr[IdeChannel].BusMasterBaseAddr;\r
 \r
+      //\r
+      // Report Status code: is about to detect IDE drive\r
+      //\r
+      REPORT_STATUS_CODE_EX (\r
+        EFI_PROGRESS_CODE,\r
+        (EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_PRESENCE_DETECT),\r
+        0,\r
+        &gEfiCallerIdGuid,\r
+        NULL,\r
+        NULL,\r
+        0\r
+      );\r
+\r
       //\r
       // Discover device, now!\r
       //\r
@@ -537,7 +538,6 @@ IDEBusDriverBindingStart (
         // Submit identify data to IDE controller init driver\r
         //\r
         CopyMem (&IdentifyData, IdeBlkIoDevicePtr->pIdData, sizeof (IdentifyData));\r
-        // IdentifyData  = *IdeBlkIoDevicePtr->pIdData;\r
         IdeBusDriverPrivateData->DeviceFound[IdeChannel * 2 + IdeDevice] = TRUE;\r
         IdeInit->SubmitData (IdeInit, IdeChannel, IdeDevice, &IdentifyData);\r
       } else {\r
@@ -664,7 +664,7 @@ IDEBusDriverBindingStart (
       //\r
       // Record PIO mode used in private data\r
       //\r
-      IdeBlkIoDevicePtr->PioMode = SupportedModes->PioMode.Mode;\r
+      IdeBlkIoDevicePtr->PioMode = (ATA_PIO_MODE) SupportedModes->PioMode.Mode;\r
 \r
       //\r
       // Set IDE controller Timing Blocks in the PCI Configuration Space\r
@@ -711,6 +711,18 @@ IDEBusDriverBindingStart (
         (EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_ENABLE),\r
         IdeBlkIoDevicePtr->DevicePath\r
         );\r
+      \r
+      //\r
+      // Create event to clear pending IDE interrupt\r
+      //\r
+      Status = gBS->CreateEvent (\r
+                      EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,\r
+                      EFI_TPL_NOTIFY,\r
+                      ClearInterrupt,\r
+                      IdeBlkIoDevicePtr,\r
+                      &IdeBlkIoDevicePtr->ExitBootServiceEvent\r
+                      );\r
+\r
       //\r
       // end of 2nd inner loop ----\r
       //\r
@@ -791,6 +803,18 @@ ErrorExit:
 // IDEBusDriverBindingStop\r
 // ***********************************************************************************\r
 //\r
+/**\r
+  Stop this driver on Controller Handle. \r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  DeviceHandle Handle of device to stop driver on\r
+  @param  NumberOfChildren Not used\r
+  @param  ChildHandleBuffer Not used\r
+\r
+  @retval  EFI_SUCCESS This driver is removed DeviceHandle\r
+  @retval  other This driver was not removed from this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEBusDriverBindingStop (\r
@@ -799,22 +823,6 @@ IDEBusDriverBindingStop (
   IN  UINTN                           NumberOfChildren,\r
   IN  EFI_HANDLE                      *ChildHandleBuffer\r
   )\r
-/*++\r
-  \r
-  Routine Description:\r
-    Stop this driver on Controller Handle. \r
-\r
-  Arguments:\r
-    This              - Protocol instance pointer.\r
-    DeviceHandle      - Handle of device to stop driver on \r
-    NumberOfChildren  - Not used\r
-    ChildHandleBuffer - Not used\r
-\r
-  Returns:\r
-    EFI_SUCCESS       - This driver is removed DeviceHandle\r
-    other             - This driver was not removed from this device\r
-  \r
---*/\r
 // TODO:    Controller - add argument and description to function comment\r
 // TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 {\r
@@ -912,29 +920,22 @@ IDEBusDriverBindingStop (
 // DeRegisterIdeDevice\r
 // ***********************************************************************************\r
 //\r
+/**\r
+  Deregister an IDE device and free resources\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  Controller Ide device handle\r
+  @param  Handle Handle of device to deregister driver on\r
+\r
+  @return EFI_STATUS\r
+\r
+**/\r
 EFI_STATUS\r
 DeRegisterIdeDevice (\r
   IN  EFI_DRIVER_BINDING_PROTOCOL    *This,\r
   IN  EFI_HANDLE                     Controller,\r
   IN  EFI_HANDLE                     Handle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Deregister an IDE device and free resources\r
-  \r
-Arguments:\r
-\r
-  This            - Protocol instance pointer.\r
-  Controller      - Ide device handle\r
-  Handle          - Handle of device to deregister driver on \r
-  \r
-Returns:\r
-\r
-  EFI_STATUS\r
-\r
---*/\r
 // TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   EFI_STATUS            Status;\r
@@ -1015,26 +1016,18 @@ Returns:
 // IDEBlkIoReset\r
 // ***********************************************************************************\r
 //\r
+/**\r
+  TODO:    This - add argument and description to function comment\r
+  TODO:    ExtendedVerification - add argument and description to function comment\r
+  TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEBlkIoReset (\r
   IN  EFI_BLOCK_IO_PROTOCOL   *This,\r
   IN  BOOLEAN                 ExtendedVerification\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    ExtendedVerification - add argument and description to function comment\r
-// TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 {\r
   IDE_BLK_IO_DEV  *IdeBlkIoDevice;\r
   EFI_STATUS      Status;\r
@@ -1048,7 +1041,8 @@ Returns:
   //\r
   // for ATA device, using ATA reset method\r
   //\r
-  if (IdeBlkIoDevice->Type == IdeHardDisk) {\r
+  if (IdeBlkIoDevice->Type == IdeHardDisk ||\r
+      IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {\r
     return AtaSoftReset (IdeBlkIoDevice);\r
   }\r
 \r
@@ -1067,6 +1061,18 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+  Read data from block io device\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  MediaId The media ID of the device\r
+  @param  LBA Starting LBA address to read data\r
+  @param  BufferSize The size of data to be read\r
+  @param  Buffer Caller supplied buffer to save data\r
+\r
+  @return read data status\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEBlkIoReadBlocks (\r
@@ -1076,25 +1082,6 @@ IDEBlkIoReadBlocks (
   IN  UINTN                   BufferSize,\r
   OUT VOID                    *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Read data from block io device\r
-  \r
-Arguments:\r
-\r
-  This            - Protocol instance pointer.\r
-  MediaId         - The media ID of the device\r
-  LBA             - Starting LBA address to read data\r
-  BufferSize      - The size of data to be read\r
-  Buffer          - Caller supplied buffer to save data\r
-  \r
-Returns:\r
-\r
-  read data status\r
-\r
---*/\r
 // TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 {\r
   IDE_BLK_IO_DEV  *IdeBlkIoDevice;\r
@@ -1137,6 +1124,18 @@ Returns:
 \r
 }\r
 \r
+/**\r
+  Write data to block io device\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  MediaId The media ID of the device\r
+  @param  LBA Starting LBA address to write data\r
+  @param  BufferSize The size of data to be written\r
+  @param  Buffer Caller supplied buffer to save data\r
+\r
+  @return write data status\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEBlkIoWriteBlocks (\r
@@ -1146,25 +1145,6 @@ IDEBlkIoWriteBlocks (
   IN  UINTN                   BufferSize,\r
   IN  VOID                    *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Write data to block io device\r
-  \r
-Arguments:\r
-\r
-  This            - Protocol instance pointer.\r
-  MediaId         - The media ID of the device\r
-  LBA             - Starting LBA address to write data\r
-  BufferSize      - The size of data to be written\r
-  Buffer          - Caller supplied buffer to save data\r
-  \r
-Returns:\r
-\r
-  write data status\r
-\r
---*/\r
 // TODO:    EFI_DEVICE_ERROR - add return value to function comment\r
 {\r
   IDE_BLK_IO_DEV  *IdeBlkIoDevice;\r
@@ -1211,24 +1191,15 @@ Returns:
 // IDEBlkIoFlushBlocks\r
 // ***********************************************************************************\r
 //\r
+/**\r
+  TODO:    This - add argument and description to function comment\r
+  TODO:    EFI_SUCCESS - add return value to function comment\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEBlkIoFlushBlocks (\r
   IN  EFI_BLOCK_IO_PROTOCOL   *This\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-// TODO:    This - add argument and description to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   //\r
   // return directly\r
@@ -1236,6 +1207,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Return the results of the Inquiry command to a drive in InquiryData.\r
+  Data format of Inquiry data is defined by the Interface GUID.\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  InquiryData Results of Inquiry command to device\r
+  @param  InquiryDataSize Size of InquiryData in bytes.\r
+\r
+  @retval  EFI_SUCCESS InquiryData valid\r
+  @retval  EFI_NOT_FOUND Device does not support this data class\r
+  @retval  EFI_DEVICE_ERROR Error reading InquiryData from device\r
+  @retval  EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEDiskInfoInquiry (\r
@@ -1243,24 +1228,6 @@ IDEDiskInfoInquiry (
   IN OUT VOID                     *InquiryData,\r
   IN OUT UINT32                   *InquiryDataSize\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Return the results of the Inquiry command to a drive in InquiryData.\r
-    Data format of Inquiry data is defined by the Interface GUID.\r
-\r
-  Arguments:\r
-    This        - Protocol instance pointer.\r
-    InquiryData - Results of Inquiry command to device\r
-    InquiryDataSize - Size of InquiryData in bytes.\r
-\r
-  Returns:\r
-    EFI_SUCCESS       - InquiryData valid\r
-    EFI_NOT_FOUND     - Device does not support this data class\r
-    EFI_DEVICE_ERROR  - Error reading InquiryData from device \r
-    EFI_BUFFER_TOO_SMALL - IntquiryDataSize not big enough\r
-\r
---*/\r
 {\r
   IDE_BLK_IO_DEV  *IdeBlkIoDevice;\r
 \r
@@ -1281,6 +1248,20 @@ IDEDiskInfoInquiry (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Return the results of the Identify command to a drive in IdentifyData.\r
+  Data format of Identify data is defined by the Interface GUID.\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  IdentifyData Results of Identify command to device\r
+  @param  IdentifyDataSize Size of IdentifyData in bytes.\r
+\r
+  @retval  EFI_SUCCESS IdentifyData valid\r
+  @retval  EFI_NOT_FOUND Device does not support this data class\r
+  @retval  EFI_DEVICE_ERROR Error reading IdentifyData from device\r
+  @retval  EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEDiskInfoIdentify (\r
@@ -1288,24 +1269,6 @@ IDEDiskInfoIdentify (
   IN OUT VOID                     *IdentifyData,\r
   IN OUT UINT32                   *IdentifyDataSize\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Return the results of the Identify command to a drive in IdentifyData.\r
-    Data format of Identify data is defined by the Interface GUID.\r
-\r
-  Arguments:\r
-    This        - Protocol instance pointer.\r
-    IdentifyData - Results of Identify command to device\r
-    IdentifyDataSize - Size of IdentifyData in bytes.\r
-\r
-  Returns:\r
-    EFI_SUCCESS       - IdentifyData valid\r
-    EFI_NOT_FOUND     - Device does not support this data class\r
-    EFI_DEVICE_ERROR  - Error reading IdentifyData from device \r
-    EFI_BUFFER_TOO_SMALL - IdentifyDataSize not big enough\r
-\r
---*/\r
 {\r
   IDE_BLK_IO_DEV  *IdeBlkIoDevice;\r
 \r
@@ -1326,6 +1289,21 @@ IDEDiskInfoIdentify (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Return the results of the Request Sense command to a drive in SenseData.\r
+  Data format of Sense data is defined by the Interface GUID.\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  SenseData Results of Request Sense command to device\r
+  @param  SenseDataSize Size of SenseData in bytes.\r
+  @param  SenseDataNumber Type of SenseData\r
+\r
+  @retval  EFI_SUCCESS InquiryData valid\r
+  @retval  EFI_NOT_FOUND Device does not support this data class\r
+  @retval  EFI_DEVICE_ERROR Error reading InquiryData from device\r
+  @retval  EFI_BUFFER_TOO_SMALL SenseDataSize not big enough\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEDiskInfoSenseData (\r
@@ -1334,29 +1312,22 @@ IDEDiskInfoSenseData (
   IN OUT UINT32                   *SenseDataSize,\r
   OUT    UINT8                    *SenseDataNumber\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Return the results of the Request Sense command to a drive in SenseData.\r
-    Data format of Sense data is defined by the Interface GUID.\r
-\r
-  Arguments:\r
-    This            - Protocol instance pointer.\r
-    SenseData       - Results of Request Sense command to device\r
-    SenseDataSize   - Size of SenseData in bytes.\r
-    SenseDataNumber - Type of SenseData\r
-\r
-  Returns:\r
-    EFI_SUCCESS       - InquiryData valid\r
-    EFI_NOT_FOUND     - Device does not support this data class\r
-    EFI_DEVICE_ERROR  - Error reading InquiryData from device \r
-    EFI_BUFFER_TOO_SMALL - SenseDataSize not big enough\r
-\r
---*/\r
 {\r
   return EFI_NOT_FOUND;\r
 }\r
 \r
+/**\r
+  Return the results of the Request Sense command to a drive in SenseData.\r
+  Data format of Sense data is defined by the Interface GUID.\r
+\r
+  @param  This Protocol instance pointer.\r
+  @param  IdeChannel Primary or Secondary\r
+  @param  IdeDevice Master or Slave\r
+\r
+  @retval  EFI_SUCCESS IdeChannel and IdeDevice are valid\r
+  @retval  EFI_UNSUPPORTED This is not an IDE device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IDEDiskInfoWhichIde (\r
@@ -1364,22 +1335,6 @@ IDEDiskInfoWhichIde (
   OUT UINT32                   *IdeChannel,\r
   OUT UINT32                   *IdeDevice\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Return the results of the Request Sense command to a drive in SenseData.\r
-    Data format of Sense data is defined by the Interface GUID.\r
-\r
-  Arguments:\r
-    This        - Protocol instance pointer.\r
-    IdeChannel  - Primary or Secondary\r
-    IdeDevice   - Master or Slave\r
-\r
-  Returns:\r
-    EFI_SUCCESS       - IdeChannel and IdeDevice are valid\r
-    EFI_UNSUPPORTED   - This is not an IDE device\r
-\r
---*/\r
 {\r
   IDE_BLK_IO_DEV  *IdeBlkIoDevice;\r
 \r