]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
MdeModulePkg/ScsiDisk: Using back-off algorithm to dynamically adjust transfer length...
[mirror_edk2.git] / MdeModulePkg / Bus / Scsi / ScsiDiskDxe / ScsiDisk.h
index 21dcbd32d4af805157416ac21ed094564d6dbdff..407763665f7cbc742be4e58faaf3639124ae5f1e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for SCSI Disk Driver.\r
 \r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -90,9 +90,10 @@ extern EFI_COMPONENT_NAME2_PROTOCOL  gScsiDiskComponentName2;
 //\r
 // action code used in detect media process\r
 //\r
-#define ACTION_NO_ACTION            0x00\r
-#define ACTION_READ_CAPACITY        0x01\r
-#define ACTION_RETRY_COMMAND_LATER  0x02\r
+#define ACTION_NO_ACTION               0x00\r
+#define ACTION_READ_CAPACITY           0x01\r
+#define ACTION_RETRY_COMMAND_LATER     0x02\r
+#define ACTION_RETRY_WITH_BACKOFF_ALGO 0x03\r
 \r
 #define SCSI_COMMAND_VERSION_1      0x01\r
 #define SCSI_COMMAND_VERSION_2      0x02\r
@@ -717,17 +718,15 @@ ScsiDiskWriteSectors (
   );\r
 \r
 /**\r
-  Submit Read command.\r
+  Submit Read(10) command.\r
 \r
   @param  ScsiDiskDevice     The pointer of ScsiDiskDevice\r
   @param  NeedRetry          The pointer of flag indicates if needs retry if error happens\r
-  @param  SenseDataArray     NOT used yet in this function\r
-  @param  NumberOfSenseKeys  The number of sense key\r
   @param  Timeout            The time to complete the command\r
   @param  DataBuffer         The buffer to fill with the read out data\r
   @param  DataLength         The length of buffer\r
   @param  StartLba           The start logic block address\r
-  @param  SectorSize         The size of sector\r
+  @param  SectorCount        The number of blocks to read\r
 \r
   @return  EFI_STATUS is returned by calling ScsiRead10Command().\r
 **/\r
@@ -735,27 +734,23 @@ EFI_STATUS
 ScsiDiskRead10 (\r
   IN     SCSI_DISK_DEV         *ScsiDiskDevice,\r
      OUT BOOLEAN               *NeedRetry,\r
-     OUT EFI_SCSI_SENSE_DATA   **SenseDataArray,   OPTIONAL\r
-     OUT UINTN                 *NumberOfSenseKeys,\r
   IN     UINT64                Timeout,\r
      OUT UINT8                 *DataBuffer,\r
   IN OUT UINT32                *DataLength,\r
   IN     UINT32                StartLba,\r
-  IN     UINT32                SectorSize\r
+  IN     UINT32                SectorCount\r
   );\r
 \r
 /**\r
-  Submit Write Command.\r
+  Submit Write(10) Command.\r
 \r
   @param  ScsiDiskDevice     The pointer of ScsiDiskDevice\r
   @param  NeedRetry          The pointer of flag indicates if needs retry if error happens\r
-  @param  SenseDataArray     NOT used yet in this function\r
-  @param  NumberOfSenseKeys  The number of sense key\r
   @param  Timeout            The time to complete the command\r
   @param  DataBuffer         The buffer to fill with the read out data\r
   @param  DataLength         The length of buffer\r
   @param  StartLba           The start logic block address\r
-  @param  SectorSize         The size of sector\r
+  @param  SectorCount        The number of blocks to write\r
 \r
   @return  EFI_STATUS is returned by calling ScsiWrite10Command().\r
 \r
@@ -764,13 +759,11 @@ EFI_STATUS
 ScsiDiskWrite10 (\r
   IN     SCSI_DISK_DEV         *ScsiDiskDevice,\r
      OUT BOOLEAN               *NeedRetry,\r
-     OUT EFI_SCSI_SENSE_DATA   **SenseDataArray,   OPTIONAL\r
-     OUT UINTN                 *NumberOfSenseKeys,\r
   IN     UINT64                Timeout,\r
   IN     UINT8                 *DataBuffer,\r
   IN OUT UINT32                *DataLength,\r
   IN     UINT32                StartLba,\r
-  IN     UINT32                SectorSize\r
+  IN     UINT32                SectorCount\r
   );\r
 \r
 /**\r
@@ -778,27 +771,23 @@ ScsiDiskWrite10 (
 \r
   @param  ScsiDiskDevice     The pointer of ScsiDiskDevice\r
   @param  NeedRetry          The pointer of flag indicates if needs retry if error happens\r
-  @param  SenseDataArray     NOT used yet in this function\r
-  @param  NumberOfSenseKeys  The number of sense key\r
   @param  Timeout            The time to complete the command\r
   @param  DataBuffer         The buffer to fill with the read out data\r
   @param  DataLength         The length of buffer\r
   @param  StartLba           The start logic block address\r
-  @param  SectorSize         The size of sector\r
+  @param  SectorCount        The number of blocks to read\r
 \r
-  @return  EFI_STATUS is returned by calling ScsiRead10Command().\r
+  @return  EFI_STATUS is returned by calling ScsiRead16Command().\r
 **/\r
 EFI_STATUS\r
 ScsiDiskRead16 (\r
   IN     SCSI_DISK_DEV         *ScsiDiskDevice,\r
      OUT BOOLEAN               *NeedRetry,\r
-     OUT EFI_SCSI_SENSE_DATA   **SenseDataArray,   OPTIONAL\r
-     OUT UINTN                 *NumberOfSenseKeys,\r
   IN     UINT64                Timeout,\r
      OUT UINT8                 *DataBuffer,\r
   IN OUT UINT32                *DataLength,\r
   IN     UINT64                StartLba,\r
-  IN     UINT32                SectorSize\r
+  IN     UINT32                SectorCount\r
   );\r
   \r
 /**\r
@@ -806,28 +795,24 @@ ScsiDiskRead16 (
 \r
   @param  ScsiDiskDevice     The pointer of ScsiDiskDevice\r
   @param  NeedRetry          The pointer of flag indicates if needs retry if error happens\r
-  @param  SenseDataArray     NOT used yet in this function\r
-  @param  NumberOfSenseKeys  The number of sense key\r
   @param  Timeout            The time to complete the command\r
   @param  DataBuffer         The buffer to fill with the read out data\r
   @param  DataLength         The length of buffer\r
   @param  StartLba           The start logic block address\r
-  @param  SectorSize         The size of sector\r
+  @param  SectorCount        The number of blocks to write\r
 \r
-  @return  EFI_STATUS is returned by calling ScsiWrite10Command().\r
+  @return  EFI_STATUS is returned by calling ScsiWrite16Command().\r
 \r
 **/\r
 EFI_STATUS\r
 ScsiDiskWrite16 (\r
   IN     SCSI_DISK_DEV         *ScsiDiskDevice,\r
      OUT BOOLEAN               *NeedRetry,\r
-     OUT EFI_SCSI_SENSE_DATA   **SenseDataArray,   OPTIONAL\r
-     OUT UINTN                 *NumberOfSenseKeys,\r
   IN     UINT64                Timeout,\r
   IN     UINT8                 *DataBuffer,\r
   IN OUT UINT32                *DataLength,\r
   IN     UINT64                StartLba,\r
-  IN     UINT32                SectorSize\r
+  IN     UINT32                SectorCount\r
   );  \r
 \r
 /**\r