From: Stephen Hemminger <shemminger@vyatta•com>
To: David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org
Subject: [PATCH 1/8] Revert "sky2: Avoid transmits during sky2_down()"
Date: Thu, 06 Aug 2009 09:12:14 -0700 [thread overview]
Message-ID: <20090806161232.524840939@vyatta.com> (raw)
In-Reply-To: 20090806161213.148382653@vyatta.com
[-- Attachment #1: sky2-revert.patch --]
[-- Type: text/plain, Size: 2415 bytes --]
This reverts commit f6caa14aa0b126d4a2933907d1519611b2a8524a.
Better solution to same problem was done in later patches.
Signed-off-by: Stephen Hemminger <shemminger@vyatta•com>
---
drivers/net/sky2.c | 14 +-------------
drivers/net/sky2.h | 1 -
2 files changed, 1 insertion(+), 14 deletions(-)
--- a/drivers/net/sky2.c 2009-08-06 08:25:15.485025569 -0700
+++ b/drivers/net/sky2.c 2009-08-06 08:25:49.579125976 -0700
@@ -1488,8 +1488,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;
@@ -1502,9 +1500,6 @@ static int sky2_up(struct net_device *de
sky2_set_multicast(dev);
- /* 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);
return 0;
@@ -1538,8 +1533,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);
}
@@ -1825,10 +1818,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);
@@ -2370,7 +2359,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)) {
netif_tx_lock(dev);
sky2_tx_complete(sky2, last);
netif_tx_unlock(dev);
@@ -4294,7 +4283,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-06 08:25:15.498381527 -0700
+++ b/drivers/net/sky2.h 2009-08-06 08:25:49.580038902 -0700
@@ -2051,7 +2051,6 @@ struct sky2_port {
u8 duplex; /* DUPLEX_HALF, DUPLEX_FULL */
u8 rx_csum;
u8 wol;
- u8 restarting;
enum flow_control flow_mode;
enum flow_control flow_status;
--
next prev parent reply other threads:[~2009-08-06 16:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 16:12 [PATCH 0/8] sky2: driver update Stephen Hemminger
2009-08-06 16:12 ` Stephen Hemminger [this message]
2009-08-06 16:12 ` [PATCH 2/8] sky2: Avoid rewinding sky2->tx_prod Stephen Hemminger
2009-08-06 16:12 ` [PATCH 3/8] sky2: Move tx reset functionality to sky2_tx_reset() Stephen Hemminger
2009-08-06 16:12 ` [PATCH 4/8] sky2: Reset tx train after interrupts disabled Stephen Hemminger
2009-08-06 16:12 ` [PATCH 5/8] sky2: Remove tx locks Stephen Hemminger
2009-08-06 16:12 ` [PATCH 6/8] sky2: Lock tx queue when calling sky2_down locally Stephen Hemminger
2009-08-06 16:12 ` [PATCH 7/8] sky2: hold RTNL when doing suspend/shutdown operations Stephen Hemminger
2009-08-06 16:12 ` [PATCH 8/8] sky2: hold spinlock around phy_power_down Stephen Hemminger
2009-08-10 4:09 ` [PATCH 0/8] sky2: driver update David Miller
2009-08-10 15:48 ` Stephen Hemminger
2009-08-11 0:52 ` 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=20090806161232.524840939@vyatta.com \
--to=shemminger@vyatta$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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