summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/motorola_powerpc/dec21140/dec21140.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-10 16:41:44 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-10 16:41:44 +0000
commit981b99faf208e2c7f6e2b83d73e1b89b669112ee (patch)
tree1f2e2b431853a81be77417c1026c75c53e04d5ea /c/src/lib/libbsp/powerpc/motorola_powerpc/dec21140/dec21140.c
parentNew configuration files added by patch from (diff)
downloadrtems-981b99faf208e2c7f6e2b83d73e1b89b669112ee.tar.bz2
Patch from Eric Valette <valette@crf.canon.fr> and Emmanuel Raguet
<raguet@crf.canon.fr>: - the dec21140 driver code has been hardened (various bug fixed) Emmanuel, - bug in the mcp750 init code have been fixed (interrupt stack/initial stack initialization), BSS correctly cleared (Eric V) - remote debugging over TCP/IP is nearly complete (berakpoints, backtrace, variables,...) (Eric V), - exception handling code has also been improved in order to fully support RDBG requirements (Eric V),
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/motorola_powerpc/dec21140/dec21140.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/dec21140/dec21140.c b/c/src/lib/libbsp/powerpc/motorola_powerpc/dec21140/dec21140.c
index 9f6252d78b..44a726844a 100644
--- a/c/src/lib/libbsp/powerpc/motorola_powerpc/dec21140/dec21140.c
+++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/dec21140/dec21140.c
@@ -117,7 +117,7 @@ struct MD {
/*
* Receive buffer size -- Allow for a full ethernet packet including CRC
*/
-#define RBUF_SIZE 1520
+#define RBUF_SIZE 1536
#define ET_MINLEN 60 /* minimum message length */
@@ -419,7 +419,8 @@ dec21140Enet_initialize_hardware (struct dec21140_softc *sc)
sc->rxBdCount = 0;
cp = (char *)malloc((NRXBUFS+NTXBUFS)*(sizeof(struct MD)+ RBUF_SIZE) + PPC_CACHE_ALIGNMENT);
sc->bufferBase = cp;
- cp += (PPC_CACHE_ALIGNMENT - (int)cp) & MASK_OFFSET;
+ if ((unsigned int)cp & (PPC_CACHE_ALIGNMENT-1))
+ cp = ((unsigned int)cp + PPC_CACHE_ALIGNMENT) & ~(PPC_CACHE_ALIGNMENT-1);
#ifdef PCI_BRIDGE_DOES_NOT_ENSURE_CACHE_COHERENCY_FOR_DMA
if (_CPU_is_paging_enabled())
_CPU_change_memory_mapping_attribute