aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2011-06-13 21:33:30 -0400
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-15 10:56:14 -0400
commita9fccec79e359b9162ab0cebe2c7ce30ee4172c3 (patch)
treea081a1a9c96a45407e08a3fc8ed6802cad322b29 /drivers/net/bnx2x
parent7a25cc7315e4d846cebbecd31bc4d79e7d2d6db3 (diff)
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>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.c2
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.h3
-rw-r--r--drivers/net/bnx2x/bnx2x_ethtool.c8
3 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 9fee7f0a2d99..ed1d695b1777 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -2810,7 +2810,7 @@ alloc_err:
2810 2810
2811} 2811}
2812 2812
2813static int bnx2x_reload_if_running(struct net_device *dev) 2813int bnx2x_reload_if_running(struct net_device *dev)
2814{ 2814{
2815 struct bnx2x *bp = netdev_priv(dev); 2815 struct bnx2x *bp = netdev_priv(dev);
2816 2816
diff --git a/drivers/net/bnx2x/bnx2x_cmn.h b/drivers/net/bnx2x/bnx2x_cmn.h
index ded8cf1e93fe..57d9354da617 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/bnx2x/bnx2x_cmn.h
@@ -377,6 +377,9 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev);
377/* select_queue callback */ 377/* select_queue callback */
378u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb); 378u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb);
379 379
380/* reload helper */
381int bnx2x_reload_if_running(struct net_device *dev);
382
380int bnx2x_change_mac_addr(struct net_device *dev, void *p); 383int bnx2x_change_mac_addr(struct net_device *dev, void *p);
381 384
382/* NAPI poll Rx part */ 385/* NAPI poll Rx part */
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c
index 9526a320eaf2..ddb99a9a803d 100644
--- a/drivers/net/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/bnx2x/bnx2x_ethtool.c
@@ -1238,7 +1238,6 @@ static int bnx2x_set_ringparam(struct net_device *dev,
1238 struct ethtool_ringparam *ering) 1238 struct ethtool_ringparam *ering)
1239{ 1239{
1240 struct bnx2x *bp = netdev_priv(dev); 1240 struct bnx2x *bp = netdev_priv(dev);
1241 int rc = 0;
1242 1241
1243 if (bp->recovery_state != BNX2X_RECOVERY_DONE) { 1242 if (bp->recovery_state != BNX2X_RECOVERY_DONE) {
1244 printk(KERN_ERR "Handling parity error recovery. Try again later\n"); 1243 printk(KERN_ERR "Handling parity error recovery. Try again later\n");
@@ -1255,12 +1254,7 @@ static int bnx2x_set_ringparam(struct net_device *dev,
1255 bp->rx_ring_size = ering->rx_pending; 1254 bp->rx_ring_size = ering->rx_pending;
1256 bp->tx_ring_size = ering->tx_pending; 1255 bp->tx_ring_size = ering->tx_pending;
1257 1256
1258 if (netif_running(dev)) { 1257 return bnx2x_reload_if_running(dev);
1259 bnx2x_nic_unload(bp, UNLOAD_NORMAL);
1260 rc = bnx2x_nic_load(bp, LOAD_NORMAL);
1261 }
1262
1263 return rc;
1264} 1258}
1265 1259
1266static void bnx2x_get_pauseparam(struct net_device *dev, 1260static void bnx2x_get_pauseparam(struct net_device *dev,