From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] sky2: remove restarting workaround flag
Date: Fri, 14 Aug 2009 16:33:17 -0700 [thread overview]
Message-ID: <20090814163317.3c5b5942@nehalam> (raw)
In-Reply-To: <20090814.154154.53636130.davem@davemloft.net>
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>
--- a/drivers/net/sky2.c 2009-08-14 16:29:56.716322334 -0700
+++ b/drivers/net/sky2.c 2009-08-14 16:30:05.681690475 -0700
@@ -1496,8 +1496,6 @@ static int sky2_up(struct net_device *de
sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL);
#endif
- sky2->restarting = 0;
-
err = sky2_rx_start(sky2);
if (err)
goto err_out;
@@ -1508,9 +1506,6 @@ static int sky2_up(struct net_device *de
sky2_write32(hw, B0_IMSK, imask);
sky2_read32(hw, B0_IMSK);
- /* wake queue incase we are restarting */
- netif_wake_queue(dev);
-
if (netif_msg_ifup(sky2))
printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
@@ -1545,8 +1540,6 @@ static inline int tx_dist(unsigned tail,
/* Number of list elements available for next tx */
static inline int tx_avail(const struct sky2_port *sky2)
{
- if (unlikely(sky2->restarting))
- return 0;
return sky2->tx_pending - tx_dist(sky2->tx_cons, sky2->tx_prod);
}
@@ -1850,10 +1843,6 @@ static int sky2_down(struct net_device *
if (netif_msg_ifdown(sky2))
printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);
- /* explicitly shut off tx incase we're restarting */
- sky2->restarting = 1;
- netif_tx_disable(dev);
-
/* Force flow control off */
sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF);
@@ -2382,7 +2371,7 @@ static inline void sky2_tx_done(struct n
{
struct sky2_port *sky2 = netdev_priv(dev);
- if (likely(netif_running(dev) && !sky2->restarting))
+ if (netif_running(dev))
sky2_tx_complete(sky2, last);
}
@@ -4327,7 +4316,6 @@ static __devinit struct net_device *sky2
spin_lock_init(&sky2->phy_lock);
sky2->tx_pending = TX_DEF_PENDING;
sky2->rx_pending = RX_DEF_PENDING;
- sky2->restarting = 0;
hw->dev[port] = dev;
--- a/drivers/net/sky2.h 2009-08-14 16:29:56.728439978 -0700
+++ b/drivers/net/sky2.h 2009-08-14 16:30:08.825275706 -0700
@@ -2053,7 +2053,6 @@ struct sky2_port {
#define SKY2_FLAG_AUTO_SPEED 0x0002
#define SKY2_FLAG_AUTO_PAUSE 0x0004
- u8 restarting;
enum flow_control flow_mode;
enum flow_control flow_status;
--
next prev parent reply other threads:[~2009-08-14 23:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 15:15 [PATCH 0/9] sky2: version 1.24 Stephen Hemminger
2009-08-14 15:15 ` [PATCH 1/9] sky2: Avoid rewinding sky2->tx_prod Stephen Hemminger
2009-08-14 15:15 ` [PATCH 2/9] sky2: Move tx reset functionality to sky2_tx_reset() Stephen Hemminger
2009-08-14 15:15 ` [PATCH 3/9] sky2: Reset tx train after interrupts disabled Stephen Hemminger
2009-08-14 15:15 ` [PATCH 4/9] sky2: hold spinlock around phy_power_down Stephen Hemminger
2009-08-14 15:15 ` [PATCH 5/9] sky2: hold RTNL when doing suspend/shutdown operations Stephen Hemminger
2009-08-14 15:15 ` [PATCH 6/9] sky2: cleanup restart operations Stephen Hemminger
2009-08-14 15:15 ` [PATCH 7/9] sky2: lock less transmit completion Stephen Hemminger
2009-08-14 15:15 ` [PATCH 8/9] sky2: fix pause negotiation Stephen Hemminger
2009-08-14 15:15 ` [PATCH 9/9] sky2: version 1.24 Stephen Hemminger
2009-08-14 22:41 ` [PATCH 0/9] " David Miller
2009-08-14 23:33 ` Stephen Hemminger [this message]
2009-08-14 23:38 ` [PATCH] sky2: remove restarting workaround flag David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090814163317.3c5b5942@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).