/[linux-patches]/genpatches-2.6/tags/2.6.12-12/2100_early-vlan.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.12-12/2100_early-vlan.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137 - (show annotations) (download)
Tue Aug 9 21:23:12 2005 UTC (13 years, 1 month ago) by dsd
File size: 1473 byte(s)
2.6.12-12 release
1 From: Tommy Christensen <tommy.christensen@tpack.net>
2 Date: Tue, 12 Jul 2005 19:13:49 +0000 (-0700)
3 Subject: [VLAN]: Fix early vlan adding leads to not functional device
4 X-Git-Tag: v2.6.13-rc3
5 X-Git-Url: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f4637b55ba960d9987a836617271659e9b7b0de8
6
7 [VLAN]: Fix early vlan adding leads to not functional device
8
9 OK, I can see what's happening here. eth0 doesn't detect link-up until
10 after a few seconds, so when the vlan interface is opened immediately
11 after eth0 has been opened, it inherits the link-down state. Subsequently
12 the vlan interface is never properly activated and are thus unable to
13 transmit any packets.
14
15 dev->state bits are not supposed to be manipulated directly. Something
16 similar is probably needed for the netif_device_present() bit, although
17 I don't know how this is meant to work for a virtual device.
18
19 Signed-off-by: David S. Miller <davem@davemloft.net>
20 ---
21
22 --- a/net/8021q/vlan.c
23 +++ b/net/8021q/vlan.c
24 @@ -578,6 +578,14 @@ static int vlan_device_event(struct noti
25 if (!vlandev)
26 continue;
27
28 + if (netif_carrier_ok(dev)) {
29 + if (!netif_carrier_ok(vlandev))
30 + netif_carrier_on(vlandev);
31 + } else {
32 + if (netif_carrier_ok(vlandev))
33 + netif_carrier_off(vlandev);
34 + }
35 +
36 if ((vlandev->state & VLAN_LINK_STATE_MASK) != flgs) {
37 vlandev->state = (vlandev->state &~ VLAN_LINK_STATE_MASK)
38 | flgs;

  ViewVC Help
Powered by ViewVC 1.1.20