From owner-freebsd-arm@FreeBSD.ORG Fri Jul 9 17:00:18 2010 Return-Path: Delivered-To: freebsd-arm@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEFAB1065690 for ; Fri, 9 Jul 2010 17:00:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C68CE8FC1A for ; Fri, 9 Jul 2010 17:00:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o69H0EvZ082976 for ; Fri, 9 Jul 2010 17:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o69H0E0d082975; Fri, 9 Jul 2010 17:00:14 GMT (envelope-from gnats) Resent-Date: Fri, 9 Jul 2010 17:00:14 GMT Resent-Message-Id: <201007091700.o69H0E0d082975@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-arm@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Greg Ansley Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ED08106566B for ; Fri, 9 Jul 2010 16:54:16 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 5E8A68FC0A for ; Fri, 9 Jul 2010 16:54:16 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o69GsFm4032018 for ; Fri, 9 Jul 2010 16:54:15 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o69GsF1n032013; Fri, 9 Jul 2010 16:54:15 GMT (envelope-from nobody) Message-Id: <201007091654.o69GsF1n032013@www.freebsd.org> Date: Fri, 9 Jul 2010 16:54:15 GMT From: Greg Ansley To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: arm/148474: MMC timeout too short durring enumeration of cards. X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2010 17:00:18 -0000 >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: