From: Krzysztof Halasa <khc@pm.waw.pl>
To: u-boot@lists.denx.de
Subject: [U-Boot] Net driver questions
Date: Mon, 02 Nov 2009 00:07:43 +0100 [thread overview]
Message-ID: <m3d441alog.fsf@intrepid.localdomain> (raw)
Hello,
Please forgive me if answers to my questions are obvious, I'm new to
U-Boot.
I'm trying to port the Ethernet driver for Intel IXP4xx CPU from Linux
(I know there is Intel's code already ported). I've read the
doc/README.drivers.eth. I came across some problems:
- dev->halt() seems to be called before the first call to
dev->init() (i.e., before the hardware is initialized). Is it on
purpose?
- dev->recv() seems to be called recursively, for example while doing
"dhcp" or "bootp" (ping is ok). dev->recv() in my driver calls
NetReceive(), which in turn (without returning to the caller, i.e.,
dev->recv(), first) reinitializes the driver on error (calls
dev->halt() and dev->init()). This makes a lot of mess in the driver,
should it stay this way? Perhaps we should queue the received packets
and process them on return from dev->recv()? Or maybe return all those
packets together?
- dev->recv() is provided with RX packet buffers. IXP4xx can only
receive to already allocated memory so the driver has to provide it's
own buffers prior to dev->recv(). I assume it's common situation with
all hardware recent enough. Does the driver have to copy data to
NetRxPackets[], or is it ok to simply call NetReceive using driver's
buffers?
--
Krzysztof Halasa
next reply other threads:[~2009-11-01 23:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 23:07 Krzysztof Halasa [this message]
2009-11-02 3:32 ` [U-Boot] Net driver questions Mike Frysinger
2009-11-02 15:08 ` Krzysztof Halasa
2009-11-02 22:53 ` Mike Frysinger
2009-11-02 23:38 ` Krzysztof Halasa
2009-11-02 23:54 ` Mike Frysinger
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=m3d441alog.fsf@intrepid.localdomain \
--to=khc@pm.waw.pl \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.