]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/sfc/ethtool.c
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / drivers / net / sfc / ethtool.c
index 3aaece6b12cc99723254c4cc9d73e8c5ed2ac9b0..7b5924c039b31508069591b2dd977e8417614525 100644 (file)
@@ -219,9 +219,6 @@ int efx_ethtool_set_settings(struct net_device *net_dev,
        struct efx_nic *efx = netdev_priv(net_dev);
        int rc;
 
-       if (EFX_WORKAROUND_13963(efx) && !ecmd->autoneg)
-               return -EINVAL;
-
        /* Falcon GMAC does not support 1000Mbps HD */
        if (ecmd->speed == SPEED_1000 && ecmd->duplex != DUPLEX_FULL) {
                EFX_LOG(efx, "rejecting unsupported 1000Mbps HD"
@@ -345,7 +342,7 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
                                       u64 *data)
 {
        struct efx_channel *channel;
-       unsigned int n = 0;
+       unsigned int n = 0, i;
        enum efx_loopback_mode mode;
 
        efx_fill_test(n++, strings, data, &tests->mii,
@@ -373,8 +370,10 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
 
        efx_fill_test(n++, strings, data, &tests->registers,
                      "core", 0, "registers", NULL);
-       efx_fill_test(n++, strings, data, &tests->phy,
-                     "phy", 0, "bist", NULL);
+
+       for (i = 0; i < efx->phy_op->num_tests; i++)
+               efx_fill_test(n++, strings, data, &tests->phy[i],
+                             "phy", 0, efx->phy_op->test_names[i], NULL);
 
        /* Loopback tests */
        for (mode = LOOPBACK_NONE; mode <= LOOPBACK_TEST_MAX; mode++) {
@@ -487,7 +486,7 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
 {
        struct efx_nic *efx = netdev_priv(net_dev);
        struct efx_self_tests efx_tests;
-       int offline, already_up;
+       int already_up;
        int rc;
 
        ASSERT_RTNL();
@@ -507,24 +506,15 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
        }
 
        memset(&efx_tests, 0, sizeof(efx_tests));
-       offline = (test->flags & ETH_TEST_FL_OFFLINE);
-
-       /* Perform online self tests first */
-       rc = efx_online_test(efx, &efx_tests);
-       if (rc)
-               goto out;
 
-       /* Perform offline tests only if online tests passed */
-       if (offline)
-               rc = efx_offline_test(efx, &efx_tests,
-                                     efx->loopback_modes);
+       rc = efx_selftest(efx, &efx_tests, test->flags);
 
- out:
        if (!already_up)
                dev_close(efx->net_dev);
 
-       EFX_LOG(efx, "%s all %sline self-tests\n",
-               rc == 0 ? "passed" : "failed", offline ? "off" : "on");
+       EFX_LOG(efx, "%s %sline self-tests\n",
+               rc == 0 ? "passed" : "failed",
+               (test->flags & ETH_TEST_FL_OFFLINE) ? "off" : "on");
 
  fail2:
  fail1: