Fixed the timeout error in SiI3132SoftResetCommand() function.
The timeout "SiI3132AtaPassThru() Err:Timeout" occurs when using "WD SSD WDS100T2B0A 1TB", but doesn't occur when using "Intel SSD 530 Series 240GB".
Compared with the linux kernel driver, and found it has the status check during software reset function.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/ata/sata_sil24.c?h=v5.6.14
After this modification, confirmed that the WD SSD works without timeout error during software reset function.
Tested platform: Juno R2
Signed-off-by: Hiroaki isono Hiroaki.isono@...
diff --git
a/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c b/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c
index a938563ebd..64a9f94c6c 100644
--- a/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c
+++ b/EmbeddedPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c
@@ -79,6 +79,14 @@ SiI3132AtaPassThruCommand (
SATA_TRACE ("SiI3132AtaPassThru() EFI_ATA_PASS_THRU_PROTOCOL_ATA_SOFTWARE_RESET");
Control = PRB_CTRL_SRST;
+ SATA_PORT_READ32 (SataPort->RegBase + SII3132_PORT_INTSTATUS_REG,
&Value32);^M
+ Timeout = 1000;^M
+ while (Timeout
&& !(Value32 & IrqMask)) {^M
+ gBS->Stall (1);^M
+ SATA_PORT_READ32 (SataPort->RegBase + SII3132_PORT_INTSTATUS_REG,
&Value32);^M
+ Timeout--;^M
+ }^M
+^M
if (FeaturePcdGet
(PcdSataSiI3132FeaturePMPSupport)) {
SataPort->HostPRB->Fis.Control = 0x0F;
}
https://github.com/hiro-isono/edk2/commit/fa638c358e1a1afd46a8f0c4f04adfd5900622ca