]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/dsa/mv88e6123_61_65.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / net / dsa / mv88e6123_61_65.c
index 147818cc706edee31f0343f379b0b32a527284cd..ec8c6a0482d3dde28385c498fbad59707da6ede3 100644 (file)
@@ -192,15 +192,19 @@ static int mv88e6123_61_65_setup_port(struct dsa_switch *ds, int p)
 
        /*
         * Port Control: disable Drop-on-Unlock, disable Drop-on-Lock,
-        * configure the EDSA tagging mode if this is the CPU port,
-        * disable Header mode, enable IGMP/MLD snooping, disable VLAN
-        * tunneling, determine priority by looking at 802.1p and IP
-        * priority fields (IP prio has precedence), and set STP state
-        * to Forwarding.  Finally, if this is the CPU port, additionally
-        * enable forwarding of unknown unicast and multicast addresses.
+        * configure the requested (DSA/EDSA) tagging mode if this is
+        * the CPU port, disable Header mode, enable IGMP/MLD snooping,
+        * disable VLAN tunneling, determine priority by looking at
+        * 802.1p and IP priority fields (IP prio has precedence), and
+        * set STP state to Forwarding.  Finally, if this is the CPU
+        * port, additionally enable forwarding of unknown unicast and
+        * multicast addresses.
         */
        REG_WRITE(addr, 0x04,
-                       (p == ds->cpu_port) ? 0x373f : 0x0433);
+                       (p == ds->cpu_port) ?
+                        (ds->tag_protocol == htons(ETH_P_DSA)) ?
+                         0x053f : 0x373f :
+                        0x0433);
 
        /*
         * Port Control 1: disable trunking.  Also, if this is the
@@ -403,14 +407,14 @@ static struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
        .get_sset_count         = mv88e6123_61_65_get_sset_count,
 };
 
-int __init mv88e6123_61_65_init(void)
+static int __init mv88e6123_61_65_init(void)
 {
        register_switch_driver(&mv88e6123_61_65_switch_driver);
        return 0;
 }
 module_init(mv88e6123_61_65_init);
 
-void __exit mv88e6123_61_65_cleanup(void)
+static void __exit mv88e6123_61_65_cleanup(void)
 {
        unregister_switch_driver(&mv88e6123_61_65_switch_driver);
 }