Commit fe957c40 authored by Sascha Hauer's avatar Sascha Hauer Committed by David S. Miller

fec: call fec_restart() in fec_open()

We called fec_stop() in fec_enet_close(), thus we have to call
fec_restart() in fec_enet_open().
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0b3fbea
...@@ -1489,6 +1489,8 @@ fec_enet_open(struct net_device *dev) ...@@ -1489,6 +1489,8 @@ fec_enet_open(struct net_device *dev)
fep->sequence_done = 0; fep->sequence_done = 0;
fep->link = 0; fep->link = 0;
fec_restart(dev, 1);
if (fep->phy) { if (fep->phy) {
mii_do_cmd(dev, fep->phy->ack_int); mii_do_cmd(dev, fep->phy->ack_int);
mii_do_cmd(dev, fep->phy->config); mii_do_cmd(dev, fep->phy->config);
...@@ -1505,18 +1507,14 @@ fec_enet_open(struct net_device *dev) ...@@ -1505,18 +1507,14 @@ fec_enet_open(struct net_device *dev)
schedule(); schedule();
mii_do_cmd(dev, fep->phy->startup); mii_do_cmd(dev, fep->phy->startup);
/* Set the initial link state to true. A lot of hardware
* based on this device does not implement a PHY interrupt,
* so we are never notified of link change.
*/
fep->link = 1;
} else {
fep->link = 1; /* lets just try it and see */
/* no phy, go full duplex, it's most likely a hub chip */
fec_restart(dev, 1);
} }
/* Set the initial link state to true. A lot of hardware
* based on this device does not implement a PHY interrupt,
* so we are never notified of link change.
*/
fep->link = 1;
netif_start_queue(dev); netif_start_queue(dev);
fep->opened = 1; fep->opened = 1;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment