Revision: 14681
          http://sourceforge.net/p/edk2/code/14681
Author:   erictian
Date:     2013-09-18 02:13:34 +0000 (Wed, 18 Sep 2013)
Log Message:
-----------
MdeModulePkg/AtaAtapiPassThru: To follow UEFI 2.4, updating the implementation 
of ATA_PASS_THRU.PassThru() to allow sending ATA cmds to ATAPI devices.

Signed-off-by: Feng Tian <[email protected]>
Reviewed-by: Eric Jin <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c

Modified: trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c 
2013-09-17 05:11:30 UTC (rev 14680)
+++ trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c 
2013-09-18 02:13:34 UTC (rev 14681)
@@ -2,7 +2,7 @@
   This file implements ATA_PASSTHRU_PROCTOCOL and EXT_SCSI_PASSTHRU_PROTOCOL 
interfaces
   for managed ATA controllers.
 
-  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
   which accompanies this distribution.  The full text of the license may be 
found at
@@ -1265,6 +1265,15 @@
     return EFI_INVALID_PARAMETER;
   }
 
+  Node = SearchDeviceInfoList (Instance, Port, PortMultiplierPort, 
EfiIdeHarddisk);
+
+  if (Node == NULL) {
+    Node = SearchDeviceInfoList(Instance, Port, PortMultiplierPort, 
EfiIdeCdrom);
+    if (Node == NULL) {
+      return EFI_INVALID_PARAMETER;
+    }
+  }
+
   //
   // convert the transfer length from sector count to byte.
   //
@@ -1281,12 +1290,6 @@
     Packet->OutTransferLength = Packet->OutTransferLength * 0x200;
   }
 
-  Node = SearchDeviceInfoList (Instance, Port, PortMultiplierPort, 
EfiIdeHarddisk);
-
-  if (Node == NULL) {
-    return EFI_INVALID_PARAMETER;
-  }
-
   //
   // Check whether this device needs 48-bit addressing (ATAPI-6 ata device).
   // Per ATA-6 spec, word83: bit15 is zero and bit14 is one.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to