Skip to contentSkip to conversation

What is NetState?

U-Boot Timur Tabi 2 participants 2 messages Dec 3, 2008 – Dec 4, 2008

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

Is there any documentation for this global variable? I'm trying to fix a bug in NetStartAgain(), and I'm trying to understand the purpose of this variable.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#1 lore raw
Quoted 4 lines · Timur Tabi

Is there any documentation for this global variable? I'm trying to fix a bug in NetStartAgain(), and I'm trying to understand the purpose of this variable.

Isn't the code self-documenting? :) This global lets any of the protocol processing routines force a restart or abort. Not very pretty, that's for sure... All of the action takes place in the call to eth_rx(), which calls a network driver's 'recv()' function, which generally calls NetReceive(), which then switches on protocol and may set NetState. Good thing we're single threaded.

regards,
Ben