be2net: allow register dump only for PFs
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ce45ee955f
commit
16a871ef55
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue