Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 2014 14:38:16 +0900
From:      Yonghyeon PYUN <pyunyh@gmail.com>
To:        Alexey Dokuchaev <danfe@FreeBSD.org>
Cc:        current@freebsd.org
Subject:   Re: ale(4) cannot negotiate as GigE
Message-ID:  <20140509053816.GA1371@michelle.cdnetworks.com>
In-Reply-To: <20140508172332.GA98477@FreeBSD.org>
References:  <20130304065940.GA13417@FreeBSD.org> <20130304070632.GC1445@michelle.cdnetworks.com> <20130304081858.GA23857@FreeBSD.org> <20130305054920.GD1472@michelle.cdnetworks.com> <20130305065910.GA97021@FreeBSD.org> <20130305074315.GE1472@michelle.cdnetworks.com> <20130305080620.GA10559@FreeBSD.org> <20130305085703.GF1472@michelle.cdnetworks.com> <20130305091411.GA26471@FreeBSD.org> <20140508172332.GA98477@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--4Ckj6UjgE2iN1+kY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, May 08, 2014 at 05:23:32PM +0000, Alexey Dokuchaev wrote:
> On Tue, Mar 05, 2013 at 09:14:11AM +0000, Alexey Dokuchaev wrote:
> > On Tue, Mar 05, 2013 at 05:57:03PM +0900, YongHyeon PYUN wrote:
> > > Hmm, Does the switch support EEE feature? If yes, would you try
> > > disabling it?
> > 
> > I do not think it [1] does; plus I cannot do much about this switch, as I'm
> > pretty far away from it right now.
> > 
> > [1] http://netgear.com/home/products/switches-and-access-points/unmanaged-switches/GS608.aspx (got it about 4 years ago)
> 
> I just had a chance to plug the Ethernet cable directly into my laptop's
> bge(4) port, and it immediately negotiated at 1000baseT; but with the switch,
> it can only feel fine with 10baseT/UTP (after some 1000baseT-no carrier flip
> flopping).  So it looks like it fails to talk to the switch.  Given that this
> switch of mine in a simple (dumb) piece of equipment, any ideas how to help
> ale(4) to negotiate with it at full speed?
> 

Because there is no publicly available data sheet for Atheros F1
PHY I'm not sure what could be done in this case.  The only thing
I can think of at this moment is announcement of next page in auto
negotiation.  atphy(4) does not directly manipulate master/slave,
single port/multi port configuration and this configuration may
need next page if other link partner also announces next page
capability.
Try attached patch and let me know whether this makes any
difference for you.  You may have to cold boot the box because
stock driver used to clear next page bit in auto-negotiation.

> ./danfe

--4Ckj6UjgE2iN1+kY
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="atphy.anar.diff"

Index: sys/dev/mii/atphy.c
===================================================================
--- sys/dev/mii/atphy.c	(revision 265477)
+++ sys/dev/mii/atphy.c	(working copy)
@@ -338,7 +338,9 @@ atphy_setmedia(struct mii_softc *sc, int media)
 {
 	uint16_t anar;
 
-	anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA;
+	anar = PHY_READ(sc, MII_ANAR);
+	anar &= ANAR_NP;
+	anar |= BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA;
 	if ((IFM_SUBTYPE(media) == IFM_AUTO || (media & IFM_FDX) != 0) &&
 	    ((media & IFM_FLOW) != 0 ||
 	    (sc->mii_flags & MIIF_FORCEPAUSE) != 0))

--4Ckj6UjgE2iN1+kY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140509053816.GA1371>