diff options
author | Guo-Fu Tseng <cooldavid@cooldavid.org> | 2010-10-18 10:10:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 06:52:09 -0400 |
commit | 3ee94018a9f49ca98e3f77f54a769c784115dbb8 (patch) | |
tree | c7d82d31389d51ca95445f0d5206cb94354f02e4 /drivers/net/jme.c | |
parent | c8a8684d5cfb0f110a962c93586630c0bf91ebc1 (diff) |
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/jme.c')
-rw-r--r-- | drivers/net/jme.c | 9 |
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, | |||
2394 | if (ecmd->speed == SPEED_1000 && ecmd->autoneg != AUTONEG_ENABLE) | 2394 | if (ecmd->speed == SPEED_1000 && ecmd->autoneg != AUTONEG_ENABLE) |
2395 | return -EINVAL; | 2395 | return -EINVAL; |
2396 | 2396 | ||
2397 | /* | ||
2398 | * Check If user changed duplex only while force_media. | ||
2399 | * Hardware would not generate link change interrupt. | ||
2400 | */ | ||
2397 | if (jme->mii_if.force_media && | 2401 | if (jme->mii_if.force_media && |
2398 | ecmd->autoneg != AUTONEG_ENABLE && | 2402 | ecmd->autoneg != AUTONEG_ENABLE && |
2399 | (jme->mii_if.full_duplex != ecmd->duplex)) | 2403 | (jme->mii_if.full_duplex != ecmd->duplex)) |
@@ -2403,10 +2407,9 @@ jme_set_settings(struct net_device *netdev, | |||
2403 | rc = mii_ethtool_sset(&(jme->mii_if), ecmd); | 2407 | rc = mii_ethtool_sset(&(jme->mii_if), ecmd); |
2404 | spin_unlock_bh(&jme->phy_lock); | 2408 | spin_unlock_bh(&jme->phy_lock); |
2405 | 2409 | ||
2406 | if (!rc && fdc) | ||
2407 | jme_reset_link(jme); | ||
2408 | |||
2409 | if (!rc) { | 2410 | if (!rc) { |
2411 | if (fdc) | ||
2412 | jme_reset_link(jme); | ||
2410 | set_bit(JME_FLAG_SSET, &jme->flags); | 2413 | set_bit(JME_FLAG_SSET, &jme->flags); |
2411 | jme->old_ecmd = *ecmd; | 2414 | jme->old_ecmd = *ecmd; |
2412 | } | 2415 | } |