提交 c8a8684d 编写于 作者: G Guo-Fu Tseng 提交者: David S. Miller

jme: Fix PHY power-off error

Adding phy_on in opposition to phy_off.
Signed-off-by: NGuo-Fu Tseng <cooldavid@cooldavid.org>
Cc: <stable@kernel.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7bfc4753
......@@ -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)
{
......@@ -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);
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册