From owner-svn-src-all@FreeBSD.ORG Thu Jul 7 17:07:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1DA0106564A; Thu, 7 Jul 2011 17:07:12 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7FE9D8FC0C; Thu, 7 Jul 2011 17:07:12 +0000 (UTC) Received: by iwr19 with SMTP id 19so1354789iwr.13 for ; Thu, 07 Jul 2011 10:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=DykaOpABxKFWC4n42RQihUAM8d6t33fyZH3ZapQn1dI=; b=Ad9eDbj1n6P19bjUJ15Er6cl+VEX5hr/oCVGQCDBYO1v0PZzkCJ9RESPEL09vOhtGm DW8KVco3xrPKr1AI/q9SA4+7+uGIH38P7P89xbvBnp92OxOw/hMlsJMBPVtRkT/RXVbL euROiGBcM+EZ80W3TXIoZEojyfv+aVJ6ikCYg= Received: by 10.231.64.132 with SMTP id e4mr894355ibi.8.1310056708376; Thu, 07 Jul 2011 09:38:28 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id v16sm5544916ibe.51.2011.07.07.09.38.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jul 2011 09:38:27 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Thu, 07 Jul 2011 09:36:55 -0700 From: YongHyeon PYUN Date: Thu, 7 Jul 2011 09:36:55 -0700 To: Nathan Whitehorn Message-ID: <20110707163655.GA8702@michelle.cdnetworks.com> References: <201106281616.p5SGGhbx056614@svn.freebsd.org> <4E15C3FF.5030703@freebsd.org> <20110707160736.GE88226@alchemy.franken.de> <4E15DE20.2040000@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <4E15DE20.2040000@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marius Strobl Subject: Re: svn commit: r223648 - head/sys/dev/gem X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2011 17:07:13 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 07, 2011 at 11:26:08AM -0500, Nathan Whitehorn wrote: > On 07/07/11 11:07, Marius Strobl wrote: > >On Thu, Jul 07, 2011 at 09:34:39AM -0500, Nathan Whitehorn wrote: > >>This breaks one of my gem devices (chip=0x0021106b) when the controller > >>is initialized from FreeBSD (netbooting works fine, and the controller > >>stays working after that), with "cannot disable RX MAC" or "cannot > >>disable RX MAC or hash filter" messages. > >Are you positive that it's exactly this revision which breaks things? > >Actually there was a report from Justin Hibbits that r222135 causing > >a GMAC to no longer work with similar symptoms, which still is unsolved > >AFAICT. If it's really r223648 which is causing problems in your case > >please try to figure out which part is causing that as none of the > >changes exactly stands out as disruptive, probably best by reverting > >gem_reset_rx() and gem_setladrf() one by one. > > > > You're right. r223648 just added the printf(), r222135 is where it began > not working. Yes, I know that. I still have no clue and can't explain how r222135 can break gem(4). Also note, the "cannot disable RX MAC" was there before r222135. One vague guess I have at this moment is that firmware may have put controller into some deep power save state so the first time gem_init() is called it may not have fully initialized the controller. I sent a patch to Justin to check that and waiting for his reply. > -Nathan --DocE+STaALJfprDB Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="gem.apple.diff" Index: sys/dev/gem/if_gem.c =================================================================== --- sys/dev/gem/if_gem.c (revision 223682) +++ sys/dev/gem/if_gem.c (working copy) @@ -328,6 +328,9 @@ phy = MII_PHY_ANY; break; } + if (GEM_IS_APPLE(sc)) + GEM_BANK1_WRITE_4(sc, GEM_MAC_XIF_CONFIG, + GEM_MAC_XIF_TX_MII_ENA); error = mii_attach(sc->sc_dev, &sc->sc_miibus, ifp, gem_mediachange, gem_mediastatus, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, MIIF_DOPAUSE); --DocE+STaALJfprDB--