From: "ariga masahiro" <ariga@link-lab.co.jp>
To: "Gary Thomas" <gary@mlbassoc.com>
Cc: <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] What functions should I call in ethernet drv ?
Date: Sat, 20 Oct 2007 06:19:00 -0000 [thread overview]
Message-ID: <000501c812e1$2d7f2cf0$1c0110ac@ariga> (raw)
In-Reply-To: <47187EEB.5020109@mlbassoc.com>
Hello Gary and others,
> Gray wrote:
> You should not have to change the driver. The differences in
> endian-ness are handled by the macros CYG_CPU_TO_LE16() and
> CYG_LE16_TO_CPU(). Make sure that your HAL defines them
> correctly.
The received data are reserved into data buffer in lan91cxx_recv's
line 1230 - line 1235
lan91cxx_recv()
1230: if (data) {
1231: while( clen > 0 ) {
1232: *data++ = get_data_byte(sc);
1233: clen--;
1234: }
1235: }
-->
cyg_uint8 get_data_byte(struct eth_drv_sc *sc)
{
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;
}
c = (cpd->data_buf>>(cpd->data_pos*8))&0xFF;
cpd->data_pos++;
return c;
}
-->
get_data(struct eth_drv_sc *sc)
{
rxd_t val;
struct lan91cxx_priv_data *cpd =
(struct lan91cxx_priv_data *)sc->driver_private;
#ifdef LAN91CXX_32BIT_RX
HAL_READ_UINT32(cpd->base+((LAN91CXX_DATA_HIGH & 0x7) << cpd->addrsh),
val);
#else
HAL_READ_UINT16(cpd->base+((LAN91CXX_DATA & 0x7) << cpd->addrsh), val);
#endif
#if DEBUG & 2
diag_printf("read data 0x%x\n", val);
#endif
return val;
}
-->
#define HAL_READ_UINT16( _register_, _value_ ) \
CYG_MACRO_START \
((_value_) = *((volatile CYG_WORD16 *)(_register_))); \
CYG_MACRO_END
As you can see CYG_CPU_TO_LE16() and CYG_LE16_TO_CPU() are never used,
and it is impossible to reserve data in BigEndian form without change.
Maybe at the time of interpriting ARP-request, reading data exchangedly ?
I tried to find where ARP-request is parsed and interpreted,but couldn't
find where it is.
I checked that ISR,DSR are called(although I'm not sure they are called
right time)
so I suppose that if ARP-request is correctly interpreted and ARP-reply is
made and sent out,
it will work.
I sincerely ask your favor.
Would you please let me know next few questions ?
1.I would like to know where ARP-request is parsed and interpreted,
entry function name, and if possible line numbers.
2.After ARP-request is recognised, by what sequence lan91cxx_send is called.
3.Where ARP-reply packet is made ?
entry function name, and if possible line numbers.
I look forward to your reply.
Thank you in advance.
Masahiro Ariga
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2007-10-20 6:19 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-14 5:37 [ECOS] Building error on CVS checkout sources ariga masahiro
2007-09-14 8:22 ` [ECOS] " Andrew Lunn
2007-09-14 9:38 ` [ECOS] Virtual Vector Configuration Stefan Sommerfeld
2007-09-14 10:17 ` Nick Garnett
2007-10-15 5:59 ` [ECOS] What functions should I call in ethernet drv ? ariga masahiro
2007-10-15 11:20 ` Gary Thomas
2007-10-16 3:04 ` ariga masahiro
2007-10-16 11:08 ` Gary Thomas
2007-10-17 7:41 ` ariga masahiro
2007-10-17 11:32 ` Gary Thomas
2007-10-18 7:17 ` ariga masahiro
[not found] ` <000c01c81151$9add59c0$1c0110ac@ariga>
2007-10-18 11:12 ` Gary Thomas
2007-10-19 4:56 ` ariga masahiro
2007-10-19 9:55 ` Gary Thomas
2007-10-20 6:19 ` ariga masahiro [this message]
2007-10-23 8:23 ` ariga masahiro
2007-10-23 8:27 ` Alok Singh
2007-10-23 9:05 ` ariga masahiro
2007-10-25 2:05 ` ariga masahiro
2007-10-30 2:41 ` [ECOS] Can't Connect,TCP CHECKSUM INCORRECT ariga masahiro
2007-10-30 3:02 ` Andrew Lunn
2007-10-30 4:17 ` [ECOS] " Grant Edwards
2007-10-30 8:51 ` Alok Singh
2007-11-06 7:14 ` [ECOS] " ariga masahiro
2007-11-06 7:58 ` Alok Singh
2007-11-06 8:30 ` ariga masahiro
2007-11-06 8:35 ` Andrew Lunn
2007-11-06 23:47 ` ariga masahiro
2007-11-07 1:05 ` ariga masahiro
2007-11-07 7:15 ` ariga masahiro
2007-11-07 8:24 ` ariga masahiro
2007-11-07 11:55 ` Alok Singh
2007-11-08 1:56 ` ariga masahiro
2007-11-08 8:23 ` ariga masahiro
2007-11-09 1:25 ` ariga masahiro
2007-11-13 1:13 ` ariga masahiro
2007-11-16 7:40 ` ariga masahiro
2007-11-08 9:13 ` Alok Singh
2008-01-07 1:36 ` [ECOS] Wrongfully compiled code ariga masahiro
2007-10-17 8:45 ` [ECOS] What functions should I call in ethernet drv ? ariga masahiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000501c812e1$2d7f2cf0$1c0110ac@ariga' \
--to=ariga@link-lab.co.jp \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=gary@mlbassoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).