]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/ScsiIo.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / ScsiIo.h
index e1019bac44adfa229058cabff37e2fbc5cd72d14..cf37eba5e95c048bec5d3fcd17526c9fa7bcbd5c 100644 (file)
@@ -1,7 +1,10 @@
 /** @file\r
   EFI_SCSI_IO_PROTOCOL as defined in UEFI 2.0.\r
+  This protocol is used by code, typically drivers, running in the EFI boot \r
+  services environment to access SCSI devices. In particular, functions for \r
+  managing devices on SCSI buses are defined here.\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2008, 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
@@ -10,8 +13,6 @@
   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:  ScsiIo.h\r
-\r
 **/\r
 \r
 #ifndef __EFI_SCSI_IO_PROTOCOL_H__\r
 \r
 #define EFI_SCSI_IO_PROTOCOL_GUID \\r
   { \\r
-    0x932f4736, 0x2362, 0x4002, {0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \\r
+    0x932f47e6, 0x2362, 0x4002, {0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \\r
   }\r
 \r
-//\r
-// Forward reference for pure ANSI compatability\r
-//\r
+///\r
+/// Forward reference for pure ANSI compatability\r
+///\r
 typedef struct _EFI_SCSI_IO_PROTOCOL EFI_SCSI_IO_PROTOCOL;\r
 \r
 //\r
@@ -92,11 +93,10 @@ typedef struct {
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE) (\r
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE)(\r
   IN  EFI_SCSI_IO_PROTOCOL            *This,\r
   OUT UINT8                           *DeviceType\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Retrieves the device location in the SCSI channel.\r
@@ -113,12 +113,11 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION) (\r
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION)(\r
   IN EFI_SCSI_IO_PROTOCOL           *This,\r
   IN OUT UINT8                      **Target,\r
   OUT UINT64                        *Lun\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Resets the SCSI Bus that the SCSI Controller is attached to.\r
@@ -135,10 +134,9 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_BUS) (\r
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_BUS)(\r
   IN EFI_SCSI_IO_PROTOCOL     *This\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Resets the SCSI Controller that the device handle specifies.\r
@@ -156,10 +154,9 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_DEVICE) (\r
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_RESET_DEVICE)(\r
   IN EFI_SCSI_IO_PROTOCOL     *This\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -183,7 +180,7 @@ EFI_STATUS
                                     HostAdapterStatus, TargetStatus,\r
                                     SenseDataLength, and SenseData in that order\r
                                     for additional status information.\r
-  @retval EFI_WARN_BUFFER_TOO_SMALL The SCSI Request Packet was executed,\r
+  @retval EFI_BAD_BUFFER_SIZE       The SCSI Request Packet was executed,\r
                                     but the entire DataBuffer could not be transferred.\r
                                     The actual number of bytes transferred is returned\r
                                     in TransferLength. See HostAdapterStatus,\r
@@ -212,19 +209,28 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND) (\r
+(EFIAPI *EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND)(\r
   IN EFI_SCSI_IO_PROTOCOL                   *This,\r
   IN OUT  EFI_SCSI_IO_SCSI_REQUEST_PACKET   *Packet,\r
   IN EFI_EVENT                              Event  OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
+///\r
+/// Provides services to manage and communicate with SCSI devices.\r
+///\r
 struct _EFI_SCSI_IO_PROTOCOL {\r
   EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE      GetDeviceType;\r
   EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION  GetDeviceLocation;\r
   EFI_SCSI_IO_PROTOCOL_RESET_BUS            ResetBus;\r
   EFI_SCSI_IO_PROTOCOL_RESET_DEVICE         ResetDevice;\r
-  EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND    ExecuteSCSICommand;    \r
+  EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND    ExecuteScsiCommand;    \r
+\r
+  ///\r
+  /// Supplies the alignment requirement for any buffer used in a data transfer. \r
+  /// IoAlign values of 0 and 1 mean that the buffer can be placed anywhere in memory. \r
+  /// Otherwise, IoAlign must be a power of 2, and the requirement is that the \r
+  /// start address of a buffer must be evenly divisible by IoAlign with no remainder.\r
+  ///\r
   UINT32                                    IoAlign;\r
 };\r
 \r