/[linux-patches]/genpatches-2.6/trunk/2.6.14/1122_3_hdlc-netif-carrier.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1122_3_hdlc-netif-carrier.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 10 months ago) by johnm
File MIME type: text/x-diff
File size: 3411 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From stable-bounces@linux.kernel.org Thu Nov 10 16:54:29 2005
2 To: stable@kernel.org
3 From: Krzysztof Halasa <khc@pm.waw.pl>
4 Date: Fri, 11 Nov 2005 01:54:14 +0100
5 Message-ID: <m3hdakxavd.fsf@defiant.localdomain>
6 Cc:
7 Subject: [PATCH] Generic HDLC WAN drivers - disable netif_carrier_off()
8
9 As we are currently unable to fix the problem with carrier and protocol
10 state signaling in net core I've to disable netif_carrier_off() calls
11 used by WAN protocol drivers. The attached patch should make them
12 working again.
13
14 The remaining netif_carrier_*() calls in hdlc_fr.c are fine as they
15 don't touch the physical device.
16
17 Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
18 Signed-off-by: Chris Wright <chrisw@osdl.org>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20 ---
21 drivers/net/wan/hdlc_cisco.c | 6 ++++++
22 drivers/net/wan/hdlc_fr.c | 4 ++++
23 drivers/net/wan/hdlc_generic.c | 6 ++++++
24 3 files changed, 16 insertions(+)
25
26 --- linux-2.6.14.2.orig/drivers/net/wan/hdlc_cisco.c
27 +++ linux-2.6.14.2/drivers/net/wan/hdlc_cisco.c
28 @@ -192,7 +192,9 @@ static int cisco_rx(struct sk_buff *skb)
29 "uptime %ud%uh%um%us)\n",
30 dev->name, days, hrs,
31 min, sec);
32 +#if 0
33 netif_carrier_on(dev);
34 +#endif
35 hdlc->state.cisco.up = 1;
36 }
37 }
38 @@ -225,7 +227,9 @@ static void cisco_timer(unsigned long ar
39 hdlc->state.cisco.settings.timeout * HZ)) {
40 hdlc->state.cisco.up = 0;
41 printk(KERN_INFO "%s: Link down\n", dev->name);
42 +#if 0
43 netif_carrier_off(dev);
44 +#endif
45 }
46
47 cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ,
48 @@ -261,8 +265,10 @@ static void cisco_stop(struct net_device
49 {
50 hdlc_device *hdlc = dev_to_hdlc(dev);
51 del_timer_sync(&hdlc->state.cisco.timer);
52 +#if 0
53 if (netif_carrier_ok(dev))
54 netif_carrier_off(dev);
55 +#endif
56 hdlc->state.cisco.up = 0;
57 hdlc->state.cisco.request_sent = 0;
58 }
59 --- linux-2.6.14.2.orig/drivers/net/wan/hdlc_fr.c
60 +++ linux-2.6.14.2/drivers/net/wan/hdlc_fr.c
61 @@ -545,8 +545,10 @@ static void fr_set_link_state(int reliab
62
63 hdlc->state.fr.reliable = reliable;
64 if (reliable) {
65 +#if 0
66 if (!netif_carrier_ok(dev))
67 netif_carrier_on(dev);
68 +#endif
69
70 hdlc->state.fr.n391cnt = 0; /* Request full status */
71 hdlc->state.fr.dce_changed = 1;
72 @@ -560,8 +562,10 @@ static void fr_set_link_state(int reliab
73 }
74 }
75 } else {
76 +#if 0
77 if (netif_carrier_ok(dev))
78 netif_carrier_off(dev);
79 +#endif
80
81 while (pvc) { /* Deactivate all PVCs */
82 pvc_carrier(0, pvc);
83 --- linux-2.6.14.2.orig/drivers/net/wan/hdlc_generic.c
84 +++ linux-2.6.14.2/drivers/net/wan/hdlc_generic.c
85 @@ -79,11 +79,13 @@ static void __hdlc_set_carrier_on(struct
86 hdlc_device *hdlc = dev_to_hdlc(dev);
87 if (hdlc->proto.start)
88 return hdlc->proto.start(dev);
89 +#if 0
90 #ifdef DEBUG_LINK
91 if (netif_carrier_ok(dev))
92 printk(KERN_ERR "hdlc_set_carrier_on(): already on\n");
93 #endif
94 netif_carrier_on(dev);
95 +#endif
96 }
97
98
99 @@ -94,11 +96,13 @@ static void __hdlc_set_carrier_off(struc
100 if (hdlc->proto.stop)
101 return hdlc->proto.stop(dev);
102
103 +#if 0
104 #ifdef DEBUG_LINK
105 if (!netif_carrier_ok(dev))
106 printk(KERN_ERR "hdlc_set_carrier_off(): already off\n");
107 #endif
108 netif_carrier_off(dev);
109 +#endif
110 }
111
112
113 @@ -294,8 +298,10 @@ int register_hdlc_device(struct net_devi
114 if (result != 0)
115 return -EIO;
116
117 +#if 0
118 if (netif_carrier_ok(dev))
119 netif_carrier_off(dev); /* no carrier until DCD goes up */
120 +#endif
121
122 return 0;
123 }

  ViewVC Help
Powered by ViewVC 1.1.20