Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix corrupted packet problem on 100Mb/s half dupl...
details: https://anonhg.NetBSD.org/src/rev/18914b58ae26
branches: trunk
changeset: 765218:18914b58ae26
user: jdc <jdc%NetBSD.org@localhost>
date: Sun May 22 11:19:23 2011 +0000
description:
Fix corrupted packet problem on 100Mb/s half duplex links.
We need to set "echo disable" on the internal phy too, not just on the
external phy.
Tested on:
SUNW,Sun-Blade-2000
gem0 at pci0 dev 5 function 1: Sun Microsystems ERI Ethernet (rev. 0x01)
ukphy0 at gem0 phy 1: OUI 0x0006b8, model 0x000c, rev. 1
Setting pointed out by bad@.
diffstat:
sys/dev/ic/gem.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diffs (47 lines):
diff -r 8bdbba2b141e -r 18914b58ae26 sys/dev/ic/gem.c
--- a/sys/dev/ic/gem.c Sun May 22 10:49:37 2011 +0000
+++ b/sys/dev/ic/gem.c Sun May 22 11:19:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gem.c,v 1.96 2010/11/13 13:52:01 uebayasi Exp $ */
+/* $NetBSD: gem.c,v 1.97 2011/05/22 11:19:23 jdc Exp $ */
/*
*
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.96 2010/11/13 13:52:01 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.97 2011/05/22 11:19:23 jdc Exp $");
#include "opt_inet.h"
@@ -2443,14 +2443,6 @@
sc->sc_mif_config = bus_space_read_4(t, mac, GEM_MIF_CONFIG);
if ((sc->sc_flags &(GEM_SERDES | GEM_SERIAL)) == 0) {
if ((sc->sc_mif_config & GEM_MIF_CONFIG_MDI1) != 0) {
- /* External MII needs echo disable if half duplex. */
- if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) &
- IFM_FDX) != 0)
- /* turn on full duplex LED */
- v |= GEM_MAC_XIF_FDPLX_LED;
- else
- /* half duplex -- disable echo */
- v |= GEM_MAC_XIF_ECHO_DISABL;
if (gigabit)
v |= GEM_MAC_XIF_GMII_MODE;
else
@@ -2458,6 +2450,13 @@
} else
/* Internal MII needs buf enable */
v |= GEM_MAC_XIF_MII_BUF_ENA;
+ /* MII needs echo disable if half duplex. */
+ if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) & IFM_FDX) != 0)
+ /* turn on full duplex LED */
+ v |= GEM_MAC_XIF_FDPLX_LED;
+ else
+ /* half duplex -- disable echo */
+ v |= GEM_MAC_XIF_ECHO_DISABL;
} else {
if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) & IFM_FDX) != 0)
v |= GEM_MAC_XIF_FDPLX_LED;
Home |
Main Index |
Thread Index |
Old Index