]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyBlock.c
Coding style modification.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaFloppyDxe / IsaFloppyBlock.c
index eed4f2e72b5ca73dfb57c026ff32c903159b34a7..6b254cd6a51048b7d1edeba70a797628e1bb9c8d 100644 (file)
@@ -23,29 +23,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "IsaFloppy.h"\r
 \r
+/**\r
+  Reset the Floppy Logic Drive, call the FddReset function   \r
+  \r
+  @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
+  @param ExtendedVerification BOOLEAN: Indicate that the driver may perform a more \r
+                    exhaustive verification operation of the device during \r
+                    reset, now this par is ignored in this driver          \r
+  @retval  EFI_SUCCESS:      The Floppy Logic Drive is reset\r
+  @retval  EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly \r
+                      and can not be reset\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FdcReset (\r
   IN  EFI_BLOCK_IO_PROTOCOL  *This,\r
   IN  BOOLEAN                ExtendedVerification\r
   )\r
-/*++\r
-  \r
-  Routine Description:  Reset the Floppy Logic Drive, call the FddReset function   \r
-  Parameters:\r
-    This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
-    ExtendedVerification BOOLEAN: Indicate that the driver may perform a more \r
-                    exhaustive verification operation of the device during \r
-                    reset, now this par is ignored in this driver          \r
-  Returns:\r
-    EFI_SUCCESS:      The Floppy Logic Drive is reset\r
-    EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly \r
-                      and can not be reset\r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    This - add argument and description to function comment\r
-// GC_TODO:    ExtendedVerification - add argument and description to function comment\r
 {\r
   FDC_BLK_IO_DEV  *FdcDev;\r
 \r
@@ -63,22 +58,18 @@ FdcReset (
   return FddReset (FdcDev);\r
 }\r
 \r
+/**\r
+  Flush block via fdd controller\r
+  \r
+  @param  This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
+  @return EFI_SUCCESS\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FddFlushBlocks (\r
   IN  EFI_BLOCK_IO_PROTOCOL  *This\r
   )\r
-/*++\r
-  \r
-  Routine Description:  \r
-  Parameters:\r
-    This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
-  Returns:\r
-    EFI_SUCCESS:    \r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    This - add argument and description to function comment\r
 {\r
   //\r
   // Not supported yet\r
@@ -86,28 +77,18 @@ FddFlushBlocks (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Common report status code interface\r
+  \r
+  @param This  Pointer of FDC_BLK_IO_DEV instance\r
+  @param Read  Error type: read or write?\r
+**/\r
 STATIC\r
 VOID\r
 FddReportStatus (\r
   IN  EFI_BLOCK_IO_PROTOCOL  *This,\r
   IN  BOOLEAN                Read\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  GC_TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This  - GC_TODO: add argument description\r
-  Read  - GC_TODO: add argument description\r
-\r
-Returns:\r
-\r
-  GC_TODO: add return values\r
-\r
---*/\r
 {\r
   FDC_BLK_IO_DEV  *FdcDev;\r
 \r
@@ -120,6 +101,26 @@ Returns:
     );\r
 }\r
 \r
+/**\r
+  Read the requested number of blocks from the device   \r
+  \r
+  @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
+  @param MediaId UINT32:    The media id that the read request is for    \r
+  @param  LBA EFI_LBA:     The starting logic block address to read from on the device\r
+  @param  BufferSize UINTN:  The size of the Buffer in bytes\r
+  @param  Buffer VOID *:     A pointer to the destination buffer for the data\r
+  \r
+  @retval  EFI_SUCCESS:     The data was read correctly from the device\r
+  @retval  EFI_DEVICE_ERROR:The device reported an error while attempting to perform\r
+                     the read operation\r
+  @retval  EFI_NO_MEDIA:    There is no media in the device\r
+  @retval  EFI_MEDIA_CHANGED:   The MediaId is not for the current media\r
+  @retval  EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the \r
+                         intrinsic block size of the device\r
+  @retval  EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid, \r
+                          or the buffer is not on proper alignment \r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FddReadBlocks (\r
@@ -129,33 +130,6 @@ FddReadBlocks (
   IN  UINTN                  BufferSize,\r
   OUT VOID                   *Buffer\r
   )\r
-/*++\r
-\r
-  Routine Description:  Read the requested number of blocks from the device   \r
-  Parameters:\r
-    This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
-    MediaId UINT32:    The media id that the read request is for    \r
-    LBA EFI_LBA:     The starting logic block address to read from on the device\r
-    BufferSize UINTN:  The size of the Buffer in bytes\r
-    Buffer VOID *:     A pointer to the destination buffer for the data\r
-  Returns:\r
-    EFI_SUCCESS:     The data was read correctly from the device\r
-    EFI_DEVICE_ERROR:The device reported an error while attempting to perform\r
-                     the read operation\r
-    EFI_NO_MEDIA:    There is no media in the device\r
-    EFI_MEDIA_CHANGED:   The MediaId is not for the current media\r
-    EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the \r
-                         intrinsic block size of the device\r
-    EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid, \r
-                          or the buffer is not on proper alignment \r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO:    This - add argument and description to function comment\r
-// GC_TODO:    MediaId - add argument and description to function comment\r
-// GC_TODO:    LBA - add argument and description to function comment\r
-// GC_TODO:    BufferSize - add argument and description to function comment\r
-// GC_TODO:    Buffer - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -168,6 +142,26 @@ FddReadBlocks (
   return Status;\r
 }\r
 \r
+/**\r
+  Write a specified number of blocks to the device   \r
+  \r
+  @param  This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
+  @param  MediaId UINT32:    The media id that the write request is for   \r
+  @param  LBA EFI_LBA:     The starting logic block address to be written\r
+  @param  BufferSize UINTN:  The size in bytes in Buffer\r
+  @param  Buffer VOID *:     A pointer to the source buffer for the data\r
+  \r
+  @retval  EFI_SUCCESS:     The data were written correctly to the device\r
+  @retval  EFI_WRITE_PROTECTED: The device can not be written to \r
+  @retval  EFI_NO_MEDIA:    There is no media in the device\r
+  @retval  EFI_MEDIA_CHANGED:   The MediaId is not for the current media\r
+  @retval  EFI_DEVICE_ERROR:  The device reported an error while attempting to perform \r
+                       the write operation \r
+  @retval  EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the \r
+                         intrinsic block size of the device\r
+  @retval  EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid, \r
+                          or the buffer is not on proper alignment \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FddWriteBlocks (\r
@@ -177,35 +171,6 @@ FddWriteBlocks (
   IN UINTN                  BufferSize,\r
   IN VOID                   *Buffer\r
   )\r
-/*++\r
-\r
-  Routine Description:  Write a specified number of blocks to the device   \r
-  Parameters:\r
-    This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface\r
-    MediaId UINT32:    The media id that the write request is for   \r
-    LBA EFI_LBA:     The starting logic block address to be written\r
-    BufferSize UINTN:  The size in bytes in Buffer\r
-    Buffer VOID *:     A pointer to the source buffer for the data\r
-  Returns :\r
-    EFI_SUCCESS:     The data were written correctly to the device\r
-    EFI_WRITE_PROTECTED: The device can not be written to \r
-    EFI_NO_MEDIA:    There is no media in the device\r
-    EFI_MEDIA_CHANGED:   The MediaId is not for the current media\r
-    EFI_DEVICE_ERROR:  The device reported an error while attempting to perform \r
-                       the write operation \r
-    EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the \r
-                         intrinsic block size of the device\r
-    EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid, \r
-                          or the buffer is not on proper alignment \r
-\r
---*/\r
-// GC_TODO: function comment is missing 'Arguments:'\r
-// GC_TODO: function comment is missing 'Returns:'\r
-// GC_TODO:    This - add argument and description to function comment\r
-// GC_TODO:    MediaId - add argument and description to function comment\r
-// GC_TODO:    LBA - add argument and description to function comment\r
-// GC_TODO:    BufferSize - add argument and description to function comment\r
-// GC_TODO:    Buffer - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
 \r
@@ -218,6 +183,32 @@ FddWriteBlocks (
   return Status;\r
 }\r
 \r
+/**\r
+  Read or Write a number of blocks to floppy device\r
+\r
+  @param This     Pointer to instance of EFI_BLOCK_IO_PROTOCOL\r
+  @param MediaId  The media id of read/write request\r
+  @param LBA      The starting logic block address to read from on the device\r
+  @param BufferSize The size of the Buffer in bytes\r
+  @param Operation   - GC_TODO: add argument description\r
+  Buffer      - GC_TODO: add argument description\r
+\r
+  @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value\r
+  @retval EFI_SUCCESS - GC_TODO: Add description for return value\r
+  @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
+  @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
+  @retval EFI_NO_MEDIA - GC_TODO: Add description for return value\r
+  @retval EFI_MEDIA_CHANGED - GC_TODO: Add description for return value\r
+  @retval EFI_WRITE_PROTECTED - GC_TODO: Add description for return value\r
+  @retval EFI_BAD_BUFFER_SIZE - GC_TODO: Add description for return value\r
+  @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value\r
+  @retval EFI_INVALID_PARAMETER - GC_TODO: Add description for return value\r
+  @retval EFI_SUCCESS - GC_TODO: Add description for return value\r
+  @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
+  @retval EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
+  @retval EFI_SUCCESS - GC_TODO: Add description for return value\r
+\r
+**/\r
 EFI_STATUS\r
 FddReadWriteBlocks (\r
   IN  EFI_BLOCK_IO_PROTOCOL  *This,\r
@@ -227,39 +218,6 @@ FddReadWriteBlocks (
   IN  BOOLEAN                Operation,\r
   OUT VOID                   *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  GC_TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This        - GC_TODO: add argument description\r
-  MediaId     - GC_TODO: add argument description\r
-  LBA         - GC_TODO: add argument description\r
-  BufferSize  - GC_TODO: add argument description\r
-  Operation   - GC_TODO: add argument description\r
-  Buffer      - GC_TODO: add argument description\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER - GC_TODO: Add description for return value\r
-  EFI_SUCCESS - GC_TODO: Add description for return value\r
-  EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
-  EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
-  EFI_NO_MEDIA - GC_TODO: Add description for return value\r
-  EFI_MEDIA_CHANGED - GC_TODO: Add description for return value\r
-  EFI_WRITE_PROTECTED - GC_TODO: Add description for return value\r
-  EFI_BAD_BUFFER_SIZE - GC_TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - GC_TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - GC_TODO: Add description for return value\r
-  EFI_SUCCESS - GC_TODO: Add description for return value\r
-  EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
-  EFI_DEVICE_ERROR - GC_TODO: Add description for return value\r
-  EFI_SUCCESS - GC_TODO: Add description for return value\r
-\r
---*/\r
 {\r
   EFI_BLOCK_IO_MEDIA  *Media;\r
   FDC_BLK_IO_DEV      *FdcDev;\r
@@ -423,25 +381,16 @@ Returns:
 \r
 }\r
 \r
+/**\r
+  Common interface for free cache \r
+  \r
+  @param FdcDec  Pointer of FDC_BLK_IO_DEV instance\r
+  \r
+**/\r
 VOID\r
 FdcFreeCache (\r
   IN    FDC_BLK_IO_DEV  *FdcDev\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  GC_TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  FdcDev  - GC_TODO: add argument description\r
-\r
-Returns:\r
-\r
-  GC_TODO: add return values\r
-\r
---*/\r
 {\r
   if (FdcDev->Cache) {\r
     gBS->FreePool (FdcDev->Cache);\r