From owner-freebsd-current@FreeBSD.ORG Fri May 9 05:38:16 2014 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83BBF3CF; Fri, 9 May 2014 05:38:16 +0000 (UTC) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C8D2825; Fri, 9 May 2014 05:38:16 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id ld10so3869328pab.17 for ; Thu, 08 May 2014 22:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=45dCoqrZtZ78POapLH5GAw6oR6kUR8lju1ztL1i2O24=; b=wVLYSdmN2qjaSLl8qSrjgVsPz2IAIZq+iVe9WUoNdqmWr7d+KY9BeCjGKa2uxQ6WXE U/UX8GGdQ4xXDW7x8gxs1jZiqvYtpj+zNkhCmX7RI8341R8Ut/AvPpPw2FB/rBwGWirC pGUX+HqCdlWJ9CYCwNMpPxdvVVR8XZishaPhoPJISf2PHPe+S4FpIRfCONqCzHoK+0Qv 4OMgwXnrdqFJizpY1XDlRg1a94xpymCtSsQIRD3pH7oI+AYicyWMBSMhRrQMXDY3VAnH 9j23GEmgTh/7KsMvT1i3O70V0ojgxA+CggMIViaup3FLv0yFjgV0APGgpceVjRk+JjJC l0mQ== X-Received: by 10.66.172.167 with SMTP id bd7mr10009081pac.72.1399613895919; Thu, 08 May 2014 22:38:15 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPSA id qh2sm2974343pab.13.2014.05.08.22.38.12 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 08 May 2014 22:38:14 -0700 (PDT) X-Google-Original-From: "Yonghyeon PYUN" Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 09 May 2014 14:38:16 +0900 From: Yonghyeon PYUN Date: Fri, 9 May 2014 14:38:16 +0900 To: Alexey Dokuchaev Subject: Re: ale(4) cannot negotiate as GigE Message-ID: <20140509053816.GA1371@michelle.cdnetworks.com> Reply-To: pyunyh@gmail.com 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: <20140508172332.GA98477@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 05:38:16 -0000 --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--