From patchwork Tue Jan 11 02:02:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 470041 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0B20hLt011447 for ; Tue, 11 Jan 2011 02:01:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755401Ab1AKCAl (ORCPT ); Mon, 10 Jan 2011 21:00:41 -0500 Received: from tx2ehsobe004.messaging.microsoft.com ([65.55.88.14]:31703 "EHLO TX2EHSOBE008.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755396Ab1AKCAj (ORCPT ); Mon, 10 Jan 2011 21:00:39 -0500 Received: from mail94-tx2-R.bigfish.com (10.9.14.241) by TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id 14.1.225.8; Tue, 11 Jan 2011 02:00:38 +0000 Received: from mail94-tx2 (localhost.localdomain [127.0.0.1]) by mail94-tx2-R.bigfish.com (Postfix) with ESMTP id C53AC116050B for ; Tue, 11 Jan 2011 02:00:37 +0000 (UTC) X-SpamScore: -6 X-BigFish: VS-6(zz936eK98bKzz1202hzz8275bh8275dhz2dh2a8h668h) X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:az33egw01.freescale.net; RD:az33egw01.freescale.net; EFVD:NLI Received: from mail94-tx2 (localhost.localdomain [127.0.0.1]) by mail94-tx2 (MessageSwitch) id 1294711237585846_30255; Tue, 11 Jan 2011 02:00:37 +0000 (UTC) Received: from TX2EHSMHS012.bigfish.com (unknown [10.9.14.248]) by mail94-tx2.bigfish.com (Postfix) with ESMTP id 82C2710051 for ; Tue, 11 Jan 2011 02:00:37 +0000 (UTC) Received: from az33egw01.freescale.net (192.88.158.102) by TX2EHSMHS012.bigfish.com (10.9.99.112) with Microsoft SMTP Server (TLS) id 14.1.225.8; Tue, 11 Jan 2011 02:00:30 +0000 Received: from az33smr02.freescale.net (az33smr02.freescale.net [10.64.34.200]) by az33egw01.freescale.net (8.14.3/8.14.3) with ESMTP id p0B20Qlj025572 for ; Mon, 10 Jan 2011 19:00:29 -0700 (MST) Received: from localhost.localdomain (shlinux1.ap.freescale.net [10.192.225.216]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p0B20MeG006513; Mon, 10 Jan 2011 20:00:23 -0600 (CST) From: Richard Zhu To: , CC: , Richard Zhu , Subject: [REVIEW 2/2] ENGR0000137838 SDHCI Some eMMC cards can't work well in our BSP Date: Tue, 11 Jan 2011 10:02:48 +0800 Message-ID: <1294711368-446-1-git-send-email-r65037@freescale.com> X-Mailer: git-send-email 1.6.3.3 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 11 Jan 2011 02:01:10 +0000 (UTC) ============================================= diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 4a9e2ed..95e13c2 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -222,7 +222,9 @@ static int mmc_read_ext_csd(struct mmc_card *card) ext_csd[EXT_CSD_SEC_CNT + 1] << 8 | ext_csd[EXT_CSD_SEC_CNT + 2] << 16 | ext_csd[EXT_CSD_SEC_CNT + 3] << 24; - if (card->ext_csd.sectors) + + /* Cards with density > 2GiB are sector addressed */ + if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512) mmc_card_set_blockaddr(card); }