From owner-svn-src-all@freebsd.org Mon Jul 31 16:55:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32930DB4213; Mon, 31 Jul 2017 16:55:58 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F381B83F53; Mon, 31 Jul 2017 16:55:57 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VGtuFE036442; Mon, 31 Jul 2017 16:55:56 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VGtuEC036440; Mon, 31 Jul 2017 16:55:56 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201707311655.v6VGtuEC036440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 31 Jul 2017 16:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321799 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 321799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 16:55:58 -0000 Author: scottl Date: Mon Jul 31 16:55:56 2017 New Revision: 321799 URL: https://svnweb.freebsd.org/changeset/base/321799 Log: Fix a logic bug in the split PCI interrupt code that slipped through Reported by: Harry Schmalzbauer Modified: head/sys/dev/mpr/mpr_pci.c head/sys/dev/mps/mps_pci.c Modified: head/sys/dev/mpr/mpr_pci.c ============================================================================== --- head/sys/dev/mpr/mpr_pci.c Mon Jul 31 16:46:16 2017 (r321798) +++ head/sys/dev/mpr/mpr_pci.c Mon Jul 31 16:55:56 2017 (r321799) @@ -260,6 +260,7 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc) dev = sc->mpr_dev; error = 0; + msgs = 0; if ((sc->disable_msix == 0) && ((msgs = pci_msix_count(dev)) >= MPR_MSI_COUNT)) @@ -267,7 +268,7 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc) if ((error != 0) && (sc->disable_msi == 0) && ((msgs = pci_msi_count(dev)) >= MPR_MSI_COUNT)) error = mpr_alloc_msi(sc, MPR_MSI_COUNT); - else + if (error != 0) msgs = 0; sc->msi_msgs = msgs; Modified: head/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Mon Jul 31 16:46:16 2017 (r321798) +++ head/sys/dev/mps/mps_pci.c Mon Jul 31 16:55:56 2017 (r321799) @@ -245,6 +245,7 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) dev = sc->mps_dev; error = 0; + msgs = 0; if ((sc->disable_msix == 0) && ((msgs = pci_msix_count(dev)) >= MPS_MSI_COUNT)) @@ -252,7 +253,7 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) if ((error != 0) && (sc->disable_msi == 0) && ((msgs = pci_msi_count(dev)) >= MPS_MSI_COUNT)) error = mps_alloc_msi(sc, MPS_MSI_COUNT); - else + if (error != 0) msgs = 0; sc->msi_msgs = msgs;