summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-04-15 01:32:25 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-16 02:34:54 -0700
commitfe957c40ec5e2763b9977c565beab3bde3aaf85b (patch)
tree07e10dff2cdaa3a9414fa19864f181eb65082942 /drivers
parentf0b3fbeae11a526c3d308b691684589ee37c359b (diff)
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: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/fec.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 54d6f86d9f6d..63eaf5de2300 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1489,6 +1489,8 @@ fec_enet_open(struct net_device *dev)
fep->sequence_done = 0;
fep->link = 0;
+ fec_restart(dev, 1);
+
if (fep->phy) {
mii_do_cmd(dev, fep->phy->ack_int);
mii_do_cmd(dev, fep->phy->config);
@@ -1505,18 +1507,14 @@ fec_enet_open(struct net_device *dev)
schedule();
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);
fep->opened = 1;
return 0;