From: Ajit Khaparde Date: Tue, 19 Apr 2011 12:10:43 +0000 (+0000) Subject: be2net: allow register dump only for PFs X-Git-Tag: 2.1b_release~4192^2~308 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16a871ef552ff55c80b6d8d895e371ea07c58281;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git be2net: allow register dump only for PFs Signed-off-by: Ajit Khaparde Signed-off-by: David S. Miller --- diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c index 28716a6..22523b9 100644 --- a/drivers/net/benet/be_ethtool.c +++ b/drivers/net/benet/be_ethtool.c @@ -161,7 +161,9 @@ be_get_reg_len(struct net_device *netdev) struct be_adapter *adapter = netdev_priv(netdev); u32 log_size = 0; - be_cmd_get_reg_len(adapter, &log_size); + if (be_physfn(adapter)) + be_cmd_get_reg_len(adapter, &log_size); + return log_size; } @@ -170,8 +172,10 @@ be_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *buf) { struct be_adapter *adapter = netdev_priv(netdev); - memset(buf, 0, regs->len); - be_cmd_get_regs(adapter, regs->len, buf); + if (be_physfn(adapter)) { + memset(buf, 0, regs->len); + be_cmd_get_regs(adapter, regs->len, buf); + } } static int