This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can't Connect,TCP CHECKSUM INCORRECT


Hello,

I am very sorry.

I am not familiar using command diff.
So I send again.
As I said I changed next two functions in \packages\devs\eth\smsc\lan91cxx\current\src\if_lan91cxx.c


cyg_uint8 get_data_byte(struct eth_drv_sc *sc)
{
   //20070919
   int sf;

   cyg_uint8 c;
   struct lan91cxx_priv_data *cpd =
       (struct lan91cxx_priv_data *)sc->driver_private;

   if( cpd->data_pos == sizeof(rxd_t) )
   {
       cpd->data_buf = get_data(sc);
       cpd->data_pos = 0;
       //20070919
       sf = 1;
   }
   //20070919 begin
   else{
       sf = 0;
 }
   //20070919 end

   //20070919 begin
//ORG    c = (cpd->data_buf>>(cpd->data_pos*8))&0xFF;
   c = (cpd->data_buf>>(sf*8))&0xFF;

cpd->data_pos++;
return c;
}


cyg_uint16 get_data_short(struct eth_drv_sc *sc)
{
   cyg_uint16 val;

val = get_data_byte(sc);
//20071023
// val |= get_data_byte(sc)<<8;
val = val<<8 | get_data_byte(sc);
return CYG_LE16_TO_CPU(val);
}


Masahiro Ariga


On Tue, Nov 06, 2007 at 05:30:26PM +0900, ariga masahiro wrote:

I only changed coding in retrieving data in BigEndian as I reported to
you.
I think others are resolved by Macros of bigendian.

Can you let us know what code you changed to retrieve data in Big-endian?

Only next two functions.

This is nearly impossible to read.


Please send a unified diff which you generate using the command diff.

Andrew


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]