Greg KH <[EMAIL PROTECTED]> writes:

> Is this upstream?  I need a Signed-off-by: line.

Ahh, right. Have to learn it somehow.

>  Care to resend it to
> the stable@ address when it is accepted?

Not sure what the address is, resending. I have no doubt Jeff will apply
this as this is all one can currently do and that's my code so I probably
know best. But of course he can tell us.

--- cut ---

As we are currently unable to fix the problem with carrier and protocol
state signaling in net core I've to disable netif_carrier_off() calls
used by WAN protocol drivers. The attached patch should make them
working again. Not tested, but the patch is trivial and it applies
to 2.6.14 cleanly :-)

The remaining netif_carrier_*() calls in hdlc_fr.c are fine as they
don't touch the physical device.

Please apply. This workaround is meant to be included in 2.6.15 and
2.6.14.* as, without it, the drivers are not at all working.

Signed-off-by: Krzysztof Halasa <[EMAIL PROTECTED]>

--- linux-2.6/drivers/net/wan/hdlc_cisco.c	2005-10-28 23:37:28 +0200
+++ linux-2.6/drivers/net/wan/hdlc_cisco.c	2005-11-10 13:07:35 +0100
@@ -192,7 +192,9 @@
 					       "uptime %ud%uh%um%us)\n",
 					       dev->name, days, hrs,
 					       min, sec);
+#if 0
 					netif_carrier_on(dev);
+#endif
 					hdlc->state.cisco.up = 1;
 				}
 			}
@@ -225,7 +227,9 @@
 		       hdlc->state.cisco.settings.timeout * HZ)) {
 		hdlc->state.cisco.up = 0;
 		printk(KERN_INFO "%s: Link down\n", dev->name);
+#if 0
 		netif_carrier_off(dev);
+#endif
 	}
 
 	cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ,
@@ -261,8 +265,10 @@
 {
 	hdlc_device *hdlc = dev_to_hdlc(dev);
 	del_timer_sync(&hdlc->state.cisco.timer);
+#if 0
 	if (netif_carrier_ok(dev))
 		netif_carrier_off(dev);
+#endif
 	hdlc->state.cisco.up = 0;
 	hdlc->state.cisco.request_sent = 0;
 }
--- linux-2.6/drivers/net/wan/hdlc_fr.c	2005-07-11 22:19:21 +0200
+++ linux-2.6/drivers/net/wan/hdlc_fr.c	2005-11-10 13:09:14 +0100
@@ -545,8 +545,10 @@
 
 	hdlc->state.fr.reliable = reliable;
 	if (reliable) {
+#if 0
 		if (!netif_carrier_ok(dev))
 			netif_carrier_on(dev);
+#endif
 
 		hdlc->state.fr.n391cnt = 0; /* Request full status */
 		hdlc->state.fr.dce_changed = 1;
@@ -560,8 +562,10 @@
 			}
 		}
 	} else {
+#if 0
 		if (netif_carrier_ok(dev))
 			netif_carrier_off(dev);
+#endif
 
 		while (pvc) {		/* Deactivate all PVCs */
 			pvc_carrier(0, pvc);
--- linux-2.6/drivers/net/wan/hdlc_generic.c	2005-10-28 23:37:28 +0200
+++ linux-2.6/drivers/net/wan/hdlc_generic.c	2005-11-10 13:08:26 +0100
@@ -79,11 +79,13 @@
 	hdlc_device *hdlc = dev_to_hdlc(dev);
 	if (hdlc->proto.start)
 		return hdlc->proto.start(dev);
+#if 0
 #ifdef DEBUG_LINK
 	if (netif_carrier_ok(dev))
 		printk(KERN_ERR "hdlc_set_carrier_on(): already on\n");
 #endif
 	netif_carrier_on(dev);
+#endif
 }
 
 
@@ -94,11 +96,13 @@
 	if (hdlc->proto.stop)
 		return hdlc->proto.stop(dev);
 
+#if 0
 #ifdef DEBUG_LINK
 	if (!netif_carrier_ok(dev))
 		printk(KERN_ERR "hdlc_set_carrier_off(): already off\n");
 #endif
 	netif_carrier_off(dev);
+#endif
 }
 
 
@@ -294,8 +298,10 @@
 	if (result != 0)
 		return -EIO;
 
+#if 0
 	if (netif_carrier_ok(dev))
 		netif_carrier_off(dev); /* no carrier until DCD goes up */
+#endif
 
 	return 0;
 }

Reply via email to