summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/nvidia
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-12-10 05:20:14 +0400
committerDavid S. Miller <davem@davemloft.net>2013-12-10 05:20:14 +0400
commit34f9f437104b86f6ddfa2770e2cd852846385dc3 (patch)
tree6c78386b3db9dd47fd2b79efb4dcf8c1472de99e /drivers/net/ethernet/nvidia
parent95dc19299f741c986227ec33e23cbf9b3321f812 (diff)
parent66e56cd46b93ef407c60adcac62cf33b06119d50 (diff)
downloadlinux-34f9f437104b86f6ddfa2770e2cd852846385dc3.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge 'net' into 'net-next' to get the AF_PACKET bug fix that Daniel's direct transmit changes depend upon. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/nvidia')
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index d8bdaf6d82d2..493a1125f54f 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -5149,8 +5149,10 @@ static void nv_self_test(struct net_device *dev, struct ethtool_test *test, u64
{
struct fe_priv *np = netdev_priv(dev);
u8 __iomem *base = get_hwbase(dev);
- int result;
- memset(buffer, 0, nv_get_sset_count(dev, ETH_SS_TEST)*sizeof(u64));
+ int result, count;
+
+ count = nv_get_sset_count(dev, ETH_SS_TEST);
+ memset(buffer, 0, count * sizeof(u64));
if (!nv_link_test(dev)) {
test->flags |= ETH_TEST_FL_FAILED;
@@ -5194,7 +5196,7 @@ static void nv_self_test(struct net_device *dev, struct ethtool_test *test, u64
return;
}
- if (!nv_loopback_test(dev)) {
+ if (count > NV_TEST_COUNT_BASE && !nv_loopback_test(dev)) {
test->flags |= ETH_TEST_FL_FAILED;
buffer[3] = 1;
}