dm9000: handle initial link status
authorAndrew Ruder <andrew.ruder@elecsyscorp.com>
Wed, 4 Jun 2014 22:28:48 +0000 (17:28 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Jun 2014 22:12:11 +0000 (15:12 -0700)
On the DM9000A/DM9000B force the initial check of the link status.  The
DM9000A/B has a link status changed event and this interrupt bit isn't
always set out of reset when a cable is plugged in.  This results in the
driver not seeing the cable attached link status until the cable is
removed and plugged in again.

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/davicom/dm9000.c

index a86755f7824e6f6ed931dfc01fb90aae90993b90..48870a8b39a42bc861b15cd835d7bd95689bddb6 100644 (file)
@@ -1326,7 +1326,8 @@ dm9000_open(struct net_device *dev)
        mii_check_media(&db->mii, netif_msg_link(db), 1);
        netif_start_queue(dev);
 
-       dm9000_schedule_poll(db);
+       /* Poll initial link status */
+       schedule_delayed_work(&db->phy_poll, 1);
 
        return 0;
 }