From owner-freebsd-arm@FreeBSD.ORG Mon Apr 18 13:25:19 2011 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B31B1065680 for ; Mon, 18 Apr 2011 13:25:19 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from brigitte.telenet-ops.be (brigitte.telenet-ops.be [195.130.137.66]) by mx1.freebsd.org (Postfix) with ESMTP id 857528FC17 for ; Mon, 18 Apr 2011 13:25:18 +0000 (UTC) Received: from triton.sigsegv.be ([94.225.212.114]) by brigitte.telenet-ops.be with bizsmtp id Z1RG1g00F2UfDsW0G1RGDQ; Mon, 18 Apr 2011 15:25:17 +0200 Received: from nereid (nereid.neptune.sigsegv.be [IPv6:2001:470:c8f4:0:200:ff:fe00:8]) by triton.sigsegv.be (Postfix) with SMTP id 68F291C1B2; Mon, 18 Apr 2011 15:25:15 +0200 (CEST) Received: by nereid (sSMTP sendmail emulation); Mon, 18 Apr 2011 15:25:15 +0200 Date: Mon, 18 Apr 2011 15:25:13 +0200 From: Kristof Provost To: Nigel Roberts Message-ID: <20110418132513.GD12608@nereid> References: <20110322154505.GH1351@nereid> <20110418114015.GA4277@snippy.nobiscuit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110418114015.GA4277@snippy.nobiscuit.com> X-PGP-Fingerprint: E114 D9EA 909E D469 8F57 17A5 7D15 91C6 9EFA F286 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-arm@freebsd.org Subject: Re: Iomega iConnect and FreeBSD (kirkwood) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 13:25:19 -0000 On 2011-04-18 11:40:15 (+0000), Nigel Roberts wrote: > On Tue, 22 Mar 2011 at 16:45:05 +0100, Kristof Provost wrote: > > > I'm not familiar with that platform, but I remember seeing a very > > similar error when I was playing with an Orion based board. > > The driver should be the same (mge). > > The panic occurs because the cleanup code is incorrect. This problem is > > fixed in current I think. > > > > In this case you probably don't need to worry about the cleanup code > > though. It's only triggered when the PHY is not found. > > If you can fix the PHY detection you won't run into the panic any more. > > In 8.2 mge assumes a static mapping between interface number and PHY > > address (i.e. PHY address = interface number (0 here) + 8). > > You can overrule the offset by defining MII_ADDRESS_BASE. > > Of course, you'll need to know the correct offset first. > > I'm also trying to get FreeBSD working on an Iomega device (an IX2-200) > and the issue is not that the address for the PHY is wrong, it's that the > first mge MAC doesn't actually have a PHY attached. Only the second MAC > has a PHY (I've checked on the PCB and have pics for the curious). In > Linux, only eth1 is usable, although eth0 is detected. Okay, That's going to trigger the same issue. > I'd really like to get this working in FreeBSD-STABLE. Can someone please > point me to where the cleanup code has been fixed in CURRENT so that I can > have a go at figuring out a patch? I also had a go at getting > FreeBSD-CURRENT working, but it wouldn't even get to the copyright > message on boot. I'm wondering if I got the fdt config wrong, so I am > going to check on that. Take a look at r201198. It ensures that the interrupt handlers are not cleaned up if they haven't been registered in the first place. That should prevent the driver from panicking when it doesn't find a PHY. Regards, Kristof