diff options
author | Praneeth Bajjuri <praneeth@ti.com> | 2015-02-03 15:45:57 -0600 |
---|---|---|
committer | Praneeth Bajjuri <praneeth@ti.com> | 2015-02-03 15:45:57 -0600 |
commit | 95b851016f79c42a9e8a824c7c81e49015c17820 (patch) | |
tree | 61e096ff6a654315c40a00eaff682be00c50f861 /drivers/net/ethernet/ti | |
parent | c73470c1da26dc543452fbff16a02beb62fec938 (diff) | |
parent | 94953719b7d459c72eede4a0164d49dfcfc76a94 (diff) |
Merge branch 'p-ti-linux-3.14.y-android' of git://git.omapzoom.org/kernel/omap into p-ti-linux-3.14.y-android
* 'p-ti-linux-3.14.y-android' of git://git.omapzoom.org/kernel/omap: (216 commits)
usb: dwc3: debugfs: dual role switch through debugfs entries
ARM: DRA7: dts: Add coprocessor nodes for iva
remoteproc/pruss: fix shutdown for manually booted PRU cores
remoteproc/pruss: fix the cleanup path in pru_rproc_probe()
UAPI: Increasing the max FRAME number to 128.
gpio: mcp23s08: Set initial direction and value from DT
firmware: Load VPDMA firmware from kernel
iommu/omap: Fix a sleeping function invocation in atomic context bug
media: ti-vpe: vpe: Add RGB565 and RGB5551 support
media: ti-vpe: vpe: Post next descriptor only for list complete IRQ
media: ti-vpe: vpe: Setup srcdst parameters in streamON
omapdrm: Expose the OMAP pre-multiplied alpha property through DRM
omapdrm: Expose the OMAP global alpha property through DRM
ti_fragments: audio_display: enable BACKLIGHT_GPIO and PANEL_DPI
ti_fragments: audio_display: clean up
arm/dts: am57xx-evm: Add LCD support
backlight: gpio-backlight: Add DT support
arm/dts: dra7xx: fix display compatible strings
OMAPDSS: add missing 'omapdss' prefixes to display drivers
OMAPDSS: add dra7-dss to dt conversion list
...
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_ale.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_ale.h | 2 |
3 files changed, 22 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 06c75bd2042..8704954b98b 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -613,7 +613,7 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) /* Clear all mcast from ALE */ cpsw_ale_flush_multicast(ale, ALE_ALL_PORTS << - priv->host_port); + priv->host_port, -1); /* Flood All Unicast Packets to Host port */ cpsw_ale_control_set(ale, 0, ALE_P0_UNI_FLOOD, 1); @@ -637,6 +637,12 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) static void cpsw_ndo_set_rx_mode(struct net_device *ndev) { struct cpsw_priv *priv = netdev_priv(ndev); + int vid; + + if (priv->data.dual_emac) + vid = priv->slaves[priv->emac_port].port_vlan; + else + vid = priv->data.default_vlan; if (ndev->flags & IFF_PROMISC) { /* Enable promiscuous mode */ @@ -652,7 +658,8 @@ static void cpsw_ndo_set_rx_mode(struct net_device *ndev) cpsw_ale_set_allmulti(priv->ale, priv->ndev->flags & IFF_ALLMULTI); /* Clear all mcast from ALE */ - cpsw_ale_flush_multicast(priv->ale, ALE_ALL_PORTS << priv->host_port); + cpsw_ale_flush_multicast(priv->ale, ALE_ALL_PORTS << priv->host_port, + vid); if (!netdev_mc_empty(ndev)) { struct netdev_hw_addr *ha; @@ -828,7 +835,9 @@ static int cpsw_poll(struct napi_struct *napi, int budget) struct cpsw_priv *prim_cpsw; napi_complete(napi); - __raw_writel(0xFF, &priv->wr_regs->rx_en); + + cpsw_intr_enable(priv); + prim_cpsw = cpsw_get_slave_priv(priv, 0); if (!prim_cpsw->irq_enabled) { prim_cpsw->irq_enabled = true; diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 097ebe7077a..5246b3a18ff 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c @@ -234,7 +234,7 @@ static void cpsw_ale_flush_mcast(struct cpsw_ale *ale, u32 *ale_entry, cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_FREE); } -int cpsw_ale_flush_multicast(struct cpsw_ale *ale, int port_mask) +int cpsw_ale_flush_multicast(struct cpsw_ale *ale, int port_mask, int vid) { u32 ale_entry[ALE_ENTRY_WORDS]; int ret, idx; @@ -245,6 +245,14 @@ int cpsw_ale_flush_multicast(struct cpsw_ale *ale, int port_mask) if (ret != ALE_TYPE_ADDR && ret != ALE_TYPE_VLAN_ADDR) continue; + /* if vid passed is -1 then remove all multicast entry from + * the table irrespective of vlan id, if a valid vlan id is + * passed then remove only multicast added to that vlan id. + * if vlan id doesn't match then move on to next entry. + */ + if (vid != -1 && cpsw_ale_get_vlan_id(ale_entry) != vid) + continue; + if (cpsw_ale_get_mcast(ale_entry)) { u8 addr[6]; diff --git a/drivers/net/ethernet/ti/cpsw_ale.h b/drivers/net/ethernet/ti/cpsw_ale.h index c0d4127aa54..af1e7ecd87c 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.h +++ b/drivers/net/ethernet/ti/cpsw_ale.h @@ -92,7 +92,7 @@ void cpsw_ale_stop(struct cpsw_ale *ale); int cpsw_ale_set_ageout(struct cpsw_ale *ale, int ageout); int cpsw_ale_flush(struct cpsw_ale *ale, int port_mask); -int cpsw_ale_flush_multicast(struct cpsw_ale *ale, int port_mask); +int cpsw_ale_flush_multicast(struct cpsw_ale *ale, int port_mask, int vid); int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port, int flags, u16 vid); int cpsw_ale_del_ucast(struct cpsw_ale *ale, u8 *addr, int port, |