aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpsw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.c')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7e93df6585e7..df32a090d08e 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -731,7 +731,7 @@ static inline void cpsw_add_default_vlan(struct cpsw_priv *priv)
731 731
732 writel(vlan, &priv->host_port_regs->port_vlan); 732 writel(vlan, &priv->host_port_regs->port_vlan);
733 733
734 for (i = 0; i < 2; i++) 734 for (i = 0; i < priv->data.slaves; i++)
735 slave_write(priv->slaves + i, vlan, reg); 735 slave_write(priv->slaves + i, vlan, reg);
736 736
737 cpsw_ale_add_vlan(priv->ale, vlan, ALE_ALL_PORTS << port, 737 cpsw_ale_add_vlan(priv->ale, vlan, ALE_ALL_PORTS << port,
@@ -905,7 +905,7 @@ static netdev_tx_t cpsw_ndo_start_xmit(struct sk_buff *skb,
905 /* If there is no more tx desc left free then we need to 905 /* If there is no more tx desc left free then we need to
906 * tell the kernel to stop sending us tx frames. 906 * tell the kernel to stop sending us tx frames.
907 */ 907 */
908 if (unlikely(cpdma_check_free_tx_desc(priv->txch))) 908 if (unlikely(!cpdma_check_free_tx_desc(priv->txch)))
909 netif_stop_queue(ndev); 909 netif_stop_queue(ndev);
910 910
911 return NETDEV_TX_OK; 911 return NETDEV_TX_OK;
@@ -1364,7 +1364,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
1364 struct platform_device *mdio; 1364 struct platform_device *mdio;
1365 1365
1366 parp = of_get_property(slave_node, "phy_id", &lenp); 1366 parp = of_get_property(slave_node, "phy_id", &lenp);
1367 if ((parp == NULL) && (lenp != (sizeof(void *) * 2))) { 1367 if ((parp == NULL) || (lenp != (sizeof(void *) * 2))) {
1368 pr_err("Missing slave[%d] phy_id property\n", i); 1368 pr_err("Missing slave[%d] phy_id property\n", i);
1369 ret = -EINVAL; 1369 ret = -EINVAL;
1370 goto error_ret; 1370 goto error_ret;