Commit 50648968 authored by Shinas Rasheed's avatar Shinas Rasheed Committed by David S. Miller

octeon_ep_vf: add ethtool support

Add support for the following ethtool commands:

ethtool -i|--driver devname
ethtool devname
ethtool -S|--statistics devname
Signed-off-by: default avatarShinas Rasheed <srasheed@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 77cef1e0
......@@ -6,4 +6,5 @@
obj-$(CONFIG_OCTEON_EP_VF) += octeon_ep_vf.o
octeon_ep_vf-y := octep_vf_main.o octep_vf_cn9k.o octep_vf_cnxk.o \
octep_vf_tx.o octep_vf_rx.o octep_vf_mbox.o
octep_vf_tx.o octep_vf_rx.o octep_vf_mbox.o \
octep_vf_ethtool.o
This diff is collapsed.
......@@ -1081,6 +1081,7 @@ static int octep_vf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
INIT_WORK(&octep_vf_dev->tx_timeout_task, octep_vf_tx_timeout_task);
netdev->netdev_ops = &octep_vf_netdev_ops;
octep_vf_set_ethtool_ops(netdev);
netif_carrier_off(netdev);
if (octep_vf_setup_mbox(octep_vf_dev)) {
......
......@@ -331,6 +331,7 @@ void octep_vf_device_setup_cn93(struct octep_vf_device *oct);
void octep_vf_device_setup_cnxk(struct octep_vf_device *oct);
int octep_vf_iq_process_completions(struct octep_vf_iq *iq, u16 budget);
int octep_vf_oq_process_rx(struct octep_vf_oq *oq, int budget);
void octep_vf_set_ethtool_ops(struct net_device *netdev);
int octep_vf_get_link_info(struct octep_vf_device *oct);
int octep_vf_get_if_stats(struct octep_vf_device *oct);
void octep_vf_mbox_work(struct work_struct *work);
......
......@@ -114,7 +114,7 @@ static int __octep_vf_mbox_send_cmd(struct octep_vf_device *oct,
{
struct octep_vf_mbox *mbox = oct->mbox;
u64 reg_val = 0ull;
int count;
int count = 0;
if (!mbox)
return OCTEP_PFVF_MBOX_CMD_STATUS_NOT_SETUP;
......
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