Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315044
b: refs/heads/master
c: 03fc472
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Ferre authored and David S. Miller committed Jul 9, 2012
1 parent ac0ac35 commit b0cd4e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed1062772531b6e1029fa4ca62dc8d61f6d53d1c
refs/heads/master: 03fc4721cd96753696a988a2ba563f9f08ad4e9f
13 changes: 11 additions & 2 deletions trunk/drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,16 @@ static void macb_handle_link_change(struct net_device *dev)
spin_unlock_irqrestore(&bp->lock, flags);

if (status_change) {
if (phydev->link)
if (phydev->link) {
netif_carrier_on(dev);
netdev_info(dev, "link up (%d/%s)\n",
phydev->speed,
phydev->duplex == DUPLEX_FULL ?
"Full" : "Half");
else
} else {
netif_carrier_off(dev);
netdev_info(dev, "link down\n");
}
}
}

Expand Down Expand Up @@ -1033,6 +1036,9 @@ static int macb_open(struct net_device *dev)

netdev_dbg(bp->dev, "open\n");

/* carrier starts down */
netif_carrier_off(dev);

/* if the phy is not yet register, retry later*/
if (!bp->phy_dev)
return -EAGAIN;
Expand Down Expand Up @@ -1406,6 +1412,8 @@ static int __init macb_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, dev);

netif_carrier_off(dev);

netdev_info(dev, "Cadence %s at 0x%08lx irq %d (%pM)\n",
macb_is_gem(bp) ? "GEM" : "MACB", dev->base_addr,
dev->irq, dev->dev_addr);
Expand Down Expand Up @@ -1469,6 +1477,7 @@ static int macb_suspend(struct platform_device *pdev, pm_message_t state)
struct net_device *netdev = platform_get_drvdata(pdev);
struct macb *bp = netdev_priv(netdev);

netif_carrier_off(netdev);
netif_device_detach(netdev);

clk_disable(bp->hclk);
Expand Down

0 comments on commit b0cd4e1

Please sign in to comment.