be2net: ethtool self test reorganization.
authorSarveshwar Bandi <sarveshwarb@serverengines.com>
Tue, 19 Jan 2010 05:15:00 +0000 (05:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jan 2010 06:49:50 +0000 (22:49 -0800)
The ddr dma ethtool self test needs to be performed even when ETH_TEST_FL_OFFLINE is not set.

Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_ethtool.c

index f18c02f3a5e46f89bdea7863b8c99fe42e8c31db..2f2ebbd678f20b693a9687359fe4b6dc694a2c4c 100644 (file)
@@ -545,10 +545,11 @@ be_self_test(struct net_device *netdev, struct ethtool_test *test, u64 *data)
                                                &data[2]) != 0) {
                        test->flags |= ETH_TEST_FL_FAILED;
                }
+       }
 
-               data[3] = be_test_ddr_dma(adapter);
-               if (data[3] != 0)
-                       test->flags |= ETH_TEST_FL_FAILED;
+       if (be_test_ddr_dma(adapter) != 0) {
+               data[3] = 1;
+               test->flags |= ETH_TEST_FL_FAILED;
        }
 
 }