diff options
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.c')
| -rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 9f3d9c67e3fe..fa674a8bda0c 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
| @@ -1267,6 +1267,7 @@ static void soft_reset_slave(struct cpsw_slave *slave) | |||
| 1267 | static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv) | 1267 | static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv) |
| 1268 | { | 1268 | { |
| 1269 | u32 slave_port; | 1269 | u32 slave_port; |
| 1270 | struct phy_device *phy; | ||
| 1270 | struct cpsw_common *cpsw = priv->cpsw; | 1271 | struct cpsw_common *cpsw = priv->cpsw; |
| 1271 | 1272 | ||
| 1272 | soft_reset_slave(slave); | 1273 | soft_reset_slave(slave); |
| @@ -1300,27 +1301,28 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv) | |||
| 1300 | 1 << slave_port, 0, 0, ALE_MCAST_FWD_2); | 1301 | 1 << slave_port, 0, 0, ALE_MCAST_FWD_2); |
| 1301 | 1302 | ||
| 1302 | if (slave->data->phy_node) { | 1303 | if (slave->data->phy_node) { |
| 1303 | slave->phy = of_phy_connect(priv->ndev, slave->data->phy_node, | 1304 | phy = of_phy_connect(priv->ndev, slave->data->phy_node, |
| 1304 | &cpsw_adjust_link, 0, slave->data->phy_if); | 1305 | &cpsw_adjust_link, 0, slave->data->phy_if); |
| 1305 | if (!slave->phy) { | 1306 | if (!phy) { |
| 1306 | dev_err(priv->dev, "phy \"%s\" not found on slave %d\n", | 1307 | dev_err(priv->dev, "phy \"%s\" not found on slave %d\n", |
| 1307 | slave->data->phy_node->full_name, | 1308 | slave->data->phy_node->full_name, |
| 1308 | slave->slave_num); | 1309 | slave->slave_num); |
| 1309 | return; | 1310 | return; |
| 1310 | } | 1311 | } |
| 1311 | } else { | 1312 | } else { |
| 1312 | slave->phy = phy_connect(priv->ndev, slave->data->phy_id, | 1313 | phy = phy_connect(priv->ndev, slave->data->phy_id, |
| 1313 | &cpsw_adjust_link, slave->data->phy_if); | 1314 | &cpsw_adjust_link, slave->data->phy_if); |
| 1314 | if (IS_ERR(slave->phy)) { | 1315 | if (IS_ERR(phy)) { |
| 1315 | dev_err(priv->dev, | 1316 | dev_err(priv->dev, |
| 1316 | "phy \"%s\" not found on slave %d, err %ld\n", | 1317 | "phy \"%s\" not found on slave %d, err %ld\n", |
| 1317 | slave->data->phy_id, slave->slave_num, | 1318 | slave->data->phy_id, slave->slave_num, |
| 1318 | PTR_ERR(slave->phy)); | 1319 | PTR_ERR(phy)); |
| 1319 | slave->phy = NULL; | ||
| 1320 | return; | 1320 | return; |
| 1321 | } | 1321 | } |
| 1322 | } | 1322 | } |
| 1323 | 1323 | ||
| 1324 | slave->phy = phy; | ||
| 1325 | |||
| 1324 | phy_attached_info(slave->phy); | 1326 | phy_attached_info(slave->phy); |
| 1325 | 1327 | ||
| 1326 | phy_start(slave->phy); | 1328 | phy_start(slave->phy); |
| @@ -1817,6 +1819,8 @@ static void cpsw_ndo_tx_timeout(struct net_device *ndev) | |||
| 1817 | } | 1819 | } |
| 1818 | 1820 | ||
| 1819 | cpsw_intr_enable(cpsw); | 1821 | cpsw_intr_enable(cpsw); |
| 1822 | netif_trans_update(ndev); | ||
| 1823 | netif_tx_wake_all_queues(ndev); | ||
| 1820 | } | 1824 | } |
| 1821 | 1825 | ||
| 1822 | static int cpsw_ndo_set_mac_address(struct net_device *ndev, void *p) | 1826 | static int cpsw_ndo_set_mac_address(struct net_device *ndev, void *p) |
