From owner-cvs-all@FreeBSD.ORG Fri Mar 30 02:54:01 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D363116A404; Fri, 30 Mar 2007 02:54:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9223B13C45B; Fri, 30 Mar 2007 02:54:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l2U2rbk7079742; Thu, 29 Mar 2007 20:53:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 29 Mar 2007 20:53:38 -0600 (MDT) Message-Id: <20070329.205338.1716877910.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely12.cicely.de From: "M. Warner Losh" In-Reply-To: <20070328224651.GE80382@cicely12.cicely.de> References: <200703282231.l2SMVWTi069642@repoman.freebsd.org> <20070328224651.GE80382@cicely12.cicely.de> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 29 Mar 2007 20:53:39 -0600 (MDT) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/boot/arm/at91/libat91 sd-card.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2007 02:54:01 -0000 In message: <20070328224651.GE80382@cicely12.cicely.de> Bernd Walter writes: : On Wed, Mar 28, 2007 at 10:31:32PM +0000, Warner Losh wrote: : > imp 2007-03-28 22:31:32 UTC : > : > FreeBSD src repository : > : > Modified files: : > sys/boot/arm/at91/libat91 sd-card.c : > Log: : > All SD cards have a block size of 512. The READ_BL_LEN field in the : > CSD is usually 512 (well, 9), but for 2GB (and the rogue 4GB SD cards) : > it is 1024 (or 2048 for 4GB). This value doesn't work for the block : > read commands (which really want 512). Hardcode 512 for those. This : > may break really old MMC cards that don't have a 512 block size (I've : > never seen one: make my day and send me one :-), but since the MMC : > side of the house is currently broken, it should only have the effect : > that 2GB (and non-conforming 4GB) SD cards will work. : : Great! : That explains why the partition table was read fine with my 2G card, : but although it calculated the right block it failed to read the : disklabel. Yes. Your report is what 'twigged' me to there being something wrong. I went out and bought a 2GB card at one of the local office stores for something like $25.00 and when it didn't work, I had a flash of inspiriation about why the 'non-standard 4GB SD card' and the 2GB cards didn't work... Warner