Subject: Re: [E1000-devel] [PATCH] Fix link test for e1000 and e1000e when iface is down

From: André Detsch <[email-masked]>
Date: Fri, 13 Feb 2009 10:08:38 -0200

Jeff Kirsher wrote:
> I guess this comes down to what the definition of a Link test should
> be doing.  My $0.02 is that it should be testing if the interface has
> a link, in which case if you ifdown the interface before running the
> Link test, I would expect it to fail.
> 
> With this patch, if you bring down the device and run the ethtool diag
> tests, the Link test would come back as passing which is something I
> would not expect.

With the current code, e1000_reset is called during the test anyway, so 
ethtool -t fails only the first time it is run (after ifconfig down). Is that 
the expected behavior for the test?

# ifconfig eth0 up; ifconfig eth0 down; ethtool -t eth0

The test result is FAIL
The test extra info:
Register test  (offline)         0
Eeprom test    (offline)         0
Interrupt test (offline)         0
Loopback test  (offline)         0
Link test   (on/offline)         1

# ethtool -t eth0

The test result is PASS
The test extra info:
Register test  (offline)         0
Eeprom test    (offline)         0
Interrupt test (offline)         0
Loopback test  (offline)         0
Link test   (on/offline)         0

Thanks for the feedback.

-- 
André Detsch
Kernel Software Engineer
Linux Technology Center Brazil