Title: [9270] trunk: netdev: bfin_mac: let boards set vlan masks
- Revision
- 9270
- Author
- vapier
- Date
- 2010-10-21 20:24:34 -0400 (Thu, 21 Oct 2010)
Log Message
netdev: bfin_mac: let boards set vlan masks
Modified Paths
Diff
Modified: trunk/drivers/net/bfin_mac.c (9269 => 9270)
--- trunk/drivers/net/bfin_mac.c 2010-10-21 22:47:11 UTC (rev 9269)
+++ trunk/drivers/net/bfin_mac.c 2010-10-22 00:24:34 UTC (rev 9270)
@@ -587,16 +587,9 @@
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);
-#endif
+ bfin_write_EMAC_VLAN1(lp->vlan1_mask);
+ bfin_write_EMAC_VLAN2(lp->vlan2_mask);
/* Initialize the TX DMA channel registers */
bfin_write_DMA2_X_COUNT(0);
@@ -1532,6 +1525,9 @@
goto out_err_mii_probe;
}
+ lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask;
+ lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask;
+
/* Fill in the fields of the device structure with ethernet values. */
ether_setup(ndev);
Modified: trunk/drivers/net/bfin_mac.h (9269 => 9270)
--- trunk/drivers/net/bfin_mac.h 2010-10-21 22:47:11 UTC (rev 9269)
+++ trunk/drivers/net/bfin_mac.h 2010-10-22 00:24:34 UTC (rev 9270)
@@ -83,6 +83,9 @@
struct timer_list tx_reclaim_timer;
struct net_device *ndev;
+ /* Data for EMAC_VLAN1 regs */
+ u16 vlan1_mask, vlan2_mask;
+
/* MII and PHY stuffs */
int old_link; /* used by bf537_adjust_link */
int old_speed;
Modified: trunk/include/linux/bfin_mac.h (9269 => 9270)
--- trunk/include/linux/bfin_mac.h 2010-10-21 22:47:11 UTC (rev 9269)
+++ trunk/include/linux/bfin_mac.h 2010-10-22 00:24:34 UTC (rev 9270)
@@ -23,6 +23,7 @@
const unsigned short *mac_peripherals;
int phy_mode;
unsigned int phy_mask;
+ unsigned short vlan1_mask, vlan2_mask;
};
#endif
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits