From owner-freebsd-arm@FreeBSD.ORG Thu Mar 3 00:26:23 2011 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD7B51065672 for ; Thu, 3 Mar 2011 00:26:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1768FC15 for ; Thu, 3 Mar 2011 00:26:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id p230JuY3060262 for ; Wed, 2 Mar 2011 17:19:56 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D6EDEA5.2030200@bsdimp.com> Date: Wed, 02 Mar 2011 17:19:49 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-arm@freebsd.org References: <201103030010.p230A89l093346@freefall.freebsd.org> In-Reply-To: <201103030010.p230A89l093346@freefall.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: arm/155214: [patch] MMC/SD IO slow on Atmel ARM with modern large SD 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: Thu, 03 Mar 2011 00:26:24 -0000 On 03/02/2011 17:10, Bernd Walter wrote: > The following reply was made to PR arm/155214; it has been noted by GNATS. > > From: Bernd Walter > To: Ian Lepore > Cc: FreeBSD-gnats-submit@freebsd.org > Subject: Re: arm/155214: [patch] MMC/SD IO slow on Atmel ARM with modern large SD cards > Date: Thu, 3 Mar 2011 00:52:51 +0100 > > On Wed, Mar 02, 2011 at 02:53:18PM -0700, Ian Lepore wrote: > > > > >Number: 155214 > > >Category: arm > > >Synopsis: [patch] MMC/SD IO slow on Atmel ARM with modern large SD 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: Wed Mar 02 22:10:10 UTC 2011 > > >Closed-Date: > > >Last-Modified: > > >Originator: Ian Lepore > > >Release: FreeBSD 8.2-RC3 arm > > >Organization: > > none > > >Environment: > > FreeBSD dvb 8.2-RC3 FreeBSD 8.2-RC3 #49: Tue Feb 15 22:52:14 UTC 2011 root@revolution.hippie.lan:/usr/obj/arm/usr/src/sys/DVB arm > > > > Included patch is against -current even though the problem was first seen on > > 8.2-RC3 > > > > The problem was seen on AT91RM9200 hardware, but presumably also affects the > > SAM9 series which uses the same driver code. > > > > >Description: > > With the latest generation of large-capacity SD cards, write speeds as low as > > 20 kbytes/sec are seen. These modern cards have erase-block sizes as large as > > 8192K (compared to 32K typical on previous generations). The at91_mci driver > > does only single-sector IO; apparently this requires the SD card to internally > > perform an expensive read-erase-modify-write cycle for each 512 byte block > > written to the card. > > The complete details of this problem are completely known. > However the RM9200 has many hardware problems to be worked around and > so far noone actually did. > Your patch is quite large, so I would like to ask you explicitly: > Did you test your patch with an AT91RM9200 system? I believe their only playform is AT91RM9200 based... > You did enable multisector support for reading and (more important) for > writing? > But you didn't activate 4bit mode? > With 4bit mode there is no hardware bug, but when the driver was written > is was just done in a lazy way because activating 4bit on SD cards require > special handling - in the meantime the SD layer itself was extracted and > has 4bit support, but the at91_mci driver was never updated to use that. Actually, I was never able to make the 4-bit mode work because our primary hardware platfom had only 1 bit and the eval boards that I bought that had 4-bits wired up would never work completely reliably. Since I was never able to test it reliably, I never completed the partial implementation I did. > PS: I'm very pleased to see your work since SD write speed was a > major show stopper for some applications Agreed. This stuff is very cool. Warner