aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_emac
diff options
context:
space:
mode:
authorEugene Surovegin <ebs@ebshome.net>2005-12-27 15:36:41 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-09 10:34:25 -0500
commit38843888e3e9fb7006d72d55b8e6ffcc925cf18a (patch)
treecd39ae82b4672ff76521dc645ca4a21f01baf613 /drivers/net/ibm_emac
parenta4bf26f30e398afa293b85103c885f03d4660a07 (diff)
[PATCH] PPC44x EMAC driver: disable TX status deferral in half-duplex mode
Disable TX status deferral (EMACx_MR[MWSW=001]) in half-duplex mode. I have two reports when EMAC stops transmitting when connected to a hub. TX ring debug printouts show complete mess when this happens, probably hardware collision handling doesn't work quite well in this mode. This is relevant only for SoCs with EMAC4 core (440GX, 440SP, 440SPe). Tested on 440GX. Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/ibm_emac')
-rw-r--r--drivers/net/ibm_emac/ibm_emac.h3
-rw-r--r--drivers/net/ibm_emac/ibm_emac_core.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h
index 644edbff4f94..c2dae6092c4c 100644
--- a/drivers/net/ibm_emac/ibm_emac.h
+++ b/drivers/net/ibm_emac/ibm_emac.h
@@ -110,6 +110,7 @@ struct emac_regs {
110#define EMAC_MR1_TFS_2K 0x00080000 110#define EMAC_MR1_TFS_2K 0x00080000
111#define EMAC_MR1_TR0_MULT 0x00008000 111#define EMAC_MR1_TR0_MULT 0x00008000
112#define EMAC_MR1_JPSM 0x00000000 112#define EMAC_MR1_JPSM 0x00000000
113#define EMAC_MR1_MWSW_001 0x00000000
113#define EMAC_MR1_BASE(opb) (EMAC_MR1_TFS_2K | EMAC_MR1_TR0_MULT) 114#define EMAC_MR1_BASE(opb) (EMAC_MR1_TFS_2K | EMAC_MR1_TR0_MULT)
114#else 115#else
115#define EMAC_MR1_RFS_4K 0x00180000 116#define EMAC_MR1_RFS_4K 0x00180000
@@ -130,7 +131,7 @@ struct emac_regs {
130 (freq) <= 83 ? EMAC_MR1_OBCI_83 : \ 131 (freq) <= 83 ? EMAC_MR1_OBCI_83 : \
131 (freq) <= 100 ? EMAC_MR1_OBCI_100 : EMAC_MR1_OBCI_100P) 132 (freq) <= 100 ? EMAC_MR1_OBCI_100 : EMAC_MR1_OBCI_100P)
132#define EMAC_MR1_BASE(opb) (EMAC_MR1_TFS_2K | EMAC_MR1_TR | \ 133#define EMAC_MR1_BASE(opb) (EMAC_MR1_TFS_2K | EMAC_MR1_TR | \
133 EMAC_MR1_MWSW_001 | EMAC_MR1_OBCI(opb)) 134 EMAC_MR1_OBCI(opb))
134#endif 135#endif
135 136
136/* EMACx_TMR0 */ 137/* EMACx_TMR0 */
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
index 1da8a66f91e1..591c5864ffb1 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -408,7 +408,7 @@ static int emac_configure(struct ocp_enet_private *dev)
408 /* Mode register */ 408 /* Mode register */
409 r = EMAC_MR1_BASE(emac_opb_mhz()) | EMAC_MR1_VLE | EMAC_MR1_IST; 409 r = EMAC_MR1_BASE(emac_opb_mhz()) | EMAC_MR1_VLE | EMAC_MR1_IST;
410 if (dev->phy.duplex == DUPLEX_FULL) 410 if (dev->phy.duplex == DUPLEX_FULL)
411 r |= EMAC_MR1_FDE; 411 r |= EMAC_MR1_FDE | EMAC_MR1_MWSW_001;
412 dev->stop_timeout = STOP_TIMEOUT_10; 412 dev->stop_timeout = STOP_TIMEOUT_10;
413 switch (dev->phy.speed) { 413 switch (dev->phy.speed) {
414 case SPEED_1000: 414 case SPEED_1000: