From owner-cvs-all@FreeBSD.ORG Thu May 24 01:28:53 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1088E16A400; Thu, 24 May 2007 01:28:53 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.freebsd.org (Postfix) with ESMTP id CA38213C468; Thu, 24 May 2007 01:28:52 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.14.0/8.14.0) with ESMTP id l4O1SnNW029201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 May 2007 21:28:49 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id l4O1SLpB019345; Wed, 23 May 2007 21:28:21 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18004.59980.434113.379401@grasshopper.cs.duke.edu> Date: Wed, 23 May 2007 21:28:21 -0400 (EDT) To: John Baldwin In-Reply-To: <200705231547.38987.jhb@freebsd.org> References: <200705231531.l4NFV12H058289@repoman.freebsd.org> <86bqgbs8kt.wl%rpaulo@fnop.net> <18004.36709.708317.994071@grasshopper.cs.duke.edu> <200705231547.38987.jhb@freebsd.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Cc: Rui Paulo , cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/pci pci_pci.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2007 01:28:53 -0000 John Baldwin writes: > On Wednesday 23 May 2007 03:00:30 pm Andrew Gallatin wrote: > > > > Rui Paulo writes: > > > At Wed, 23 May 2007 15:31:01 +0000 (UTC), > > > Andrew Gallatin wrote: > > > > > > > > gallatin 2007-05-23 15:31:01 UTC > > > > > > > > FreeBSD src repository > > > > > > > > Modified files: > > > > sys/dev/pci pci_pci.c > > > > Log: > > > > Fix a typo in pcib_alloc_msi{x} which resulted in the > > > > device's, not the bridge's, softc to be used to check the > > > > PCIB_DISABLE_MSI flag. This resulted in randomly allowing > > > > or denying MSI interrupts based on whatever value the driver > > > > happened to store at sizeof(device_t) bytes into its softc. > > > > > > > > I noticed this when I stopped getting MSI interrupts > > > > after slighly re-arranging mxge's softc yesterday. > > > > > > Wow, I'll have to try this out on msk(4).. > > > > To be clear, pci_alloc_msi() was failing, so MSI was not > > used at all. It didn't affect the actual generation > > of interrupts once MSI is enabled.. > > In some cases it gave you MSI when it shouldn't have, too. I do have at least > one bug report on msk(4) that this might fix, as since it was checking the > wrong softc, it could break on any system, not just ones with the broken > bridges. Indeed. In fact, mxge would always get MSI, even on blacklisted bridges before I changed the layout of the softc.. Then it would never get MSI, and I lost ~1Gb/s when my 10GbE NIC was sharing an IRQ with USB, and I went bug hunting. The temporary lack of MSI made me appreciate all your hard work in adding support for it even more :) Drew