diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-08-14 09:33:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 19:35:41 -0400 |
commit | 49d4b8ba97034469b941d00d5ca1e3b897394e35 (patch) | |
tree | f2a38e44e64bf9cc9fb9ba15158312a187d4d48b /drivers/net/sky2.c | |
parent | f34c5c828439cedbc222030d7e45af69f947384d (diff) |
sky2: remove restarting workaround flag
The whole restarting flag was introduced by Mike McCormack
and was a temporary duct tape patch around issues with transmits
inflight during restart. The problems it was covering are now
fixed and the code should have been reverted.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index bac187000e1..8a763f86661 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1496,8 +1496,6 @@ static int sky2_up(struct net_device *dev) | |||
1496 | sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL); | 1496 | sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL); |
1497 | #endif | 1497 | #endif |
1498 | 1498 | ||
1499 | sky2->restarting = 0; | ||
1500 | |||
1501 | err = sky2_rx_start(sky2); | 1499 | err = sky2_rx_start(sky2); |
1502 | if (err) | 1500 | if (err) |
1503 | goto err_out; | 1501 | goto err_out; |
@@ -1508,9 +1506,6 @@ static int sky2_up(struct net_device *dev) | |||
1508 | sky2_write32(hw, B0_IMSK, imask); | 1506 | sky2_write32(hw, B0_IMSK, imask); |
1509 | sky2_read32(hw, B0_IMSK); | 1507 | sky2_read32(hw, B0_IMSK); |
1510 | 1508 | ||
1511 | /* wake queue incase we are restarting */ | ||
1512 | netif_wake_queue(dev); | ||
1513 | |||
1514 | if (netif_msg_ifup(sky2)) | 1509 | if (netif_msg_ifup(sky2)) |
1515 | printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); | 1510 | printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); |
1516 | 1511 | ||
@@ -1545,8 +1540,6 @@ static inline int tx_dist(unsigned tail, unsigned head) | |||
1545 | /* Number of list elements available for next tx */ | 1540 | /* Number of list elements available for next tx */ |
1546 | static inline int tx_avail(const struct sky2_port *sky2) | 1541 | static inline int tx_avail(const struct sky2_port *sky2) |
1547 | { | 1542 | { |
1548 | if (unlikely(sky2->restarting)) | ||
1549 | return 0; | ||
1550 | return sky2->tx_pending - tx_dist(sky2->tx_cons, sky2->tx_prod); | 1543 | return sky2->tx_pending - tx_dist(sky2->tx_cons, sky2->tx_prod); |
1551 | } | 1544 | } |
1552 | 1545 | ||
@@ -1850,10 +1843,6 @@ static int sky2_down(struct net_device *dev) | |||
1850 | if (netif_msg_ifdown(sky2)) | 1843 | if (netif_msg_ifdown(sky2)) |
1851 | printk(KERN_INFO PFX "%s: disabling interface\n", dev->name); | 1844 | printk(KERN_INFO PFX "%s: disabling interface\n", dev->name); |
1852 | 1845 | ||
1853 | /* explicitly shut off tx incase we're restarting */ | ||
1854 | sky2->restarting = 1; | ||
1855 | netif_tx_disable(dev); | ||
1856 | |||
1857 | /* Force flow control off */ | 1846 | /* Force flow control off */ |
1858 | sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF); | 1847 | sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF); |
1859 | 1848 | ||
@@ -2382,7 +2371,7 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last) | |||
2382 | { | 2371 | { |
2383 | struct sky2_port *sky2 = netdev_priv(dev); | 2372 | struct sky2_port *sky2 = netdev_priv(dev); |
2384 | 2373 | ||
2385 | if (likely(netif_running(dev) && !sky2->restarting)) | 2374 | if (netif_running(dev)) |
2386 | sky2_tx_complete(sky2, last); | 2375 | sky2_tx_complete(sky2, last); |
2387 | } | 2376 | } |
2388 | 2377 | ||
@@ -4327,7 +4316,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, | |||
4327 | spin_lock_init(&sky2->phy_lock); | 4316 | spin_lock_init(&sky2->phy_lock); |
4328 | sky2->tx_pending = TX_DEF_PENDING; | 4317 | sky2->tx_pending = TX_DEF_PENDING; |
4329 | sky2->rx_pending = RX_DEF_PENDING; | 4318 | sky2->rx_pending = RX_DEF_PENDING; |
4330 | sky2->restarting = 0; | ||
4331 | 4319 | ||
4332 | hw->dev[port] = dev; | 4320 | hw->dev[port] = dev; |
4333 | 4321 | ||