From owner-svn-src-all@FreeBSD.ORG Sat Mar 3 18:03:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03F40106566B; Sat, 3 Mar 2012 18:03:51 +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 CA2138FC0A; Sat, 3 Mar 2012 18:03:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q23I3oNY093655; Sat, 3 Mar 2012 18:03:50 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q23I3owm093652; Sat, 3 Mar 2012 18:03:50 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203031803.q23I3owm093652@svn.freebsd.org> From: John Baldwin Date: Sat, 3 Mar 2012 18:03:50 +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: r232470 - in head/sys/dev: oce virtio/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 03 Mar 2012 18:03:51 -0000 Author: jhb Date: Sat Mar 3 18:03:50 2012 New Revision: 232470 URL: http://svn.freebsd.org/changeset/base/232470 Log: Use pci_find_cap() instead of pci_find_extcap() to locate PCI find capabilities as the latter API is deprecated for this purpose. MFC after: 2 weeks Modified: head/sys/dev/oce/oce_hw.c head/sys/dev/virtio/pci/virtio_pci.c Modified: head/sys/dev/oce/oce_hw.c ============================================================================== --- head/sys/dev/oce/oce_hw.c Sat Mar 3 17:52:19 2012 (r232469) +++ head/sys/dev/oce/oce_hw.c Sat Mar 3 18:03:50 2012 (r232470) @@ -203,12 +203,12 @@ void oce_get_pci_capabilities(POCE_SOFTC { uint32_t val; - if (pci_find_extcap(sc->dev, PCIY_PCIX, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_PCIX, &val) == 0) { if (val != 0) sc->flags |= OCE_FLAGS_PCIX; } - if (pci_find_extcap(sc->dev, PCIY_EXPRESS, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_EXPRESS, &val) == 0) { if (val != 0) { uint16_t link_status = pci_read_config(sc->dev, val + 0x12, 2); @@ -219,12 +219,12 @@ void oce_get_pci_capabilities(POCE_SOFTC } } - if (pci_find_extcap(sc->dev, PCIY_MSI, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_MSI, &val) == 0) { if (val != 0) sc->flags |= OCE_FLAGS_MSI_CAPABLE; } - if (pci_find_extcap(sc->dev, PCIY_MSIX, &val) == 0) { + if (pci_find_cap(sc->dev, PCIY_MSIX, &val) == 0) { if (val != 0) { val = pci_msix_count(sc->dev); sc->flags |= OCE_FLAGS_MSIX_CAPABLE; Modified: head/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Sat Mar 3 17:52:19 2012 (r232469) +++ head/sys/dev/virtio/pci/virtio_pci.c Sat Mar 3 18:03:50 2012 (r232470) @@ -251,10 +251,10 @@ vtpci_attach(device_t dev) return (ENXIO); } - if (pci_find_extcap(dev, PCIY_MSI, NULL) != 0) + if (pci_find_cap(dev, PCIY_MSI, NULL) != 0) sc->vtpci_flags |= VIRTIO_PCI_FLAG_NO_MSI; - if (pci_find_extcap(dev, PCIY_MSIX, NULL) == 0) { + if (pci_find_cap(dev, PCIY_MSIX, NULL) == 0) { rid = PCIR_BAR(1); sc->vtpci_msix_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);