From owner-freebsd-sparc64@FreeBSD.ORG Thu Oct 13 10:15:13 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53BB716A41F for ; Thu, 13 Oct 2005 10:15:13 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B84043D48 for ; Thu, 13 Oct 2005 10:15:12 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j9DAFA4K065812; Thu, 13 Oct 2005 12:15:10 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j9DAF525065811; Thu, 13 Oct 2005 12:15:05 +0200 (CEST) (envelope-from marius) Date: Thu, 13 Oct 2005 12:15:05 +0200 From: Marius Strobl To: "Gallagher, James" Message-ID: <20051013121505.A64371@newtrinity.zeist.de> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="J/dobhs11T7y2rNN" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from james.gallagher@misys.com on Thu, Oct 13, 2005 at 04:26:29PM +0800 X-AntiVirus-modified: yes X-AntiVirus: checked by AntiVir Milter (version: 1.1.1-9; AVE: 6.32.0.8; VDF: 6.32.0.79; host: newtrinity.zeist.de) Cc: freebsd-sparc64@freebsd.org Subject: Re: hme problems X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2005 10:15:13 -0000 --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 13, 2005 at 04:26:29PM +0800, Gallagher, James wrote: > > > > > -----Original Message----- > > From: owner-freebsd-sparc64@freebsd.org > > [mailto:owner-freebsd-sparc64@freebsd.org] On Behalf Of Ppop Door > > Sent: Thursday, October 13, 2005 16:06 PM > > To: freebsd-sparc64@freebsd.org > > Subject: hme problems > > > > > > Greetings, > > > > We have an E250, trying to put 5.4R on it, and we get > > this: > > hme0: Ethernet address: 08:00:20:e7:16:88 > > hme0: couldn't establish interrupt > > > > Consequently, no hme0 device is available later on for ifconfig. > > > > Card and box were working fine as Solaris. > > > > Any help, solutions? > > > > > Hi, > > No solution that I'm aware of - I asked this question also awhile back > (http://lists.freebsd.org/pipermail/freebsd-sparc64/2005-April/002973.html) > also as I encountered the problem going from 5.3 to 5.4. I should have a > look at it again and try to report the issue properly (once I dig around in > the Handbook and figure out what that way is!) That's an old bug; the second NS16550 (used as mouse port) on E250 erroneously gets the IRQ of the on-board HME assigned. Later on this became fatal when uart(4) was enabled which began trying to use that NS16550. The attached patch (applies to HEAD and RELENG_6 but it should also be fine to just grab uart_bus_ebus.c from HEAD, apply the patch and stick it into a FreeBSD 5 system) should work around this by causing uart(4) to not attach to the NS16550 in question in favour of a working on-board HME. AFAICT the underlying problem is caused by a IRQ routing problem due to interpreting the information present in OFW wrong. This however can happen at a couple of layers (the exact code path is also model dependend) and I didn't manage to spot faulty code. Fixing it would require me to have at least remote access to an E250 which so far I didn't manage to get. Also currently I'm short on spare time... Marius -- This mail was scanned by AntiVir Milter. This product is licensed for non-commercial use. See www.antivir.de for details. --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="uart_bus_ebus.c.diff" Index: uart_bus_ebus.c =================================================================== RCS file: /mnt/futile/usr/data/bsd/cvs/fbsd/src/sys/dev/uart/uart_bus_ebus.c,v retrieving revision 1.7 diff -u -r1.7 uart_bus_ebus.c --- uart_bus_ebus.c 7 Aug 2005 13:37:25 -0000 1.7 +++ uart_bus_ebus.c 13 Oct 2005 09:47:05 -0000 @@ -93,6 +93,21 @@ device_disable(dev); return (ENXIO); } + /* + * XXX Hack + * On E250 the IRQ of the on-board HME gets erroneously + * also assigned to the second NS16550 due to interrupt + * routing problems at some layer. As uart(4) uses a + * INTR_FAST handler while hme(4) doesn't the IRQ can't + * be actually "shared" causing hme(4) to not attach to + * the on-board HME. Prefer the on-board HME at the + * expense of the mouse port for now. + */ + if (!strcmp(sparc64_model, "SUNW,Ultra-250") && + device_get_unit(dev) % 2 == 1) { + device_disable(dev); + return (ENXIO); + } sc->sc_class = &uart_ns8250_class; return (uart_bus_probe(dev, 0, 0, 0, 0)); } --J/dobhs11T7y2rNN--