gianfar: ensure ECNTRL[R100] is cleared on link state change
authorLi Yang <leoli@freescale.com>
Tue, 6 Jan 2009 22:08:10 +0000 (14:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jan 2009 22:08:10 +0000 (14:08 -0800)
When changing the link between 100Mbps and 1Gbps in SGMII mode it was
found out that the link would stop working.  The issue is that ECNTRL[R100]
needs to be cleared when in 1Gbps mode.  Older reference manuals didn't
require the explicitly clearing but has since been found it that it is
needed.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gianfar.c

index c672ecfc95957f24cc3cb0f358bface91b0a2fbd..7fcc3af3f86bd2ad696145520b71e6d6122b1288 100644 (file)
@@ -1973,6 +1973,8 @@ static void adjust_link(struct net_device *dev)
                        case 1000:
                                tempval =
                                    ((tempval & ~(MACCFG2_IF)) | MACCFG2_GMII);
+
+                               ecntrl &= ~(ECNTRL_R100);
                                break;
                        case 100:
                        case 10: