public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH]  Fix: if using crc32 command watchdog timed out
@ 2011-07-05  7:26 Jens Scharsig
  2011-07-16  9:53 ` Albert ARIBAUD
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jens Scharsig @ 2011-07-05  7:26 UTC (permalink / raw)
  To: u-boot

* Fix: if using crc32 command watchdog timed out


Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index a5576aa..4daa1b3 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -1092,7 +1092,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int
argc, char * const argv[])

 	length = simple_strtoul (argv[2], NULL, 16);

-	crc = crc32 (0, (const uchar *) addr, length);
+	crc = crc32_wd(0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",
 			addr, addr + length - 1, crc);
@@ -1137,7 +1137,7 @@ usage:
 	addr += base_address;
 	length = simple_strtoul(*av++, NULL, 16);

-	crc = crc32(0, (const uchar *) addr, length);
+	crc = crc32_wd(0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	if (!verify) {
 		printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out
  2011-07-05  7:26 [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out Jens Scharsig
@ 2011-07-16  9:53 ` Albert ARIBAUD
  2011-07-17  6:25   ` Jens Scharsig
  2011-07-18  6:31 ` [U-Boot] [PATCH V2] " Jens Scharsig
  2011-07-18  6:46 ` [U-Boot] [PATCH V3] " Jens Scharsig
  2 siblings, 1 reply; 8+ messages in thread
From: Albert ARIBAUD @ 2011-07-16  9:53 UTC (permalink / raw)
  To: u-boot

Hi Jens,

Le 05/07/2011 09:26, Jens Scharsig a ?crit :

> * Fix: if using crc32 command watchdog timed out
>
>
> Signed-off-by: Jens Scharsig<esw@bus-elektronik.de>
> ---

Nitpick: in addition to describing which issue the patch fixes, can you 
describe how it fixes it?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out
  2011-07-16  9:53 ` Albert ARIBAUD
@ 2011-07-17  6:25   ` Jens Scharsig
  2011-07-17  9:18     ` Albert ARIBAUD
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Scharsig @ 2011-07-17  6:25 UTC (permalink / raw)
  To: u-boot

Hello,
Am 2011-07-16 11:53, schrieb Albert ARIBAUD:
> Hi Jens,
> 
> Le 05/07/2011 09:26, Jens Scharsig a ?crit :
> 
>> * Fix: if using crc32 command watchdog timed out
>>
>>
>> Signed-off-by: Jens Scharsig<esw@bus-elektronik.de>
>> ---
> 
> Nitpick: in addition to describing which issue the patch fixes, can you 
> describe how it fixes it?

If your board is using a watchdog and you try to calculate/check a CRC2
with crc32 command, the watchdog timed out on large data blocks.
The commands around uboot-images also uses crc32, but don't time out.
The difference between:

CRC32 command calls the the crc32 function and the"image" commands
crc32_wd (i think _wd stands for watchdog). So this patch changes the
the function call from crc32 to crc_32 to support watchdog reset in  the
same way as "image" commands.

Best regards

Jens

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out
  2011-07-17  6:25   ` Jens Scharsig
@ 2011-07-17  9:18     ` Albert ARIBAUD
  0 siblings, 0 replies; 8+ messages in thread
From: Albert ARIBAUD @ 2011-07-17  9:18 UTC (permalink / raw)
  To: u-boot

Hi Jens,

Le 17/07/2011 08:25, Jens Scharsig a ?crit :
> Hello,
> Am 2011-07-16 11:53, schrieb Albert ARIBAUD:
>> Hi Jens,
>>
>> Le 05/07/2011 09:26, Jens Scharsig a ?crit :
>>
>>> * Fix: if using crc32 command watchdog timed out
>>>
>>>
>>> Signed-off-by: Jens Scharsig<esw@bus-elektronik.de>
>>> ---
>>
>> Nitpick: in addition to describing which issue the patch fixes, can you
>> describe how it fixes it?
>
> If your board is using a watchdog and you try to calculate/check a CRC2
> with crc32 command, the watchdog timed out on large data blocks.
> The commands around uboot-images also uses crc32, but don't time out.
> The difference between:
>
> CRC32 command calls the the crc32 function and the"image" commands
> crc32_wd (i think _wd stands for watchdog). So this patch changes the
> the function call from crc32 to crc_32 to support watchdog reset in  the
> same way as "image" commands.

Sorry, I meant: describe what the fix does in the commit message, not on 
the list.

Generally, a patch commit message should always describe what the patch 
does.

> Best regards
>
> Jens

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2] Fix: if using crc32 command watchdog timed out
  2011-07-05  7:26 [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out Jens Scharsig
  2011-07-16  9:53 ` Albert ARIBAUD
@ 2011-07-18  6:31 ` Jens Scharsig
  2011-07-18  6:42   ` Albert ARIBAUD
  2011-07-18  6:46 ` [U-Boot] [PATCH V3] " Jens Scharsig
  2 siblings, 1 reply; 8+ messages in thread
From: Jens Scharsig @ 2011-07-18  6:31 UTC (permalink / raw)
  To: u-boot

* Fix: if using crc32 command watchdog timed out
* change function call crc32(..) to the watchdog save variant
  crc_32_wd(..) to support watchdog reset


Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index a5576aa..4daa1b3 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -1092,7 +1092,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int
argc, char * const argv[])

 	length = simple_strtoul (argv[2], NULL, 16);

-	crc = crc32 (0, (const uchar *) addr, length);
+	crc = crc32_wd (0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",
 			addr, addr + length - 1, crc);
@@ -1137,7 +1137,7 @@ usage:
 	addr += base_address;
 	length = simple_strtoul(*av++, NULL, 16);

-	crc = crc32(0, (const uchar *) addr, length);
+	crc = crc32_wd (0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	if (!verify) {
 		printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2] Fix: if using crc32 command watchdog timed out
  2011-07-18  6:31 ` [U-Boot] [PATCH V2] " Jens Scharsig
@ 2011-07-18  6:42   ` Albert ARIBAUD
  0 siblings, 0 replies; 8+ messages in thread
From: Albert ARIBAUD @ 2011-07-18  6:42 UTC (permalink / raw)
  To: u-boot

Hi Jens,

Le 18/07/2011 08:31, Jens Scharsig a ?crit :
> * Fix: if using crc32 command watchdog timed out
> * change function call crc32(..) to the watchdog save variant
>    crc_32_wd(..) to support watchdog reset
>
>
> Signed-off-by: Jens Scharsig<esw@bus-elektronik.de>
> ---

Sorry for nitpicking again -- can you fix the typo in the commit 
message? I assume it is "watchdog-safe", not "watchdog save".

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V3] Fix: if using crc32 command watchdog timed out
  2011-07-05  7:26 [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out Jens Scharsig
  2011-07-16  9:53 ` Albert ARIBAUD
  2011-07-18  6:31 ` [U-Boot] [PATCH V2] " Jens Scharsig
@ 2011-07-18  6:46 ` Jens Scharsig
  2011-07-25 22:41   ` Wolfgang Denk
  2 siblings, 1 reply; 8+ messages in thread
From: Jens Scharsig @ 2011-07-18  6:46 UTC (permalink / raw)
  To: u-boot

* Fix: if using crc32 command watchdog timed out
* change function call crc32(..) to the watchdog-safe variant
  crc_32_wd(..) to support watchdog reset


Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index a5576aa..4daa1b3 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -1092,7 +1092,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int
argc, char * const argv[])

 	length = simple_strtoul (argv[2], NULL, 16);

-	crc = crc32 (0, (const uchar *) addr, length);
+	crc = crc32_wd (0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",
 			addr, addr + length - 1, crc);
@@ -1137,7 +1137,7 @@ usage:
 	addr += base_address;
 	length = simple_strtoul(*av++, NULL, 16);

-	crc = crc32(0, (const uchar *) addr, length);
+	crc = crc32_wd (0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	if (!verify) {
 		printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V3] Fix: if using crc32 command watchdog timed out
  2011-07-18  6:46 ` [U-Boot] [PATCH V3] " Jens Scharsig
@ 2011-07-25 22:41   ` Wolfgang Denk
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2011-07-25 22:41 UTC (permalink / raw)
  To: u-boot

Dear Jens Scharsig,

In message <4E23D6C2.7070601@bus-elektronik.de> you wrote:
> * Fix: if using crc32 command watchdog timed out
> * change function call crc32(..) to the watchdog-safe variant
>   crc_32_wd(..) to support watchdog reset
> 
> 
> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
> ---
>  common/cmd_mem.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Insults are effective only where emotion is present.
	-- Spock, "Who Mourns for Adonais?"  stardate 3468.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-25 22:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05  7:26 [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out Jens Scharsig
2011-07-16  9:53 ` Albert ARIBAUD
2011-07-17  6:25   ` Jens Scharsig
2011-07-17  9:18     ` Albert ARIBAUD
2011-07-18  6:31 ` [U-Boot] [PATCH V2] " Jens Scharsig
2011-07-18  6:42   ` Albert ARIBAUD
2011-07-18  6:46 ` [U-Boot] [PATCH V3] " Jens Scharsig
2011-07-25 22:41   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox