1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

modules/mqnic: Make mqnic_start_port/mqnic_stop_port non-static so they can be called from mqnic_ethtool

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich 2023-05-03 01:20:07 -07:00
parent 3c995dc8e0
commit 21b8d164cf
2 changed files with 5 additions and 11 deletions

View File

@ -539,6 +539,8 @@ u32 mqnic_port_get_tx_status(struct mqnic_port *port);
u32 mqnic_port_get_rx_status(struct mqnic_port *port); u32 mqnic_port_get_rx_status(struct mqnic_port *port);
// mqnic_netdev.c // mqnic_netdev.c
int mqnic_start_port(struct net_device *ndev);
void mqnic_stop_port(struct net_device *ndev);
void mqnic_update_stats(struct net_device *ndev); void mqnic_update_stats(struct net_device *ndev);
struct net_device *mqnic_create_netdev(struct mqnic_if *interface, int index, int dev_port); struct net_device *mqnic_create_netdev(struct mqnic_if *interface, int index, int dev_port);
void mqnic_destroy_netdev(struct net_device *ndev); void mqnic_destroy_netdev(struct net_device *ndev);

View File

@ -37,9 +37,7 @@
#include <linux/version.h> #include <linux/version.h>
static int mqnic_stop_port(struct net_device *ndev); int mqnic_start_port(struct net_device *ndev)
static int mqnic_start_port(struct net_device *ndev)
{ {
struct mqnic_priv *priv = netdev_priv(ndev); struct mqnic_priv *priv = netdev_priv(ndev);
struct mqnic_dev *mdev = priv->mdev; struct mqnic_dev *mdev = priv->mdev;
@ -218,7 +216,7 @@ fail:
return ret; return ret;
} }
static int mqnic_stop_port(struct net_device *ndev) void mqnic_stop_port(struct net_device *ndev)
{ {
struct mqnic_priv *priv = netdev_priv(ndev); struct mqnic_priv *priv = netdev_priv(ndev);
struct mqnic_dev *mdev = priv->mdev; struct mqnic_dev *mdev = priv->mdev;
@ -301,8 +299,6 @@ static int mqnic_stop_port(struct net_device *ndev)
mqnic_destroy_cq(cq); mqnic_destroy_cq(cq);
} }
up_write(&priv->rxq_table_sem); up_write(&priv->rxq_table_sem);
return 0;
} }
static int mqnic_open(struct net_device *ndev) static int mqnic_open(struct net_device *ndev)
@ -331,11 +327,7 @@ static int mqnic_close(struct net_device *ndev)
mutex_lock(&mdev->state_lock); mutex_lock(&mdev->state_lock);
ret = mqnic_stop_port(ndev); mqnic_stop_port(ndev);
if (ret)
dev_err(mdev->dev, "Failed to stop port on interface %d netdev %d: %d",
priv->interface->index, priv->index, ret);
mutex_unlock(&mdev->state_lock); mutex_unlock(&mdev->state_lock);
return ret; return ret;