From patchwork Mon Jul 18 12:39:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "esw@bus-elektronik.de" X-Patchwork-Id: 105254 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 5B151B6F62 for ; Mon, 18 Jul 2011 22:39:17 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0FB522813A; Mon, 18 Jul 2011 14:39:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 C6T7Mwtw6j3P; Mon, 18 Jul 2011 14:39:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B72FC28104; Mon, 18 Jul 2011 14:39:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4EDCE28102 for ; Mon, 18 Jul 2011 14:39:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 D-4lQQFLSHNh for ; Mon, 18 Jul 2011 14:39:09 +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 mailout-f5.arcor-ip.de (mailout-f5.arcor-ip.de [145.253.3.207]) by theia.denx.de (Postfix) with ESMTP id 853E7280F2 for ; Mon, 18 Jul 2011 14:39:08 +0200 (CEST) Received: from bus-elektronik.de (unknown [212.144.119.2]) by mailout-f5.arcor-ip.de (Arcor-IP) with ESMTPA id 1E2DD26A227; Mon, 18 Jul 2011 14:39:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by bus-elektronik.de (Postfix) with ESMTP id DCFF01923E; Mon, 18 Jul 2011 14:39:07 +0200 (CEST) Received: from 127.0.0.1 (helo=localhost) by localhost with ESMTP (eXpurgate 3.0.4) (envelope-from ) for ; Mon, 18 Jul 2011 14:39:07 +0200 Received: from bus-elektronik.de (localhost [127.0.0.1]) by localhost (AvMailGate-3.1.2) id 6624-Et6jpZ; Mon, 18 Jul 2011 12:39:07 -0000 Received: from [10.0.0.1] (unknown [192.168.30.80]) by bus-elektronik.de (Postfix) with ESMTP id 6F88B18405; Mon, 18 Jul 2011 14:39:07 +0200 (CEST) Message-ID: <4E24296B.9000401@bus-elektronik.de> Date: Mon, 18 Jul 2011 14:39:07 +0200 From: Jens Scharsig User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: "u-boot@lists.denx.de" X-AntiVirus: checked by Avira MailGate (version: 3.1.2; AVE: 8.2.6.16; VDF: 7.11.11.179; host: bus-elektronik); id=6624-Et6jpZ X-purgate-ID: 149719::1310992747-00001D03-CFC39D5C/0-0/0-0 X-purgate-type: clean X-purgate-size: 908 X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean Cc: Jens Scharsig Subject: [U-Boot] [PATCH] Fix: watchdog timed out, if using sha1 command X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de * Fix: if using sha1 command watchdog timed out * change function call sha1_csum(..) to the watchdog-safe variant sha1_csum_wd(..) to support watchdog reset Signed-off-by: Jens Scharsig --- common/cmd_sha1sum.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) printf("%02x", output[i]); diff --git a/common/cmd_sha1sum.c b/common/cmd_sha1sum.c index bb3cff0..2b2dd8b 100644 --- a/common/cmd_sha1sum.c +++ b/common/cmd_sha1sum.c @@ -37,7 +37,7 @@ static int do_sha1sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) addr = simple_strtoul(argv[1], NULL, 16); len = simple_strtoul(argv[2], NULL, 16); - sha1_csum((unsigned char *) addr, len, output); + sha1_csum_wd((unsigned char *) addr, len, output, CHUNKSZ_SHA1); printf("SHA1 for %08lx ... %08lx ==> ", addr, addr + len - 1); for (i = 0; i < 20; i++)