bnx2x: Correct VF driver info
authorYuval Mintz <yuvalmin@broadcom.com>
Sat, 28 Sep 2013 05:46:08 +0000 (08:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Sep 2013 22:23:59 +0000 (15:23 -0700)
When running ethtool on VF interfaces, returning values should indicate
that the interface does not support self-test or register dump.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

index 97b3d32a98bd010ab1a1327ef7382e5bd64139b8..a38d04942e7ff2f06f765c14a0776e7e9aaab20f 100644 (file)
@@ -2231,7 +2231,7 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id,
 #define BNX2X_NUM_TESTS_SF             7
 #define BNX2X_NUM_TESTS_MF             3
 #define BNX2X_NUM_TESTS(bp)            (IS_MF(bp) ? BNX2X_NUM_TESTS_MF : \
-                                                    BNX2X_NUM_TESTS_SF)
+                                            IS_VF(bp) ? 0 : BNX2X_NUM_TESTS_SF)
 
 #define BNX2X_PHY_LOOPBACK             0
 #define BNX2X_MAC_LOOPBACK             1
index 120966c5f1cf7f83fb9989e181d6790c9ae81d0a..8213cc827aae822307e937fc72bcf6dad2d7fabe 100644 (file)
@@ -639,6 +639,9 @@ static int bnx2x_get_regs_len(struct net_device *dev)
        struct bnx2x *bp = netdev_priv(dev);
        int regdump_len = 0;
 
+       if (IS_VF(bp))
+               return 0;
+
        regdump_len = __bnx2x_get_regs_len(bp);
        regdump_len *= 4;
        regdump_len += sizeof(struct dump_header);