From owner-cvs-src@FreeBSD.ORG Wed Mar 28 22:31:32 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73F8E16A404; Wed, 28 Mar 2007 22:31:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 650BD13C480; Wed, 28 Mar 2007 22:31:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l2SMVWK1069646; Wed, 28 Mar 2007 22:31:32 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l2SMVWTi069642; Wed, 28 Mar 2007 22:31:32 GMT (envelope-from imp) Message-Id: <200703282231.l2SMVWTi069642@repoman.freebsd.org> From: Warner Losh Date: Wed, 28 Mar 2007 22:31:32 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/boot/arm/at91/libat91 sd-card.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2007 22:31:32 -0000 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. My 'non-conforming' 4GB SD card also works now too. The non-conforming 4GB SD cards were sold for a while before the SD association was worried they would be (a) incompatible (different FAT flavor on them) and (b) confusing for the new SDHC standard and cracked down on suppliers' bogus use of the SD trademark... Revision Changes Path 1.4 +6 -4 src/sys/boot/arm/at91/libat91/sd-card.c