]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c
MdePkg, MdeModulePkg: Remove EFI_ABORTED from I2C protocols per PI spec 1.4.
[mirror_edk2.git] / MdeModulePkg / Bus / I2c / I2cDxe / I2cHost.c
index 0cc8e33842833c846e8adfa28665cac382954403..68dd93188751362787cdda7c4a08c206e553379b 100644 (file)
@@ -2,7 +2,8 @@
   This file implements I2C Host Protocol which provides callers with the ability to \r
   do I/O transactions to all of the devices on the I2C bus.\r
 \r
-  Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
+  Copyright (c) 2013 - 2015, 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
@@ -672,6 +673,10 @@ I2cHostI2cBusConfigurationAvailable (
                         I2cHostContext->I2cEvent,\r
                         &I2cHostContext->Status\r
                         );\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG((DEBUG_ERROR, "I2cHostI2cBusConfigurationAvailable: Error starting I2C operation, %r\n", Status));\r
+  }\r
 }\r
 \r
 /**\r
@@ -891,8 +896,6 @@ I2cHostRequestEnable (
                               completion status\r
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
-  @retval EFI_ABORTED           The request did not complete because the driver\r
-                                was shutdown.\r
   @retval EFI_BAD_BUFFER_SIZE   The WriteBytes or ReadBytes buffer size is too large.\r
   @retval EFI_DEVICE_ERROR      There was an I2C error (NACK) during the operation.\r
                                 This could indicate the slave device is not present.\r
@@ -1012,6 +1015,7 @@ I2cHostQueueRequest (
   //\r
   RequestPacketSize = sizeof (UINTN) + RequestPacket->OperationCount * sizeof (EFI_I2C_OPERATION);\r
   I2cRequest->RequestPacket = AllocateZeroPool (RequestPacketSize);\r
+  ASSERT (I2cRequest->RequestPacket != NULL);\r
   CopyMem (I2cRequest->RequestPacket, RequestPacket, RequestPacketSize);\r
 \r
   //\r