Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215419
b: refs/heads/master
c: c8a8684
h: refs/heads/master
i:
  215417: 64469ac
  215415: 769ec19
v: v3
  • Loading branch information
Guo-Fu Tseng authored and David S. Miller committed Oct 21, 2010
1 parent 73e1a18 commit b6880fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 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: 7bfc47532301a84c575cfc20b4531f5de5c326bc
refs/heads/master: c8a8684d5cfb0f110a962c93586630c0bf91ebc1
22 changes: 18 additions & 4 deletions trunk/drivers/net/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,16 @@ jme_free_irq(struct jme_adapter *jme)
}
}

static inline void
jme_phy_on(struct jme_adapter *jme)
{
u32 bmcr;

bmcr = jme_mdio_read(jme->dev, jme->mii_if.phy_id, MII_BMCR);
bmcr &= ~BMCR_PDOWN;
jme_mdio_write(jme->dev, jme->mii_if.phy_id, MII_BMCR, bmcr);
}

static int
jme_open(struct net_device *netdev)
{
Expand All @@ -1594,10 +1604,12 @@ jme_open(struct net_device *netdev)

jme_start_irq(jme);

if (test_bit(JME_FLAG_SSET, &jme->flags))
if (test_bit(JME_FLAG_SSET, &jme->flags)) {
jme_phy_on(jme);
jme_set_settings(netdev, &jme->old_ecmd);
else
} else {
jme_reset_phy_processor(jme);
}

jme_reset_link(jme);

Expand Down Expand Up @@ -3005,10 +3017,12 @@ jme_resume(struct pci_dev *pdev)
jme_clear_pm(jme);
pci_restore_state(pdev);

if (test_bit(JME_FLAG_SSET, &jme->flags))
if (test_bit(JME_FLAG_SSET, &jme->flags)) {
jme_phy_on(jme);
jme_set_settings(netdev, &jme->old_ecmd);
else
} else {
jme_reset_phy_processor(jme);
}

jme_start_irq(jme);
netif_device_attach(netdev);
Expand Down

0 comments on commit b6880fa

Please sign in to comment.