From owner-freebsd-current@FreeBSD.ORG Wed Mar 11 00:07:14 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD05B106564A; Wed, 11 Mar 2009 00:07:14 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 51E938FC16; Wed, 11 Mar 2009 00:07:13 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n2B079El034928; Tue, 10 Mar 2009 18:07:09 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <49B700AD.7010500@samsco.org> Date: Tue, 10 Mar 2009 18:07:09 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Robert Noland References: <200903101425.28608.jhb@freebsd.org> <200903101637.31039.jhb@freebsd.org> <1236728841.2091.5.camel@balrog.2hip.net> In-Reply-To: <1236728841.2091.5.camel@balrog.2hip.net> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-current@freebsd.org, "Arno J. Klaassen" Subject: Re: msi broken? 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: Wed, 11 Mar 2009 00:07:15 -0000 Robert Noland wrote: > On Wed, 2009-03-11 at 00:36 +0100, Arno J. Klaassen wrote: >> John Baldwin writes: >> >>> On Tuesday 10 March 2009 3:00:00 pm Arno J. Klaassen wrote: >>>> John Baldwin writes: >>>> >>>>> On Tuesday 10 March 2009 10:08:59 am Arno J. Klaassen wrote: >>>>>> Hello, >>>>>> >>>>>> when upgrading this morning from a March 1 -current, if_bge >>>>>> stopped working (and irq256: bge0 not showing up in >>>>>> vmstat -i ). Setting hw.pci.enable_msi="0" makes it work again. >>>>> Can you get a verbose dmesg (boot -v) with MSI enabled? >>> Ok, so you are getting MSI interrupts assigned and routed ok. Can you try >>> disabling the code that sets the INTx_MASK flag in the PCI command register >>> in sys/dev/pci/pci.c:pci_setup_intr()? >> grr : "rid" sure is 1 for the if_bge interrupt. Please tell me which >> lines of code set the INTx_MASK flag. Thanx, more tomorrow. > > if rid is 0, the chip should be using INTx. if rid > 0 then it should > be using MSI. > > > } > mte->mte_handlers++; > } > #if 0 /* Comment this out/* > /* Make sure that INTx is disabled if we are using MSI/MSIX */ > pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); > #endif > bad: > if (error) { > (void)bus_generic_teardown_intr(dev, child, irq, > cookie); > return (error); > > robert. > If this turns out to help this particular gentleman, then I'd like to suggest a further test of having the bge driver explicitly reset the the INTxDIS bit after calling bus_setup_intr(). If that works, then I strongly suggest that we treat this as a localized quirk that drivers will need to manage for themselves, and not something that the PCI layer should try to control. It might be possible to set up some sort of hint system for drivers to programatically tell the PCI layer to treat this bit special for a particular device instance. What I don't want to see is the PCI layer growing yet another hidden quirk table of PCI IDs. This kind of quirk knowledge belongs in the driver. Scott