netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tommy Christensen <tommy.christensen@tpack.net>
To: hadi@cyberus.ca
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Thomas Spatzier <thomas.spatzier@de.ibm.com>,
	"David S. Miller" <davem@davemloft.net>,
	Hasso Tepper <hasso@estpak.ee>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	netdev@oss.sgi.com, Paul Jakma <paul@clubi.ie>
Subject: Re: [patch 4/10] s390: network driver.
Date: Mon, 31 Jan 2005 00:39:25 +0100	[thread overview]
Message-ID: <41FD702D.2060403@tpack.net> (raw)
In-Reply-To: <41EC3067.6050104@tpack.net>

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Tommy Christensen wrote:
> jamal wrote:
> 
>> Didnt see anymore discussion on this - have we given up on it?
> 
> 
> It is not forgotten - just stalled ...
> I'll try to look at it some more.

Sorry for the long delay.

Jamal, do you think something like this could work?

Flushing of the DMA ring could be added if the need arises.
e1000 does this already in the driver on link-down.

-Tommy


[-- Attachment #2: carrier.patch --]
[-- Type: text/plain, Size: 1671 bytes --]

diff -ur linux-2.6.11-rc2-bk8/net/core/link_watch.c linux-2.6.11-work/net/core/link_watch.c
--- linux-2.6.11-rc2-bk8/net/core/link_watch.c	2005-01-30 22:08:44.000000000 +0100
+++ linux-2.6.11-work/net/core/link_watch.c	2005-01-31 00:17:45.716039247 +0100
@@ -16,6 +16,7 @@
 #include <linux/netdevice.h>
 #include <linux/if.h>
 #include <net/sock.h>
+#include <net/pkt_sched.h>
 #include <linux/rtnetlink.h>
 #include <linux/jiffies.h>
 #include <linux/spinlock.h>
@@ -74,6 +75,9 @@
 		clear_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state);
 
 		if (dev->flags & IFF_UP) {
+			if (netif_carrier_ok(dev) &&
+			    dev->qdisc_sleeping != &noop_qdisc)
+				dev_activate(dev);
 			netdev_state_change(dev);
 		}
 
diff -ur linux-2.6.11-rc2-bk8/net/sched/sch_generic.c linux-2.6.11-work/net/sched/sch_generic.c
--- linux-2.6.11-rc2-bk8/net/sched/sch_generic.c	2005-01-30 22:11:50.458216314 +0100
+++ linux-2.6.11-work/net/sched/sch_generic.c	2005-01-31 00:06:47.609769835 +0100
@@ -185,6 +185,7 @@
 static void dev_watchdog(unsigned long arg)
 {
 	struct net_device *dev = (struct net_device *)arg;
+	int check_carrier = 0;
 
 	spin_lock(&dev->xmit_lock);
 	if (dev->qdisc != &noop_qdisc) {
@@ -198,10 +199,23 @@
 			}
 			if (!mod_timer(&dev->watchdog_timer, jiffies + dev->watchdog_timeo))
 				dev_hold(dev);
-		}
+		} else
+			check_carrier = 1;
 	}
 	spin_unlock(&dev->xmit_lock);
 
+	if (check_carrier) {
+		spin_lock(&dev->queue_lock);
+		if (!netif_carrier_ok(dev) && netif_queue_stopped(dev)) {
+			struct Qdisc *qdisc;
+
+			qdisc = dev->qdisc;
+			dev->qdisc = &noop_qdisc;
+			qdisc_reset(qdisc);
+		}
+		spin_unlock(&dev->queue_lock);
+	}
+
 	dev_put(dev);
 }
 

  reply	other threads:[~2005-01-30 23:39 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF88EC0E9F.DE8FC278-ONC1256F4A.0038D5C0-C1256F4A.00398E11@de.ibm.com>
2004-11-14  1:29 ` [patch 4/10] s390: network driver Jeff Garzik
2004-11-15  7:52   ` Paul Jakma
2004-11-21  8:16     ` Paul Jakma
2004-11-29 15:57     ` Thomas Spatzier
2004-11-29 16:30       ` Paul Jakma
2004-11-29 16:41         ` Thomas Spatzier
2004-11-29 20:27           ` Paul Jakma
2004-11-30  7:22             ` Thomas Spatzier
2004-12-05  6:25               ` Paul Jakma
2004-12-06 11:01                 ` Post Network dev questions to netdev Please WAS(Re: " jamal
2004-12-06 11:27                 ` jamal
2004-12-06 14:42                   ` Hasso Tepper
2004-12-07  1:13                     ` Herbert Xu
2004-12-07  2:22                       ` jamal
2004-12-10 15:37                       ` Paul Jakma
2004-12-14  7:40                         ` Thomas Spatzier
2004-12-15 13:50                           ` jamal
2004-12-15 15:03                             ` Thomas Spatzier
2004-12-19 19:29                               ` jamal
2004-12-19 22:29                                 ` Tommy Christensen
2004-12-19 23:05                                   ` jamal
2004-12-19 23:46                                     ` Tommy Christensen
2004-12-20  0:15                                       ` Jeff Garzik
2004-12-20 14:10                                       ` jamal
2004-12-20 18:54                                         ` Jeff Garzik
2004-12-21  0:13                                           ` Tommy Christensen
2004-12-21  1:19                                             ` Jeff Garzik
2004-12-22 10:56                                           ` Thomas Spatzier
2004-12-22 11:07                                             ` Jeff Garzik
2004-12-22 13:48                                             ` jamal
2005-01-03  9:10                                               ` Thomas Spatzier
2005-01-03 15:05                                                 ` jamal
2005-01-04 23:28                                                   ` Jeff Garzik
2005-01-05  3:19                                                     ` jamal
2005-01-05  6:30                                                       ` Paul Jakma
2005-01-05 13:16                                                         ` jamal
2005-01-05 14:29                                                           ` Paul Jakma
2005-01-06 13:55                                                             ` jamal
2005-01-05 15:35                                                       ` Tommy Christensen
2005-01-06 13:58                                                         ` jamal
2005-01-06 15:06                                                           ` Tommy Christensen
2005-01-07 13:32                                                             ` jamal
2005-01-07 15:26                                                               ` Tommy Christensen
2005-01-10 13:18                                                                 ` jamal
2005-01-16 23:10                                                                   ` jamal
2005-01-17 12:04                                                                     ` Hasso Tepper
2005-01-17 22:04                                                                       ` Tommy Christensen
2005-01-17 22:13                                                                         ` Peter Buckingham
2005-01-17 22:36                                                                           ` jamal
2005-01-17 22:53                                                                           ` Tommy Christensen
2005-01-17 21:38                                                                     ` Tommy Christensen
2005-01-30 23:39                                                                       ` Tommy Christensen [this message]
2005-01-31  0:09                                                                         ` jamal
2005-01-31  0:12                                                                           ` jamal
2005-01-31  0:31                                                                           ` Tommy Christensen
2005-01-31  3:26                                                                             ` jamal
2005-01-31 12:16                                                                               ` Tommy Christensen
2005-03-13 17:49                                                                                 ` Hasso Tepper
2005-01-05  6:26                                                     ` Paul Jakma
2004-12-20 14:16                                       ` Paul Jakma
2004-12-20 18:56                                         ` Jeff Garzik
2004-12-26  5:36                                       ` Herbert Xu
2004-12-19 22:43                                 ` Jeff Garzik
2004-12-19 23:54                                 ` Paul Jakma
2004-12-20 14:11                                   ` jamal
2004-12-07  2:39                     ` jamal
2004-12-06 18:44                   ` Paul Jakma

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=41FD702D.2060403@tpack.net \
    --to=tommy.christensen@tpack.net \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=hasso@estpak.ee \
    --cc=herbert@gondor.apana.org.au \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    --cc=paul@clubi.ie \
    --cc=thomas.spatzier@de.ibm.com \
    /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).