From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Thu, 04 Dec 2008 00:00:05 -0800 Subject: [U-Boot] What is NetState? In-Reply-To: <4936F383.8030300@freescale.com> References: <4936F383.8030300@freescale.com> Message-ID: <49378E05.4090201@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Timur Tabi wrote: > 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