From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 26 Jan 2019 22:52:19 -0500 Subject: [U-Boot] [U-Boot, 1/2] mmc: mtk-sd: fix possible incomplete read ops In-Reply-To: <20190117170601.20676-1-fparent@baylibre.com> References: <20190117170601.20676-1-fparent@baylibre.com> Message-ID: <20190127035219.GS6906@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Jan 17, 2019 at 06:06:00PM +0100, Fabien Parent wrote: > The code is checking for incomplete read when it see the INT_XFER_COMPL > flag, but it forget to first check whether there is anything left in the > FIFO to copy to the RX buffer. This means that sometimes we will get > errors because of erroneous incomplete read operation. > > This commit fixes the driver re-ordering the code so that we first > check for data inside the RX fifo and only after check the status > of the INT_XFER_COMPL flag. > > Signed-off-by: Fabien Parent Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: