summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/wangxun/txgbe
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/wangxun/txgbe')
-rw-r--r--drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c18
-rw-r--r--drivers/net/ethernet/wangxun/txgbe/txgbe_main.c31
-rw-r--r--drivers/net/ethernet/wangxun/txgbe/txgbe_type.h1
3 files changed, 5 insertions, 45 deletions
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c
index 31fde3fa7c..db675512ce 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c
@@ -19,7 +19,7 @@ static int txgbe_set_ringparam(struct net_device *netdev,
struct wx *wx = netdev_priv(netdev);
u32 new_rx_count, new_tx_count;
struct wx_ring *temp_ring;
- int i, err = 0;
+ int i;
new_tx_count = clamp_t(u32, ring->tx_pending, WX_MIN_TXD, WX_MAX_TXD);
new_tx_count = ALIGN(new_tx_count, WX_REQ_TX_DESCRIPTOR_MULTIPLE);
@@ -31,10 +31,6 @@ static int txgbe_set_ringparam(struct net_device *netdev,
new_rx_count == wx->rx_ring_count)
return 0;
- err = wx_set_state_reset(wx);
- if (err)
- return err;
-
if (!netif_running(wx->netdev)) {
for (i = 0; i < wx->num_tx_queues; i++)
wx->tx_ring[i]->count = new_tx_count;
@@ -43,16 +39,14 @@ static int txgbe_set_ringparam(struct net_device *netdev,
wx->tx_ring_count = new_tx_count;
wx->rx_ring_count = new_rx_count;
- goto clear_reset;
+ return 0;
}
/* allocate temporary buffer to store rings in */
i = max_t(int, wx->num_tx_queues, wx->num_rx_queues);
temp_ring = kvmalloc_array(i, sizeof(struct wx_ring), GFP_KERNEL);
- if (!temp_ring) {
- err = -ENOMEM;
- goto clear_reset;
- }
+ if (!temp_ring)
+ return -ENOMEM;
txgbe_down(wx);
@@ -61,9 +55,7 @@ static int txgbe_set_ringparam(struct net_device *netdev,
txgbe_up(wx);
-clear_reset:
- clear_bit(WX_STATE_RESETTING, wx->state);
- return err;
+ return 0;
}
static int txgbe_set_channels(struct net_device *dev,
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
index 8c7a74981b..bd4624d14c 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
@@ -269,8 +269,6 @@ static int txgbe_sw_init(struct wx *wx)
wx->tx_work_limit = TXGBE_DEFAULT_TX_WORK;
wx->rx_work_limit = TXGBE_DEFAULT_RX_WORK;
- wx->do_reset = txgbe_do_reset;
-
return 0;
}
@@ -423,34 +421,6 @@ int txgbe_setup_tc(struct net_device *dev, u8 tc)
return 0;
}
-static void txgbe_reinit_locked(struct wx *wx)
-{
- int err = 0;
-
- netif_trans_update(wx->netdev);
-
- err = wx_set_state_reset(wx);
- if (err) {
- wx_err(wx, "wait device reset timeout\n");
- return;
- }
-
- txgbe_down(wx);
- txgbe_up(wx);
-
- clear_bit(WX_STATE_RESETTING, wx->state);
-}
-
-void txgbe_do_reset(struct net_device *netdev)
-{
- struct wx *wx = netdev_priv(netdev);
-
- if (netif_running(netdev))
- txgbe_reinit_locked(wx);
- else
- txgbe_reset(wx);
-}
-
static const struct net_device_ops txgbe_netdev_ops = {
.ndo_open = txgbe_open,
.ndo_stop = txgbe_close,
@@ -458,7 +428,6 @@ static const struct net_device_ops txgbe_netdev_ops = {
.ndo_start_xmit = wx_xmit_frame,
.ndo_set_rx_mode = wx_set_rx_mode,
.ndo_set_features = wx_set_features,
- .ndo_fix_features = wx_fix_features,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = wx_set_mac,
.ndo_get_stats64 = wx_get_stats64,
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_type.h b/drivers/net/ethernet/wangxun/txgbe/txgbe_type.h
index f434a7865c..1b4ff50d58 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_type.h
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_type.h
@@ -134,7 +134,6 @@ extern char txgbe_driver_name[];
void txgbe_down(struct wx *wx);
void txgbe_up(struct wx *wx);
int txgbe_setup_tc(struct net_device *dev, u8 tc);
-void txgbe_do_reset(struct net_device *netdev);
#define NODE_PROP(_NAME, _PROP) \
(const struct software_node) { \