Message ID | 1512060244-22907-6-git-send-email-jjhiblot@ti.com |
---|---|
State | Accepted |
Delegated to: | Jaehoon Chung |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="MJ5u14F1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3ynk400kxDz9sMN for <incoming@patchwork.ozlabs.org>; Fri, 1 Dec 2017 03:53:03 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id A9A74C21F00; Thu, 30 Nov 2017 16:46:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 20A9FC21EA8; Thu, 30 Nov 2017 16:45:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id ECAD9C21E6F; Thu, 30 Nov 2017 16:45:09 +0000 (UTC) Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by lists.denx.de (Postfix) with ESMTPS id 1BAE7C21DE6 for <u-boot@lists.denx.de>; Thu, 30 Nov 2017 16:45:04 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id vAUGj3Dt019299; Thu, 30 Nov 2017 10:45:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1512060303; bh=nDRQOTjbshejM4NV4StWVkxpn5KXeZnW5a2SRXGWiW8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MJ5u14F1pUz6wNPCMiJBj+GU+VtMDKdSLZGDFreNccd67uszBfrhlWJbYP62sJRa6 /VFRaWNFbUK7/oq930+Roh/R2JYfQ+rC3I4w5rPHvko7C3CGF6vsCxazoqYHKI6Uq0 ipZHX9KDnbIf7i4ofoswE4dTqNs89BR9e9gBpo5A= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAUGj249014031; Thu, 30 Nov 2017 10:45:03 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Thu, 30 Nov 2017 10:45:02 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Thu, 30 Nov 2017 10:45:02 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAUGj1hJ014530; Thu, 30 Nov 2017 10:45:02 -0600 From: Jean-Jacques Hiblot <jjhiblot@ti.com> To: <jh80.chung@samsung.com>, <kishon@ti.com>, <marek.vasut@gmail.com>, <sjg@chromium.org>, <u-boot@lists.denx.de>, <trini@konsulko.com> Date: Thu, 30 Nov 2017 17:43:58 +0100 Message-ID: <1512060244-22907-6-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1512060244-22907-1-git-send-email-jjhiblot@ti.com> References: <1512060244-22907-1-git-send-email-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Subject: [U-Boot] [PATCH v5 05/11] mmc: fix for old MMCs (below version 4) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
mmc: fixes for HS200/UHS core support
|
expand
|
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 0ebcc45..2a58031 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1657,6 +1657,9 @@ static int mmc_read_and_compare_ext_csd(struct mmc *mmc) const u8 *ext_csd = mmc->ext_csd; ALLOC_CACHE_ALIGN_BUFFER(u8, test_csd, MMC_MAX_BLOCK_LEN); + if (mmc->version < MMC_VERSION_4) + return 0; + err = mmc_send_ext_csd(mmc, test_csd); if (err) return err;
The ext_csd is allocated only for MMC above version 4. The compare will crash or fail for older MMCs. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> --- no change since v4 drivers/mmc/mmc.c | 3 +++ 1 file changed, 3 insertions(+)