summaryrefslogtreecommitdiff
path: root/doc/README.drivers.eth
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-11-11 23:10:34 +0100
committerWolfgang Denk <wd@denx.de>2009-11-11 23:10:34 +0100
commit4f127980e0d4ba179b4628ebf8e8642210731055 (patch)
tree5748931e40e1f7ed26817f26326e5f8c386d9a4f /doc/README.drivers.eth
parenta9e9d69dd8849aa230fab88a7f3f4435713763af (diff)
parent651ef90fa6ca824c8e581aeef9e04bbbe7f7e9ce (diff)
downloadu-boot-imx-4f127980e0d4ba179b4628ebf8e8642210731055.zip
u-boot-imx-4f127980e0d4ba179b4628ebf8e8642210731055.tar.gz
u-boot-imx-4f127980e0d4ba179b4628ebf8e8642210731055.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'doc/README.drivers.eth')
-rw-r--r--doc/README.drivers.eth13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/README.drivers.eth b/doc/README.drivers.eth
index e73e462..d0c3571 100644
--- a/doc/README.drivers.eth
+++ b/doc/README.drivers.eth
@@ -122,10 +122,12 @@ function can be called multiple times in a row.
The recv function should process packets as long as the hardware has them
readily available before returning. i.e. you should drain the hardware fifo.
-The common code sets up packet buffers for you already (NetRxPackets), so there
-is no need to allocate your own. For each packet you receive, you should call
-the NetReceive() function on it with the packet length. So the pseudo code
-here would look something like:
+For each packet you receive, you should call the NetReceive() function on it
+along with the packet length. The common code sets up packet buffers for you
+already in the .bss (NetRxPackets), so there should be no need to allocate your
+own. This doesn't mean you must use the NetRxPackets array however; you're
+free to call the NetReceive() function with any buffer you wish. So the pseudo
+code here would look something like:
int ape_recv(struct eth_device *dev)
{
int length, i = 0;
@@ -145,7 +147,8 @@ int ape_recv(struct eth_device *dev)
}
The halt function should turn off / disable the hardware and place it back in
-its reset state.
+its reset state. It can be called at any time (before any call to the related
+init function), so make sure it can handle this sort of thing.
So the call graph at this stage would look something like:
some net operation (ping / tftp / whatever...)