From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: tien.hock.loh@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Thu, 09 May 2019 00:54:11 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 00:54:11 -0700 X-ExtLoop1: 1 Received: from pg-nx11.altera.com ([10.104.4.26]) by fmsmga006.fm.intel.com with ESMTP; 09 May 2019 00:54:09 -0700 From: "Loh, Tien Hock" To: devel@edk2.groups.io, thloh85@gmail.com Cc: "Tien Hock, Loh" , Leif Lindholm , Ard Biesheuvel Subject: [PATCH 2/4] EmbeddedPkg: Fix response check flag Date: Thu, 9 May 2019 15:49:50 +0800 Message-Id: <1557388192-162021-1-git-send-email-tien.hock.loh@intel.com> X-Mailer: git-send-email 2.2.2 From: "Tien Hock, Loh" Do not send CRC response check if the MMC command does not support CRC response Signed-off-by: Tien Hock, Loh Cc: Leif Lindholm Cc: Ard Biesheuvel --- EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c index c44e310c04..e0068655ca 100644 --- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c +++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c @@ -385,7 +385,7 @@ DwEmmcSendCommand ( BIT_CMD_READ | BIT_CMD_WAIT_PRVDATA_COMPLETE; break; default: - Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC; + Cmd = BIT_CMD_RESPONSE_EXPECT; break; } @@ -396,6 +396,10 @@ DwEmmcSendCommand ( else IsACmd = FALSE; + if (!(MmcCmd & MMC_CMD_NO_CRC_RESPONSE)) { + Cmd |= BIT_CMD_CHECK_RESPONSE_CRC; + } + if (IsPendingReadCommand (Cmd) || IsPendingWriteCommand (Cmd)) { mDwEmmcCommand = Cmd; mDwEmmcArgument = Argument; -- 2.19.0