aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/jme.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/jme.c')
-rw-r--r--drivers/net/jme.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 99f24f5cac53..f0643ac4aff1 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -1575,6 +1575,16 @@ jme_free_irq(struct jme_adapter *jme)
1575 } 1575 }
1576} 1576}
1577 1577
1578static inline void
1579jme_phy_on(struct jme_adapter *jme)
1580{
1581 u32 bmcr;
1582
1583 bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR);
1584 bmcr &= ~BMCR_PDOWN;
1585 jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_BMCR, bmcr);
1586}
1587
1578static int 1588static int
1579jme_open(struct net_device *netdev) 1589jme_open(struct net_device *netdev)
1580{ 1590{
@@ -1595,10 +1605,12 @@ jme_open(struct net_device *netdev)
1595 1605
1596 jme_start_irq(jme); 1606 jme_start_irq(jme);
1597 1607
1598 if (test_bit(JME_FLAG_SSET, &jme->flags)) 1608 if (test_bit(JME_FLAG_SSET, &jme->flags)) {
1609 jme_phy_on(jme);
1599 jme_set_settings(netdev, &jme->old_ecmd); 1610 jme_set_settings(netdev, &jme->old_ecmd);
1600 else 1611 } else {
1601 jme_reset_phy_processor(jme); 1612 jme_reset_phy_processor(jme);
1613 }
1602 1614
1603 jme_reset_link(jme); 1615 jme_reset_link(jme);
1604 1616
@@ -3006,10 +3018,12 @@ jme_resume(struct pci_dev *pdev)
3006 jme_clear_pm(jme); 3018 jme_clear_pm(jme);
3007 pci_restore_state(pdev); 3019 pci_restore_state(pdev);
3008 3020
3009 if (test_bit(JME_FLAG_SSET, &jme->flags)) 3021 if (test_bit(JME_FLAG_SSET, &jme->flags)) {
3022 jme_phy_on(jme);
3010 jme_set_settings(netdev, &jme->old_ecmd); 3023 jme_set_settings(netdev, &jme->old_ecmd);
3011 else 3024 } else {
3012 jme_reset_phy_processor(jme); 3025 jme_reset_phy_processor(jme);
3026 }
3013 3027
3014 jme_start_irq(jme); 3028 jme_start_irq(jme);
3015 netif_device_attach(netdev); 3029 netif_device_attach(netdev);