[ECOS] Re: EDOSK-2674 ethernet drivers -TCP problem
Uwe Kindler
uwe_kindler@web.de
Fri Dec 5 14:52:00 GMT 2003
Hello Andrew,
I found the problem within the driver and fixed it by myself - now the
driver works with EDOSK2674 board.
Yoshinori Satos patch does not work for me. Here is my patch for smsc91cxx
driver.
Uwe Kindler
--- if_lan91cxx.c 2003-11-18 22:05:34.000000000 +0100
+++ ../if_lan91cxx.c 2003-11-28 16:58:18.000000000 +0100
@@ -141,9 +141,8 @@
static cyg_handle_t lan91cxx_interrupt_handle;
// This ISR is called when the ethernet interrupt occurs
-static int
-lan91cxx_isr(cyg_vector_t vector, cyg_addrword_t data
- /* , HAL_SavedRegisters *regs */ )
+static int lan91cxx_isr(cyg_vector_t vector, cyg_addrword_t data)
+ /* , HAL_SavedRegisters *regs */
{
struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
struct lan91cxx_priv_data *cpd =
@@ -820,7 +819,7 @@
control |= LAN91CXX_CONTROLBYTE_ODD;
}
control |= LAN91CXX_CONTROLBYTE_CRC; // Just in case...
- put_data(sc, control);
+ put_data(sc, CYG_CPU_TO_LE16(control));
// Enqueue the packet
put_reg(sc, LAN91CXX_MMU_COMMAND, LAN91CXX_MMU_enq_packet);
@@ -1071,6 +1070,7 @@
val = CYG_LE32_TO_CPU(val);
plen = (val >> 16) - 6;
#else
+ val = CYG_LE16_TO_CPU(val);
plen = get_data(sc);
plen = CYG_LE16_TO_CPU(plen) - 6;
#endif
@@ -1111,6 +1111,8 @@
val >>= 16;
mlen -= 2;
} else
+#else
+ val = CYG_LE16_TO_CPU(val);
#endif
cp = (unsigned char *)data;
> It looks to me your change causes random junk to be in the control
> word.
>
> Am i reading this wrong?
>
> Thanks
> Andrew
>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list