From patchwork Thu May 21 22:57:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 475243 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CE192140DEE for ; Fri, 22 May 2015 08:57:41 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7ACE4B632; Fri, 22 May 2015 00:57:37 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ewF_-hcccYTF; Fri, 22 May 2015 00:57:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 01EB14B622; Fri, 22 May 2015 00:57:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA6654B622 for ; Fri, 22 May 2015 00:57:33 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RVQZb1at2pFJ for ; Fri, 22 May 2015 00:57:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by theia.denx.de (Postfix) with ESMTPS id 3AFD64B61D for ; Fri, 22 May 2015 00:57:29 +0200 (CEST) Received: by pdbqa5 with SMTP id qa5so2441824pdb.0 for ; Thu, 21 May 2015 15:57:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=svpUj0dB0UvKz8ZXt7WKMAVhVSQfOnp4AlNopxfsBsM=; b=XOh00BhWHnXhcp6wOoacOUz4APcn7P0o70r/A3MPKMhfGBeNRhSUAo3T+KlvqE9S8l 4qg5XQ8E3+IIy+EcuIo1BHW7zCHEyITe8Hw8BcErMmqit2S9VDJL95xueNICKhqeQSqd RCxmtn+NM9C07vMDTO7KT1hdCSoxELOBxh3gzV5BC4E6rtaMANLexe/QL+G4e7yLVgjE TRhbHZsF3AryXn8qL1lEa96vZ2zF7hvxFEijy0lp22+0bzXpyQb5ZJnKtj6pIZxrF5IG C36HPn778Iv+1IuXGrL2vyumA4hCqmjLM83tN14tXLPp0WSkB/XVpuhedeRGakn9Aw5u M7Pw== X-Gm-Message-State: ALoCoQkYinlXBpj5XBPZ4VrHI2t6hsgvNJiFl03PCtBC8+OR5iOsyxs7t4NGNz5GwDXNSy6OvwE7 X-Received: by 10.68.197.39 with SMTP id ir7mr9653992pbc.87.1432249047935; Thu, 21 May 2015 15:57:27 -0700 (PDT) Received: from tharvey.gw (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by mx.google.com with ESMTPSA id ue9sm124190pbc.78.2015.05.21.15.57.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 May 2015 15:57:27 -0700 (PDT) From: Tim Harvey To: Tom Rini Date: Thu, 21 May 2015 15:57:16 -0700 Message-Id: <1432249036-2785-1-git-send-email-tharvey@gateworks.com> X-Mailer: git-send-email 1.9.1 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] spl: spl_mmc: fix mmc Falcon mode regression X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 91199f4a5a21a7cf9dd9e7c05e295a042f8c2b7e broke mmc based Falcon mode. The block_read function returns the number of blocks read thus the error check needs to look for a return of 0 blocks read. Cc: Paul Kocialkowski Signed-off-by: Tim Harvey Acked-by: Paul Kocialkowski --- common/spl/spl_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 5d688d6..c96345e 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -76,7 +76,7 @@ static int mmc_load_image_raw_os(struct mmc *mmc) CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR, CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS, (void *)CONFIG_SYS_SPL_ARGS_ADDR); - if (err) { + if (err == 0) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("spl: mmc block read error\n"); #endif