Title: [6063] trunk/drivers/net/bfin_mac.c: Coding style improve for VLAN registers, no funciton change
Revision
6063
Author
gyang
Date
2009-02-05 02:54:43 -0600 (Thu, 05 Feb 2009)

Log Message

Coding style improve for VLAN registers, no funciton change

Modified Paths


Diff

Modified: trunk/drivers/net/bfin_mac.c (6062 => 6063)


--- trunk/drivers/net/bfin_mac.c	2009-02-05 08:53:15 UTC (rev 6062)
+++ trunk/drivers/net/bfin_mac.c	2009-02-05 08:54:43 UTC (rev 6063)
@@ -517,17 +517,16 @@
 
 	bfin_write_EMAC_MMC_CTL(RSTC | CROLL);
 
+#if defined(CONFIG_NET_DSA_KSZ8893M)
+#define PORT1_MASK 1
+#define PORT2_MASK 2
+	/* Set vlan regs to let 1522 bytes long packets pass through */
+	bfin_write_EMAC_VLAN1(ETH_P_8021Q | PORT1_MASK);
+	bfin_write_EMAC_VLAN2(ETH_P_8021Q | PORT2_MASK);
+#else
 	/* The legal length of the frame is increased to 1522 bytes */
 	bfin_write_EMAC_VLAN1(ETH_P_8021Q);
-	/* Frame length is increased to 1538 bytes, for future use? */
-	/* bfin_write_EMAC_VLAN2( ?? ); */
-
-#if defined(CONFIG_NET_DSA)
-#if defined(CONFIG_NET_DSA_KSZ8893M)
-	bfin_write_EMAC_VLAN1(0x8101);
-	bfin_write_EMAC_VLAN2(0x8102);
 #endif
-#endif
 
 	/* Initialize the TX DMA channel registers */
 	bfin_write_DMA2_X_COUNT(0);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to