From owner-freebsd-sparc Fri Nov 22 9:13:28 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C48A37B406 for ; Fri, 22 Nov 2002 09:13:26 -0800 (PST) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 602EA43E3B for ; Fri, 22 Nov 2002 09:13:25 -0800 (PST) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (jake@localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.5/8.12.5) with ESMTP id gAMHRZs5033497; Fri, 22 Nov 2002 12:27:36 -0500 (EST) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.5/8.12.5/Submit) id gAMHRZFZ033496; Fri, 22 Nov 2002 12:27:35 -0500 (EST) Date: Fri, 22 Nov 2002 12:27:35 -0500 From: Jake Burkholder To: Oliver Blasnik Cc: "Small, Jim" , freebsd-sparc@FreeBSD.ORG Subject: Re: Fw: [PATCH] HME (Happy Meal Ethernet) and T1/105... Message-ID: <20021122122735.H12431@locore.ca> References: <8AA870658244D4119AF600508BDF0A3612D79095@usahm014.exmi01.exch.eds.com> <012b01c2923f$e9637700$1d0a310a@de.tiscali.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <012b01c2923f$e9637700$1d0a310a@de.tiscali.com>; from oliver.blasnik@de.tiscali.com on Fri, Nov 22, 2002 at 04:57:51PM +0100 Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Apparently, On Fri, Nov 22, 2002 at 04:57:51PM +0100, Oliver Blasnik said words to the effect of; > Hi Jim, > > > Does the PCI qfe card work correctly on UltraSparcs? Right now, it > doesn't > > on OpenBSD--probably because of a bridge issue: > > I have seen such a card somewhere at our lab, I'll check it out asap. > > > >> I think the same sort of PCI-PCI bridge fun happens with the DEC > > >> quad-2114x cards as well, and probably also the Dlink clones, so it > > >> isn't real suprising the Sun qfe-pci is similar. > > This is good to know, as the single PCI HME doesn't work... So, if > the QFE doesn't, too, this probably is a global brigde/IRQ Problem. I have one of these cards which Thomas and I got to work this week, there are some issues with pci interrupt routing. We're in code freeze right now so its taking a little while to get stuff committed though. I think this patch should make it work unless I'm forgetting something else that needed to change. It will break pci on some machines though. Jake Index: pci/ofw_pci.c =================================================================== RCS file: /home/ncvs/src/sys/sparc64/pci/ofw_pci.c,v retrieving revision 1.5 diff -u -r1.5 ofw_pci.c --- pci/ofw_pci.c 7 Nov 2002 16:07:46 -0000 1.5 +++ pci/ofw_pci.c 22 Nov 2002 17:06:32 -0000 @@ -64,7 +64,7 @@ }; #define OPQ_NENT (sizeof(ofw_pci_quirks) / sizeof(ofw_pci_quirks[0])) -static int pci_quirks; +static int pci_quirks = OPQ_NEED_SWIZZLE; #define OFW_PCI_PCIBUS "pci" #define PCI_BUS_MAP_INC 10 @@ -88,7 +88,8 @@ */ bcopy(pintptr, &pintr, sizeof(pintr)); bcopy(pregptr, &preg, sizeof(preg)); - intr = (OFW_PCI_PHYS_HI_DEVICE(preg.phys_hi) + pintr) % 4; + intr = ((OFW_PCI_PHYS_HI_DEVICE(preg.phys_hi) + pintr + 3) % + 4) + 1; *rintr = malloc(sizeof(intr), M_OFWPROP, M_WAITOK); bcopy(&intr, *rintr, sizeof(intr)); *terminate = 0; Index: pci/psycho.c =================================================================== RCS file: /home/ncvs/src/sys/sparc64/pci/psycho.c,v retrieving revision 1.18 diff -u -r1.18 psycho.c --- pci/psycho.c 14 Nov 2002 11:29:16 -0000 1.18 +++ pci/psycho.c 19 Nov 2002 21:06:47 -0000 @@ -673,7 +674,7 @@ /* Hunt thru obio first */ diag = PSYCHO_READ8(sc, PSR_OBIO_INT_DIAG); for (intrmap = PSR_SCSI_INT_MAP, intrclr = PSR_SCSI_INT_CLR; - intrmap <= PSR_FFB1_INT_MAP; intrmap += 8, intrclr += 8, + intrmap < PSR_FFB1_INT_MAP; intrmap += 8, intrclr += 8, diag >>= 2) { im = PSYCHO_READ8(sc, intrmap); if (INTINO(im) == ino) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message