Revision: 14708
http://sourceforge.net/p/edk2/code/14708
Author: vanjeff
Date: 2013-09-24 02:54:57 +0000 (Tue, 24 Sep 2013)
Log Message:
-----------
Sync patch r14428 from main trunk.
MdeModulePkg/AtaBus: wait up to 30s for ATA cmd response in Standby/Idle mode
to follow ATA spec.
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/14428
Modified Paths:
--------------
branches/UDK2010.SR1/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
Modified:
branches/UDK2010.SR1/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
===================================================================
--- branches/UDK2010.SR1/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
2013-09-23 14:50:57 UTC (rev 14707)
+++ branches/UDK2010.SR1/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
2013-09-24 02:54:57 UTC (rev 14708)
@@ -10,7 +10,7 @@
for Security Protocol Specific layout. This implementation uses big endian
for
Cylinder register.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -543,19 +543,21 @@
//
// As AtaBus is used to manage ATA devices, we have to use the lowest
transfer rate to
// calculate the possible maximum timeout value for each read/write
operation.
+ // The timout value is rounded up to nearest integar and here an additional
30s is added
+ // to follow ATA spec in which it mentioned that the device may take up to
30s to respond
+ // commands in the Standby/Idle mode.
//
if (AtaDevice->UdmaValid) {
//
// Calculate the maximum timeout value for DMA read/write operation.
//
- Packet->Timeout = EFI_TIMER_PERIOD_SECONDS ((TransferLength *
AtaDevice->BlockMedia.BlockSize) / 2100000 + 1);
+ Packet->Timeout = EFI_TIMER_PERIOD_SECONDS (DivU64x32 (MultU64x32
(TransferLength, AtaDevice->BlockMedia.BlockSize), 2100000) + 31);
} else {
//
// Calculate the maximum timeout value for PIO read/write operation
//
- Packet->Timeout = EFI_TIMER_PERIOD_SECONDS ((TransferLength *
AtaDevice->BlockMedia.BlockSize) / 3300000 + 1);
+ Packet->Timeout = EFI_TIMER_PERIOD_SECONDS (DivU64x32 (MultU64x32
(TransferLength, AtaDevice->BlockMedia.BlockSize), 3300000) + 31);
}
-
return AtaDevicePassThru (AtaDevice, TaskPacket, Event);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits