From owner-freebsd-current@FreeBSD.ORG Thu Oct 4 01:40:04 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E88B216A419 for ; Thu, 4 Oct 2007 01:40:03 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by mx1.freebsd.org (Postfix) with ESMTP id 93CE313C459 for ; Thu, 4 Oct 2007 01:40:03 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so14560waf for ; Wed, 03 Oct 2007 18:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:subject:message-id:reply-to:mime-version:content-type:content-disposition:user-agent; bh=wCzd9wCIjVPy4qKN7B/jRc9ickETfHNuJQEGduzZyVQ=; b=t8HFOMBMM3wEmYqEgbgR6JOrKusdO69PZaq/B8EkOHoVY5odEa7d5y9vhD9icxrUw1Ibamb7n8EdJ90D+JZ2NSud+OOos+/ytU8BuHvgyHchVnoNwXftZGDBrLOANBx2xT3c/eZb/2uAKHcdGQoBA4H3SoyX+BChQjz+pb8nt5s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:reply-to:mime-version:content-type:content-disposition:user-agent; b=obK7fayd9hr01vh27eg80Q/cqACUpP6jz8YWYPQSADRcIMw/mAqJSqHJg/8DvvdvSzJmyWYI6SUdv/pX5Npzg6aBqfQUVhXYNf9Gl9Kj9g6yy1RM/BXB1KpCgkx0lSXHMaDKVxrksG+ToS4mXo981SBW+yJdZc/LSFqNaxogdQU= Received: by 10.114.154.1 with SMTP id b1mr2904390wae.1191462003376; Wed, 03 Oct 2007 18:40:03 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id m10sm2370696waf.2007.10.03.18.40.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Oct 2007 18:40:02 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id l941aN5x031423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 4 Oct 2007 10:36:23 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id l941aMWb031422 for freebsd-current@FreeBSD.org; Thu, 4 Oct 2007 10:36:22 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Thu, 4 Oct 2007 10:36:22 +0900 From: Pyun YongHyeon To: freebsd-current@FreeBSD.org Message-ID: <20071004013622.GD30781@cdnetworks.co.kr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Subject: CFT: msk(4)/nfe(4) with 88E1116 PHY X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2007 01:40:04 -0000 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, There had been several complaints that nfe(4) with 88E1116 PHY doesn't work. The attached patch may fix it by taking the PHY out of powerdown mode. Because I know that some revisions works well without any patch I'd like to know whether attached patch have any effects for those hardwares that had been working correctly. I think both msk(4) and nfe(4) would be affacted by the patch so if you're using one of these hardwares please give it spin and let me know the result. Thanks. -- Regards, Pyun YongHyeon --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="e1000phy.88e1116.patch" Index: e1000phy.c =================================================================== RCS file: /home/ncvs/src/sys/dev/mii/e1000phy.c,v retrieving revision 1.18 diff -u -r1.18 e1000phy.c --- e1000phy.c 11 Dec 2006 11:09:48 -0000 1.18 +++ e1000phy.c 4 Oct 2007 01:35:56 -0000 @@ -235,6 +235,8 @@ /* Disable energy detect mode. */ reg &= ~E1000_SCR_EN_DETECT_MASK; reg |= E1000_SCR_AUTO_X_MODE; + if (esc->mii_model == MII_MODEL_MARVELL_E1116) + reg &= ~E1000_SCR_POWER_DOWN; break; case MII_MODEL_MARVELL_E3082: reg |= (E1000_SCR_AUTO_X_MODE >> 1); @@ -248,6 +250,14 @@ /* Auto correction for reversed cable polarity. */ reg &= ~E1000_SCR_POLARITY_REVERSAL; PHY_WRITE(sc, E1000_SCR, reg); + + if (esc->mii_model == MII_MODEL_MARVELL_E1116) { + PHY_WRITE(sc, E1000_EADR, 2); + reg = PHY_READ(sc, E1000_SCR); + reg |= E1000_SCR_RGMII_POWER_UP; + PHY_WRITE(sc, E1000_SCR, reg); + PHY_WRITE(sc, E1000_EADR, 0); + } } switch (MII_MODEL(esc->mii_model)) { Index: e1000phyreg.h =================================================================== RCS file: /home/ncvs/src/sys/dev/mii/e1000phyreg.h,v retrieving revision 1.4 diff -u -r1.4 e1000phyreg.h --- e1000phyreg.h 11 Dec 2006 10:43:32 -0000 1.4 +++ e1000phyreg.h 4 Oct 2007 01:35:56 -0000 @@ -244,6 +244,11 @@ #define E1000_SCR_MODE_COPPER 0x0280 #define E1000_SCR_MODE_1000BX 0x0380 +/* 88E1116 page 0 */ +#define E1000_SCR_POWER_DOWN 0x0004 +/* 88E1116 page 2 */ +#define E1000_SCR_RGMII_POWER_UP 0x0008 + #define E1000_SSR 0x11 /* special status register */ #define E1000_SSR_JABBER 0x0001 #define E1000_SSR_REV_POLARITY 0x0002 --bp/iNruPH9dso1Pn--