From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 17 May 2016 11:36:54 -0600 Subject: [U-Boot] [PATCH] test/py: Detect timeout in phy negotiation In-Reply-To: <573B4ED6.2000607@xilinx.com> References: <0abce825b8b0d541148207594be5bb1512cbf40e.1463493444.git.michal.simek@xilinx.com> <573B4BBF.8090508@wwwdotorg.org> <573B4D58.4030007@xilinx.com> <573B4E26.7070909@wwwdotorg.org> <573B4ED6.2000607@xilinx.com> Message-ID: <573B56B6.1020600@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/17/2016 11:03 AM, Michal Simek wrote: > On 17.5.2016 19:00, Stephen Warren wrote: >> On 05/17/2016 10:56 AM, Michal Simek wrote: >>> Hi Stephen, >>> >>> On 17.5.2016 18:50, Stephen Warren wrote: >>>> On 05/17/2016 07:57 AM, Michal Simek wrote: >>>>> If timeout happen it should be reported as fault. >>>> >>>> Presumably if a timeout occurs, the expected text does not appear, i.e. >>>> the existing assert fails anyway? >>>> >>>> Anyway, it's useful to point out problems explicitly, so, >>>> Acked-by: Stephen Warren >>> >>> Unfortunately I found this issue when I was checking logs where I am >>> getting this. >>> >>> ethernet at e000b000 Waiting for PHY auto negotiation to complete......... >>> TIMEOUT ! >>> BOOTP broadcast 1 >>> BOOTP broadcast 2 >>> BOOTP broadcast 3 >>> DHCP client bound to address 192.168.0.107 (882 ms) >>> Zynq> .Zynq> setenv serverip 192.168.0.105 >>> >>> I haven't looked at the exact reason why it is failing but IMHO it is >>> worth to check. >> >> Oh, in that case I think I should withdraw my ack; in the log above, the >> operation completed successfully, so I'm not convinced the test should >> be marked a failure. I thought this change simply provided more detail >> re: the cause of a test failure. > > Is there any other way how to run just phy negotiation and mark this > test as fail? I don't see anything obvious that will do that; I think that only happens when net_loop starts. It might be possible to add some new command to test just PHY startup, or a new mode for net_loop() that just waited for link up and did no protocol work.