From 63b96b95abd3c1010242fcb345281f33fd367a95 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Apr 1999 15:21:43 +0000 Subject: Addressed this bug report: Date: Mon, 12 Apr 1999 00:38:04 +0000 From: Brendan Simon To: Jay Monkman , "joel@OARcorp.com" Subject: [Fwd: Goof in SMC initialize for mpc860] Nick Simon reported this bug in the eth_comm BSP sources. I see that it is still there in the latest snapshot that Joel sent me (thanks). I thought I better forward this on to you guys. Brendan. Nick.SIMON@syntegra.bt.co.uk wrote: > Sice I believe you're using the same base BSP as I am (you sent it to me) I > thought I'd mention.. > > In console-generic.c, in m860_smc_initialize, the receive buffer is malloced > and assigned to RxBd[port+3]-> buffer - it should be [port-1]. > > TTFN B --- c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c | 2 +- c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'c/src') diff --git a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c index dec222fb3f..8e8b876379 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c +++ b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c @@ -417,7 +417,7 @@ m821_smc_initialize (int port) /* port is the SMC number (i.e. 1 or 2) */ RxBd[port-1]->status = M821_BD_EMPTY | M821_BD_WRAP | M821_BD_INTERRUPT; RxBd[port-1]->length = 0; - RxBd[port+3]->buffer = malloc(RXBUFSIZE); + RxBd[port-1]->buffer = malloc(RXBUFSIZE); /* * Setup the Transmit Buffer Descriptor diff --git a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c index 1697ea1350..10a858b07e 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c +++ b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c @@ -431,7 +431,7 @@ m860_smc_initialize (int port) /* port is the SMC number (i.e. 1 or 2) */ RxBd[port-1]->status = M860_BD_EMPTY | M860_BD_WRAP | M860_BD_INTERRUPT; RxBd[port-1]->length = 0; - RxBd[port+3]->buffer = malloc(RXBUFSIZE); + RxBd[port-1]->buffer = malloc(RXBUFSIZE); /* * Setup the Transmit Buffer Descriptor -- cgit v1.2.3