From owner-svn-src-head@FreeBSD.ORG Mon Jun 22 20:08:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39053106564A; Mon, 22 Jun 2009 20:08:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 276AE8FC1B; Mon, 22 Jun 2009 20:08:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5MK87Xh050930; Mon, 22 Jun 2009 20:08:07 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5MK87qh050928; Mon, 22 Jun 2009 20:08:07 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906222008.n5MK87qh050928@svn.freebsd.org> From: John Baldwin Date: Mon, 22 Jun 2009 20:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194644 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 20:08:07 -0000 Author: jhb Date: Mon Jun 22 20:08:06 2009 New Revision: 194644 URL: http://svn.freebsd.org/changeset/base/194644 Log: Enable MSI in the MSI capability registers any time that the first message in an MSI group is enabled, not just if the address/data pair are not initialized. Reported by: rnoland MFC after: 1 week Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Mon Jun 22 19:35:39 2009 (r194643) +++ head/sys/dev/pci/pci.c Mon Jun 22 20:08:06 2009 (r194644) @@ -2883,8 +2883,10 @@ pci_setup_intr(device_t dev, device_t ch goto bad; dinfo->cfg.msi.msi_addr = addr; dinfo->cfg.msi.msi_data = data; - pci_enable_msi(child, addr, data); } + if (dinfo->cfg.msi.msi_handlers == 0) + pci_enable_msi(child, dinfo->cfg.msi.msi_addr, + dinfo->cfg.msi.msi_data); dinfo->cfg.msi.msi_handlers++; } else { KASSERT(dinfo->cfg.msix.msix_alloc > 0,