lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 12 Feb 2007 21:21:55 -0000 (GMT)
From:	"Leigh Brown" <leigh@...inno.co.uk>
To:	"David Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: [PATCH] sundance: add IFF_RUNNING support

Patch to add IFF_RUNNING support for sundance.

I copied the basic code for this from the forcedeth driver, and I've
tested it using the ifplugstatus command from the ifplugd package.
This is very handy if you use Quagga or keepalived.

Signed-off-by: Leigh Brown <leigh@...inno.co.uk>

diff -urN a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c	2007-02-11 11:29:19.000000000 +0000
+++ b/drivers/net/sundance.c	2007-02-12 19:48:36.000000000 +0000
@@ -23,8 +23,8 @@
 */

 #define DRV_NAME	"sundance"
-#define DRV_VERSION	"1.2"
-#define DRV_RELDATE	"11-Sep-2006"
+#define DRV_VERSION	"1.3"
+#define DRV_RELDATE	"12-Feb-2007"


 /* The user-configurable values.
@@ -831,6 +831,7 @@
 	/* Fix DFE-580TX packet drop issue */
 	if (np->pci_rev_id >= 0x14)
 		iowrite8(0x01, ioaddr + DebugCtrl1);
+	netif_carrier_off(dev);
 	netif_start_queue(dev);

 	spin_lock_irqsave(&np->lock, flags);
@@ -1429,6 +1430,13 @@
 			iowrite16(ioread16(ioaddr + MACCtrl0) | EnbFlowCtrl,
 				ioaddr + MACCtrl0);
 		}
+		if (mii_link_ok(&np->mii_if)) {
+			if (!netif_carrier_ok(dev))
+				netif_carrier_on(dev);
+		} else {
+			if (netif_carrier_ok(dev))
+				netif_carrier_off(dev);
+		}
 	}
 	if (intr_status & StatsMax) {
 		get_stats(dev);

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ