bnx2x: use bnx2x_reload_if_running
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7a25cc7315
commit
a9fccec79e
@@ -2810,7 +2810,7 @@ alloc_err:
|
||||
|
||||
}
|
||||
|
||||
static int bnx2x_reload_if_running(struct net_device *dev)
|
||||
int bnx2x_reload_if_running(struct net_device *dev)
|
||||
{
|
||||
struct bnx2x *bp = netdev_priv(dev);
|
||||
|
||||
|
@@ -377,6 +377,9 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
/* select_queue callback */
|
||||
u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb);
|
||||
|
||||
/* reload helper */
|
||||
int bnx2x_reload_if_running(struct net_device *dev);
|
||||
|
||||
int bnx2x_change_mac_addr(struct net_device *dev, void *p);
|
||||
|
||||
/* NAPI poll Rx part */
|
||||
|
@@ -1238,7 +1238,6 @@ static int bnx2x_set_ringparam(struct net_device *dev,
|
||||
struct ethtool_ringparam *ering)
|
||||
{
|
||||
struct bnx2x *bp = netdev_priv(dev);
|
||||
int rc = 0;
|
||||
|
||||
if (bp->recovery_state != BNX2X_RECOVERY_DONE) {
|
||||
printk(KERN_ERR "Handling parity error recovery. Try again later\n");
|
||||
@@ -1255,12 +1254,7 @@ static int bnx2x_set_ringparam(struct net_device *dev,
|
||||
bp->rx_ring_size = ering->rx_pending;
|
||||
bp->tx_ring_size = ering->tx_pending;
|
||||
|
||||
if (netif_running(dev)) {
|
||||
bnx2x_nic_unload(bp, UNLOAD_NORMAL);
|
||||
rc = bnx2x_nic_load(bp, LOAD_NORMAL);
|
||||
}
|
||||
|
||||
return rc;
|
||||
return bnx2x_reload_if_running(dev);
|
||||
}
|
||||
|
||||
static void bnx2x_get_pauseparam(struct net_device *dev,
|
||||
|
Reference in New Issue
Block a user