svn commit: r353585 - head/sys/dev/pci

John Baldwin jhb at FreeBSD.org
Tue Oct 15 18:58:02 UTC 2019


Author: jhb
Date: Tue Oct 15 18:58:01 2019
New Revision: 353585
URL: https://svnweb.freebsd.org/changeset/base/353585

Log:
  Export pci_attach() and pci_detach().
  
  Reviewed by:	imp
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D21948

Modified:
  head/sys/dev/pci/pci.c
  head/sys/dev/pci/pci_private.h

Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c	Tue Oct 15 18:47:06 2019	(r353584)
+++ head/sys/dev/pci/pci.c	Tue Oct 15 18:58:01 2019	(r353585)
@@ -100,8 +100,6 @@ static void		pci_assign_interrupt(device_t bus, device
 static int		pci_add_map(device_t bus, device_t dev, int reg,
 			    struct resource_list *rl, int force, int prefetch);
 static int		pci_probe(device_t dev);
-static int		pci_attach(device_t dev);
-static int		pci_detach(device_t dev);
 static void		pci_load_vendor_data(void);
 static int		pci_describe_parse_line(char **ptr, int *vendor,
 			    int *device, char **desc);
@@ -4373,7 +4371,7 @@ pci_attach_common(device_t dev)
 	return (0);
 }
 
-static int
+int
 pci_attach(device_t dev)
 {
 	int busno, domain, error;
@@ -4394,7 +4392,7 @@ pci_attach(device_t dev)
 	return (bus_generic_attach(dev));
 }
 
-static int
+int
 pci_detach(device_t dev)
 {
 #ifdef PCI_RES_BUS

Modified: head/sys/dev/pci/pci_private.h
==============================================================================
--- head/sys/dev/pci/pci_private.h	Tue Oct 15 18:47:06 2019	(r353584)
+++ head/sys/dev/pci/pci_private.h	Tue Oct 15 18:58:01 2019	(r353585)
@@ -58,7 +58,9 @@ void		pci_add_resources(device_t bus, device_t dev, in
 		    uint32_t prefetchmask);
 void		pci_add_resources_ea(device_t bus, device_t dev, int alloc_iov);
 struct pci_devinfo *pci_alloc_devinfo_method(device_t dev);
+int		pci_attach(device_t dev);
 int		pci_attach_common(device_t dev);
+int		pci_detach(device_t dev);
 int		pci_rescan_method(device_t dev);
 void		pci_driver_added(device_t dev, driver_t *driver);
 int		pci_ea_is_enabled(device_t dev, int rid);


More information about the svn-src-head mailing list