Date: Wed, 04 May 2016 07:16:19 -0700 From: John Baldwin <john@baldwin.cx> To: freebsd-drivers@freebsd.org Subject: Re: Porting FreeBSD driver from 8.4 to 10.3 - PCI_ENABLE_MSI definition missing Message-ID: <8107686.DyeUg95lUZ@ralph.baldwin.cx> In-Reply-To: <BL2PR07MB23692CAC518BDFD07401D581E0970@BL2PR07MB2369.namprd07.prod.outlook.com> References: <BL2PR07MB23692CAC518BDFD07401D581E0970@BL2PR07MB2369.namprd07.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, April 14, 2016 11:40:02 PM Reguna, Lakshmi wrote: > Hi, > > I am attempting to port a freebsd driver from 8.4 to 10.3. I ran into the following compilation error. I am not able to find any file which declares PCI_ENABLE_MSI, PCI_ENABLE_MSIX, PCI_DISABLE_MSI etc. The actual definition of PCI_ENABLE_MSI seems to point to pci_enable_msi_method in pci.c. Any thoughts on what might be missing ? > > DEVMETHOD(pci_enable_msi, pci_enable_msi_method), > > > Build Error: > > @/dev/pci/pcivar.h:459:5: error: implicit declaration of function 'PCI_ENABLE_MSI' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > PCI_ENABLE_MSI(device_get_parent(dev), dev, address, data); > > > @/dev/pci/pcivar.h:465:5: error: implicit declaration of function 'PCI_ENABLE_MSIX' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > PCI_ENABLE_MSIX(device_get_parent(dev), dev, index, address, data); > > @/dev/pci/pcivar.h:471:5: error: implicit declaration of function 'PCI_DISABLE_MSI' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > PCI_DISABLE_MSI(device_get_parent(dev), dev); > ^ > @/dev/pci/pcivar.h:501:13: error: implicit declaration of function 'PCI_MSIX_PBA_BAR' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > return (PCI_MSIX_PBA_BAR(device_get_parent(dev), dev)); > ^ > @/dev/pci/pcivar.h:507:13: error: implicit declaration of function 'PCI_MSIX_TABLE_BAR' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > return (PCI_MSIX_TABLE_BAR(device_get_parent(dev), dev)); > > @/dev/pci/pcivar.h:520:13: error: implicit declaration of function 'PCI_CHILD_ADDED' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > return (PCI_CHILD_ADDED(device_get_parent(dev), dev)); You need to add 'pci_if.h' to your SRCS line in your kernel module Makefile. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8107686.DyeUg95lUZ>