From owner-freebsd-sparc Tue Jan 28 4:44: 5 2003 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 DD89037B401 for ; Tue, 28 Jan 2003 04:44:03 -0800 (PST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 03C5343F85 for ; Tue, 28 Jan 2003 04:44:02 -0800 (PST) (envelope-from tmoestl@gmx.net) Received: (qmail 5945 invoked by uid 0); 28 Jan 2003 12:43:54 -0000 Received: from p508E76CC.dip.t-dialin.net (HELO galatea.local) (80.142.118.204) by mail.gmx.net (mp016-rz3) with SMTP; 28 Jan 2003 12:43:54 -0000 Received: from tmm by galatea.local with local (Exim 4.12 #1) id 18dV83-0000QA-00; Tue, 28 Jan 2003 13:46:15 +0100 Date: Tue, 28 Jan 2003 13:46:15 +0100 From: Thomas Moestl To: Harti Brandt Cc: sparc@freebsd.org Subject: Re: strange IRQ assignments Message-ID: <20030128124615.GB288@crow.dom2ip.de> Mail-Followup-To: Harti Brandt , sparc@freebsd.org References: <20030128132145.T1102@beagle.fokus.gmd.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030128132145.T1102@beagle.fokus.gmd.de> User-Agent: Mutt/1.4i 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 On Tue, 2003/01/28 at 13:24:09 +0100, Harti Brandt wrote: > > Hi, > > why is the IRQ for a network card different when I first load the driver? > > harti > > > 501 [root] (catssrv) /usr/src # ifconfig hatm0 up > hatm0: mem 0x100000-0x1fffff irq 20 at device 2.0 on pci1 > ^^ > > hatm0: ForeRunnerHE 155, Rev. B, S/N 5705534, MAC=00:20:48:57:0f:3e > 502 [root] (catssrv) /usr/src # kldunload if_hatm > hatm0: detached > 503 [root] (catssrv) /usr/src # ifconfig hatm0 up > hatm0: mem 0x100000-0x1fffff irq 2004 at device 2.0 on pci1 > ^^^^ This is because the MD PCI code changes the PCI interrupt numbers by or-ing with a bridge-specific offset upon allocation (usually 0x7c0) to get the real interrupt numbers. The MI PCI code will write the actual resources returned by the allocation into the corresponding resource list, so that the changed number will be displayed next time. This is admittedly ugly, but both numbers will work just the same. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message