From owner-freebsd-stable@FreeBSD.ORG Tue Sep 13 19:03:14 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2269D106566C for ; Tue, 13 Sep 2011 19:03:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EC9FC8FC16 for ; Tue, 13 Sep 2011 19:03:13 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 85B7D46B2A; Tue, 13 Sep 2011 15:03:13 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 25B8D8A02E; Tue, 13 Sep 2011 15:03:13 -0400 (EDT) From: John Baldwin To: freebsd-stable@freebsd.org Date: Tue, 13 Sep 2011 15:03:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <4DC6A277.4030801@it4pro.pl> <1DB50624F8348F48840F2E2CF6040A9D018D22E697@orsmsx508.amr.corp.intel.com> <4E6F7041.6040602@it4pro.pl> In-Reply-To: <4E6F7041.6040602@it4pro.pl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109131503.12633.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 13 Sep 2011 15:03:13 -0400 (EDT) Cc: Bartosz Stec , "Vogel, Jack" , Jeremy Chadwick Subject: Re: Panic during kernel booting on HP Proliant DL180G6 and latest STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 19:03:14 -0000 On Tuesday, September 13, 2011 11:01:21 am Bartosz Stec wrote: > Hi again list. Here's little update about the issue. > > Yes, there have been a few times when I have seen something like this, and issue when the driver is static and not when modulized. I have never been clear what to make of this. If anyone else here has any thoughts or enlightening ideas I'd appreciate it. > Fresh build, 8.2-STABLE #7: Tue Sep 13 14:25:45, problem is still here, > regardless of igb included in the kernel or loaded as module from > loader.conf, system panic with msix enabled. > > Also if it does not even happen when using the GENERIC config then it would be interesting to see the diff between that and what does cause the panic. > Here it is: Hmm, can you try this patch. I need to come up with a final variant and get it into the tree: Index: if_igb.c =================================================================== --- if_igb.c (.../mirror/FreeBSD/stable/8/sys/dev/e1000) (revision 225344) +++ if_igb.c (.../stable/8/sys/dev/e1000) (revision 225344) @@ -600,16 +619,6 @@ goto err_late; } - /* - ** Configure Interrupts - */ - if ((adapter->msix > 1) && (igb_enable_msix)) - error = igb_allocate_msix(adapter); - else /* MSI or Legacy */ - error = igb_allocate_legacy(adapter); - if (error) - goto err_late; - /* Setup OS specific network interface */ if (igb_setup_interface(dev, adapter) != 0) goto err_late; @@ -653,6 +662,16 @@ adapter->led_dev = led_create(igb_led_func, adapter, device_get_nameunit(dev)); + /* + ** Configure Interrupts + */ + if ((adapter->msix > 1) && (igb_enable_msix)) + error = igb_allocate_msix(adapter); + else /* MSI or Legacy */ + error = igb_allocate_legacy(adapter); + if (error) + goto err_late; + INIT_DEBUGOUT("igb_attach: end"); return (0); @@ -661,10 +680,10 @@ igb_free_transmit_structures(adapter); igb_free_receive_structures(adapter); igb_release_hw_control(adapter); +err_pci: + igb_free_pci_resources(adapter); if (adapter->ifp != NULL) if_free(adapter->ifp); -err_pci: - igb_free_pci_resources(adapter); free(adapter->mta, M_DEVBUF); IGB_CORE_LOCK_DESTROY(adapter); @@ -2272,6 +2291,8 @@ struct igb_queue *que = adapter->queues; int error, rid, vector = 0; + /* Turn off all interrupts */ + E1000_WRITE_REG(&adapter->hw, E1000_IMC, 0xffffffff); for (int i = 0; i < adapter->num_queues; i++, vector++, que++) { rid = vector +1; -- John Baldwin