From: Detlev Zundel Date: Thu, 02 Sep 2010 18:40:38 +0200 Subject: [U-Boot] [PATCH] zlib: Add further watchdog reset calls In-Reply-To: <1283274708-32533-1-git-send-email-sr@denx.de> (Stefan Roese's message of "Tue, 31 Aug 2010 19:11:48 +0200") References: <1283274708-32533-1-git-send-email-sr@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, > Patch 253cb831 [zlib: add watchdog reset call] added already a few > watchdog reset calls to the new zlib U-Boot port. But on some boards > this is not enough. Additional calls are needed on boards with > short watchdog timeouts. > > This was detected and tested on the lwmon5 board with a very short > watchdog timeout. Without this patch, the board resets during Linux > kernel decompression. With it, the decompression succeeds. > > Signed-off-by: Stefan Roese > --- > lib/zlib.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/lib/zlib.c b/lib/zlib.c > index 26e5af1..39d5dab 100644 > --- a/lib/zlib.c > +++ b/lib/zlib.c > @@ -1599,6 +1599,8 @@ int flush; > strm->adler = state->check = adler32(0L, Z_NULL, 0); > state->mode = TYPE; > case TYPE: > + if (strm->outcb != Z_NULL) > + (*strm->outcb)(Z_NULL, 0); /* call WATCHDOG_RESET */ > if (flush == Z_BLOCK) goto inf_leave; > case TYPEDO: > if (state->last) { Can you please tell me (and include in the comment) why this calls a watchdog reset and why you did not use a "regular plain WATCHDOG_RESET"? Thanks! Detlev -- (3) With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- The Twelve Networking Truths (RFC 1925) -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de