From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation Date: Mon, 9 Jan 2012 09:41:15 +0000 Message-ID: <4F0AB63B.4030202@imgtec.com> References: <4F0A3DA4.8010909@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from multi.imgtec.com ([194.200.65.239]:15453 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752257Ab2AIJl1 (ORCPT ); Mon, 9 Jan 2012 04:41:27 -0500 In-Reply-To: <4F0A3DA4.8010909@samsung.com> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Jaehoon Chung Cc: linux-mmc , Chris Ball , Kyungmin Park , Will Newton On 01/09/2012 01:06 AM, Jaehoon Chung wrote: > In FIFOTH register, can find "bit[27:16] = FIFO_DEPTH - 1". > Finally, FIFO_DEPTH = bit[27:16] + 1. > > Now, Used the 0x7ff. but 0xfff is right. Nice catch. The patch itself looks okay, but I don't think the commit message is very understandable, maybe something like this would be better?: In FIFOTH register, the RX_WMark field (bits[27:16]) defaults to FIFO_DEPTH - 1. When reading it, bits[26:16] were being used, so fix it to use the mask 0xfff instead of 0x7ff. Cheers James