Date: Thu, 7 Jul 2011 09:36:55 -0700 From: YongHyeon PYUN <pyunyh@gmail.com> To: Nathan Whitehorn <nwhitehorn@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marius Strobl <marius@alchemy.franken.de> Subject: Re: svn commit: r223648 - head/sys/dev/gem Message-ID: <20110707163655.GA8702@michelle.cdnetworks.com> In-Reply-To: <4E15DE20.2040000@freebsd.org> References: <201106281616.p5SGGhbx056614@svn.freebsd.org> <4E15C3FF.5030703@freebsd.org> <20110707160736.GE88226@alchemy.franken.de> <4E15DE20.2040000@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110707163655.GA8702>