summaryrefslogtreecommitdiffstats
path: root/c/src/libchip/network/smc91111.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 15:41:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 15:41:43 +0000
commit2a2b206ba357c45d090496916910e13e26288813 (patch)
tree6df4666c170f0f247d6e5036337da69339dbebbb /c/src/libchip/network/smc91111.h
parent2007-09-12 Daniel Hellstrom <daniel@gaisler.com> (diff)
downloadrtems-2a2b206ba357c45d090496916910e13e26288813.tar.bz2
2007-09-12 Daniel Hellstrom <daniel@gaisler.com>
* libchip/network/smc91111.c, libchip/network/smc91111.h: Multiple fixes. - Odd bit bug in some chips taken care of. - Buggy ASSERT removed, it seem to be inserted to detect if MBUF data alignment but failing to do so must have made the driver writer to make some incorrect assumptions about MBUFs. - Fixed MBUF handling to handle mbuf chains better. The Data length of MBUFs in middle of the mbuf chain are now checked for odd number of bytes. - Made while loop responsible for copying data to fifo port copy 16 shorts per loop instead of 1 short, increasing the copying process.
Diffstat (limited to '')
-rw-r--r--c/src/libchip/network/smc91111.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/c/src/libchip/network/smc91111.h b/c/src/libchip/network/smc91111.h
index 7cf047e42c..c3a6f32e10 100644
--- a/c/src/libchip/network/smc91111.h
+++ b/c/src/libchip/network/smc91111.h
@@ -460,7 +460,7 @@ get_reg(struct lan91cxx_priv_data *cpd, int regno)
}
dbg++;
}
-#else
+#else
db2_printf("%sread reg %d:%x -> 0x%04x\n", dbg_prefix, regno>>3,(regno&0x7)*2, val);
#endif
@@ -483,7 +483,7 @@ put_reg(struct lan91cxx_priv_data *cpd, int regno, unsigned short val)
}
dbg++;
}
-#else
+#else
db2_printf("%swrite reg %d:%x <- 0x%04x\n", dbg_prefix, regno>>3,(regno&0x7)*2, val);
#endif
@@ -508,6 +508,17 @@ put_data(struct lan91cxx_priv_data *cpd, unsigned short val)
HAL_WRITE_UINT16(cpd->base+((LAN91CXX_DATA & 0x7)), val);
}
+
+/* Assumes bank2 has been selected*/
+static __inline__ void
+put_data8(struct lan91cxx_priv_data *cpd, unsigned char val)
+{
+ db2_printf("%s[bdata] <- 0x%02x\n", dbg_prefix, val);
+
+ HAL_WRITE_UINT8(((unsigned char *)(cpd->base+((LAN91CXX_DATA & 0x7))))+1, val);
+
+}
+
#endif /* SMSC_PLATFORM_DEFINED_PUT_DATA*/
#ifndef SMSC_PLATFORM_DEFINED_GET_DATA