diff --git a/modules/mqnic/mqnic.h b/modules/mqnic/mqnic.h index 0164d4a0c..1dacfe568 100644 --- a/modules/mqnic/mqnic.h +++ b/modules/mqnic/mqnic.h @@ -539,6 +539,8 @@ u32 mqnic_port_get_tx_status(struct mqnic_port *port); u32 mqnic_port_get_rx_status(struct mqnic_port *port); // 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); struct net_device *mqnic_create_netdev(struct mqnic_if *interface, int index, int dev_port); void mqnic_destroy_netdev(struct net_device *ndev); diff --git a/modules/mqnic/mqnic_netdev.c b/modules/mqnic/mqnic_netdev.c index 7ee0ee058..a83bf3577 100644 --- a/modules/mqnic/mqnic_netdev.c +++ b/modules/mqnic/mqnic_netdev.c @@ -37,9 +37,7 @@ #include -static int mqnic_stop_port(struct net_device *ndev); - -static int mqnic_start_port(struct net_device *ndev) +int mqnic_start_port(struct net_device *ndev) { struct mqnic_priv *priv = netdev_priv(ndev); struct mqnic_dev *mdev = priv->mdev; @@ -218,7 +216,7 @@ fail: 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_dev *mdev = priv->mdev; @@ -301,8 +299,6 @@ static int mqnic_stop_port(struct net_device *ndev) mqnic_destroy_cq(cq); } up_write(&priv->rxq_table_sem); - - return 0; } 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); - ret = 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); + mqnic_stop_port(ndev); mutex_unlock(&mdev->state_lock); return ret;