[U-Boot-Users] [PATCH] Fix serial hangs when CONFIG_SERIAL_MULTI is defined

Hi
The following patch fixes the hangs in the serial port when outputting very early.
Testing for global vars early in the boot sequence has unintended consequences so just we check by the GD RELOC flag which is safe to do anytime.
Regards
Pantelis
* Patch by Pantelis Antoniou, 14 Sep 2004: Fix early serial hang when CONFIG_SERIAL_MULTI is defined.
serial.c | 55 ++++++++++++++++++++++++++----------------------------- 1 files changed, 26 insertions(+), 29 deletions(-)

Pantelis Antoniou panto@intracom.gr wrote:
--- u-boot/common/serial.c 2004-08-02 01:48:18.000000000 +0300 +++ u-boot-cvs-work/common/serial.c 2004-09-07 14:23:44.000000000 +0300 @@ -102,6 +102,8 @@ { struct serial_device *s;
- return 0;
- for (s = serial_devices; s; s = s->next) { if (strcmp(s->name, name) == 0)
Hi,
is it intentional that you disable the body of that function? If yes, why not remove it entirely?
Cheers Anders

Anders Larsen wrote:
Pantelis Antoniou panto@intracom.gr wrote:
--- u-boot/common/serial.c 2004-08-02 01:48:18.000000000 +0300 +++ u-boot-cvs-work/common/serial.c 2004-09-07 14:23:44.000000000 +0300 @@ -102,6 +102,8 @@ { struct serial_device *s;
- return 0;
- for (s = serial_devices; s; s = s->next) { if (strcmp(s->name, name) == 0)
Hi,
is it intentional that you disable the body of that function? If yes, why not remove it entirely?
Cheers Anders
OBVIOUSLY IT IS WRONG.
Damn, good catch.
Remove the return 0 please.
Regards
Pantelis

In message 4146A68D.2050309@intracom.gr you wrote:
is it intentional that you disable the body of that function? If yes, why not remove it entirely?
...
OBVIOUSLY IT IS WRONG.
Damn, good catch.
Remove the return 0 please.
Please submit a fixed patch.
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
In message 4146A68D.2050309@intracom.gr you wrote:
is it intentional that you disable the body of that function? If yes, why not remove it entirely?
...
OBVIOUSLY IT IS WRONG.
Damn, good catch.
Remove the return 0 please.
Please submit a fixed patch.
Best regards,
Wolfgang Denk
Rediffed patch included.
Regards
Pantelis

In message 41469EE1.3040203@intracom.gr you wrote:
- Patch by Pantelis Antoniou, 14 Sep 2004: Fix early serial hang when CONFIG_SERIAL_MULTI is defined.
Added (slightly modified to keep the code readable).
Best regards,
Wolfgang Denk
participants (3)
-
Anders Larsen
-
Pantelis Antoniou
-
Wolfgang Denk