diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-04-28 13:59:11 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-04-28 13:59:11 +0000 |
commit | 8846bbd0ecf804b7f3c297e8713049341cf5c361 (patch) | |
tree | 3320effdabefc4c71983c4419fe59214abdac60d /c | |
parent | Patch from Eric Norum <eric@cls.usask.ca> to corrent a miscount in length (diff) | |
download | rtems-8846bbd0ecf804b7f3c297e8713049341cf5c361.tar.bz2 |
Patch from Emmanuel Raguet <raguet@crf.canon.fr>:
I have made test with the Dec21140 driver and it appears that all
works fine even if the cache is enabled for the memory space in
which the incoming and outcoming Ethernet frames are stored.
I have had #ifdef to "comment" the code. If you want to disable
cache, you only have to #define the name. It could be mandatory
for some BSPs.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/dec21140/dec21140.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/dec21140/dec21140.c b/c/src/lib/libbsp/i386/pc386/dec21140/dec21140.c index 13bd268ef4..221cd0da26 100644 --- a/c/src/lib/libbsp/i386/pc386/dec21140/dec21140.c +++ b/c/src/lib/libbsp/i386/pc386/dec21140/dec21140.c @@ -406,12 +406,14 @@ dec21140Enet_initialize_hardware (struct dec21140_softc *sc) cp = (char *)malloc((NRXBUFS+NTXBUFS)*(sizeof(struct MD)+ RBUF_SIZE) + PG_SIZE); sc->bufferBase = cp; - cp += (PG_SIZE - (int)cp) & MASK_OFFSET ; + cp += (PG_SIZE - (int)cp) & MASK_OFFSET; +#ifdef PCI_BRIDGE_DOES_NOT_ENSURE_CACHE_COHERENCY_FOR_DMA if (_CPU_is_paging_enabled()) _CPU_change_memory_mapping_attribute (NULL, cp, (NRXBUFS+NTXBUFS)*(sizeof(struct MD)+ RBUF_SIZE), PTE_CACHE_DISABLE | PTE_WRITABLE); +#endif rmd = (struct MD*)cp; sc->MDbase = rmd; buffer = cp + ((NRXBUFS+NTXBUFS)*sizeof(struct MD)); |