From: Gary Thomas <gary@mlbassoc.com>
To: ariga masahiro <ariga@link-lab.co.jp>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] What functions should I call in ethernet drv ?
Date: Mon, 15 Oct 2007 11:20:00 -0000 [thread overview]
Message-ID: <47134CDD.1080604@mlbassoc.com> (raw)
In-Reply-To: <000501c80eef$edf10f30$1c0110ac@ariga>
ariga masahiro wrote:
> Hello,
>
> I am in a complete predicament,please help me.
>
> I am testing SMSC LAN91C111 ethernet driver using nc_test_slave/master
> and managed to make it run,correctly say,I succeeded to receive ARP
> from host.
>
> But I discovered that in ether_input and ether_output functions in
> if_ethersubr.c file,
> ng_ether_input_p and ng_ether_output_p pointers are both NULL,and
> passed out function calls.
>
> \packages\net\bsd_tcpip\current\src\sys\net\if_ethersubr.c
> ether_input(ifp, eh, m)
> /* Handle ng_ether(4) processing, if any */
> if (ng_ether_input_p != NULL) {
> (*ng_ether_input_p)(ifp, &m, eh);
> if (m == NULL)
> return;
> }
>
> ether_output(ifp, m, dst, rt0)
> /* Handle ng_ether(4) processing, if any */
> if (ng_ether_output_p != NULL) {
> if ((error = (*ng_ether_output_p)(ifp, &m)) != 0) {
> bad: if (m != NULL)
> m_freem(m);
> return (error);
> }
> if (m == NULL)
> return (0);
> }
>
> I encountered the same problem in ether_ifattach in the same file
> where ng_ether_attach_p were NULL and passed out function call.
> But at that time I found next function fulfill need,
> so I inserted pointer assignment before function call like below.
>
> packages\net\bsd_tcpip\current\src\sys\net\if.c
> if_attach(ifp)
>
> ether_ifattach(ifp, bpf)
> ng_ether_attach_p = if_attach; // inserted
> if (ng_ether_attach_p != NULL)
> (*ng_ether_attach_p)(ifp);
>
> I hope I was right.
>
> But this time I can't find suitable functions in ether_input and
> ether_output.
> It is crestfallen to select every functions.Is there any way to select
> correctly ?
>
> Or rather,since I configured to use LAN91C111 driver specifically,
> it is unreasonable to choose each functions manually.
> There ought be the way to initialize cyg_ pointers in param.h.
>
> Please let me know how to initialize cyg_ pointers so I could use
> LAN91C111 driver properly.
You should not need to be messing with *any* of this. The lanC91xx
driver is known to work,
as is, on a number of platforms.
I assume that this is for a new platform/port? Did you follow the model
of how other platforms
are using this device?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
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-15 11:20 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 [this message]
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
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=47134CDD.1080604@mlbassoc.com \
--to=gary@mlbassoc.com \
--cc=ariga@link-lab.co.jp \
--cc=ecos-discuss@ecos.sourceware.org \
/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).