Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jul 2010 16:54:15 GMT
From:      Greg Ansley <gja@ansley.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   arm/148474: MMC timeout too short durring enumeration of cards.
Message-ID:  <201007091654.o69GsF1n032013@www.freebsd.org>
Resent-Message-ID: <201007091700.o69H0E0d082975@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         148474
>Category:       arm
>Synopsis:       MMC timeout too short durring enumeration of cards.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-arm
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 09 17:00:14 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Greg Ansley
>Release:        8-stabe & 9-current
>Organization:
Ansley & Associates, Inc.
>Environment:
>Description:
Large SD cards take much longer to come out of the power-up state than earlier smaller cards.

Current command loop terminates after 100 attempts waiting for a card to become ready.  A 1G card currently takes 241 iterations to become ready on a 400Mhz AT91SAM9G20. A 8G card was took 721.

SD card spec does not specify a maximum wait time.

The patch bumps the loop count to for 100 to 5000. Note that this does not affect the no-card or error condition timings.
>How-To-Repeat:
Boot system with SD card present. Large cards will not be found. Small cards work fine.
>Fix:


Patch attached with submission follows:

Index: mmc.c
===================================================================
RCS file: /usr/home/ncvs/src/sys/dev/mmc/mmc.c,v
retrieving revision 1.38
diff -r1.38 mmc.c
451c451
< 	for (i = 0; i < 100; i++) {
---
> 	for (i = 0; i < 5000; i++) {
478c478
< 	for (i = 0; i < 100; i++) {
---
> 	for (i = 0; i < 5000; i++) {


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007091654.o69GsF1n032013>