Revision: 19684
http://sourceforge.net/p/edk2/code/19684
Author: lersek
Date: 2016-01-19 10:46:34 +0000 (Tue, 19 Jan 2016)
Log Message:
-----------
MdeModulePkg/.../IdeMode: actualize DRQReady*() comment blocks
The DRQReady() and DRQReady2() functions only differ in that they poll
different status registers for BSY, ERR, and DRQ: the former looks at the
Status Register (clearing interrupt status), while the latter looks at the
Alternate Status Register (not clearing interrupt status).
They both correctly return a unique status code, EFI_NOT_READY, for the
BSY==0 && ERR==0 && DRQ==0
case; that is, when the device reports "command complete".
However, the functions' leading comments don't explain this case, so it's
easy to miss in callers. Update the comments.
Cc: Feng Tian <[email protected]>
Cc: Star Zeng <[email protected]>
Cc: John Snow <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
Modified: trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c 2016-01-19
09:19:37 UTC (rev 19683)
+++ trunk/edk2/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c 2016-01-19
10:46:34 UTC (rev 19684)
@@ -467,10 +467,19 @@
@param IdeRegisters A pointer to EFI_IDE_REGISTERS data structure.
@param Timeout The time to complete the command, uses 100ns as a
unit.
- @retval EFI_SUCCESS DRQ bit set within the time out.
- @retval EFI_TIMEOUT DRQ bit not set within the time out.
- @retval EFI_ABORTED DRQ bit not set caused by the command abort.
+ @retval EFI_SUCCESS BSY bit cleared and DRQ bit set within the
+ timeout.
+ @retval EFI_TIMEOUT BSY bit not cleared within the timeout.
+
+ @retval EFI_ABORTED Polling abandoned due to command abort.
+
+ @retval EFI_DEVICE_ERROR Polling abandoned due to a non-abort error.
+
+ @retval EFI_NOT_READY BSY bit cleared within timeout, and device
+ reported "command complete" by clearing DRQ
+ bit.
+
@note Read Status Register will clear interrupt status.
**/
@@ -542,9 +551,19 @@
@param IdeRegisters A pointer to EFI_IDE_REGISTERS data structure.
@param Timeout The time to complete the command, uses 100ns as a
unit.
- @retval EFI_SUCCESS DRQ bit set within the time out.
- @retval EFI_TIMEOUT DRQ bit not set within the time out.
- @retval EFI_ABORTED DRQ bit not set caused by the command abort.
+ @retval EFI_SUCCESS BSY bit cleared and DRQ bit set within the
+ timeout.
+
+ @retval EFI_TIMEOUT BSY bit not cleared within the timeout.
+
+ @retval EFI_ABORTED Polling abandoned due to command abort.
+
+ @retval EFI_DEVICE_ERROR Polling abandoned due to a non-abort error.
+
+ @retval EFI_NOT_READY BSY bit cleared within timeout, and device
+ reported "command complete" by clearing DRQ
+ bit.
+
@note Read Alternate Status Register will not clear interrupt status.
**/
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits