From: Guo-Fu Tseng Date: Sun, 13 Feb 2011 18:27:38 +0000 (+0000) Subject: jme: Fix hardware action of full-duplex X-Git-Tag: MMI-PSA29.97-13-9~20520^2~360 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3903c023570446303a10f152cfc120dcbf9a4ccf;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git jme: Fix hardware action of full-duplex Clear Transmit Timer/Retry setting while full-duplex. Signed-off-by: Guo-Fu Tseng Signed-off-by: David S. Miller --- diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 490bc0feff3d..6996d04e1de4 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c @@ -439,16 +439,14 @@ jme_check_link(struct net_device *netdev, int testonly) if (phylink & PHY_LINK_DUPLEX) { jwrite32(jme, JME_TXMCS, TXMCS_DEFAULT); + jwrite32(jme, JME_TXTRHD, TXTRHD_FULLDUPLEX); ghc |= GHC_DPX; } else { jwrite32(jme, JME_TXMCS, TXMCS_DEFAULT | TXMCS_BACKOFF | TXMCS_CARRIERSENSE | TXMCS_COLLISION); - jwrite32(jme, JME_TXTRHD, TXTRHD_TXPEN | - ((0x2000 << TXTRHD_TXP_SHIFT) & TXTRHD_TXP) | - TXTRHD_TXREN | - ((8 << TXTRHD_TXRL_SHIFT) & TXTRHD_TXRL)); + jwrite32(jme, JME_TXTRHD, TXTRHD_HALFDUPLEX); } gpreg1 = GPREG1_DEFAULT; diff --git a/drivers/net/jme.h b/drivers/net/jme.h index dc4af5753a9e..b33bc5b0bb4e 100644 --- a/drivers/net/jme.h +++ b/drivers/net/jme.h @@ -658,6 +658,14 @@ enum jme_txtrhd_shifts { TXTRHD_TXRL_SHIFT = 0, }; +enum jme_txtrhd_values { + TXTRHD_FULLDUPLEX = 0x00000000, + TXTRHD_HALFDUPLEX = TXTRHD_TXPEN | + ((0x2000 << TXTRHD_TXP_SHIFT) & TXTRHD_TXP) | + TXTRHD_TXREN | + ((8 << TXTRHD_TXRL_SHIFT) & TXTRHD_TXRL), +}; + /* * RX Control/Status Bits */