summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorCodrin Ciubotariu <codrin.ciubotariu@nxp.com>2016-03-14 13:46:52 +0200
committerYork Sun <york.sun@nxp.com>2016-04-06 08:34:18 -0700
commit02c00f265da0d85e81fb74f6aabfc4295d49ff56 (patch)
treea79770f8798fe7cda05ad13f549ac9437c1a5c90 /drivers
parent5330c7d707f1117a95985ff6e770eb146703706a (diff)
downloadtalos-obmc-uboot-02c00f265da0d85e81fb74f6aabfc4295d49ff56.tar.gz
talos-obmc-uboot-02c00f265da0d85e81fb74f6aabfc4295d49ff56.zip
drivers: net: vsc9953: Do not configure disabled ports
Some SerDes protocols might not enable all l2switch ports. In this case, these ports should not be configured to perform Rx/Tx operations. This also fixes an issue when flooded frames were also switched to disabled ports and frames start to accumulate, consuming memory and eventually causing head-of-line blocking for other frames. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/vsc9953.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/vsc9953.c b/drivers/net/vsc9953.c
index 44afe14051..4b3b811967 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -2525,6 +2525,9 @@ void vsc9953_init(bd_t *bis)
if (vsc9953_port_init(i))
printf("Failed to initialize l2switch port %d\n", i);
+ if (!vsc9953_l2sw.port[i].enabled)
+ continue;
+
/* Enable VSC9953 GMII Ports Port ID 0 - 7 */
if (VSC9953_INTERNAL_PORT_CHECK(i)) {
out_le32(&l2ana_reg->pfc[i].pfc_cfg,
@@ -2537,6 +2540,11 @@ void vsc9953_init(bd_t *bis)
out_le32(&l2sys_reg->pause_cfg.mac_fc_cfg[i],
VSC9953_MAC_FC_CFG);
}
+
+ l2dev_gmii_reg = (struct vsc9953_dev_gmii *)
+ (VSC9953_OFFSET + VSC9953_DEV_GMII_OFFSET +
+ T1040_SWITCH_GMII_DEV_OFFSET * i);
+
out_le32(&l2dev_gmii_reg->port_mode.clock_cfg,
VSC9953_CLOCK_CFG);
out_le32(&l2dev_gmii_reg->mac_cfg_status.mac_ena_cfg,
@@ -2559,10 +2567,6 @@ void vsc9953_init(bd_t *bis)
/* WAIT FOR 2 us*/
udelay(2);
- l2dev_gmii_reg = (struct vsc9953_dev_gmii *)(
- (char *)l2dev_gmii_reg
- + T1040_SWITCH_GMII_DEV_OFFSET);
-
/* Initialize Lynx PHY Wrappers */
phy_addr = 0;
if (vsc9953_l2sw.port[i].enet_if ==
OpenPOWER on IntegriCloud