linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: James Hogan <james.hogan@imgtec.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Chris Ball <cjb@laptop.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Will Newton <will.newton@imgtec.com>
Subject: Re: mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation
Date: Wed, 11 Jan 2012 18:59:06 +0900	[thread overview]
Message-ID: <4F0D5D6A.9040200@samsung.com> (raw)
In-Reply-To: <4F0D5635.50201@imgtec.com>

Hi James,

Thank you..:)

Best Regards,
Jaehoon Chung

On 01/11/2012 06:28 PM, James Hogan wrote:

> On 09/01/12 09:41, James Hogan wrote:
>> 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
> 
> Are you happy having your signed-off-by against this identical patch with
> a modified message Jaehoon?
> 
> From: Jaehoon Chung <jh80.chung@samsung.com>
> 
> 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.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Reviewed-by: James Hogan <james.hogan@imgtec.com>
> ---
>  drivers/mmc/host/dw_mmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index cc54808..6ea6185 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2075,7 +2075,7 @@ static int dw_mci_probe(struct platform_device *pdev)
>  		 * should put it in the platform data.
>  		 */
>  		fifo_size = mci_readl(host, FIFOTH);
> -		fifo_size = 1 + ((fifo_size >> 16) & 0x7ff);
> +		fifo_size = 1 + ((fifo_size >> 16) & 0xfff);
>  	} else {
>  		fifo_size = host->pdata->fifo_depth;
>  	}



  reply	other threads:[~2012-01-11  9:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09  1:06 mmc: dw_mmc: miscaculated the fifo-depth with wrong bit operation Jaehoon Chung
2012-01-09  9:41 ` James Hogan
2012-01-11  9:28   ` James Hogan
2012-01-11  9:59     ` Jaehoon Chung [this message]
2012-01-11 19:14       ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F0D5D6A.9040200@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=cjb@laptop.org \
    --cc=james.hogan@imgtec.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=will.newton@imgtec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).