summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorGuo-Fu Tseng <cooldavid@cooldavid.org>2010-10-18 16:10:41 +0200
committerDavid S. Miller <davem@davemloft.net>2010-10-21 12:52:09 +0200
commit3ee94018a9f49ca98e3f77f54a769c784115dbb8 (patch)
treec7d82d31389d51ca95445f0d5206cb94354f02e4 /drivers/net
parentjme: Fix PHY power-off error (diff)
downloadlinux-3ee94018a9f49ca98e3f77f54a769c784115dbb8.tar.xz
linux-3ee94018a9f49ca98e3f77f54a769c784115dbb8.zip
jme: Add comment in jme_set_settings
Explains what `fdc` variable is for. Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/jme.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index e04f180965ae..0ea0da32d7d8 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -2394,6 +2394,10 @@ jme_set_settings(struct net_device *netdev,
if (ecmd->speed == SPEED_1000 && ecmd->autoneg != AUTONEG_ENABLE)
return -EINVAL;
+ /*
+ * Check If user changed duplex only while force_media.
+ * Hardware would not generate link change interrupt.
+ */
if (jme->mii_if.force_media &&
ecmd->autoneg != AUTONEG_ENABLE &&
(jme->mii_if.full_duplex != ecmd->duplex))
@@ -2403,10 +2407,9 @@ jme_set_settings(struct net_device *netdev,
rc = mii_ethtool_sset(&(jme->mii_if), ecmd);
spin_unlock_bh(&jme->phy_lock);
- if (!rc && fdc)
- jme_reset_link(jme);
-
if (!rc) {
+ if (fdc)
+ jme_reset_link(jme);
set_bit(JME_FLAG_SSET, &jme->flags);
jme->old_ecmd = *ecmd;
}