提交 7fa13653 编写于 作者: D Derek Chickles 提交者: David S. Miller

liquidio: disallow enabling firmware debug from a VF

Disallow enabling firmware debug from a VF.  Only PF is allowed to do that.
Signed-off-by: NDerek Chickles <derek.chickles@cavium.com>
Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fe741e23
...@@ -700,6 +700,13 @@ static void lio_set_msglevel(struct net_device *netdev, u32 msglvl) ...@@ -700,6 +700,13 @@ static void lio_set_msglevel(struct net_device *netdev, u32 msglvl)
lio->msg_enable = msglvl; lio->msg_enable = msglvl;
} }
static void lio_vf_set_msglevel(struct net_device *netdev, u32 msglvl)
{
struct lio *lio = GET_LIO(netdev);
lio->msg_enable = msglvl;
}
static void static void
lio_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) lio_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)
{ {
...@@ -2611,7 +2618,7 @@ static const struct ethtool_ops lio_vf_ethtool_ops = { ...@@ -2611,7 +2618,7 @@ static const struct ethtool_ops lio_vf_ethtool_ops = {
.get_regs_len = lio_get_regs_len, .get_regs_len = lio_get_regs_len,
.get_regs = lio_get_regs, .get_regs = lio_get_regs,
.get_msglevel = lio_get_msglevel, .get_msglevel = lio_get_msglevel,
.set_msglevel = lio_set_msglevel, .set_msglevel = lio_vf_set_msglevel,
.get_sset_count = lio_vf_get_sset_count, .get_sset_count = lio_vf_get_sset_count,
.get_coalesce = lio_get_intr_coalesce, .get_coalesce = lio_get_intr_coalesce,
.set_coalesce = lio_set_intr_coalesce, .set_coalesce = lio_set_intr_coalesce,
......
...@@ -2997,10 +2997,6 @@ static int setup_nic_devices(struct octeon_device *octeon_dev) ...@@ -2997,10 +2997,6 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
liquidio_set_feature(netdev, OCTNET_CMD_LRO_ENABLE, liquidio_set_feature(netdev, OCTNET_CMD_LRO_ENABLE,
OCTNIC_LROIPV4 | OCTNIC_LROIPV6); OCTNIC_LROIPV4 | OCTNIC_LROIPV6);
if ((debug != -1) && (debug & NETIF_MSG_HW))
liquidio_set_feature(netdev, OCTNET_CMD_VERBOSE_ENABLE,
0);
if (setup_link_status_change_wq(netdev)) if (setup_link_status_change_wq(netdev))
goto setup_nic_dev_fail; goto setup_nic_dev_fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册