Skip to contentSkip to conversation

Fix: if using crc32 command watchdog timed out

PATCH Superseded Jens Scharsig 4 participants 8 messages Jul 5, 2011 – Jul 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix: if using crc32 command watchdog timed out

* Fix: if using crc32 command watchdog timed out

---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
common/cmd_mem.c +0 -0
index a5576aa..4daa1b3 100644
@@ -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",

Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 Fix: if using crc32 command watchdog timed out

Hi Jens,

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

Quoted 5 lines

* Fix: if using crc32 command watchdog timed out

---

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

Amicalement,

Signature · 1 line
Albert.
#2 lore raw

PATCH 1/1 Fix: if using crc32 command watchdog timed out

Hello,
Am 2011-07-16 11:53, schrieb Albert ARIBAUD:

Quoted 4 lines

Hi Jens,

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

Quoted 8 lines
Quoted 5 lines

* Fix: if using crc32 command watchdog timed out

---

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

#3 lore raw

PATCH 1/1 Fix: if using crc32 command watchdog timed out

Hi Jens,

Le 17/07/2011 08:25, Jens Scharsig a ?crit :

Quoted 20 lines

Hello,
Am 2011-07-16 11:53, schrieb Albert ARIBAUD:

Quoted 4 lines

Hi Jens,

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

Quoted 8 lines
Quoted 5 lines

* Fix: if using crc32 command watchdog timed out

---

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:

Quoted 4 lines

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.

Quoted 3 lines

Best regards

Jens

Amicalement,

Signature · 1 line
Albert.
#4 lore raw

PATCH v2 1/1 Fix: if using crc32 command watchdog timed out

In reply to Jens Scharsig

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

---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
common/cmd_mem.c +0 -0
index a5576aa..4daa1b3 100644
@@ -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",

Signature · 1 line
1.7.3.4
#5 lore raw

PATCH v2 1/1 Fix: if using crc32 command watchdog timed out

Hi Jens,

Le 18/07/2011 08:31, Jens Scharsig a ?crit :

Quoted 7 lines

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

---

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

Amicalement,

Signature · 1 line
Albert.
#6 lore raw

PATCH v3 1/1 Fix: if using crc32 command watchdog timed out

In reply to Jens Scharsig

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

---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
common/cmd_mem.c +0 -0
index a5576aa..4daa1b3 100644
@@ -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",

Signature · 1 line
1.7.3.4
#7 lore raw

PATCH v3 1/1 Fix: if using crc32 command watchdog timed out

Dear Jens Scharsig,

Quoted 9 lines · In message <[email protected]> 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

---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
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