From owner-freebsd-current@FreeBSD.ORG Tue Jul 11 19:44:46 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FCC816A4DA for ; Tue, 11 Jul 2006 19:44:46 +0000 (UTC) (envelope-from goto@snowy.to) Received: from mail.snowy.to (mail.snowy.to [219.166.73.149]) by mx1.FreeBSD.org (Postfix) with SMTP id C5C6C43D67 for ; Tue, 11 Jul 2006 19:44:43 +0000 (GMT) (envelope-from goto@snowy.to) Received: (qmail 69408 invoked from network); 12 Jul 2006 04:44:40 +0900 Received: from unknown (HELO snowy.to) (0.0.0.0) by 0.0.0.0 with SMTP; 12 Jul 2006 04:44:40 +0900 Date: Wed, 12 Jul 2006 04:44:39 +0900 (JST) Message-Id: <20060712.044439.74753790.goto@snowy.to> To: jhb@freebsd.org From: Yoshikazu GOTO In-Reply-To: <200607111011.52520.jhb@freebsd.org> References: <20060711053000.94DB016A4E1@hub.freebsd.org> <200607111011.52520.jhb@freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: wpaul@freebsd.org, freebsd-current@freebsd.org Subject: Re: if_re does not work X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2006 19:44:46 -0000 Hi John, In Message-ID: <200607111011.52520.jhb@freebsd.org> John Baldwin wrote : > On Tuesday 11 July 2006 01:30, Bill Paul wrote: > > > Hi all, > > > > > > I have two CardBus card with RealTek 8169SB as follows: > > > > > > NETGEAR GA511 > > > Buffalo LPC-CB-CLGT > > > > > > But they act up from revision 1.68 of if_re.c. > > > > This has nothing to do with the re(4) driver. The problem is that > > the cardbus code is not allocating an interrupt resource for the device: > > > > > It is a log of NETGEAR GA511 inserting to ThinkPad X40. > > > > It sure is. > > > > > Jul 10 22:54:33 x40 kernel: re0: Gigabit Ethernet> port 0x3000-0x30ff mem 0xd0211000-0xd02111ff at device 0.0 > on cardbus0 > > > > Note that there is no 'irq' mentioned anywhere in this line, which is why > > you get this error: > > > > > Jul 10 22:54:33 x40 kernel: re0: couldn't set up irq > > > > If you really think this is related to the driver, prove it: back out > > the changes (while keeping the rest of your kernel the same) and see if > > it works again. I don't think it will. > > In theory the bus_alloc_resource(.., SYS_RES_IRQ, ...) should route an > interrupt for the re0 device but it won't show up in the probe line in that > case since the probe line is printed before re_attach() is called. In fact, > in the failing case, it wasn't bus_alloc_resource() that failed, but > bus_setup_intr(). This is most likely not an re0 issue however. > > goto-san, can you add printf's to i386/i386/intr_machdep.c:intr_add_handler() > and kern/kern_intr.c:intr_event_add_handler() to see which of the EINVAL > cases is being triggered? I added printf() to 2 functions (one in intr_add_handler() and two in intr_event_add_handler()) and re-build my kernel and reboot my ThinkPad X40. But I could not get any printf's messages. And I have a question. Why INTR_FAST was added in re_attach()? When I deleted it and re-build if_re modules, my card was attached. But I got another error messages and panic if interface is up. (mutex re0 not owned at...) Goto. -=-=-=- // Yoshikazu GOTO // E-mail: goto@snowy.to -=-=-=- \e