Skip to content

Commit

Permalink
jme: Add comment in jme_set_settings
Browse files Browse the repository at this point in the history
Explains what `fdc` variable is for.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Guo-Fu Tseng authored and David S. Miller committed Oct 21, 2010
1 parent c8a8684 commit 3ee9401
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/net/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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;
}
Expand Down

0 comments on commit 3ee9401

Please sign in to comment.