Commit 75543741 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

bnx2x: Correct VF driver info

When running ethtool on VF interfaces, returning values should indicate
that the interface does not support self-test or register dump.
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bd8e012b
...@@ -2231,7 +2231,7 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, ...@@ -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_SF 7
#define BNX2X_NUM_TESTS_MF 3 #define BNX2X_NUM_TESTS_MF 3
#define BNX2X_NUM_TESTS(bp) (IS_MF(bp) ? BNX2X_NUM_TESTS_MF : \ #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_PHY_LOOPBACK 0
#define BNX2X_MAC_LOOPBACK 1 #define BNX2X_MAC_LOOPBACK 1
......
...@@ -639,6 +639,9 @@ static int bnx2x_get_regs_len(struct net_device *dev) ...@@ -639,6 +639,9 @@ static int bnx2x_get_regs_len(struct net_device *dev)
struct bnx2x *bp = netdev_priv(dev); struct bnx2x *bp = netdev_priv(dev);
int regdump_len = 0; int regdump_len = 0;
if (IS_VF(bp))
return 0;
regdump_len = __bnx2x_get_regs_len(bp); regdump_len = __bnx2x_get_regs_len(bp);
regdump_len *= 4; regdump_len *= 4;
regdump_len += sizeof(struct dump_header); regdump_len += sizeof(struct dump_header);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment